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

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

bug#68215: Bug in what-page


From: Eli Zaretskii
Subject: bug#68215: Bug in what-page
Date: Sat, 13 Jan 2024 12:10:24 +0200

> From: Lars Brinkhoff <lars.brinkhoff@gmail.com>
> Date: Thu, 11 Jan 2024 14:49:58 +0100
> Cc: 68215@debbugs.gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> wrote:
> > It should be a simple matter to countermand this special-casing in
> > what-page, while still using count-lines.  Or am I missing something?
> 
> That's probably better.  I'm attaching an updated patch which uses
> count-lines instead.  It countermands the special case by checking
> (bolp) and then doing the opposite adjustment.
> 
> However, there's one more case to consider: when point starts out
> right after a page delimiter (i.e. the very first positon on a page),
> the page--what-page while loop will leave the final point there too,
> and then count-lines will return 0.  The line number should be 1, so
> an adjustment is needed there too.
> 
> The updated test is the same as the previous round, and they still
> pass with the new patch.
> 
> > > +  "Return a list of the page number of point, and the line number
> > > +within that page."
> >
> > Our convention is to have the first line of a doc string be a single
> > complete sentence.
> 
> Fixed by moving info to a second line, or rephrasing to one line.

Thanks, installed on the master branch, and closing the bug.





reply via email to

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