unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Roland Winkler <winkler@gnu.org>
Cc: 27674@debbugs.gnu.org
Subject: bug#27674: 26.0.50; cl-progv: strange scoping due to implementation
Date: Thu, 13 Jul 2017 11:07:47 -0400	[thread overview]
Message-ID: <CAM-tV--vFG1kdsJd4FdqVaxHLrUwegKEpYkuOHWBwq5qRWRYUw@mail.gmail.com> (raw)
In-Reply-To: <871spkz9gk.fsf@gnu.org>

On Thu, Jul 13, 2017 at 10:40 AM, Roland Winkler <winkler@gnu.org> wrote:
>
> The docstring of cl-progv says
>
>   Bind SYMBOLS to VALUES dynamically in BODY.
>
> But I am not sure whether this statement correctly reflects the actual
> code of cl-progv: cl-progv evaluates a let form at runtime, but it is
> not up to cl-progv to ensure dynamical binding.  I believe it depends on
> whether lexical binding is on or off whether the code currently used by
> cl-progv uses dynamical binding or lexical binding.

No, because cl-progv omits the second argument to `eval', which is the
same as passing nil. This guarantees the evaluated let-bindings are
dynamic bindings.

> So it is my ignorant guess that a consistent behavior of cl-progv with
> lexical binding on or off requires that the bindings of SYMBOLS to
> VALUES is also passed to `eval' as a second arg.

Doing this would mean that cl-progv would always bind lexically. We
could, in theory, change cl-progv to be that way, but it would be
backwards incompatible with previous Emacs versions, and with Common
Lisp.





  reply	other threads:[~2017-07-13 15:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 21:53 bug#27674: 26.0.50; cl-progv: strange scoping due to implementation Michael Heerdegen
2017-07-13  0:21 ` npostavs
2017-07-13  0:36   ` Michael Heerdegen
2017-07-13  0:50     ` npostavs
2017-07-13  1:11       ` Michael Heerdegen
2017-07-13  1:54         ` npostavs
2017-07-13  2:15           ` Michael Heerdegen
2017-07-13  2:41             ` npostavs
2017-07-13 14:40               ` Roland Winkler
2017-07-13 15:07                 ` Noam Postavsky [this message]
2017-07-14 14:20                   ` Michael Heerdegen
2017-07-15 20:46                     ` Roland Winkler
2017-07-14 16:00               ` Michael Heerdegen
2017-07-19 13:55             ` Stefan Monnier

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=CAM-tV--vFG1kdsJd4FdqVaxHLrUwegKEpYkuOHWBwq5qRWRYUw@mail.gmail.com \
    --to=npostavs@users.sourceforge.net \
    --cc=27674@debbugs.gnu.org \
    --cc=winkler@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).