2002-07-26 Juanma Barranquero <lektu@terra.es>
- * warnings.el (lwarn, warn): Doc fix.
+ * warnings.el (lwarn, warn, warning-levels): Doc fix.
+ (warning-suppress-log-types): Fix typo.
+ (display-warning): Fix typo. Remove useless asignment to free variable
+ `group-string'.
2002-07-25 Markus Rost <rost@math.ohio-state.edu>
(:error "Error%s: ")
(:warning "Warning%s: ")
(:debug "Debug%s: "))
- "List of severity level definitions for `define-warnings'.
+ "List of severity level definitions for `display-warning'.
Each element looks like (LEVEL STRING FUNCTION) and
defines LEVEL as a severity level. STRING is the description
to use in the buffer, and FUNCTION (which may be omitted)
The element must match the first elements of GROUP.
Thus, (foo bar) as an element matches (foo bar)
or (foo bar ANYTHING...) as GROUP.
-If GROUP is a symbol FOO, that is equivalent to the list (FOO)
+If GROUP is a symbol FOO, that is equivalent to the list (FOO),
so only the element (FOO) will match it."
:group 'warnings
:type '(repeat (repeat symbol))
(let* ((elt (assq level warning-levels))
(link (memq elt warning-levels)))
(length link)))
-
+
(defvar warning-series nil
"Non-nil means treat multiple `display-warning' calls as a series.
An integer is a position in the warnings buffer
;;;###autoload
(defun display-warning (group message &optional level buffer-name)
"Display a warning message, MESSAGE.
-GROUP should be a custom group name (a symbol).
+GROUP should be a custom group name (a symbol),
or else a list of symbols whose first element is a custom group name.
\(The rest of the symbols represent subcategories, for warning purposes
only, and you can use whatever symbols you like.)
(if warning-prefix-function
(setq level-info (funcall warning-prefix-function
level level-info)))
- (setq group-string (format warning-group-format groupname))
- (insert (format (nth 1 level-info) group-string)
+ (insert (format (nth 1 level-info)
+ (format warning-group-format groupname))
message)
(newline)
(when (and warning-fill-prefix (not (string-match "\n" message)))
;; Interactively, decide whether the warning merits
;; immediate display.
(or (< (warning-numeric-level level)
- (warning-numeric-level warning-minimum-level))
+ (warning-numeric-level warning-minimum-level))
(warning-suppress-p group warning-suppress-types)
(let ((window (display-buffer buffer)))
(when warning-series