From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: master af4791b5706: Fix apparently wrong `delete` and `delq` value discards (bug#61730)
Date: Thu, 25 May 2023 10:09:28 +0300 [thread overview]
Message-ID: <83lehcnazb.fsf@gnu.org> (raw)
This part of the changeset looks strange to me:
diff --git a/lisp/allout.el b/lisp/allout.el
index be2fd632c69..d3203800168 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6307,7 +6307,7 @@ not its value."
(if (yes-or-no-p (format-message
"%s entry `%s' is unbound -- remove it? "
configvar-name sym))
- (delq sym (symbol-value configvar-name)))
+ (set configvar-name (delq sym (symbol-value configvar-name))))
(push (symbol-value sym) got)))
configvar-name is evidently a string, whereas the value returned by
delq is not a string at all. Do you understand why this code even
calls delq? If it wants to change the value of configvar-name, it
should assign to (symbol-value configvar-name), no? And if all it
wants is to skip 'sym' and not add it to 'got', then there's no need
to call delq, right?
next reply other threads:[~2023-05-25 7:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 7:09 Eli Zaretskii [this message]
2023-05-25 8:05 ` master af4791b5706: Fix apparently wrong `delete` and `delq` value discards (bug#61730) Mattias Engdegård
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=83lehcnazb.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.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).