Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
47479:c25e0ce03c50 | 47480:0d4291124ff0 |
---|---|
255 ;; Noninteractively, take the text we inserted | 255 ;; Noninteractively, take the text we inserted |
256 ;; in the warnings buffer and print it. | 256 ;; in the warnings buffer and print it. |
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) |
264 (warning-numeric-level warning-minimum-level)) | 270 (warning-numeric-level warning-minimum-level)) |
265 (warning-suppress-p group warning-suppress-types) | 271 (warning-suppress-p group warning-suppress-types) |