emacs-devel
[Top][All Lists]
Advanced

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

Counting sentences in `count-words'


From: Manuel Giraud
Subject: Counting sentences in `count-words'
Date: Fri, 20 May 2022 14:16:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)

Hi,

Why not have emacs to count sentences besides lines, words and
characters? So far, here is the patch that I end up with.

Comments:

    - the `count-sentences' function seems a bit out of place in
      "simple.el" but since I'm using it here I left it there;
          
    - I had to ignore-errors on (end-of-paragraph-text) in
      `forward-sentence' otherwise `count-words' won't work on a buffer
      without a terminal new line. But now `forward-sentence' won't
      error out at the end of buffer. Maybe there is a way around it
      that I don't know.
      

Attachment: 0001-Make-count-words-count-sentences.patch
Description: Text Data

-- 
Manuel Giraud

reply via email to

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