]> git.eshelyaron.com Git - emacs.git/commitdiff
(display-warning): In batch mode,
authorRichard M. Stallman <rms@gnu.org>
Sat, 14 Sep 2002 17:35:32 +0000 (17:35 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 14 Sep 2002 17:35:32 +0000 (17:35 +0000)
exclude the final newline from the arg to `message'.

lisp/ChangeLog
lisp/warnings.el

index ccda6c1344e9dfa3b2b3bb1d066c3233872a8b02..f12d7a6e3a72e41eb5fd8713860bb2ba2e99b923 100644 (file)
@@ -1,3 +1,8 @@
+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
index 07075fa970cf6ef9bc198034f5faf198438a3395..99f345baa55dc6e5008aa4500d736c52765ace32 100644 (file)
@@ -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)