From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.devel Subject: Re: flet vs cl-flet vs compilation-start Date: Wed, 1 Feb 2017 15:49:03 -0800 Message-ID: References: <86mve51o6v.fsf@stephe-leake.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1485992980 19728 195.159.176.226 (1 Feb 2017 23:49:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2017 23:49:40 +0000 (UTC) Cc: Stephen Leake To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 02 00:49:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ4ea-0004kj-De for ged-emacs-devel@m.gmane.org; Thu, 02 Feb 2017 00:49:32 +0100 Original-Received: from localhost ([::1]:53556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ4ec-00052y-Og for ged-emacs-devel@m.gmane.org; Wed, 01 Feb 2017 18:49:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ4eT-00052q-RO for emacs-devel@gnu.org; Wed, 01 Feb 2017 18:49:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZ4eT-0004Il-0h for emacs-devel@gnu.org; Wed, 01 Feb 2017 18:49:25 -0500 Original-Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]:36363) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZ4eS-0004IN-RA for emacs-devel@gnu.org; Wed, 01 Feb 2017 18:49:24 -0500 Original-Received: by mail-qt0-x22d.google.com with SMTP id k15so294264139qtg.3 for ; Wed, 01 Feb 2017 15:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l35MVk8ePRVeSd2Po4HMaMElvvOljn1HVx8/Ta62+zM=; b=QBx4N1q9Q8sJT4JcE0FUgOZyYGyTw3L+KMj6kUqV4GsVMgPbLLxUbIY2YVzapkugIk Sv2pjo2pWH+FUuS1x1gEyt25+bxXWt5JmEWLQdWI8kVnzFpxftJPSeDoZflU0Tbx1DFT V5jxSFQ7fb9p73k6AUPmIePwpK4Q1SDA7mPVlYRn/PONzMKXcpO5b9IG9mCkorUfNHRR cxj9eTMoPevlmwoxSlSrii7Cvt+Kx3KN9B/A5cadFrrVJE9DgigC0YSKjISu4uvWTkV6 G2FMfoFPTg9sp68pUl30jGdkE+kngn3mhA23ZQGr7+DKg/nHsqeNP/l31+wZedw3mI3C Wb1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l35MVk8ePRVeSd2Po4HMaMElvvOljn1HVx8/Ta62+zM=; b=B40TUI/ycCLclYyc7ZxYH+W9tLsbSrx5oez7dA36tOmN7GdFx4KDd4uT5hi8walbCY TGj1FTOEs+4RZVSMYiLHqpBAwHnMu3zqUO6C/peXycZN3dXGUG6Jr+fgTxQVIe/uWKPn 40S0P8QxjFFR8HmYsYkxPn8XJblPpMikP+KsA87jyl9p7FrGVc4GWkfrg/bwy++be/Yg +pg6HJ7H5rh1VJsFmwTjowJJjz5tPpW9HF6EXx5sVWq4dxe6hLv/2DnMUaqh3ZAuV67S pZsZF0XkHVby2gIIzPVfbBTOfhxbsHaXJuBo3ensnHUTsXbur/oakVtCiWvwVzuGkkJI DVuA== X-Gm-Message-State: AIkVDXJVhWRjiJqZF9dgnipc/8Tpe2knwDLPJOIIFh6j5NWOR7iLILtTkQ6awnZ5df6y0FXjY7FiVrjP1ESo5A== X-Received: by 10.200.57.163 with SMTP id v32mr5740993qte.173.1485992963663; Wed, 01 Feb 2017 15:49:23 -0800 (PST) Original-Received: by 10.237.41.2 with HTTP; Wed, 1 Feb 2017 15:49:03 -0800 (PST) In-Reply-To: <86mve51o6v.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211854 Archived-At: Stephen Leake wrote: > This is consistent with the doc strings: > > cl-flet says: > > Make local function definitions. > > flet says: > > Make temporary overriding function definitions. > > and goes on to say "use cl-flet". > > Perhaps the doc string of flet should be improved to point out that > cl-flet does not produce _overriding_ function definitions, and suggest > workarounds. It's not as well known, but you can use `cl-letf' for this: (cl-letf (((symbol-function 'erase-buffer) (lambda () (goto-char (point-max))))) (compilation-start ...))