[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autorevert doesn't change mode-line-modified anymore
From: |
Luc Teirlinck |
Subject: |
Re: autorevert doesn't change mode-line-modified anymore |
Date: |
Tue, 19 Oct 2004 20:57:50 -0500 (CDT) |
Klaus Zeitler wrote:
Can we please have a user configurable option to change back to the old
behavior?
What about the following patch?
===File ~/arv-diff==========================================
*** autorevert.el 19 Oct 2004 15:26:46 -0500 1.39
--- autorevert.el 19 Oct 2004 19:00:12 -0500
***************
*** 243,248 ****
--- 243,260 ----
:type 'boolean
:version "21.4")
+ (defcustom auto-revert-preserve-read-only t
+ "If non-nil Auto Revert Mode preserves the read-only status.
+ This prevents auto-reverting from overriding you if you make the
+ buffer read-only using \\[toggle-read-only]. However, it can be a nuisance
+ when the read-only status of the buffer is determined by the
+ file's modes and those modes change. If the latter situation
+ occurs more often in your usage than the former, you can set this
+ option to nil."
+ :group 'auto-revert
+ :type 'boolean
+ :version "21.4")
+
(defvar global-auto-revert-ignore-buffer nil
"*When non-nil, Global Auto-Revert Mode will not revert this buffer.
***************
*** 419,431 ****
(= (window-point window) (point-max))
(push window eoblist)))
'no-mini t))
! (if auto-revert-tail-mode
! (auto-revert-tail-handler)
! ;; Bind buffer-read-only in case user has done C-x C-q,
! ;; so as not to forget that. This gives undesirable results
! ;; when the file's mode changes, but that is less common.
! (let ((buffer-read-only buffer-read-only))
! (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
(when buffer-file-name
(when eob (goto-char (point-max)))
(dolist (window eoblist)
--- 431,441 ----
(= (window-point window) (point-max))
(push window eoblist)))
'no-mini t))
! (cond (auto-revert-tail-mode (auto-revert-tail-handler))
! (auto-revert-preserve-read-only
! (let ((buffer-read-only buffer-read-only))
! (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
! (t (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
(when buffer-file-name
(when eob (goto-char (point-max)))
(dolist (window eoblist)
============================================================
- autorevert doesn't change mode-line-modified anymore, Klaus Zeitler, 2004/10/18
- Re: autorevert doesn't change mode-line-modified anymore, Luc Teirlinck, 2004/10/18
- Re: autorevert doesn't change mode-line-modified anymore, Luc Teirlinck, 2004/10/18
- Re: autorevert doesn't change mode-line-modified anymore, Luc Teirlinck, 2004/10/18
- Re: autorevert doesn't change mode-line-modified anymore, Richard Stallman, 2004/10/19
- Re: autorevert doesn't change mode-line-modified anymore, Luc Teirlinck, 2004/10/19
- Re: autorevert doesn't change mode-line-modified anymore, Richard Stallman, 2004/10/20
- Re: autorevert doesn't change mode-line-modified anymore, Klaus Zeitler, 2004/10/21
- Re: autorevert doesn't change mode-line-modified anymore, Kim F. Storm, 2004/10/21
- Re: autorevert doesn't change mode-line-modified anymore, Richard Stallman, 2004/10/22