2012-07-18 Chong Yidong <cyd@gnu.org>
+ * simple.el (count-words): Report on narrowing (Bug#9959).
+
* bindings.el: Bind M-= to count-words.
* faces.el (face-spec-reset-face): Handle reverse video (Bug#4238).
((use-region-p)
(call-interactively 'count-words-region))
(t
- (count-words--message "Buffer" (point-min) (point-max)))))
+ (count-words--message
+ (if (= (point-max) (1+ (buffer-size)))
+ "Buffer"
+ "Narrowed part of buffer")
+ (point-min) (point-max)))))
(defun count-words--message (str start end)
(let ((lines (count-lines start end))