]> git.eshelyaron.com Git - emacs.git/commitdiff
(read-char-by-name): Adhere to changes in 'completions-group'
authorEshel Yaron <me@eshelyaron.com>
Sat, 10 Aug 2024 12:00:11 +0000 (14:00 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 07:19:08 +0000 (09:19 +0200)
lisp/international/mule-cmds.el

index 700e48fe29cb0eca4840ae11183de5beb9fce0d3..5207bf5a3b9d923b82622b9792192a13d303e7a9 100644 (file)
@@ -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))