From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: The two-argument form of defvar
Date: Thu, 19 Mar 2015 16:03:05 +0100 [thread overview]
Message-ID: <87vbhxf2s6.fsf@yahoo.fr> (raw)
In-Reply-To: <CAArVCkQUoK9tyx7t2nMmE5aJ5s++mUa9w9dpVwyFm3oZA4qsxQ@mail.gmail.com> (Philipp Stephani's message of "Thu, 19 Mar 2015 11:39:48 +0000")
Philipp Stephani <p.stephani2@gmail.com> 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
next prev parent reply other threads:[~2015-03-19 15:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 11:39 The two-argument form of defvar Philipp Stephani
2015-03-19 15:03 ` Nicolas Richard [this message]
2015-03-19 15:52 ` Tassilo Horn
2015-04-18 9:25 ` Philipp Stephani
2015-04-18 13:27 ` Stefan Monnier
2015-04-18 14:14 ` Drew Adams
2015-04-18 16:50 ` Philipp Stephani
[not found] ` <mailman.1013.1429363810.904.help-gnu-emacs@gnu.org>
2015-04-19 21:48 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vbhxf2s6.fsf@yahoo.fr \
--to=theonewiththeevillook@yahoo.fr \
--cc=help-gnu-emacs@gnu.org \
--cc=p.stephani2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).