Show
Ignore:
Timestamp:
04/07/07 15:49:28 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/emacs-lisp/warnings.el

    r4190 r4200  
    219219:debug     -- info for debugging only. 
    220220 
    221 BUFFER-NAME, if specified, is the name of the buffer for logging the 
    222 warning.  By default, it is `*Warnings*'. 
     221BUFFER-NAME, if specified, is the name of the buffer for logging 
     222the warning.  By default, it is `*Warnings*'.  If this function 
     223has to create the buffer, it disables undo in the buffer. 
    223224 
    224225See the `warnings' custom group for user customization features. 
     
    228229  (unless level 
    229230    (setq level :warning)) 
     231  (unless buffer-name 
     232    (setq buffer-name "*Warnings*")) 
    230233  (if (assq level warning-level-aliases) 
    231234      (setq level (cdr (assq level warning-level-aliases)))) 
     
    234237      (warning-suppress-p type warning-suppress-log-types) 
    235238      (let* ((typename (if (consp type) (car type) type)) 
    236              (buffer (get-buffer-create (or buffer-name "*Warnings*"))) 
     239             (old (get-buffer buffer-name)) 
     240             (buffer (get-buffer-create buffer-name)) 
    237241             (level-info (assq level warning-levels)) 
    238242             start end) 
    239243        (with-current-buffer buffer 
     244          ;; If we created the buffer, disable undo. 
     245          (unless old 
     246            (setq buffer-undo-list t)) 
    240247          (goto-char (point-max)) 
    241248          (when (and warning-series (symbolp warning-series))