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

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

Re: result of completing-read contradicting require-match


From: Jean Louis
Subject: Re: result of completing-read contradicting require-match
Date: Sun, 3 Jul 2022 00:58:30 +0300
User-agent: Mutt/+ () (2022-05-21)

* Yuri Khan <yuri.v.khan@gmail.com> [2022-07-02 23:39]:
> I meant a closure over the list of valid strings, something like this:

(let* ((choices '("name" "name-mode"))
       (is-valid (lambda (s) (member s choices)))
       (choice (completing-read "Type: " choices nil is-valid)))
  choice) ⇒ results with ""

So it did not work in my development version of Emacs. 

> I took the liberty to give variables sane names.
> I did not test this as my currently installed Emacs does not accept
> functions as the REQUIRE-MATCH argument. (Or, rather, it does but
> treats them as the “anything else” case.)


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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