From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: The purpose of makunbound Date: Fri, 20 Feb 2015 11:55:00 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1424451355 30103 80.91.229.3 (20 Feb 2015 16:55:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Feb 2015 16:55:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kelly Dean Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 20 17:55:47 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YOqrf-0004cI-Fl for ged-emacs-devel@m.gmane.org; Fri, 20 Feb 2015 17:55:43 +0100 Original-Received: from localhost ([::1]:33109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOqre-00062J-Ic for ged-emacs-devel@m.gmane.org; Fri, 20 Feb 2015 11:55:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOqrX-00061A-17 for emacs-devel@gnu.org; Fri, 20 Feb 2015 11:55:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOqrP-0001Pm-Nu for emacs-devel@gnu.org; Fri, 20 Feb 2015 11:55:34 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:24002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOqrP-0001Pf-KP for emacs-devel@gnu.org; Fri, 20 Feb 2015 11:55:27 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkwUAPOG1lTO+LI//2dsb2JhbABbgwaDX0+FBMBlBAICgQ1EAQEBAQEBfIQNAQQBIzMjBQsLGgIYDgICFBgNJIg4CLgylXEBAQgCAR+BIY4kMweCaIFCBYonn0uBRSKEDCCCcwEBAQ X-IPAS-Result: AkwUAPOG1lTO+LI//2dsb2JhbABbgwaDX0+FBMBlBAICgQ1EAQEBAQEBfIQNAQQBIzMjBQsLGgIYDgICFBgNJIg4CLgylXEBAQgCAR+BIY4kMweCaIFCBYonn0uBRSKEDCCCcwEBAQ X-IronPort-AV: E=Sophos;i="5.09,536,1418101200"; d="scan'208";a="111020629" Original-Received: from 206-248-178-63.dsl.teksavvy.com (HELO pastel.home) ([206.248.178.63]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Feb 2015 11:55:26 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 0B3121775; Fri, 20 Feb 2015 11:55:01 -0500 (EST) In-Reply-To: (Kelly Dean's message of "Fri, 20 Feb 2015 09:35:30 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183327 Archived-At: > The definition of =C2=ABlet=C2=BB in eval.c calls the function =C2=ABunbi= nd_to=C2=BB at the end. This is completely invisible to the Elisp programmer, so it's of no importance. > Also see the Emacs 24.4 Elisp manual: > (elisp) Catch and Throw (section 10.5.1): > =E2=8C=9CExecuting `throw' exits all Lisp constructs up to the matching > `catch', including function calls. When binding constructs such as > `let' or function calls are exited in this way, the bindings are > unbound, just as they are when these constructs exit normally=E2=8C=9D This "unbound" is indeed incorrect, it should be "undone" (if anything is "unbound" it could be the variables, but definitely not the bindings). > (elisp) Named Features (section 15.7): > =E2=8C=9CLoading a library while its variables are let-bound can have > unintended consequences, namely the variables becoming unbound after > the let exits.=E2=8C=9D This "becoming unbound" here really means "the variables will end up with a Qunbound value". BTW, the problem described in this little bit of text has been mostly eliminated by recentish changes which made `defvar' use the new `set-default-toplevel-value'. > (elisp) Warning Variables (section 37.5.2): > =E2=8C=9CPrograms can bind this variable to `t' to say that the next > warning should begin a series. > ... > The series ends when the local binding > is unbound and `warning-series' becomes `nil' again.=E2=8C=9D Here again "unbound" should be "undone". > (elisp) Intro to Buffer-Local (section 11.10.1): > =E2=8C=9Cif you exit the `let' > while still in the other buffer, you won't see the unbinding occur=E2=8C= =9D This one is admittedly a real case where "unbind" is used to mean "undo a let binding". Stefan