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:
parent
6dfa1d83fd
commit
3132e11599
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user