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:48:15 +0530 Message-ID: <87a9vuh3e0.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 1349875036 32174 80.91.229.3 (10 Oct 2012 13:17:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2012 13:17:16 +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:17:23 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 1TLwA5-00069F-4y for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 15:17:21 +0200 Original-Received: from localhost ([::1]:41827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLw9y-0002pD-Sd for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 09:17:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLw9l-0002p3-3x for help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 09:17:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLw9b-0002eH-CT for help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 09:17:01 -0400 Original-Received: from mail-pb0-f41.google.com ([209.85.160.41]:38828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLw9b-0002e4-6G for help-gnu-emacs@gnu.org; Wed, 10 Oct 2012 09:16:51 -0400 Original-Received: by mail-pb0-f41.google.com with SMTP id rq2so772373pbb.0 for ; Wed, 10 Oct 2012 06:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=j973f/wsp8TN715z3i6PdXcRU4D1PhvglIsgYvFiucE=; b=AtOtfdpD1exibLPlkDijtyjiqC0xTVTiZB4qGhVMrxjDyDxoQFjd19aN0jxl+IgJyw v5AwfLcjpy/VaCnoT5MA3blyH6t2GU43VbG/DKiL7QmAva5S2ENPC7hiC1zFvjSncMgZ cGC3Tsys7mYEL+DPhyzXMuOI+G907KPL0NHyEqaHMUJwwcyf/pngpwlWwOhNCb7Zq8xY U9kacw5kZYkZYnoGqzaOoFjlKvc1lqy3NPqhBhiyrTQEGhD1yQsSGSnVUFhSiAJR+nJW /7A8X7hg3yC7CZcboVNw3kIctRl1vR0qKeZpaW4Y1k/S9A/k/R4mOgCOCW/PsTb1Ao4A m3CQ== Original-Received: by 10.68.248.1 with SMTP id yi1mr13759992pbc.93.1349875010391; Wed, 10 Oct 2012 06:16:50 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.211.100]) by mx.google.com with ESMTPS id ox5sm1014449pbc.75.2012.10.10.06.16.48 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 06:16:49 -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.160.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:87151 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 argument of revert-buffer. > Best regards, > Seb --