GNU bug report logs -
#28428
comment-search-backward with no comments
Previous Next
Reported by: "N. Raghavendra" <raghu <at> hri.res.in>
Date: Mon, 11 Sep 2017 22:38:02 UTC
Severity: normal
Fixed in version 27.1
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 28428 <at> debbugs.gnu.org (full text, mbox):
At 2017-09-22T12:40:58-04:00, Stefan Monnier wrote:
> That looks fine, thank you. But I think the simpler patch below works
> as well:
>
> - (if (not (re-search-backward comment-start-skip limit t))
> + (if (not (re-search-backward comment-start-skip limit 'move))
That's indeed nicer! Thanks for pointing out that the NOERROR arg of
`re-search-backward' can be given a value outside {t,nil} to move point
to LIMIT. It's a lesson to myself that I should read docstrings more
carefully.
> I wonder if there's code out there that depends on this behavior, tho,
> since AFAIK it's been behaving this way "forever".
As you say, it doesn't really matter; it's just that there is a
discrepancy between the docstring specification of the effects of the
function and the said effects, which would be good to remove.
I came across it because I've been playing around with a major mode
based on AUCTeX, and was writing ERT tests for some initialisation code
I was using from AUCTeX. Perhaps such tests are the only places where
these trivial errors matter.
Regards,
Raghu.
--
N. Raghavendra <raghu <at> hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
This bug report was last modified 7 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.