value. Auto Revert mode can use this information to avoid polling the
buffer periodically when 'auto-revert-avoid-polling' is non-nil.
+---
+*** `global-auto-revert-ignore-buffer' can now also be a predicate
+function that can be used for more fine-grained control of which
+buffers to auto-revert.
+
** auth-source-pass
+++
(defvar-local global-auto-revert-ignore-buffer nil
"When non-nil, Global Auto-Revert Mode will not revert this buffer.
-This variable becomes buffer local when set in any fashion.")
+This variable can also be a predicate function, in which case
+it'll be called with one parameter (the buffer in question), and
+it should return non-nil to make Global Auto-Revert Mode not
+revert this buffer.")
(defcustom auto-revert-remote-files nil
"If non-nil remote files are also reverted."
(not (eq buffer-stale-function
#'buffer-stale--default-function))))
(not (memq 'major-mode global-auto-revert-ignore-modes))
- (not global-auto-revert-ignore-buffer))
+ (or (null global-auto-revert-ignore-buffer)
+ (if (functionp global-auto-revert-ignore-buffer)
+ (not (funcall global-auto-revert-ignore-buffer
+ (current-buffer)))
+ nil)))
(setq auto-revert--global-mode t)))
(defun auto-revert--global-adopt-current-buffer ()