[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flet is obsolete, but...
From: |
Jambunathan K |
Subject: |
Re: flet is obsolete, but... |
Date: |
Wed, 10 Oct 2012 18:47:57 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
> Hello,
>
> `flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'.
>
> But doing so in the following code:
>
>
> (defun my/revert-buffer ()
> "Unconditionally revert current buffer."
> (interactive)
> (flet ((yes-or-no-p (msg) t))
> (revert-buffer)))
>
>
> does not lead to the right things:
>
> - use cl-flet, and the code doesn't behave as it should (i.e., it does ask for
> a confirmation, before reverting)
>
> - use cl-letf, and you've got an error:
> cl-letf: `let' bindings can have only one value-form: yes-or-no-p, (msg), t
>
> What should I do?
Use the NOCONFIRM of revert-buffer.
> Best regards,
> Seb
--
- flet is obsolete, but..., Sebastien Vauban, 2012/10/10
- Re: flet is obsolete, but...,
Jambunathan K <=
- Re: flet is obsolete, but..., Jambunathan K, 2012/10/10
- Re: flet is obsolete, but..., Barry Margolin, 2012/10/10
- Message not available
- Re: flet is obsolete, but..., Sebastien Vauban, 2012/10/11
- Re: flet is obsolete, but..., Tassilo Horn, 2012/10/11
- Re: flet is obsolete, but..., Jambunathan K, 2012/10/11
- RE: flet is obsolete, but..., Drew Adams, 2012/10/11
- RE: flet is obsolete, but..., Ludwig, Mark, 2012/10/11
- `f5' for refreshing/reverting without confirmation [was: flet is obsolete, but...], Drew Adams, 2012/10/11