[climacs-devel] M-q issues: undo doesn't work after, DREI-BUFFER:OFFSET-AFTER-END during

Robert Strandh strandh at labri.fr
Sun May 31 06:21:43 UTC 2009


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.
---------------------------------------------------------------------




More information about the climacs-devel mailing list