GNU bug report logs - #62453
30.0.50; Semicolon in view-lossage yields wrong alignment

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Sun, 26 Mar 2023 05:34:02 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #11 received at 62453 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 62453 <at> debbugs.gnu.org
Subject: Re: bug#62453: 30.0.50; Semicolon in view-lossage yields wrong
 alignment
Date: Sun, 26 Mar 2023 12:39:13 +0300
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Sun, 26 Mar 2023 08:33:18 +0300
>> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> It seems like key sequences that end with a semicolon hinder the
>> alignment in the `view-lossage` output buffer.  This is a regression
>> with respect to the (IMO correct) behavior in Emacs 27.
>> 
>> [...]
>
> Does the patch below give good results?

Thanks, that works well AFAICT from a few experiments.

> Stefan, any better ideas?  It looks like relying on comment-indent is
> quite fragile here, as keys can include a semi-colon, which will be
> interpreted as beginning a comment in too many places.  I wonder
> whether the two extra bindings I add below really plug all the holes.
>
> diff --git a/lisp/help.el b/lisp/help.el
> index 3e94b50..13e61c0 100644
> --- a/lisp/help.el
> +++ b/lisp/help.el
> @@ -689,6 +689,10 @@ view-lossage
>        (with-current-buffer standard-output
>  	(goto-char (point-min))
>  	(let ((comment-start ";; ")
> +              ;; Prevent 'comment-indent' from handling a single
> +              ;; semicolon as the beginning of a comment.
> +              (comment-start-skip ";; ")
> +              (comment-use-syntax nil)
>                (comment-column 24))
>            (while (not (eobp))
>              (comment-indent)





This bug report was last modified 2 years and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.