Function: inhibit-auto-revert
inhibit-auto-revert is a macro defined in autorevert.el.gz.
Signature
(inhibit-auto-revert &rest BODY)
Documentation
Deactivate auto-reverting of current buffer temporarily.
Run BODY.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/autorevert.el.gz
;;;###autoload
(progn
(defvar inhibit-auto-revert-buffers nil
"A list of buffers with suppressed auto-revert.")
(defmacro inhibit-auto-revert (&rest body)
"Deactivate auto-reverting of current buffer temporarily.
Run BODY."
(declare (indent 0) (debug (body)))
(let ((buf (make-symbol "buf")))
`(progn
;; Cleanup.
(dolist (,buf inhibit-auto-revert-buffers)
(unless (buffer-live-p ,buf)
(setq inhibit-auto-revert-buffers
(delq ,buf inhibit-auto-revert-buffers))))
(let ((,buf
(and (not (memq (current-buffer) inhibit-auto-revert-buffers))
(current-buffer))))
(unwind-protect
(progn
(when ,buf (add-to-list 'inhibit-auto-revert-buffers ,buf))
,@body)
(when ,buf
(setq inhibit-auto-revert-buffers
(delq ,buf inhibit-auto-revert-buffers)))))))))