emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog mail/mailabbrev.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog mail/mailabbrev.el
Date: Wed, 25 Nov 2009 06:02:07 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/11/25 06:02:07

Modified files:
        lisp           : ChangeLog 
        lisp/mail      : mailabbrev.el 

Log message:
        (mail-abbrev-complete-alias): Use completion-in-region.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16728&r2=1.16729
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/mailabbrev.el?cvsroot=emacs&r1=1.95&r2=1.96

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16728
retrieving revision 1.16729
diff -u -b -r1.16728 -r1.16729
--- ChangeLog   25 Nov 2009 05:31:05 -0000      1.16728
+++ ChangeLog   25 Nov 2009 06:02:01 -0000      1.16729
@@ -1,5 +1,8 @@
 2009-11-25  Stefan Monnier  <address@hidden>
 
+       * mail/mailabbrev.el (mail-abbrev-complete-alias):
+       Use completion-in-region.
+
        * dabbrev.el (dabbrev--minibuffer-origin): Use 
minibuffer-selected-window.
        (dabbrev-completion): Use completion-in-region.
        (dabbrev--abbrev-at-point): Simplify regexp.

Index: mail/mailabbrev.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/mailabbrev.el,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- mail/mailabbrev.el  12 Mar 2009 06:23:43 -0000      1.95
+++ mail/mailabbrev.el  25 Nov 2009 06:02:06 -0000      1.96
@@ -569,27 +569,12 @@
   ;; Based on lisp.el:lisp-complete-symbol
   (interactive)
   (mail-abbrev-make-syntax-table)
-  (let* ((end (point))
+  (let ((end (point))
         (beg (with-syntax-table mail-abbrev-syntax-table
                 (save-excursion
                   (backward-word 1)
-                  (point))))
-         (alias (buffer-substring beg end))
-        (completion (try-completion alias mail-abbrevs)))
-    (cond ((eq completion t)
-          (message "%s" alias))        ; confirm
-         ((null completion)
-          (error "[Can't complete \"%s\"]" alias)) ; (message ...) (ding)
-         ((not (string= completion alias))
-          (delete-region beg end)
-          (insert completion))
-         (t (with-output-to-temp-buffer "*Completions*"
-              (display-completion-list
-               (prog2
-                   (message "Making completion list...")
-                   (all-completions alias mail-abbrevs)
-                 (message "Making completion list...done"))
-               alias))))))
+                 (point)))))
+    (completion-in-region beg end mail-abbrevs)))
 
 (defun mail-abbrev-next-line (&optional arg)
   "Expand a mail abbrev before point, then move vertically down ARG lines.




reply via email to

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