all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 54240@debbugs.gnu.org, chenphy10@gmail.com
Subject: bug#54240: emacs/lisp/emacs-lisp/derived.el patch
Date: Fri, 04 Mar 2022 22:39:32 +0100	[thread overview]
Message-ID: <87zgm5gzxn.fsf@web.de> (raw)
In-Reply-To: <87mti5g2xs.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 04 Mar 2022 16:19:59 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Oh, yeah -- I was thinking that the mode had to be lexically bound
> there, but of course it isn't really, since eval is ... eval.  (Whenever
> there's an eval in code, there's a bug somewhere.)

`defvar' doesn't eval the first argument, and there is no alternative to
using it (right?).  So `derived-mode-init-mode-variables' should just
better be a macro I think.

> Would adding LEXICAL to the eval form fix the issue here, or would that
> interact oddly with the defvar?

Yes - since `defvar' doesn't evaluate its first argument no variable
references will work.  The constructed sexp must contain the final
symbol at that position, any other expression won't do it.

Michael.





  reply	other threads:[~2022-03-04 21:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 16:45 bug#54240: emacs/lisp/emacs-lisp/derived.el patch chenphy10
2022-03-03 17:14 ` Lars Ingebrigtsen
2022-03-03 23:02   ` Tongjie Chen
2022-03-04  0:36   ` Michael Heerdegen
2022-03-04  3:28     ` Tongjie Chen
2022-03-04  3:59       ` Michael Heerdegen
2022-03-04 15:19     ` Lars Ingebrigtsen
2022-03-04 21:39       ` Michael Heerdegen [this message]
2022-03-06 16:13         ` Lars Ingebrigtsen

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=87zgm5gzxn.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=54240@debbugs.gnu.org \
    --cc=chenphy10@gmail.com \
    --cc=larsi@gnus.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 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.