1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

(dabbrev-expand): When no more expansions,

Put back the original abbrev with its original case pattern.
This commit is contained in:
Richard M. Stallman 1995-10-20 20:30:22 +00:00
parent 6dfa1d83fd
commit 3132e11599

View File

@ -490,8 +490,10 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
(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