diff options
| author | Tassilo Horn | 2025-02-06 20:07:09 +0100 |
|---|---|---|
| committer | Tassilo Horn | 2025-02-06 20:07:09 +0100 |
| commit | be316dc1c74fc547fe83c0426fdec3ffd4e5fb1f (patch) | |
| tree | 35fd96b358d9d7037df703a7bef999125a4f3239 | |
| parent | 811d575336942b1cd1e1c6fb50620babdf9cc82c (diff) | |
| download | emacs-be316dc1c74fc547fe83c0426fdec3ffd4e5fb1f.tar.gz emacs-be316dc1c74fc547fe83c0426fdec3ffd4e5fb1f.zip | |
; Use an uninterned symbol in the inhibit-auto-revert expansion.
| -rw-r--r-- | lisp/autorevert.el | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 315100885be..e6a12d37ad1 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -781,22 +781,23 @@ If the buffer needs to be reverted, do it now." | |||
| 781 | "Deactivate auto-reverting of current buffer temporarily. | 781 | "Deactivate auto-reverting of current buffer temporarily. |
| 782 | Run BODY." | 782 | Run BODY." |
| 783 | (declare (indent 0) (debug (body))) | 783 | (declare (indent 0) (debug (body))) |
| 784 | `(progn | 784 | (let ((buf (make-symbol "buf"))) |
| 785 | ;; Cleanup. | 785 | `(progn |
| 786 | (dolist (buf inhibit-auto-revert-buffers) | 786 | ;; Cleanup. |
| 787 | (unless (buffer-live-p buf) | 787 | (dolist (,buf inhibit-auto-revert-buffers) |
| 788 | (setq inhibit-auto-revert-buffers | 788 | (unless (buffer-live-p ,buf) |
| 789 | (delq buf inhibit-auto-revert-buffers)))) | ||
| 790 | (let ((iar-buf | ||
| 791 | (and (not (memq (current-buffer) inhibit-auto-revert-buffers)) | ||
| 792 | (current-buffer)))) | ||
| 793 | (unwind-protect | ||
| 794 | (progn | ||
| 795 | (when iar-buf (add-to-list 'inhibit-auto-revert-buffers iar-buf)) | ||
| 796 | ,@body) | ||
| 797 | (when iar-buf | ||
| 798 | (setq inhibit-auto-revert-buffers | 789 | (setq inhibit-auto-revert-buffers |
| 799 | (delq iar-buf inhibit-auto-revert-buffers)))))))) | 790 | (delq ,buf inhibit-auto-revert-buffers)))) |
| 791 | (let ((,buf | ||
| 792 | (and (not (memq (current-buffer) inhibit-auto-revert-buffers)) | ||
| 793 | (current-buffer)))) | ||
| 794 | (unwind-protect | ||
| 795 | (progn | ||
| 796 | (when ,buf (add-to-list 'inhibit-auto-revert-buffers ,buf)) | ||
| 797 | ,@body) | ||
| 798 | (when ,buf | ||
| 799 | (setq inhibit-auto-revert-buffers | ||
| 800 | (delq ,buf inhibit-auto-revert-buffers))))))))) | ||
| 800 | 801 | ||
| 801 | (defun auto-revert-active-p () | 802 | (defun auto-revert-active-p () |
| 802 | "Check if auto-revert is active in current buffer." | 803 | "Check if auto-revert is active in current buffer." |