From c544840969f3d74b716aa67d953510a0f7b3729a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 5 Mar 2014 21:02:46 -0500 Subject: [PATCH] * lisp/mh-e/mh-compat.el (mh-display-completion-list): Replace use of obsolete argument of display-completion-list. --- lisp/mh-e/ChangeLog | 5 +++++ lisp/mh-e/mh-compat.el | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 9b00e2de614..da6895eaf39 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2014-03-06 Glenn Morris + + * mh-compat.el (mh-display-completion-list): + Replace use of obsolete argument of display-completion-list. + 2013-11-05 Stefan Monnier * mh-print.el (mh-ps-print-preprint): Don't use dynamic-var diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index af9f1364970..db46be7bec4 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -96,12 +96,18 @@ expected to return an integer." (defmacro mh-display-completion-list (completions &optional common-substring) "Display the list of COMPLETIONS. See documentation for `display-completion-list' for a description of the -arguments COMPLETIONS and perhaps COMMON-SUBSTRING. -This macro is used by Emacs versions that lack a COMMON-SUBSTRING -argument, introduced in Emacs 22." - (if (< emacs-major-version 22) - `(display-completion-list ,completions) - `(display-completion-list ,completions ,common-substring))) +arguments COMPLETIONS. +The optional argument COMMON-SUBSTRING, if non-nil, should be a string +specifying a common substring for adding the faces +`completions-first-difference' and `completions-common-part' to +the completions." + (cond ((< emacs-major-version 22) `(display-completion-list ,completions)) + ((fboundp 'completion-hilit-commonality) ; Emacs 23.1 and later + `(display-completion-list + (completion-hilit-commonality ,completions + ,(length common-substring) nil))) + (t ; Emacs 22 + `(display-completion-list ,completions ,common-substring)))) (defmacro mh-face-foreground (face &optional frame inherit) "Return the foreground color name of FACE, or nil if unspecified. -- 2.39.5