all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* last-abbrev-location
@ 2004-02-24  4:37 Luc Teirlinck
  2004-02-24 14:19 ` last-abbrev-location Luc Teirlinck
  0 siblings, 1 reply; 4+ messages in thread
From: Luc Teirlinck @ 2004-02-24  4:37 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-26  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-24  4:37 last-abbrev-location Luc Teirlinck
2004-02-24 14:19 ` last-abbrev-location Luc Teirlinck
2004-02-25 13:23   ` last-abbrev-location Richard Stallman
2004-02-26  2:17     ` last-abbrev-location Luc Teirlinck

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.