From db2b5e784b2031f788af455f7056015bd15ce719 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 6 Aug 2022 20:32:59 +0200 Subject: [PATCH] Make compat macro mh-display-completion-list obsolete * lisp/mh-e/mh-compat.el (mh-display-completion-list): Make compat macro obsolete. Update callers. --- lisp/mh-e/mh-compat.el | 1 + lisp/mh-e/mh-letter.el | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 7a09429e4ef..27158fc53a1 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -69,6 +69,7 @@ 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." + (declare (obsolete nil "29.1")) `(display-completion-list (completion-hilit-commonality ,completions ,(length common-substring) nil))) diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index 4e3e1012315..78355101c12 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -864,16 +864,17 @@ Any match found replaces the text from BEGIN to END." ((stringp completion) (if (equal word completion) (with-output-to-temp-buffer completions-buffer - (mh-display-completion-list - (all-completions word choices) - ;; The `common-substring' arg only works if it's a prefix. - (unless (and (functionp choices) - (let ((bounds - (funcall choices - word nil '(boundaries . "")))) - (and (eq 'boundaries (car-safe bounds)) - (< 0 (cadr bounds))))) - word))) + (display-completion-list + (completion-hilit-commonality + (all-completions word choices) + ;; The `common-substring' arg only works if it's a prefix. + (unless (and (functionp choices) + (let ((bounds + (funcall choices + word nil '(boundaries . "")))) + (and (eq 'boundaries (car-safe bounds)) + (< 0 (cadr bounds))))) + word)))) (ignore-errors (kill-buffer completions-buffer)) (delete-region begin end) -- 2.39.2