From: Alan Mackenzie <acm@muc.de>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: acm@muc.de, 75290@debbugs.gnu.org, rms@gnu.org
Subject: bug#75290: Fwd: remove-pos-from-symbol and bare-symbol
Date: Sun, 5 Jan 2025 16:08:35 +0000 [thread overview]
Message-ID: <Z3qug0VaUoY2lHrt@MAC.fritz.box> (raw)
In-Reply-To: <CADwFkmmg4kHTY4nE-Gs8pxp6peAh67fPpzM8KHfo1U4KTt6B3g@mail.gmail.com>
Hello, Stefan.
Thanks for the Cc:.
On Thu, Jan 02, 2025 at 11:22:44 -0600, Stefan Kangas wrote:
> Severity: wishlist
> I'm forwarding this to the bug tracker so that we don't lose track of
> it. Alan, any comments here?
Yes. I remember vaguely having some difficulty formulating these doc
strings. Making them accurate would have made them less readable. So I
erred on the side of sketchy rather than unreadable. I underestimated
the amount of difficulty this would cause.
> -------------------- Start of forwarded message --------------------
> From: Richard Stallman <rms@gnu.org>
> To: emacs-devel@gnu.org
> Subject: remove-pos-from-symbol and bare-symbol
> Date: Sun, 10 Mar 2024 22:39:23 -0400
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> The doc string of remove-pos-from-symbol says to compare it with
> bare-symbol. The doc strings are too sketchy to make clear what the
> difference is. Someone who knows should make that clear.
> Is the difference what they do to an argument that is not a symbol?
Yes. bare-symbol signals an error, remove-pos-from-symbol returns a
non-symbol argument unchanged.
> If so, it would be good to state that explicitly in the doc string
> of bare-symbol. "If need be" is not explicit, not concrete.
OK. The current doc string for bare-symbol is:
Extract, if need be, the bare symbol from SYM.
SYM is either a symbol or a symbol with position.
Ignore `symbols-with-pos-enabled'.
How about the following replacement?
Extract and return the bare symbol from SYM, when it is a symbol
with position. Return SYM unchanged when it is a symbol. Otherwise
signal an error. Ignore `symbols-with-pos-enable'.
Compare with `remove-pos-from-symbol'.
> I tried looking at the macros they call, which are in lisp.h. But
> those don't have doc strings and just call other functions that have
> no comments to say what they do.
> The macros and inline functions in lisp.h need to be documented there.
I agree, this is bad and needs rectifying. The time taken to fix this
would be less than the time wasted by people reading it and having to
figure out for themselves what each macro/function does.
When I added symbols with position to this part of lisp.h, I just did so
in the style of the existing code, i.e. undocumented.
I think somebody should fix it now.
> --
> Dr Richard Stallman (https://stallman.org)
> Chief GNUisance of the GNU Project (https://gnu.org)
> Founder, Free Software Foundation (https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
> -------------------- End of forwarded message --------------------
--
Alan Mackenzie (Nuremberg, Germany).
prev parent reply other threads:[~2025-01-05 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1rjVZT-0007Ko-8Q@fencepost.gnu.org>
2025-01-02 17:22 ` bug#75290: Fwd: remove-pos-from-symbol and bare-symbol Stefan Kangas
2025-01-05 16:08 ` Alan Mackenzie [this message]
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=Z3qug0VaUoY2lHrt@MAC.fritz.box \
--to=acm@muc.de \
--cc=75290@debbugs.gnu.org \
--cc=rms@gnu.org \
--cc=stefankangas@gmail.com \
/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).