Mercurial > emacs
diff lisp/warnings.el @ 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 | b4cd4023d957 |
children | 3f0f00c7a374 |
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)