emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

last-abbrev-location


From: Luc Teirlinck
Subject: last-abbrev-location
Date: Mon, 23 Feb 2004 22:37:53 -0600 (CST)

Unlike `abbrev-start-location', which is a marker,
`last-abbrev-location' is just a buffer position, an integer.  Is
there a reason for this?  It seems to cause problems.

Do `emacs -q'.  Define an abbrev `exp' expanding to `expansion'.

In the *scratch* buffer type exp in the following position (no
trailing whitespace):

;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

exp

Then expand exp.  Go to the previous line and type 12345:

;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
12345
expansion


M-x unexpand-abbrev results in:

;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
1expnsion

This does not seem right and I have the impression that if
`last-abbrev-location' were a marker instead of an integer, one would
get:

;; This buffer is for notes you don't want to save, and for Lisp
   evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
12345
exp

It would seem from the docstring of `unexpand-abbrev' that it is still
supposed to work orrectly after some minor editing of the type
described above:

Undo the expansion of the last abbrev that expanded.
This differs from ordinary undo in that other editing done since then
is not undone.

Sincerely,

Luc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]