From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: How to rescind a defun? Date: Fri, 18 May 2012 15:09:16 -0700 Message-ID: <04A0ECB15DCC470685337FFC04605BBA@us.oracle.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1337378979 10557 80.91.229.3 (18 May 2012 22:09:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 May 2012 22:09:39 +0000 (UTC) To: "'kj'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 19 00:09:38 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 1SVVMb-0005RR-Sp for geh-help-gnu-emacs@m.gmane.org; Sat, 19 May 2012 00:09:34 +0200 Original-Received: from localhost ([::1]:38783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVVMb-00072s-8o for geh-help-gnu-emacs@m.gmane.org; Fri, 18 May 2012 18:09:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVVMV-00071Y-KL for help-gnu-emacs@gnu.org; Fri, 18 May 2012 18:09:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVVMU-0004Zi-0S for help-gnu-emacs@gnu.org; Fri, 18 May 2012 18:09:27 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:48666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVVMT-0004ZB-Qc for help-gnu-emacs@gnu.org; Fri, 18 May 2012 18:09:25 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q4IM9LTv005501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 May 2012 22:09:22 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q4IM9LXo022284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 May 2012 22:09:21 GMT Original-Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q4IM9KwZ014585; Fri, 18 May 2012 17:09:20 -0500 Original-Received: from dradamslap1 (/10.159.222.233) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 May 2012 15:09:20 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac01QDNkNXdOwFJySUmIjeNAgxieHgAAZoog X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 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:84888 Archived-At: > >> If, during an Emacs session, one evaluates a defun that > >> (inadvertently) redefines an existing function, is it > >> possible to undo this? > > > See function `fmakunbound'. > > Thanks, I would have never found this! > > Unfortunately, it seems that the original definition is gone. (I > had hoped that the new definition was just shadowing the original > one, so that rescinding the former would "resurrect" the latter.) I see now what you meant by "undo". No, within a given namespace (obarray) and a given program scope (e.g. `flet' or `labels' binding), a symbol has only one function definition. And for a global function definition, assignment is used, not binding. So there is no shadowing.