emacs-devel
[Top][All Lists]
Advanced

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

Re: Counting sentences in `count-words'


From: Manuel Giraud
Subject: Re: Counting sentences in `count-words'
Date: Wed, 25 May 2022 10:17:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)

Filipp Gunbin <fgunbin@fastmail.fm> writes:

> With just a single newline in file, (count-sentences (point-min)
> (point-max)) loops indefinitely.

Hi Filipp,

I'm not able to reproduce. For me™, it returns 0. I've tried with both
DOS and Unix line terminator.

> I guess there're two options for safe movement:
>
> - Either rely on what movement function returns - in this case
>   forward-sentence doesn't specify return value, so no luck
>
> - Or track the point yourself, and check whether you've moved.  I think
>   you should do this here.

Maybe you're right, I can then avoid modifying 'forward-sentence'.
-- 
Manuel Giraud



reply via email to

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