[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The *Warnings* buffer and undo
From: |
Glenn Morris |
Subject: |
Re: The *Warnings* buffer and undo |
Date: |
Wed, 28 Mar 2007 16:52:57 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
David Kastrup wrote:
> I don't think it is a good idea to let-bind buffer-undo-list here:
> instead it should generally be set to t in the buffer.
Maybe the following is better then. It would seem odd to me if
display-warning permanently disabled undo in pre-existing buffers.
*** warnings.el 21 Jan 2007 02:44:23 -0000 1.11
--- warnings.el 28 Mar 2007 20:49:50 -0000
***************
*** 218,225 ****
but raise suspicion of a possible problem.
:debug -- info for debugging only.
! BUFFER-NAME, if specified, is the name of the buffer for logging the
! warning. By default, it is `*Warnings*'.
See the `warnings' custom group for user customization features.
--- 218,226 ----
but raise suspicion of a possible problem.
:debug -- info for debugging only.
! BUFFER-NAME, if specified, is the name of the buffer for logging
! the warning. By default, it is `*Warnings*'. If this function
! has to create the buffer, it disables undo in the buffer.
See the `warnings' custom group for user customization features.
***************
*** 227,242 ****
`warning-fill-prefix' for additional programming features."
(unless level
(setq level :warning))
(if (assq level warning-level-aliases)
(setq level (cdr (assq level warning-level-aliases))))
(or (< (warning-numeric-level level)
(warning-numeric-level warning-minimum-log-level))
(warning-suppress-p type warning-suppress-log-types)
(let* ((typename (if (consp type) (car type) type))
! (buffer (get-buffer-create (or buffer-name "*Warnings*")))
(level-info (assq level warning-levels))
start end)
(with-current-buffer buffer
(goto-char (point-max))
(when (and warning-series (symbolp warning-series))
(setq warning-series
--- 228,249 ----
`warning-fill-prefix' for additional programming features."
(unless level
(setq level :warning))
+ (unless buffer-name
+ (setq buffer-name "*Warnings*"))
(if (assq level warning-level-aliases)
(setq level (cdr (assq level warning-level-aliases))))
(or (< (warning-numeric-level level)
(warning-numeric-level warning-minimum-log-level))
(warning-suppress-p type warning-suppress-log-types)
(let* ((typename (if (consp type) (car type) type))
! (old (get-buffer buffer-name))
! (buffer (get-buffer-create buffer-name))
(level-info (assq level warning-levels))
start end)
(with-current-buffer buffer
+ ;; If we created the buffer, disable undo.
+ (unless old
+ (setq buffer-undo-list t))
(goto-char (point-max))
(when (and warning-series (symbolp warning-series))
(setq warning-series
- The *Warnings* buffer and undo, Lennart Borgman (gmail), 2007/03/24
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/25
- Re: The *Warnings* buffer and undo, Glenn Morris, 2007/03/27
- Re: The *Warnings* buffer and undo, David Kastrup, 2007/03/28
- Re: The *Warnings* buffer and undo,
Glenn Morris <=
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/29
- Re: The *Warnings* buffer and undo, David Kastrup, 2007/03/29
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/30
- Re: The *Warnings* buffer and undo, Glenn Morris, 2007/03/30
- Re: The *Warnings* buffer and undo, Lennart Borgman (gmail), 2007/03/30
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/31
- Re: The *Warnings* buffer and undo, Glenn Morris, 2007/03/31
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/31
- Re: The *Warnings* buffer and undo, Miles Bader, 2007/03/29
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/30