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

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

bug#32462: 26.1; Can `count-lines' be rewritten to use the newline cache


From: Phil Sainty
Subject: bug#32462: 26.1; Can `count-lines' be rewritten to use the newline cache?
Date: Sun, 19 Aug 2018 00:10:27 +1200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 18/08/18 02:40, Eli Zaretskii wrote:
>> From: Phil Sainty <address@hidden>
>> `count-lines' uses a regexp search to find all the newlines (and/or
>> carriage returns
> 
> It uses regexp search only when selective-display is in effect, which
> means almost never.  Otherwise, it uses forward-line, which uses
> scan_newline_from_point, which already uses the newline cache (unless
> the cache is disabled).

Ah, thanks Eli; I see that now.  A look at the C code suggests that the
newline cache is also a more complicated arrangement than I'd imagined,
so I don't think my original thoughts about this were actually viable.

I'm closing this bug.






reply via email to

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