# HG changeset patch # User Richard M. Stallman # Date 1032024919 0 # Node ID 0d4291124ff0739aeaf08b9aedcec638d8ce1777 # Parent c25e0ce03c50de579b9918a0f616d946637da1a2 (display-warning): In batch mode, exclude the final newline from the arg to `message'. diff -r c25e0ce03c50 -r 0d4291124ff0 lisp/warnings.el --- 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)