Commit 3132e115 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(dabbrev-expand): When no more expansions,

Put back the original abbrev with its original case pattern.
parent 6dfa1d83
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment