diff options
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index b81e0d7ee8..6e37700b91 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -974,7 +974,9 @@ rather than the region. If called from Lisp, return the number of words between positions START and END." - (interactive "r\nP") + (interactive (if current-prefix-arg + (list nil nil current-prefix-arg) + (list (region-beginning) (region-end) nil))) (cond ((not (called-interactively-p 'any)) (count-words start end)) (arg @@ -1008,9 +1010,7 @@ END, without printing any message." (defun count-words--buffer-message () (count-words--message - (if (= (point-max) (1+ (buffer-size))) - "Buffer" - "Narrowed part of buffer") + (if (buffer-narrowed-p) "Narrowed part of buffer" "Buffer") (point-min) (point-max))) (defun count-words--message (str start end) |