[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: yes-or-no-p prompt conditionally broken in master?
From: |
Drew Adams |
Subject: |
RE: yes-or-no-p prompt conditionally broken in master? |
Date: |
Fri, 4 Sep 2015 07:42:55 -0700 (PDT) |
> That's awesome! So I believe it will be something like this?
>
> (defcustom yes-or-no-quick nil)
>
> ;; yes-or-no-p now implemented in elisp instead of C
> (defun yes-or-no-p (prompt)
> (if yes-or-no-p-quick
> (progn
> ;; y-or-n-p implementation
> )
> (progn
> ;; legacy yes-or-no-p implementation
> )))
>
> ;; y-or-n-p redefined
> (defun y-or-n-p (prompt)
> (let ((yes-or-no-quick t))
> (yes-or-no-p prompt)))
Certainly not. Although Eli expressed himself very poorly
in his proposal, I don't think that is what he meant (I
certainly hope not).
Presumably the defcustom would allow at least 3 possibilities:
1. Always use the traditional y-or-n-p behavior.
2. Always use the traditional yes-or-no-p behavior.
3. Always respect whichever behavior is expressed in the call.
#3 would be equivalent to the out-of-the-box behavior today.
With #3 the behavior in one code context could be like y-or-n-p
and in a different context it could be like yes-or-no-p.
At least this is what I hope he meant. What he actually said
can, however, give the impression that only possibilites #1
and #2 would exist. I cannot believe that is what he meant,
given his other posts about Emacs carefully judging which
behavior to code in any given context.
On Fri, Sep 4, 2015 at 8:40 AM Andreas Schwab <address@hidden> wrote:
Eli Zaretskii <address@hidden> writes:
>> From: Andreas Schwab <address@hidden>
>> Cc: address@hidden, address@hidden, address@hidden, address@hidden,
>> address@hidden, address@hidden
>> Date: Fri, 04 Sep 2015 11:26:46 +0200
>>
>> Eli Zaretskii <address@hidden> writes:
>>
>> > Any objections to removing yes-or-no-p (with a defalias for backward
>> > compatibility, of course) and making y-or-n-p serve both duties,
>> > controlled by some defcustom?
>>
>> That doesn't make sense. They implement different intented meaning.
>
> Sorry, I lost you: what different meaning is that?
(elisp) Yes-or-No Queries
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- Re: yes-or-no-p prompt conditionally broken in master?, (continued)
- Re: yes-or-no-p prompt conditionally broken in master?, Eli Zaretskii, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, David Kastrup, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, David Kastrup, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Eli Zaretskii, 2015/09/05
- Re: yes-or-no-p prompt conditionally broken in master?, David Kastrup, 2015/09/05
- Re: yes-or-no-p prompt conditionally broken in master?, David Kastrup, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Alan Mackenzie, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Chad Brown, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Eli Zaretskii, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Kaushal Modi, 2015/09/04
- RE: yes-or-no-p prompt conditionally broken in master?,
Drew Adams <=
- Re: yes-or-no-p prompt conditionally broken in master?, Stefan Monnier, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, David Kastrup, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Eli Zaretskii, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Eli Zaretskii, 2015/09/04
- Re: yes-or-no-p prompt conditionally broken in master?, Dmitry Gutov, 2015/09/03
- Re: yes-or-no-p prompt conditionally broken in master?, Eli Zaretskii, 2015/09/03
- Re: yes-or-no-p prompt conditionally broken in master?, Dmitry Gutov, 2015/09/03
- Re: yes-or-no-p prompt conditionally broken in master?, Marcin Borkowski, 2015/09/03
- Re: yes-or-no-p prompt conditionally broken in master?, Dmitry Gutov, 2015/09/03
- Re: yes-or-no-p prompt conditionally broken in master?, Eli Zaretskii, 2015/09/03