changeset 15328:90dc960355d9

(occur): Avoid "1 lines" in echo area.
author Richard M. Stallman <rms@gnu.org>
date Tue, 04 Jun 1996 15:31:01 +0000
parents 2c508f2c884d
children 19008fd7774d
files lisp/replace.el
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Tue Jun 04 15:27:52 1996 +0000
+++ b/lisp/replace.el	Tue Jun 04 15:31:01 1996 +0000
@@ -448,11 +448,13 @@
 	    ;; 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)))))))))
 
 ;; It would be nice to use \\[...], but there is no reasonable way
 ;; to make that display both SPC and Y.