aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 10c41344006..886748d1713 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -352,7 +352,8 @@ It serves as a menu to find any of the occurrences in this buffer.
352 (with-output-to-temp-buffer "*Occur*" 352 (with-output-to-temp-buffer "*Occur*"
353 (save-excursion 353 (save-excursion
354 (set-buffer standard-output) 354 (set-buffer standard-output)
355 (insert "Lines matching ") 355 ;; We will insert the number of lines, and "lines", later.
356 (insert " matching ")
356 (prin1 regexp) 357 (prin1 regexp)
357 (insert " in buffer " (buffer-name buffer) ?. ?\n) 358 (insert " in buffer " (buffer-name buffer) ?. ?\n)
358 (occur-mode) 359 (occur-mode)
@@ -425,6 +426,10 @@ It serves as a menu to find any of the occurrences in this buffer.
425 (set-buffer standard-output) 426 (set-buffer standard-output)
426 ;; Put positions in increasing order to go with buffer. 427 ;; Put positions in increasing order to go with buffer.
427 (setq occur-pos-list (nreverse occur-pos-list)) 428 (setq occur-pos-list (nreverse occur-pos-list))
429 (goto-char (point-min))
430 (if (= (length occur-pos-list) 1)
431 (insert "1 line")
432 (insert (format "%d lines" (length occur-pos-list))))
428 (if (interactive-p) 433 (if (interactive-p)
429 (message "%d matching lines." (length occur-pos-list))))))) 434 (message "%d matching lines." (length occur-pos-list)))))))
430 435