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

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

bug#36970: 26.2; invalid-read-syntax could print the location of the err


From: Eli Zaretskii
Subject: bug#36970: 26.2; invalid-read-syntax could print the location of the error
Date: Mon, 01 Feb 2021 17:06:59 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacsuser@freemail.hu,  36970@debbugs.gnu.org
> Date: Mon, 01 Feb 2021 09:40:07 +0100
> 
>       nlines = display_count_lines (startpos_byte,
>                                     PT_BYTE, PT, &junk);
> 
> So I guess I should just put the prototype in lisp.h and use it?

Yes (and make it non-static).  Alternatively, define a wrapper for it
that doesn't accept that last arg, and make _that_ wrapper extern and
more suitably named.

> (It's kinda surprising that no other part of Emacs has felt the need
> to compute a line number before...)

Emacs almost never counts lines, except for 2 display features: the
line-number display in the mode line and display-line-numbers-mode.
The buffer-with-gap paradigm makes a point of not knowing where each
line ends and how many lines are there.





reply via email to

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