unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Alan Schmitt <alan.schmitt@polytechnique.org>, help-gnu-emacs@gnu.org
Subject: RE: hooks and let-bound variables
Date: Wed, 24 Jun 2015 07:44:33 -0700 (PDT)	[thread overview]
Message-ID: <8eccbda9-800d-403f-ad79-35554153db17@default> (raw)
In-Reply-To: <m2r3p1dya1.fsf@charm-ecran.irisa.fr>

> I find very funny that I only use languages with lexical binding,
> but can still be bitten by it in emacs-lisp.

;-)

Yup.  If you have only lexical binding then you cannot be bitten
by it (or by dynamic binding).

Emacs makes (good) use of dynamic binding, for exactly the kind
of thing you were doing: let-binding around some code whose behavior
you want to change by way of the binding.

In most languages you do not ever want the behavior of existing code
to change at runtime by just changing the value of a global variable
(i.e, from outside that code).  With Common Lisp and Emacs Lisp you
do sometimes want that.

http://www.gnu.org/software/emacs/emacs-paper.html#SEC17



  reply	other threads:[~2015-06-24 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 19:15 hooks and let-bound variables Alan Schmitt
2015-06-23 21:44 ` Drew Adams
2015-06-24  9:13   ` Alan Schmitt
2015-06-24 13:22     ` Drew Adams
2015-06-24 13:35       ` Alan Schmitt
2015-06-24 14:44         ` Drew Adams [this message]
2015-06-24 15:48           ` tomas

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=8eccbda9-800d-403f-ad79-35554153db17@default \
    --to=drew.adams@oracle.com \
    --cc=alan.schmitt@polytechnique.org \
    --cc=help-gnu-emacs@gnu.org \
    /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).