Article View: gnu.emacs.bug
Article #1886undo destroys circluar queue
From: enami tsugutomo
Date: Fri, 23 Feb 1990 10:21
Date: Fri, 23 Feb 1990 10:21
46 lines
1592 bytes
1592 bytes
Hello,
In GNU Emacs 18.55.0 of Fri Feb 23 1990 on chihaya (berkeley-unix)
Undo sometimes destroys own circluar queue and leaves garbage in
buffer.
For example, let's think following 2 functions (they are just a sample):
(defun undo-bug-1 ()
""
(interactive)
(insert (make-string 4100 ?a)) )
(defun undo-bug-2 ()
""
(interactive)
(delete-region (point-min) (point-max))
(insert (make-string 4100 ?b)) )
First make an empty buffer and do M-x undo-bug-1 and M-x undo-bug-2.
Then, do C-_ (undo). It seems undone correctly, but you probably
find garbage at beginning of buffer.
I think there is several way to fix this. For example, following
patch will fix this problem with telling us an error.
enami.
*** /tmp/,RCSt1022610 Fri Feb 23 19:05:29 1990
--- undo.c Fri Feb 23 18:55:06 1990
***************
*** 328,333 ****
--- 328,337 ----
chars = LastUndoneC;
while (--n >= 0)
{
+ #if defined(CHECK_NCharsLeft)
+ if (NCharsLeft < 0)
+ error ("Next undo information may be lost");
+ #endif
if (!i)
i = u->num_undorecs;
i--;
Technical Details
Message-ID:
<9002231022.AA22636@chihaya.ptgd.sony.co.jp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ptgd.sony.co.jp!enamiShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ptgd.sony.co.jp!enami From: enami@ptgd.sony.co.jp (enami tsugutomo) Newsgroups: gnu.emacs.bug Subject: undo destroys circluar queue Message-ID: <9002231022.AA22636@chihaya.ptgd.sony.co.jp> Date: 23 Feb 90 10:21:58 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: enami%ptgd.sony.co.jp@uunet.uu.net Distribution: gnu Organization: GNUs Not Usenet Lines: 46