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

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

bug#41793: `comment-only-p' erroneously flags blank lines as comments


From: Lars Ingebrigtsen
Subject: bug#41793: `comment-only-p' erroneously flags blank lines as comments
Date: Mon, 09 May 2022 13:14:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> Gah. That attempt breaks flagging of comments separated by
>> whitespace-only lines. Maybe this?
>
> Do you have an example of when that fails?

The test was

;; foo
;;       
;; bar

where comment-only-p would give the wrong results.

Anyway, I think it's ambiguous whether whitespace only should be a
comment or not.  The current algo considers this to be one comment:

;; foo

;; bar

And I think that's correct.  If we consider whitespace lines to not be
comments, this would change how our comment navigation commands work.

So there's some DWIM in this area, but I think how it currently works is
basically the way we want it to work, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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