76 |
the warning is logged in the warnings buffer, but the buffer |
the warning is logged in the warnings buffer, but the buffer |
77 |
is not immediately displayed. See also `warning-minimum-log-level'." |
is not immediately displayed. See also `warning-minimum-log-level'." |
78 |
:group 'warnings |
:group 'warnings |
79 |
:type '(choice (const :emergency) (const :error) (const :warning)) |
:type '(choice (const :emergency) (const :error) |
80 |
|
(const :warning) (const :debug)) |
81 |
:version "22.1") |
:version "22.1") |
82 |
(defvaralias 'display-warning-minimum-level 'warning-minimum-level) |
(defvaralias 'display-warning-minimum-level 'warning-minimum-level) |
83 |
|
|
84 |
(defcustom warning-minimum-log-level :warning |
(defcustom warning-minimum-log-level :warning |
85 |
"Minimum severity level for logging a warning. |
"Minimum severity level for logging a warning. |
86 |
If a warning severity level is lower than this, |
If a warning severity level is lower than this, |
87 |
the warning is completely ignored." |
the warning is completely ignored. |
88 |
|
Value must be lower or equal than `warning-minimum-level', |
89 |
|
because warnings not logged aren't displayed either." |
90 |
:group 'warnings |
:group 'warnings |
91 |
:type '(choice (const :emergency) (const :error) (const :warning)) |
:type '(choice (const :emergency) (const :error) |
92 |
|
(const :warning) (const :debug)) |
93 |
:version "22.1") |
:version "22.1") |
94 |
(defvaralias 'log-warning-minimum-level 'warning-minimum-log-level) |
(defvaralias 'log-warning-minimum-level 'warning-minimum-log-level) |
95 |
|
|
207 |
\(The rest of the symbols represent subcategories, for warning purposes |
\(The rest of the symbols represent subcategories, for warning purposes |
208 |
only, and you can use whatever symbols you like.) |
only, and you can use whatever symbols you like.) |
209 |
|
|
210 |
LEVEL should be either :warning, :error, or :emergency. |
LEVEL should be either :debug, :warning, :error, or :emergency |
211 |
|
\(but see `warning-minimum-level' and `warning-minimum-log-level'). |
212 |
|
|
213 |
:emergency -- a problem that will seriously impair Emacs operation soon |
:emergency -- a problem that will seriously impair Emacs operation soon |
214 |
if you do not attend to it promptly. |
if you do not attend to it promptly. |
215 |
:error -- data or circumstances that are inherently wrong. |
:error -- data or circumstances that are inherently wrong. |
229 |
(if (assq level warning-level-aliases) |
(if (assq level warning-level-aliases) |
230 |
(setq level (cdr (assq level warning-level-aliases)))) |
(setq level (cdr (assq level warning-level-aliases)))) |
231 |
(or (< (warning-numeric-level level) |
(or (< (warning-numeric-level level) |
232 |
(warning-numeric-level warning-minimum-log-level)) |
(warning-numeric-level warning-minimum-log-level)) |
233 |
(warning-suppress-p type warning-suppress-log-types) |
(warning-suppress-p type warning-suppress-log-types) |
234 |
(let* ((typename (if (consp type) (car type) type)) |
(let* ((typename (if (consp type) (car type) type)) |
235 |
(buffer (get-buffer-create (or buffer-name "*Warnings*"))) |
(buffer (get-buffer-create (or buffer-name "*Warnings*"))) |
297 |
\(The rest of the symbols represent subcategories and |
\(The rest of the symbols represent subcategories and |
298 |
can be whatever you like.) |
can be whatever you like.) |
299 |
|
|
300 |
LEVEL should be either :warning, :error, or :emergency. |
LEVEL should be either :debug, :warning, :error, or :emergency |
301 |
|
\(but see `warning-minimum-level' and `warning-minimum-log-level'). |
302 |
|
|
303 |
:emergency -- a problem that will seriously impair Emacs operation soon |
:emergency -- a problem that will seriously impair Emacs operation soon |
304 |
if you do not attend to it promptly. |
if you do not attend to it promptly. |
305 |
:error -- invalid data or circumstances. |
:error -- invalid data or circumstances. |
306 |
:warning -- suspicious data or circumstances." |
:warning -- suspicious data or circumstances. |
307 |
|
:debug -- info for debugging only." |
308 |
(display-warning type (apply 'format message args) level)) |
(display-warning type (apply 'format message args) level)) |
309 |
|
|
310 |
;;;###autoload |
;;;###autoload |