emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 5aba61e 1/2: Use the correct dabbrev expansion


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] emacs-25 5aba61e 1/2: Use the correct dabbrev expansion
Date: Wed, 02 Mar 2016 17:29:28 +0000

branch: emacs-25
commit 5aba61ea21069f38896845ece2f5b4850535698c
Author: Alan Third <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Use the correct dabbrev expansion
    
    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.
---
 lisp/dabbrev.el |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 3557041..d9f36b1 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -546,8 +546,8 @@ See also `dabbrev-abbrev-char-regexp' and 
\\[dabbrev-completion]."
                (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)
@@ -902,7 +902,9 @@ to record whether we upcased the expansion, downcased it, 
or did neither."
     ;; 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)
 
 
 ;;;----------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]