From 6fb1b80f1cf99f735cab6b57dd79d1d534b2c641 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 10 Aug 2024 14:00:11 +0200 Subject: [PATCH] (read-char-by-name): Adhere to changes in 'completions-group' --- lisp/international/mule-cmds.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 700e48fe29c..5207bf5a3b9 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -3316,7 +3316,6 @@ Optional arg ALLOW-SINGLE non-nil means to additionally allow single characters to be treated as standing for themselves." (let* ((sort-fun (when (eq read-char-by-name-sort 'code) #'mule--ucs-names-sort-by-code)) - (group-fun (when completions-group #'mule--ucs-names-group)) (input (minibuffer-with-setup-hook (lambda () @@ -3329,11 +3328,13 @@ single characters to be treated as standing for themselves." (completing-read prompt (completion-table-with-metadata (ucs-names) - `((sort-function . ,sort-fun) - (affixation-function . ,#'mule--ucs-names-affixation) - (narrow-completions-function . ,#'mule--ucs-names-narrow) - (group-function . ,group-fun) - (category . unicode-name)))))) + (lambda (&rest _) + `((sort-function . ,sort-fun) + (affixation-function . ,#'mule--ucs-names-affixation) + (narrow-completions-function . ,#'mule--ucs-names-narrow) + (category . unicode-name) + . ,(when completions-group + '((group-function . mule--ucs-names-group))))))))) (char (cond ((char-from-name input t)) -- 2.39.2