From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: The two-argument form of defvar Date: Thu, 19 Mar 2015 16:03:05 +0100 Message-ID: <87vbhxf2s6.fsf@yahoo.fr> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426777422 12458 80.91.229.3 (19 Mar 2015 15:03:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2015 15:03:42 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Philipp Stephani Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 19 16:03:33 2015 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 1YYbyq-0006eM-Mr for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2015 16:03:28 +0100 Original-Received: from localhost ([::1]:39653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYbyk-0003na-Oi for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Mar 2015 11:03:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYbyT-0003mW-Uw for help-gnu-emacs@gnu.org; Thu, 19 Mar 2015 11:03:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYbyO-0002oP-FY for help-gnu-emacs@gnu.org; Thu, 19 Mar 2015 11:03:05 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:32841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYbyO-0002oF-AO for help-gnu-emacs@gnu.org; Thu, 19 Mar 2015 11:03:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuAFAEXkClWkD4Xx/2dsb2JhbABchDKzBAEBAQEBAQaZCQKCEgEBAQEBAX2EEAEEAXkFCwgDDhMlDwEEDTwTiBoBAwkIs2uUEQFKDYUpAQEBBwIBH4YKgi2CYIFPdYItB4QtAQSYaoFMhnSHDoYmIoNvPTGCQwEBAQ Original-Received: from mathsrv4.ulb.ac.be (HELO localhost) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 19 Mar 2015 16:02:06 +0100 In-Reply-To: (Philipp Stephani's message of "Thu, 19 Mar 2015 11:39:48 +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: 164.15.128.112 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:103217 Archived-At: Philipp Stephani writes: > Hi, > > when looking at the source code of defvar it becomes clear that the > two-argument form > > (defvar foo) > > is a no-op. Not always a no-op. The source code has this comment : /* A simple (defvar foo) with lexical scoping does "nothing" except declare that var to be dynamically scoped *locally* (i.e. within the current file or let-block). */ To reflect the above comment, the docstring has : | The `defvar' form also declares the variable as "special", | so that it is always dynamically bound even if `lexical-binding' is t. -- Nicolas Richard