Mercurial > emacs
changeset 95571:49efb79bb63b
(unexpand-abbrev): Better preserve markers.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 05 Jun 2008 05:06:58 +0000 |
parents | b18ab5e0d568 |
children | 5b297c639631 |
files | lisp/ChangeLog lisp/abbrev.el |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jun 05 04:56:02 2008 +0000 +++ b/lisp/ChangeLog Thu Jun 05 05:06:58 2008 +0000 @@ -1,3 +1,7 @@ +2008-06-05 Stefan Monnier <monnier@iro.umontreal.ca> + + * abbrev.el (unexpand-abbrev): Better preserve markers. + 2008-06-05 Glenn Morris <rgm@gnu.org> * emacs-lisp/autoload.el (autoload-rubric): New function,
--- a/lisp/abbrev.el Thu Jun 05 04:56:02 2008 +0000 +++ b/lisp/abbrev.el Thu Jun 05 05:06:58 2008 +0000 @@ -824,10 +824,11 @@ ;; to do the expansion. (let ((val (symbol-value last-abbrev))) (unless (stringp val) - (error "value of abbrev-symbol must be a string")) - (delete-region (point) (+ (point) (length val))) + (error "Value of abbrev-symbol must be a string")) ;; Don't inherit properties here; just copy from old contents. (insert last-abbrev-text) + ;; Delete after inserting, to better preserve markers. + (delete-region (point) (+ (point) (length val))) (setq last-abbrev-text nil)))))) (defun abbrev--write (sym)