From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12758: letf no longer allows unbound variables Date: Mon, 29 Oct 2012 09:46:56 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351518476 5247 80.91.229.3 (29 Oct 2012 13:47:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2012 13:47:56 +0000 (UTC) Cc: 12758@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 29 14:48:04 2012 Return-path: Envelope-to: geb-bug-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 1TSph9-0003EU-Td for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Oct 2012 14:48:00 +0100 Original-Received: from localhost ([::1]:53018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSph1-0002Iz-Qg for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Oct 2012 09:47:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSpgn-0001d1-Em for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 09:47:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSpgm-0008UO-Dj for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 09:47:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSpgm-0008UK-AV for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 09:47:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TSpj7-00037p-Vt for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 09:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Oct 2012 13:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12758-submit@debbugs.gnu.org id=B12758.135151856511961 (code B ref 12758); Mon, 29 Oct 2012 13:50:01 +0000 Original-Received: (at 12758) by debbugs.gnu.org; 29 Oct 2012 13:49:25 +0000 Original-Received: from localhost ([127.0.0.1]:37657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSpiX-00036s-GP for submit@debbugs.gnu.org; Mon, 29 Oct 2012 09:49:25 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:3016) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSpiV-00036k-FJ for 12758@debbugs.gnu.org; Mon, 29 Oct 2012 09:49:24 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203063653" Original-Received: from 206-248-177-19.dsl.teksavvy.com (HELO ceviche.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Oct 2012 09:46:56 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 836CE662A1; Mon, 29 Oct 2012 09:46:56 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Mon, 29 Oct 2012 03:42:28 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:66190 Archived-At: > Evaluating this returns `99', and leaves `b' unbound. This behaviour is > documented in cl.texi: > In most cases, the @var{place} must have a well-defined value on > entry to the @code{letf} form. The only exceptions are plain > variables and calls to @code{symbol-value} and @code{symbol-function}. > If the symbol is not bound on entry, it is simply made unbound by > @code{makunbound} or @code{fmakunbound} on exit. I think this was a bad idea, so it indeed doesn't work that way any longer; more specifically: - W.r.t symbol-function, this is still true for `letf' but not for `cl-letf'. - W.r.t symbol-value, this is not true any more neither of `letf' nor or `cl-letf' (I could change that for letf but in the absence of a bug-report pointing to pre-existing code that depends on this behavior I'd rather not). - For (letf ((b 4)) ...) this is still true, because it expands to (let ((b 4)) ...). But for (letf ((b)) ...) it isn't because that expands to (let ((b b)) ...). When `b' is a lexically-scoped variable, we really can't "fix" it because lexical variables don't have a notion of "unbound". Stefan