diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-08-20 22:41:45 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-08-20 22:41:45 +0000 |
commit | 423732e4fb5e4d08f60319290002e7817240fcb9 (patch) | |
tree | 46941b93c3077a9ae1bd20279e5c86d882a4b142 /lisp | |
parent | c5edc28f43f2999cf73600e8e5a06021f9fb2ede (diff) |
(wdired-old-auto-revert-mode): New var.
(wdired-change-to-wdired-mode): Turn off auto-revert-mode.
(wdired-change-to-dired-mode): Turn auto-revert-mode on if it used to
be on.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/wdired.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/wdired.el b/lisp/wdired.el index e2d6a4b85b..f2f863ef97 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -207,6 +207,7 @@ program `dired-chmod-program', which must exist." (defvar wdired-col-perm) ;; Column where the permission bits start (defvar wdired-old-content) (defvar wdired-old-point) +(defvar wdired-old-auto-revert-mode nil) (defun wdired-mode () @@ -242,6 +243,10 @@ See `wdired-mode'." (buffer-substring (point-min) (point-max))) (set (make-local-variable 'wdired-old-point) (point)) (set (make-local-variable 'query-replace-skip-read-only) t) + (when (and (boundp 'auto-revert-mode) + auto-revert-mode) + (set (make-local-variable 'wdired-old-auto-revert-mode) t) + (auto-revert-mode 0)) (use-local-map wdired-mode-map) (force-mode-line-update) (setq buffer-read-only nil) @@ -349,6 +354,11 @@ non-nil means return old filename." (setq mode-name "Dired") (dired-advertise) (remove-hook 'kill-buffer-hook 'wdired-check-kill-buffer t) + (when wdired-old-auto-revert-mode + (kill-local-variable 'wdired-old-auto-revert-mode) + (and (boundp 'auto-revert-mode) + (null auto-revert-mode) + (auto-revert-mode 1))) (set (make-local-variable 'revert-buffer-function) 'dired-revert)) |