]> git.eshelyaron.com Git - emacs.git/commitdiff
(occur): Avoid "1 lines" in echo area.
authorRichard M. Stallman <rms@gnu.org>
Tue, 4 Jun 1996 15:31:01 +0000 (15:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 4 Jun 1996 15:31:01 +0000 (15:31 +0000)
lisp/replace.el

index 747adbe27e497656f0bb1f63733f15ea6021ffa1..90c66fa47c0b87c67573dfe5489abe43bc6a75ab 100644 (file)
@@ -448,11 +448,13 @@ It serves as a menu to find any of the occurrences in this buffer.
            ;; 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)))))))))
+           (let ((message-string
+                  (if (= (length occur-pos-list) 1)
+                      "1 line"
+                    (format "%d lines" (length occur-pos-list)))))
+             (insert message-string)
+             (if (interactive-p)
+                 (message "%s matched" message-string)))))))))
 \f
 ;; It would be nice to use \\[...], but there is no reasonable way
 ;; to make that display both SPC and Y.