exclude the final newline from the arg to `message'.
+2002-09-14 Richard M. Stallman <rms@gnu.org>
+
+ * warnings.el (display-warning): In batch mode,
+ exclude the final newline from the arg to `message'.
+
2002-09-13 Markus Rost <rost@math.ohio-state.edu>
* files.el (diff-buffer-with-file): Check whether associated file
;; 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)