[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: |
Thu, 11 Oct 2012 13:47:34 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> Hi Jambunathan,
>
> Jambunathan K wrote:
>>> `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:
>>> What should I do?
>>
>> Use the NOCONFIRM argument of revert-buffer.
>
> I tried another way:
>
>
> (defun my/revert-buffer ()
> "Unconditionally revert current buffer."
> (interactive)
> (let ((revert-without-query t))
> (revert-buffer)))
>
>
> but I don't understand why it does not work:
>
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (wrong-type-argument listp t)
> byte-code("\304\211\205\n@\305 \"\203
>
listp in above Lisp error gives a clue that a list is expected.
A describe variable confirms that it is indeed a list regexes. Regex is
a Emacs regex and NOT a shell-regex.
,----[ C-h v revert-without-query RET ]
| revert-without-query is a variable defined in `files.el'.
| Its value is nil
|
| Documentation:
| Specify which files should be reverted without query.
| The value is a list of regular expressions.
| If the file name matches one of these regular expressions,
| then `revert-buffer' reverts the file without querying
| if the file has changed on disk and you have not edited the buffer.
|
| You can customize this variable.
|
| [back]
`----
--
- flet is obsolete, but..., Sebastien Vauban, 2012/10/10
- Re: flet is obsolete, but..., Jambunathan K, 2012/10/10
- 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 <=
- 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