# HG changeset patch # User Richard M. Stallman # Date 1030639571 0 # Node ID 796b2ef84d400d91daf19459e7441d70d8bced46 # Parent 256bfac4f5b5291c6027f0ca846f7ff878a74e87 (warning-series): Now can be a marker, not an integer. (display-warning): Handle new value for warning-series. diff -r 256bfac4f5b5 -r 796b2ef84d40 lisp/warnings.el --- a/lisp/warnings.el Thu Aug 29 14:50:07 2002 +0000 +++ b/lisp/warnings.el Thu Aug 29 16:46:11 2002 +0000 @@ -131,9 +131,10 @@ ;;;###autoload (defvar warning-series nil "Non-nil means treat multiple `display-warning' calls as a series. -An integer is a position in the warnings buffer -which is the start of the current series. -t means the next warning begins a series (and stores an integer here). +A marker indicates a position in the warnings buffer +which is the start of the current series; it means that +additional warnings in the same buffer should not move point. +t means the next warning begins a series (and stores a marker here). A symbol with a function definition is like t, except also call that function before the next warning.") (put 'warning-series 'risky-local-variable t) @@ -227,7 +228,7 @@ (goto-char (point-max)) (when (and warning-series (symbolp warning-series)) (setq warning-series - (prog1 (point) + (prog1 (point-marker) (unless (eq warning-series t) (funcall warning-series))))) (unless (bolp) @@ -245,7 +246,8 @@ (fill-column 78)) (fill-region start (point)))) (setq end (point)) - (when warning-series + (when (and (markerp warning-series) + (eq (marker-buffer warning-series) buffer)) (goto-char warning-series))) (if (nth 2 level-info) (funcall (nth 2 level-info))) @@ -262,7 +264,8 @@ (warning-numeric-level warning-minimum-level)) (warning-suppress-p group warning-suppress-types) (let ((window (display-buffer buffer))) - (when warning-series + (when (and (markerp warning-series) + (eq (marker-buffer warning-series) buffer)) (set-window-start window warning-series)) (sit-for 0)))))))