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: Wed, 10 Oct 2012 18:47:57 +0530 Message-ID: <87bogah3ei.fsf@gmail.com> References: <804nm2zekk.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349875009 31893 80.91.229.3 (10 Oct 2012 13:16:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2012 13:16:49 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 10 15:16:56 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 1TLw9g-0005qg-AJ for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 15:16:56 +0200 Original-Received: from localhost ([::1]:41080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLw9a-0002Pk-0L for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 09:16:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLw9P-0002Pb-Gl for help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 09:16:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLw9J-0002as-JX for help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 09:16:39 -0400 Original-Received: from mail-da0-f41.google.com ([209.85.210.41]:65237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLw9J-0002aA-D3 for help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 09:16:33 -0400 Original-Received: by mail-da0-f41.google.com with SMTP id i14so199801dad.0 for ; Wed, 10 Oct 2012 06:16:32 -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=KzuHLQ7DCNJmzRIMY6Jez2ctEh23JrMBWTAPy5Q84b4=; b=ndp00U59U4b4lB12LBETh56mJGyqlAovmkHXI+VN5ZEBU9XgVDnDXjtyemFQ6etRKs 7CKxoh27m1iVHrZQkf4kqgvk/f0rhnjqYYA23ApQngWURpZxnp91D2oZv74kJbNlw8rZ iaIJy5bHxYP4uTEVPcRa9WViUWOFnAlHmeTeDXSNXg6haYmNBN8pyjGDazY/qEF9etNx 4Nl64d7F710LdJ3ivNS05dT/lYzFXWteuJ1Y+9/6Lc8QmtnTp4fgEy9UoQr6XXM4HwFH djeS2l+Rqy2hE+yueTUC3X8zMGNXvPofP7pm1omUMPhmDMDxRBtakF19wK5SwkzZzNkR cwAA== Original-Received: by 10.66.85.8 with SMTP id d8mr62553587paz.30.1349874992420; Wed, 10 Oct 2012 06:16:32 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.211.100]) by mx.google.com with ESMTPS id kp3sm1016581pbc.64.2012.10.10.06.16.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 06:16:31 -0700 (PDT) In-Reply-To: <804nm2zekk.fsf@somewhere.org> (Sebastien Vauban's message of "Wed, 10 Oct 2012 14:39:23 +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:87150 Archived-At: > 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 --