bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62453: 30.0.50; Semicolon in view-lossage yields wrong alignment


From: Eshel Yaron
Subject: bug#62453: 30.0.50; Semicolon in view-lossage yields wrong alignment
Date: Sun, 26 Mar 2023 12:39:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@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@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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]