Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c4795b11
Commit
c4795b11
authored
Oct 11, 2008
by
Chong Yidong
Browse files
(display-warning): Issue a message if called during daemon
initialization.
parent
f76103b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
lisp/emacs-lisp/warnings.el
lisp/emacs-lisp/warnings.el
+23
-12
No files found.
lisp/emacs-lisp/warnings.el
View file @
c4795b11
...
@@ -268,7 +268,7 @@ See also `warning-series', `warning-prefix-function' and
...
@@ -268,7 +268,7 @@ See also `warning-series', `warning-prefix-function' and
(
goto-char
warning-series
)))
(
goto-char
warning-series
)))
(
if
(
nth
2
level-info
)
(
if
(
nth
2
level-info
)
(
funcall
(
nth
2
level-info
)))
(
funcall
(
nth
2
level-info
)))
(
if
noninteractive
(
cond
(
noninteractive
;; Noninteractively, take the text we inserted
;; Noninteractively, take the text we inserted
;; in the warnings buffer and print it.
;; in the warnings buffer and print it.
;; Do this unconditionally, since there is no way
;; Do this unconditionally, since there is no way
...
@@ -280,17 +280,28 @@ See also `warning-series', `warning-prefix-function' and
...
@@ -280,17 +280,28 @@ See also `warning-series', `warning-prefix-function' and
(
goto-char
end
)
(
goto-char
end
)
(
if
(
bolp
)
(
if
(
bolp
)
(
forward-char
-1
))
(
forward-char
-1
))
(
message
"%s"
(
buffer-substring
start
(
point
)))))
(
message
"%s"
(
buffer-substring
start
(
point
))))))
;; Interactively, decide whether the warning merits
((
and
(
daemonp
)
(
null
after-init-time
))
;; immediate display.
;; Warnings assigned during daemon initialization go into
(
or
(
<
(
warning-numeric-level
level
)
;; the messages buffer.
(
warning-numeric-level
warning-minimum-level
))
(
message
"%s"
(
warning-suppress-p
type
warning-suppress-types
)
(
with-current-buffer
buffer
(
let
((
window
(
display-buffer
buffer
)))
(
save-excursion
(
when
(
and
(
markerp
warning-series
)
(
goto-char
end
)
(
eq
(
marker-buffer
warning-series
)
buffer
))
(
if
(
bolp
)
(
set-window-start
window
warning-series
))
(
forward-char
-1
))
(
sit-for
0
)))))))
(
buffer-substring
start
(
point
))))))
(
t
;; Interactively, decide whether the warning merits
;; immediate display.
(
or
(
<
(
warning-numeric-level
level
)
(
warning-numeric-level
warning-minimum-level
))
(
warning-suppress-p
type
warning-suppress-types
)
(
let
((
window
(
display-buffer
buffer
)))
(
when
(
and
(
markerp
warning-series
)
(
eq
(
marker-buffer
warning-series
)
buffer
))
(
set-window-start
window
warning-series
))
(
sit-for
0
))))))))
;;;###autoload
;;;###autoload
(
defun
lwarn
(
type
level
message
&rest
args
)
(
defun
lwarn
(
type
level
message
&rest
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment