Article View: gnu.emacs.vm.bug
Article #9649Re: strange vm redisplay glitch
From: Kayvan Sylvan
Date: Mon, 15 Apr 1991 07:52
Date: Mon, 15 Apr 1991 07:52
117 lines
3904 bytes
3904 bytes
There was a source fix to Emacs just recently that fixed this.
I include the original message below.
---Kayvan
Message-Id: <JIMB.91Mar24204206@pogo.gnu.ai.mit.edu>
Distribution: gnu
Organization: I see no organization here.
From: apple!pogo.gnu.ai.mit.edu!jimb (Jim Blandy)
Sender: apple!uunet.uu.net!info-vm-request
To: info-vm@uunet.UU.NET
Subject: Emacs bug tickled by VM, with fix
Date: 25 Mar 91 01:42:06 GMT
If you vm-reply-include-text to a message near the end of a folder,
and then use C-x b to switch back to the mail buffer, Emacs often
displays the wrong section of the buffer. This is caused by a bug in
save-restriction - when clipping point to lie within the reinstated
restriction, it assumes it's operating on the current buffer.
Blech.
This bug exists in the 18.57 distribution, but has been fixed in the
FSF's working sources, so it will be distributed the next time around.
Tue Feb 26 12:50:45 1991 Jim Blandy (jimb at spiff.ai.mit.edu)
* editfns.c (in_accessible_range): Deleted - insufficently
general.
(clip_to_bounds): New function, much like in_accessible_range,
except that the upper and lower bounds are arguments.
(goto_char, save_restriction_restore): Rewritten to use
clip_to_bounds instead of in_accessible_range.
*** editfns.c.~1~ Tue Jan 8 12:28:22 1991
--- editfns.c Wed Mar 20 11:10:20 1991
***************
*** 158,172 ****
return buildmark (point);
}
! int
! in_accessible_range (loc)
! int loc;
! {
! if (loc < BEGV)
! return BEGV;
! if (loc > ZV)
! return ZV;
! return loc;
}
DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ",
--- 158,173 ----
return buildmark (point);
}
! static int
! clip_to_bounds (lower, num, upper)
! int lower, num, upper;
! {
! if (num < lower)
! return lower;
! else if (num > upper)
! return upper;
! else
! return num;
}
DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ",
***************
*** 177,184 ****
{
register int charno;
CHECK_NUMBER_COERCE_MARKER (n, 0);
! charno = XINT (n);
! SET_PT (in_accessible_range (charno));
return n;
}
--- 178,184 ----
{
register int charno;
CHECK_NUMBER_COERCE_MARKER (n, 0);
! SET_PT (clip_to_bounds (BEGV, XINT (n), ZV));
return n;
}
***************
*** 825,831 ****
clip_changed = 1;
/* If point is outside the new visible range, move it inside. */
! SET_BUF_PT (buf, in_accessible_range (BUF_PT (buf)));
return Qnil;
}
--- 825,832 ----
clip_changed = 1;
/* If point is outside the new visible range, move it inside. */
! SET_BUF_PT (buf,
! clip_to_bounds (BUF_BEGV (buf), BUF_PT (buf), BUF_ZV (buf)));
return Qnil;
}
--
-Jim Blandy
jimb@ai.mit.edu
--
| Kayvan Sylvan Consulting/Training 879 Lewiston Drive |
| Sylvan Associates Unix and Mac Programming San Jose, CA 95136 |
| "Think Globally, GNU tools, GUIs, Databases (408) 978-1407 |
| Act Locally." Unify User's Group Librarian apple!satyr!kayvan |
Technical Details
Message-ID:
<KAYVAN.91Apr15005251@satyr.UUCP>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!lll-winken!sun-barr!apple!satyr!satyr!kayvanReferences:
<9104140426.AA19494@thalidomide> <9104150303.AA16449@rodan.UU.NET>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,2baae27b626ee36d X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1991-04-15 01:44:45 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!lll-winken!sun-barr!apple!satyr!satyr!kayvan From: kayvan@satyr.UUCP (Kayvan Sylvan) Newsgroups: gnu.emacs.vm.bug Subject: Re: strange vm redisplay glitch Message-ID: <KAYVAN.91Apr15005251@satyr.UUCP> Date: 15 Apr 91 07:52:51 GMT References: <9104140426.AA19494@thalidomide> <9104150303.AA16449@rodan.UU.NET> Sender: kayvan@satyr.UUCP (Kayvan Sylvan) Organization: Sylvan Associates Lines: 117 In-Reply-To: kyle@uunet.UU.NET's message of 15 Apr 91 03:03:08 GMT