aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-09-14 17:35:32 +0000
committerRichard M. Stallman2002-09-14 17:35:32 +0000
commitbf2a6c399cf5f48ba47eaa5133c009a271e98401 (patch)
tree56d6b0c68cfbe9b0a87f5db1d1d73da63b58b375
parentfacebc7bbb941af0ba03f4ba807027a7c9d79b1a (diff)
downloademacs-bf2a6c399cf5f48ba47eaa5133c009a271e98401.tar.gz
emacs-bf2a6c399cf5f48ba47eaa5133c009a271e98401.zip
(display-warning): In batch mode,
exclude the final newline from the arg to `message'.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/warnings.el8
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ccda6c1344e..f12d7a6e3a7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12002-09-14 Richard M. Stallman <rms@gnu.org>
2
3 * warnings.el (display-warning): In batch mode,
4 exclude the final newline from the arg to `message'.
5
12002-09-13 Markus Rost <rost@math.ohio-state.edu> 62002-09-13 Markus Rost <rost@math.ohio-state.edu>
2 7
3 * files.el (diff-buffer-with-file): Check whether associated file 8 * files.el (diff-buffer-with-file): Check whether associated file
diff --git a/lisp/warnings.el b/lisp/warnings.el
index 07075fa970c..99f345baa55 100644
--- a/lisp/warnings.el
+++ b/lisp/warnings.el
@@ -257,7 +257,13 @@ See also `warning-series', `warning-prefix-function' and
257 ;; Do this unconditionally, since there is no way 257 ;; Do this unconditionally, since there is no way
258 ;; to view logged messages unless we output them. 258 ;; to view logged messages unless we output them.
259 (with-current-buffer buffer 259 (with-current-buffer buffer
260 (message "%s" (buffer-substring start end))) 260 (save-excursion
261 ;; Don't include the final newline in the arg
262 ;; to `message', because it adds a newline.
263 (goto-char end)
264 (if (bolp)
265 (forward-char -1))
266 (message "%s" (buffer-substring start (point)))))
261 ;; Interactively, decide whether the warning merits 267 ;; Interactively, decide whether the warning merits
262 ;; immediate display. 268 ;; immediate display.
263 (or (< (warning-numeric-level level) 269 (or (< (warning-numeric-level level)