changeset 47480:0d4291124ff0

(display-warning): In batch mode, exclude the final newline from the arg to `message'.
author Richard M. Stallman <rms@gnu.org>
date Sat, 14 Sep 2002 17:35:19 +0000
parents c25e0ce03c50
children 8d8b9ebf5798
files lisp/warnings.el
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/warnings.el	Fri Sep 13 22:19:48 2002 +0000
+++ b/lisp/warnings.el	Sat Sep 14 17:35:19 2002 +0000
@@ -257,7 +257,13 @@
 	    ;; Do this unconditionally, since there is no way
 	    ;; to view logged messages unless we output them.
 	    (with-current-buffer buffer
-	      (message "%s" (buffer-substring start end)))
+	      (save-excursion
+		;; Don't include the final newline in the arg
+		;; to `message', because it adds a newline.
+		(goto-char end)
+		(if (bolp)
+		    (forward-char -1))
+		(message "%s" (buffer-substring start (point)))))
 	  ;; Interactively, decide whether the warning merits
 	  ;; immediate display.
 	  (or (< (warning-numeric-level level)