bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10502: 24.0.92; Please add optional NAMES arg to `read-char-by-name'


From: Lars Ingebrigtsen
Subject: bug#10502: 24.0.92; Please add optional NAMES arg to `read-char-by-name'
Date: Thu, 28 Apr 2016 14:10:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:

> The use of `(ucs-names)' is hard-coded in `read-char-by-name'.  Please
> add an optional parameter NAMES that defaults to `(ucs-names)' and use
> that instead.  That will enable callers to use a different set of
> candidates, typically a subset of `(ucs-names)'.

I don't think so.  `read-char-by-name' is just a shim over

(completing-read
 prompt
 (lambda (string pred action)
   (if (eq action 'metadata)
       '(metadata
         (annotation-function . mule--ucs-names-annotation)
         (category . unicode-name))
     (complete-with-action action (ucs-names) string pred))))

and if you want a different completion table, then you should just avoid
`read-char-by-name' -- it doesn't provide much value.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]