lisp/dabbrev.el (dabbrev--substitute-expansion): Return EXPANSION after
any processing.
lisp/dabbrev.el (dabbrev-expand): Set EXPANSION to the return value of
DABBREV--SUBSTITUTE-EXPANSION.
test/automated/dabbrev-tests.el (dabbrev-expand-test): Test for bug#1948.
(copy-marker dabbrev--last-expansion-location)))
;; Success: stick it in and return.
(setq buffer-undo-list (cons orig-point buffer-undo-list))
- (dabbrev--substitute-expansion old abbrev expansion
- record-case-pattern)
+ (setq expansion (dabbrev--substitute-expansion old abbrev expansion
+ record-case-pattern))
;; Save state for re-expand.
(setq dabbrev--last-expansion expansion)
;; and (2) the replacement itself is all lower case.
(dabbrev--safe-replace-match expansion
(not use-case-replace)
- t)))
+ t))
+ ;; Return the expansion actually used.
+ expansion)
;;;----------------------------------------------------------------