emacs-commit
[Top][All Lists]
Advanced

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

[Emacs-commit] emacs/lisp/mh-e mh-comp.el ChangeLog


From: Bill Wohler
Subject: [Emacs-commit] emacs/lisp/mh-e mh-comp.el ChangeLog
Date: Mon, 17 Oct 2005 02:33:32 -0400

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         
Changes by:     Bill Wohler <address@hidden>    05/10/17 06:33:32

Modified files:
        lisp/mh-e      : mh-comp.el ChangeLog 

Log message:
        (mh-display-completion-list-compat): New macro which calls
        `display-completion-list' correctly in older environments. Versions of
        Emacs prior to version 22 lacked a COMMON-SUBSTRING argument.
        (mh-complete-word): Use it.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/mh-e/mh-comp.el.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/mh-e/ChangeLog.diff?tr1=1.42&tr2=1.43&r1=text&r2=text

Patches:
Index: emacs/lisp/mh-e/ChangeLog
diff -u emacs/lisp/mh-e/ChangeLog:1.42 emacs/lisp/mh-e/ChangeLog:1.43
--- emacs/lisp/mh-e/ChangeLog:1.42      Mon Oct 17 05:52:53 2005
+++ emacs/lisp/mh-e/ChangeLog   Mon Oct 17 06:33:31 2005
@@ -1,5 +1,11 @@
 2005-10-16  Bill Wohler  <address@hidden>
 
+       * mh-comp.el (mh-display-completion-list-compat): New macro which
+       calls `display-completion-list' correctly in older environments.
+       Versions of Emacs prior to version 22 lacked a COMMON-SUBSTRING
+       argument.
+       (mh-complete-word): Use it.
+
        * mh-init.el (mh-image-load-path): Use locate-library to find
        MH-E. This simplified the code a lot. Flattened out nested
        statements even more.
Index: emacs/lisp/mh-e/mh-comp.el
diff -u emacs/lisp/mh-e/mh-comp.el:1.16 emacs/lisp/mh-e/mh-comp.el:1.17
--- emacs/lisp/mh-e/mh-comp.el:1.16     Sun Oct 16 09:31:45 2005
+++ emacs/lisp/mh-e/mh-comp.el  Mon Oct 17 06:33:31 2005
@@ -1633,6 +1633,16 @@
 
 (mh-do-in-xemacs (defvar mail-abbrevs))
 
+(defmacro mh-display-completion-list-compat (word choices)
+  "Completes WORD from CHOICES using `display-completion-list'.
+Calls `display-completion-list' correctly in older environments.
+Versions of Emacs prior to version 22 lacked a COMMON-SUBSTRING argument
+which is used to highlight the next possible character you can enter
+in the current list of completions."
+  (if (>= emacs-major-version 22)
+      `(display-completion-list (all-completions ,word ,choices) ,word)
+    `(display-completion-list (all-completions ,word ,choices))))
+
 ;;;###mh-autoload
 (defun mh-complete-word (word choices begin end)
   "Complete WORD at from CHOICES.
@@ -1650,8 +1660,7 @@
           ((stringp completion)
            (if (equal word completion)
                (with-output-to-temp-buffer completions-buffer
-                 (display-completion-list (all-completions word choices)
-                                          word))
+                 (mh-display-completion-list-compat word choices))
              (ignore-errors
                (kill-buffer completions-buffer))
              (delete-region begin end)




reply via email to

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