From nikodemus at random-state.net Tue May 19 09:33:10 2009 From: nikodemus at random-state.net (Nikodemus Siivola) Date: Tue, 19 May 2009 12:33:10 +0300 Subject: [climacs-devel] M-q issues: undo doesn't work after, DREI-BUFFER:OFFSET-AFTER-END during Message-ID: <633d72b0905190233k3998b2f3qaa4d619bc5e40251@mail.gmail.com> in foo.lisp: (defun foo () "Line one. Line two." (bar)) hit M-q on the start of `Line two.' in the docstring. Result is (defun foo () "Line one. Line Two." (bar)) C-_ move the `Line two.' part back and forth, but does not restore the original before running out of undo. Add following forms in the the same file after FOO, and try the reindent again: Climacs lands in the debugger with OFFSET-AFTER-END error. (defmacro qx-macro (type n) `(let ((n ,n)) (declare (,type n)) (decf n))) (defun qx (a) (declare (optimize speed)) (qx-macro fixnum a)) Cheers, -- Nikodemus From strandh at labri.fr Sun May 31 06:21:43 2009 From: strandh at labri.fr (Robert Strandh) Date: Sun, 31 May 2009 08:21:43 +0200 Subject: [climacs-devel] M-q issues: undo doesn't work after, DREI-BUFFER:OFFSET-AFTER-END during In-Reply-To: <633d72b0905190233k3998b2f3qaa4d619bc5e40251@mail.gmail.com> References: <633d72b0905190233k3998b2f3qaa4d619bc5e40251@mail.gmail.com> Message-ID: <18978.8695.754509.722768@serveur5.labri.fr> Hello, Nikodemus Siivola writes: > in foo.lisp: > > (defun foo () > "Line one. > > Line two." > (bar)) > > hit M-q on the start of `Line two.' in the docstring. Result is > > (defun foo () > "Line one. Line Two." > (bar)) > > C-_ move the `Line two.' part back and forth, but does not restore the > original before running out of undo. Thanks for reporting this problem. This appears to be because (setf buffer-object) doesn't create an undo record. I suspect the thing to do would be to create a new kind of output record, CHANGE-RECORD (in addition to INSERT-RECORD and DELETE-RECORD), to add all the proper methods for this new type of record, and to add a :before method on (SETF BUFFER-OBJECT) that creates such an output record. -- Robert Strandh --------------------------------------------------------------------- Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp. --------------------------------------------------------------------- From strandh at labri.fr Sun May 31 07:50:27 2009 From: strandh at labri.fr (Robert Strandh) Date: Sun, 31 May 2009 09:50:27 +0200 Subject: [climacs-devel] M-q issues: undo doesn't work after, DREI-BUFFER:OFFSET-AFTER-END during In-Reply-To: <633d72b0905190233k3998b2f3qaa4d619bc5e40251@mail.gmail.com> References: <633d72b0905190233k3998b2f3qaa4d619bc5e40251@mail.gmail.com> Message-ID: <18978.14019.72839.141821@serveur5.labri.fr> Nikodemus Siivola writes: > Add following forms in the the same file after FOO, and try the > reindent again: Climacs lands in the debugger with OFFSET-AFTER-END > error. Indeed. This seems to be an unrelated problem. I don't know (yet) what causes it. Thanks for reporting it. -- Robert Strandh --------------------------------------------------------------------- Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp. ---------------------------------------------------------------------