[Top][All Lists]

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

Word count in Emacs

From: B. T. Raven
Subject: Word count in Emacs
Date: Fri, 14 Sep 2012 12:55:44 -0500
User-agent: Mozilla/5.0 (Windows NT 5.0; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

Can anyone give me a clue why the following doesn't print a number in
the mini-buffer or to the *Messages* buffer?:

(defun count-words (start end) ;; alias wce
    "Print number of words in the region."
    (interactive "r")
        (narrow-to-region start end)
        (goto-char (point-min))
        (count-matches "\\sw+"))))

an alias is assigned so that I can invoke with

M-x wce (word count emacs)



reply via email to

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