[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9429: 24.0.50; Extended count-words
From: |
Stefan Monnier |
Subject: |
bug#9429: 24.0.50; Extended count-words |
Date: |
Tue, 06 Sep 2011 21:51:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> It seems to me that it could, however, replace count-words-region
> (ideally, from my point of view, with a “wc” convenience alias), and I’d
> be happy to supply such a definition.
That would be good, yes. I don't see a need for a `wc' alias, tho.
Stefan
PS: Note that the (use-region-p) check should be within the `interactive'
spec rather than within the function body, as in:
(interactive (if (use-region-p) (list (region-beginning) (region-end))
(list (point-min) (point-max))))
this both because you avoid getting errors (from the "r" spec) when the
mark is not yet set, and because it's better to compute interactive args
in the `interactive' spec than within the function body under
a called-interactively-p test.