emacs-devel
[Top][All Lists]
Advanced

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

Re: yes-or-no-p prompt conditionally broken in master?


From: Kaushal Modi
Subject: Re: yes-or-no-p prompt conditionally broken in master?
Date: Fri, 04 Sep 2015 12:59:14 +0000

Well, we could have one function bind the defcustom and then call the
other one.  Then we won't even need a defalias for backward
compatibility.

That's awesome! So I believe it will be something like this?

<psuedocode follows>

(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)))



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@hiddenaddress@hiddenaddress@hiddenaddress@hiddenaddress@hiddenaddress@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."

reply via email to

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