GNU bug report logs - #41793
`comment-only-p' erroneously flags blank lines as comments

Previous Next

Package: emacs;

Reported by: Toby Cubitt <toby-dated-1593021285.3f7973 <at> dr-qubit.org>

Date: Wed, 10 Jun 2020 18:02:02 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Toby Cubitt <toby-dated-1593024851.318b83 <at> dr-qubit.org>
Cc: 41793 <at> debbugs.gnu.org
Subject: bug#41793: `comment-only-p' erroneously flags blank lines as comments
Date: Mon, 09 May 2022 13:14:44 +0200
Lars Ingebrigtsen <larsi <at> 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




This bug report was last modified 3 years and 14 days ago.

Previous Next


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