From: Stefan Kangas Date: Sat, 6 Aug 2022 18:32:59 +0000 (+0200) Subject: Make compat macro mh-display-completion-list obsolete X-Git-Tag: emacs-29.0.90~1447^2~360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db2b5e784b2031f788af455f7056015bd15ce719;p=emacs.git Make compat macro mh-display-completion-list obsolete * lisp/mh-e/mh-compat.el (mh-display-completion-list): Make compat macro obsolete. Update callers. --- 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)