diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-11-24 08:39:41 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-11-24 08:39:41 +0000 |
commit | 85ce74412f980058450d70a38e52f937c1e67d59 (patch) | |
tree | 1d0c13223d0de0d6d8b2439a4a3318925a30487a /lisp/replace.el | |
parent | f509d1c4125775a1441fca3a5f463f07c83a25a4 (diff) | |
download | emacs-85ce74412f980058450d70a38e52f937c1e67d59.tar.gz |
(occur): Put number of matches in the header line.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 7 |
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. (with-output-to-temp-buffer "*Occur*" (save-excursion (set-buffer standard-output) - (insert "Lines matching ") + ;; We will insert the number of lines, and "lines", later. + (insert " matching ") (prin1 regexp) (insert " in buffer " (buffer-name buffer) ?. ?\n) (occur-mode) @@ -425,6 +426,10 @@ It serves as a menu to find any of the occurrences in this buffer. (set-buffer standard-output) ;; Put positions in increasing order to go with buffer. (setq occur-pos-list (nreverse occur-pos-list)) + (goto-char (point-min)) + (if (= (length occur-pos-list) 1) + (insert "1 line") + (insert (format "%d lines" (length occur-pos-list)))) (if (interactive-p) (message "%d matching lines." (length occur-pos-list))))))) |