|
From: | Sebastien Vauban |
Subject: | Re: flet is obsolete, but... |
Date: | Thu, 11 Oct 2012 10:04:21 +0200 |
User-agent: | Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (windows-nt) |
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: --8<---------------cut here---------------start------------->8--- (defun my/revert-buffer () "Unconditionally revert current buffer." (interactive) (let ((revert-without-query t)) (revert-buffer))) --8<---------------cut here---------------end--------------->8--- 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
[Prev in Thread] | Current Thread | [Next in Thread] |