# HG changeset patch # User Richard M. Stallman # Date 814221022 0 # Node ID d9c469af1ee01fcb48ed5ee8dce63970b6926c3e # Parent 9e94f911f00c3f8f1647d7f2588cd8ba28ddbed2 (dabbrev-expand): When no more expansions, Put back the original abbrev with its original case pattern. diff -r 9e94f911f00c -r d9c469af1ee0 lisp/dabbrev.el --- 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