From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Kost Newsgroups: gmane.emacs.help Subject: Re: How to shadow a function temporarily? (flet and cl-flet) Date: Mon, 27 Jan 2014 02:07:03 +0400 Message-ID: <87r47u2y9k.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390774054 11256 80.91.229.3 (26 Jan 2014 22:07:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Jan 2014 22:07:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 26 23:07:41 2014 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 1W7Xrg-0001m9-Ef for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jan 2014 23:07:40 +0100 Original-Received: from localhost ([::1]:56481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7Xrf-0003hd-Kn for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jan 2014 17:07:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7XrJ-0003hE-HK for help-gnu-emacs@gnu.org; Sun, 26 Jan 2014 17:07:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7Xr9-00028z-8L for help-gnu-emacs@gnu.org; Sun, 26 Jan 2014 17:07:17 -0500 Original-Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:46885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7Xr9-00028p-0L for help-gnu-emacs@gnu.org; Sun, 26 Jan 2014 17:07:07 -0500 Original-Received: by mail-la0-f52.google.com with SMTP id c6so3985726lan.11 for ; Sun, 26 Jan 2014 14:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=4qaT58Z3ulpk4/X7aOo8fKjdsb9tlO4GmgFl9PCiAHg=; b=U1W4u0Yto60tjQPiOZglJhoRfWmrDwjaqjksr0qDAZAG8g6EWMcco8SwRm8PQT3QAF j5KlNbddO7xDKZhqtkMM5KfoKvaa95MRBnyTTqyezwOsvStfF+35fh7RDeEFA0BjPYU5 9Lz2zdGbFEXP5YH3KDZOqe7PExS79zZAXGOKtO78XiihuiCCa8UsOAWY/CBw06ZdyfZp VVk9RGouGgy57wbbD5ZP4eU0SNFWTwcyY4jgFruL3GYrSqsIWnkiW0jh7qdFrkP8sWdz 4sqlPRPpAL9cSGnZUiUuP0rvIlYcGaP5C/xddan11ve+H1NqMWCQcNCc+O7MWjP7hD6+ LKGw== X-Received: by 10.112.205.5 with SMTP id lc5mr272801lbc.40.1390774025979; Sun, 26 Jan 2014 14:07:05 -0800 (PST) Original-Received: from leviafan (128-70-204-126.broadband.corbina.ru. [128.70.204.126]) by mx.google.com with ESMTPSA id ld10sm13799372lab.8.2014.01.26.14.07.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Jan 2014 14:07:05 -0800 (PST) In-Reply-To: (Barry Margolin's message of "Sun, 26 Jan 2014 14:36:21 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::234 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:95680 Archived-At: Barry Margolin (2014-01-26 23:36 +0400) wrote: > Use `letf' of `symbol-function': > > (letf ((symbol-function 'function-name) (symbol-function > 'other-function)) > ...) That's what I wanted (not sure about byte-compiled yet): I couldn't figure it out how to use `letf' to set functions, but now I know about `symbol-function'. Thank you very much.