all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: monnier@iro.umontreal.ca, 67991@debbugs.gnu.org
Subject: bug#67991: 30.0.50; boundp always returns nil in format-mode-line with let* after 0fde935
Date: Sat, 23 Dec 2023 17:13:18 +0100	[thread overview]
Message-ID: <m2msu0ew2p.fsf@Pro.fritz.box> (raw)
In-Reply-To: <CAHyO48zCg4ifPJd0i4apAurkui1OWjA-goUdGBeztd=0MobnZA@mail.gmail.com> (Aaron Jensen's message of "Sat, 23 Dec 2023 10:52:22 -0500")

Aaron Jensen <aaronjensen@gmail.com> writes:

> On Sat, Dec 23, 2023 at 10:21 AM Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
>>
>> Aaron Jensen <aaronjensen@gmail.com> writes:
>>
>> > After commits:
>> >
>> > 0fde935b66e43e4d7ec137ba6195de993168587a
>> > a63b206fbde2ead91f1053d80a275f8850e5ffce
>> >
>> > boundp returns nil here, rather than t, like it used to:
>> >
>> > (format-mode-line
>> >  '(:eval (let* ((some-var "some-value")
>> >                 (_ (message "Bound: %S" (boundp 'some-var))))
>> >            (message "Var: %S, Bound: %S" some-var (boundp 'some-var)))))
>> >
>> > This has an impact on a particular package I use for my modeline, which
>> > can be worked around if this behavior is expected. It seemed a
>> > significant chagne, so I wanted to report it, in case it was not expected.
>>
>> I don't know why that would have changed things with Stefan's commit,
>> but are your sure that some-var is declared special (has a defvar, for
>> instance)? When it is, boundp returns t here.
>
> It's not in the package in question.

It should have a defvar, to make sure that the binding of some-var in
the let* behaves as expected also when lexical-binding it t, which it is
in lisp-interaction-mode, for example.

> But even if I defvar w/o giving
> it a value, it does not return t:

That's strange, indeed:

(defvar some-var2)
 => some-var2
(special-variable-p 'some-var2)
 => nil

(defvar some-var3 nil)
 => some-var3
(special-variable-p 'some-var3)
 => t

Does someone know if that's intended for some reason?

Looks like a bug to me.





  reply	other threads:[~2023-12-23 16:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23 14:51 bug#67991: 30.0.50; boundp always returns nil in format-mode-line with let* after 0fde935 Aaron Jensen
2023-12-23 15:09 ` Eli Zaretskii
2023-12-23 15:21 ` Gerd Möllmann
2023-12-23 15:52   ` Aaron Jensen
2023-12-23 16:13     ` Gerd Möllmann [this message]
2023-12-23 16:42     ` Eli Zaretskii
2023-12-24  7:13       ` Gerd Möllmann
2023-12-24  7:45         ` Eli Zaretskii
2023-12-24  8:05           ` Gerd Möllmann

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2msu0ew2p.fsf@Pro.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=67991@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.