Mercurial > emacs
changeset 13256:d9c469af1ee0
(dabbrev-expand): When no more expansions,
Put back the original abbrev with its original case pattern.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 20 Oct 1995 20:30:22 +0000 |
parents | 9e94f911f00c |
children | 679fc0917c11 |
files | lisp/dabbrev.el |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dabbrev.el Fri Oct 20 15:22:56 1995 +0000 +++ b/lisp/dabbrev.el Fri Oct 20 20:30:22 1995 +0000 @@ -490,8 +490,10 @@ (if old (save-excursion (setq buffer-undo-list (cons orig-point buffer-undo-list)) - (search-backward (substring old (length abbrev))) - (delete-region (match-beginning 0) (match-end 0)))) + ;; Put back the original abbrev with its original case pattern. + (search-backward old) + (insert abbrev) + (delete-region (point) (+ (point) (length old))))) (error "No%s dynamic expansion for `%s' found" (if old " further" "") abbrev)) (t