From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.help Subject: Re: flet is obsolete, but... Date: Thu, 11 Oct 2012 13:47:34 +0530 Message-ID: <87ipah5so1.fsf@gmail.com> References: <804nm2zekk.fsf@somewhere.org> <80lifdsad6.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349943383 16269 80.91.229.3 (11 Oct 2012 08:16:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2012 08:16:23 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 11 10:16:29 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 1TMDwT-0003in-9p for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2012 10:16:29 +0200 Original-Received: from localhost ([::1]:43397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMDwM-0006eu-S1 for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2012 04:16:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMDwB-0006eW-QY for help-gnu-emacs@gnu.org; Thu, 11 Oct 2012 04:16:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMDw3-0006Jn-T7 for help-gnu-emacs@gnu.org; Thu, 11 Oct 2012 04:16:11 -0400 Original-Received: from mail-da0-f41.google.com ([209.85.210.41]:50045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMDw3-0006Jd-8c for help-gnu-emacs@gnu.org; Thu, 11 Oct 2012 04:16:03 -0400 Original-Received: by mail-da0-f41.google.com with SMTP id i14so701603dad.0 for ; Thu, 11 Oct 2012 01:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=GdDJTX6DuRpJ4oPKaJ86qNiB3OrwlTfnha3Gue9DDNc=; b=DvHgITfx6BbKl/5IBezHJP5YIIlZ/mdyVAj/wRLV8fJN1KN6Qq/F8ZQe6TdCjkWvzL UDpb7YpPqjlR6tixAXDIGjArbf+J8qws3qcbf5Q9pPO066RREweowzJb3MVde9+edU+i n51/gCRx010gq7Gog4lwjNztNaQuuAyOMot+Af/QAKyU69RPXgHEjkzeNFLSxQaQOeFr X9CRW7/kFJH/BpZ4oxQZmg64MAFHorC1xsFE01DSjU5X58cQnwMyo3rsD3X9BNWJrlIJ K6wf8r2w0pg5nwHjh4jmfiznthjOsvuvmwVimcqST6ix2tE7uZvl+WzzjbcCPQ53vGOs Gy6A== Original-Received: by 10.68.129.233 with SMTP id nz9mr1277004pbb.136.1349943361426; Thu, 11 Oct 2012 01:16:01 -0700 (PDT) Original-Received: from debian-6.05 ([115.241.59.78]) by mx.google.com with ESMTPS id uu10sm2390730pbc.2.2012.10.11.01.15.58 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 01:16:00 -0700 (PDT) In-Reply-To: <80lifdsad6.fsf@somewhere.org> (Sebastien Vauban's message of "Thu, 11 Oct 2012 10:04:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.41 X-BeenThere: help-gnu-emacs@gnu.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@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87171 Archived-At: "Sebastien Vauban" 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] `---- --