]> git.eshelyaron.com Git - emacs.git/commitdiff
Make compat macro mh-display-completion-list obsolete
authorStefan Kangas <stefan@marxist.se>
Sat, 6 Aug 2022 18:32:59 +0000 (20:32 +0200)
committerStefan Kangas <stefan@marxist.se>
Sat, 6 Aug 2022 18:32:59 +0000 (20:32 +0200)
* lisp/mh-e/mh-compat.el (mh-display-completion-list): Make compat
macro obsolete.  Update callers.

lisp/mh-e/mh-compat.el
lisp/mh-e/mh-letter.el

index 7a09429e4effd9160b08f0659a1422f43940309b..27158fc53a1638eaafb6862e7db284a81038588c 100644 (file)
@@ -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)))
index 4e3e10123158f8fb1482da6389140b6f71d19b1d..78355101c12d1e13fc38c84f4a872ad0aea1f2bf 100644 (file)
@@ -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)