summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-08-06 20:32:59 +0200
committerStefan Kangas <stefan@marxist.se>2022-08-06 20:32:59 +0200
commitdb2b5e784b2031f788af455f7056015bd15ce719 (patch)
treeea2ae5c6fd994c1ffc53f8e4504cd116cf0d042e
parentb9c65203d0f419306ac062e59a59643db9a1a541 (diff)
downloademacs-db2b5e784b2031f788af455f7056015bd15ce719.tar.gz
Make compat macro mh-display-completion-list obsolete
* lisp/mh-e/mh-compat.el (mh-display-completion-list): Make compat macro obsolete. Update callers.
-rw-r--r--lisp/mh-e/mh-compat.el1
-rw-r--r--lisp/mh-e/mh-letter.el21
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)