From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#18059: 24.3.92; defvar and special variables Date: Sun, 11 Feb 2018 10:35:22 -0500 Message-ID: <873727bkud.fsf@users.sourceforge.net> References: <87ha2c7lxy.fsf@web.de> <87mv0gbq33.fsf@users.sourceforge.net> <87y3k0bdm9.fsf@web.de> <87inb4bbse.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1518363283 4725 195.159.176.226 (11 Feb 2018 15:34:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Feb 2018 15:34:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: Michael Heerdegen , 18059@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 11 16:34:38 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ektdo-0007R1-Pj for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Feb 2018 16:34:08 +0100 Original-Received: from localhost ([::1]:51125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ektfq-0008D4-D5 for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Feb 2018 10:36:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ektfh-0008BE-GA for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 10:36:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ektfe-0004OM-Bx for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 10:36:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ektfe-0004Nz-83 for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 10:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ektfe-0001pk-1D for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 10:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Feb 2018 15:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18059 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18059-submit@debbugs.gnu.org id=B18059.15183633346999 (code B ref 18059); Sun, 11 Feb 2018 15:36:01 +0000 Original-Received: (at 18059) by debbugs.gnu.org; 11 Feb 2018 15:35:34 +0000 Original-Received: from localhost ([127.0.0.1]:38468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ektfA-0001on-Ir for submit@debbugs.gnu.org; Sun, 11 Feb 2018 10:35:34 -0500 Original-Received: from mail-io0-f171.google.com ([209.85.223.171]:44522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ektf8-0001ob-UB for 18059@debbugs.gnu.org; Sun, 11 Feb 2018 10:35:31 -0500 Original-Received: by mail-io0-f171.google.com with SMTP id z6so14719068iob.11 for <18059@debbugs.gnu.org>; Sun, 11 Feb 2018 07:35:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lcvqZsIdk3oD19+1a/mIouzaG41Pyt06t6oc4dxdn7w=; b=DCnad/QwASwE5Ghd0vM3pAuDPJV9WV2UDvERQecDc0dfQRdw0u+MHxU71z6cWWNHlF Z5ZmuWpLpw/Lw9o16q53SAfInRBmMetOJfw16BjgHM4a6WSsK9LxRMZ6KvfvjfkWvPTP wY3MpbqkcKCoWghIDgVT89VUPGZjQ1Fo0f9IrHcX+693BGqvJdfqraKfM7uof+4OSzgf A2cWWSo7MTuJ3/Fz0oKfp1AE67fD5hlc3u3h/feQWdztOwrSBzY777lu7EZnhwOImNEQ nmF8T/7y6khLHqu1hcxAh2npy0FGVptswdnXJ5WyanCtkcf7MyfBuQ2hrYVWRkH7nlx4 2C+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=lcvqZsIdk3oD19+1a/mIouzaG41Pyt06t6oc4dxdn7w=; b=WjKcP/PKUnb9Jy/i6fQjlSqS2L8w02u1VSqbFBsYO9G/hkOS/TpEq/2W9/AByF0gUq C/9e75NbRiSHrjS5grnXnGsQI7+bc4noRYqm6oVCnpvtH2KzmrlUtH92kcTTFIVQP4nW W01n6duaQb0wva4lQDdh004iR8suZNA2e0FwpBJZNcaSUG/jqhYxyorVXRYh8gpAMXY8 fLxaOQ5LQTpxfDoUGWg3OrNvsOX53+eSY3/qp8IZR9CUePQ0tRK4j2hO2TIuhTUS0Kc+ EhyHqfnvQ1xdQan8rmewIamy1CiPMeNNyOJ405kGt6fAkcWZ3Tdd4JOO3V5k3HsCXMGB BwMg== X-Gm-Message-State: APf1xPB3zZq/q2b+xYVyeRvOBEEAMh7EcihO8GLa2Zw3VMHZrvFhM5i6 kr2UMZ7E8y7awJDLL4NCEZ8rTw== X-Google-Smtp-Source: AH8x227smOFQ5fzvkqQs06CIbeKP7rIU9rpLGIjDebgAlA/IXJbDykxt8Mt9QoZKxIWOrex2sUr85g== X-Received: by 10.107.17.27 with SMTP id z27mr10546660ioi.254.1518363324908; Sun, 11 Feb 2018 07:35:24 -0800 (PST) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id r139sm4545845itc.34.2018.02.11.07.35.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 07:35:24 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 11 Feb 2018 10:14:49 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:143137 Archived-At: Stefan Monnier writes: >> I noticed doing (let () (defvar x)) seems to be the same as (progn >> (defvar x)), which may be a bug. > > Both interpretations would make sense, so given the lack of > documentation about the intention, we could consider it as a feature as > much as a bug. > > Have you checked whether the behavior is the same with the > byte-compiler? Yes, it's the same. I see that a lambda form scopes the defvar even if it has no parameters though. I.e., the following prints 1: ;; -*- lexical-binding: t -*- (lambda () (defvar x)) (let ((x 1)) (setq testfun (lambda () x))) (message "%S" (funcall testfun))