From: Richard M. Stallman Date: Sat, 14 Sep 2002 17:35:32 +0000 (+0000) Subject: (display-warning): In batch mode, X-Git-Tag: ttn-vms-21-2-B4~13169 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf2a6c399cf5f48ba47eaa5133c009a271e98401;p=emacs.git (display-warning): In batch mode, exclude the final newline from the arg to `message'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ccda6c1344e..f12d7a6e3a7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-09-14 Richard M. Stallman + + * warnings.el (display-warning): In batch mode, + exclude the final newline from the arg to `message'. + 2002-09-13 Markus Rost * 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 ;; 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)