/[emacs]/emacs/lisp/warnings.el
ViewVC logotype

Diff of /emacs/lisp/warnings.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by lektu, Fri Jul 26 07:08:58 2002 UTC revision 1.6 by lektu, Fri Jul 26 07:57:24 2002 UTC
# Line 34  Line 34 
34      (:error "Error%s: ")      (:error "Error%s: ")
35      (:warning "Warning%s: ")      (:warning "Warning%s: ")
36      (:debug "Debug%s: "))      (:debug "Debug%s: "))
37    "List of severity level definitions for `define-warnings'.    "List of severity level definitions for `display-warning'.
38  Each element looks like (LEVEL STRING FUNCTION) and  Each element looks like (LEVEL STRING FUNCTION) and
39  defines LEVEL as a severity level.  STRING is the description  defines LEVEL as a severity level.  STRING is the description
40  to use in the buffer, and FUNCTION (which may be omitted)  to use in the buffer, and FUNCTION (which may be omitted)
# Line 86  the warning is completely ignored. Line 86  the warning is completely ignored.
86  The element must match the first elements of GROUP.  The element must match the first elements of GROUP.
87  Thus, (foo bar) as an element matches (foo bar)  Thus, (foo bar) as an element matches (foo bar)
88  or (foo bar ANYTHING...) as GROUP.  or (foo bar ANYTHING...) as GROUP.
89  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),
90  so only the element (FOO) will match it."  so only the element (FOO) will match it."
91    :group 'warnings    :group 'warnings
92    :type '(repeat (repeat symbol))    :type '(repeat (repeat symbol))
# Line 121  the beginning of the warning.") Line 121  the beginning of the warning.")
121    (let* ((elt (assq level warning-levels))    (let* ((elt (assq level warning-levels))
122           (link (memq elt warning-levels)))           (link (memq elt warning-levels)))
123      (length link)))      (length link)))
124      
125  (defvar warning-series nil  (defvar warning-series nil
126    "Non-nil means treat multiple `display-warning' calls as a series.    "Non-nil means treat multiple `display-warning' calls as a series.
127  An integer is a position in the warnings buffer  An integer is a position in the warnings buffer
# Line 171  SUPPRESS-LIST is the list of kinds of wa Line 171  SUPPRESS-LIST is the list of kinds of wa
171  ;;;###autoload  ;;;###autoload
172  (defun display-warning (group message &optional level buffer-name)  (defun display-warning (group message &optional level buffer-name)
173    "Display a warning message, MESSAGE.    "Display a warning message, MESSAGE.
174  GROUP should be a custom group name (a symbol).  GROUP should be a custom group name (a symbol),
175  or else a list of symbols whose first element is a custom group name.  or else a list of symbols whose first element is a custom group name.
176  \(The rest of the symbols represent subcategories, for warning purposes  \(The rest of the symbols represent subcategories, for warning purposes
177  only, and you can use whatever symbols you like.)  only, and you can use whatever symbols you like.)
# Line 215  See also `warning-series', `warning-pref Line 215  See also `warning-series', `warning-pref
215            (if warning-prefix-function            (if warning-prefix-function
216                (setq level-info (funcall warning-prefix-function                (setq level-info (funcall warning-prefix-function
217                                          level level-info)))                                          level level-info)))
218            (setq group-string (format warning-group-format groupname))            (insert (format (nth 1 level-info)
219            (insert (format (nth 1 level-info) group-string)                            (format warning-group-format groupname))
220                    message)                    message)
221            (newline)            (newline)
222            (when (and warning-fill-prefix (not (string-match "\n" message)))            (when (and warning-fill-prefix (not (string-match "\n" message)))
# Line 238  See also `warning-series', `warning-pref Line 238  See also `warning-series', `warning-pref
238            ;; Interactively, decide whether the warning merits            ;; Interactively, decide whether the warning merits
239            ;; immediate display.            ;; immediate display.
240            (or (< (warning-numeric-level level)            (or (< (warning-numeric-level level)
241                   (warning-numeric-level warning-minimum-level))                   (warning-numeric-level warning-minimum-level))
242                (warning-suppress-p group warning-suppress-types)                (warning-suppress-p group warning-suppress-types)
243                (let ((window (display-buffer buffer)))                (let ((window (display-buffer buffer)))
244                  (when warning-series                  (when warning-series

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26