From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: flet is obsolete, but... Date: Thu, 11 Oct 2012 10:04:21 +0200 Organization: Sebastien Vauban Message-ID: <80lifdsad6.fsf@somewhere.org> References: <804nm2zekk.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1349942715 10369 80.91.229.3 (11 Oct 2012 08:05:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2012 08:05:15 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Oct 11 10:05:22 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TMDlh-00068r-8l for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2012 10:05:21 +0200 Original-Received: from localhost ([::1]:40694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMDla-0004IQ-EX for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2012 04:05:14 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!feeder.erje.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Injection-Info: mx04.eternal-september.org; posting-host="368fa3c7dc5c1bbe516391bd65bd1ab2"; logging-data="16553"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX1+oh99NiJ7/U97LN8HawKwh" User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:w+vkxFbt3JlpQjOcif5/gV6ymUs= sha1:LGHWeXdlZ58RkiPoYbzwCkD7DRw= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:194836 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:87169 Archived-At: 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