Commit c4795b11 authored by Chong Yidong's avatar Chong Yidong
Browse files

(display-warning): Issue a message if called during daemon

parent f76103b7
......@@ -268,7 +268,7 @@ See also `warning-series', `warning-prefix-function' and
(goto-char warning-series)))
(if (nth 2 level-info)
(funcall (nth 2 level-info)))
(if noninteractive
(cond (noninteractive
;; Noninteractively, take the text we inserted
;; in the warnings buffer and print it.
;; Do this unconditionally, since there is no way
......@@ -280,7 +280,18 @@ See also `warning-series', `warning-prefix-function' and
(goto-char end)
(if (bolp)
(forward-char -1))
(message "%s" (buffer-substring start (point)))))
(message "%s" (buffer-substring start (point))))))
((and (daemonp) (null after-init-time))
;; Warnings assigned during daemon initialization go into
;; the messages buffer.
(message "%s"
(with-current-buffer buffer
(goto-char end)
(if (bolp)
(forward-char -1))
(buffer-substring start (point))))))
;; Interactively, decide whether the warning merits
;; immediate display.
(or (< (warning-numeric-level level)
......@@ -290,7 +301,7 @@ See also `warning-series', `warning-prefix-function' and
(when (and (markerp warning-series)
(eq (marker-buffer warning-series) buffer))
(set-window-start window warning-series))
(sit-for 0)))))))
(sit-for 0))))))))
(defun lwarn (type level message &rest args)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment