From: Eli Zaretskii <eliz@gnu.org>
To: sigurddam@hotmail.com, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 73872@debbugs.gnu.org
Subject: bug#73872: 30.0.91; emacs-lisp-mode-syntax-table active when calling `describe-variable' on variable with textually large value.
Date: Sat, 30 Nov 2024 11:49:12 +0200 [thread overview]
Message-ID: <867c8l9hlz.fsf@gnu.org> (raw)
In-Reply-To: <jwvsertuche.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Thu, 14 Nov 2024 09:40:48 -0500)
Ping! Sigurd, could you please answer Stefan's questions?
> Cc: Sigurd Dam Sonniks <sigurddam@hotmail.com>, 73872@debbugs.gnu.org
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 14 Nov 2024 09:40:48 -0500
>
> >> When you call `describle-variable' on a variable with a value that's
> >> large enough that it's moved to the end of the help buffer, the syntax
> >> table is changed to `emacs-lisp-mode-syntax-table' but never changed
> >> back. There is a very easy fix where you just set it back to
> >> `help-mode-syntax-table' at the end of the enclosing
> >> `with-current-buffer', but I guess you could also switch to a
> >> temporary buffer instead. Below is the relevant code snippet with the
> >> first suggested fix applied.
>
> I'm curious: in which context did you notice this?
> Does it lead to an undesirable behavior in a specific case?
>
> > Shouldn't the syntax table be left at that value until the buffer is
> > reused for another variable/function? Otherwise, why do we set the
> > syntax table to this value? Stefan, do you know the reason?
>
> FWIW, according to my reading of the Git history, this behavior dates
> back at least to 2001 when Miles split `help.el` into several files
> (I didn't bother to check the previous history of that code on
> `help.el`), so it's far from new.
>
> AFAICT the syntax-table of the *Help* buffer shouldn't matter very much
> once the buffer is filled: it affects only navigation by the user, where
> the prose part would presumably prefer a syntax-table somewhat like that
> of `text-mode` whereas the var's value part would prefer something like
> that of `elisp-mode`.
>
> But, AFAICT the `help-mode-syntax-table` happens to be a derivative of
> `emacs-lisp-mode-syntax-table` just with extra matching of ‘...’, so
> reverting to it would be safe enough in most cases. This said, I think
> The Right Thing™ would be to add a `syntax-table` property on the
> printed value (regardless if it stays at the beginning or is moved to
> the end of the buffer) so it's not affected by the syntax-table used in
> the rest of the buffer.
>
>
> Stefan
>
>
>
>
>
next prev parent reply other threads:[~2024-11-30 9:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 22:14 bug#73872: 30.0.91; emacs-lisp-mode-syntax-table active when calling `describe-variable' on variable with textually large value Sigurd Dam Sonniks
2024-11-02 11:55 ` Eli Zaretskii
[not found] ` <jwvsertuche.fsf-monnier+emacs@gnu.org>
2024-11-30 9:49 ` Eli Zaretskii [this message]
[not found] ` <DBAP195MB104976F58C31051E74A4F05CB92B2@DBAP195MB1049.EURP195.PROD.OUTLOOK.COM>
[not found] ` <jwvh67nvuta.fsf-monnier+emacs@gnu.org>
2024-12-07 13:10 ` Eli Zaretskii
2024-12-21 9:12 ` Eli Zaretskii
2024-12-21 15:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=867c8l9hlz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73872@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sigurddam@hotmail.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 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.