mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-16 09:50:25 +00:00
e9f9827eb0
Make `auto-revert-avoid-polling' have effect in global-auto-revert-mode. Buffers actually handled by that mode are marked with a non-nil value of `auto-revert--global-mode'. When global-auto-revert-mode is entered, eligible buffers are marked in that way, and hooks are set up to mark new buffers and take care of buffers whose file names change. This way the existing poll-avoidance logic can be used, since the entire set of buffers in auto-revert is known. A new hook, `after-set-visited-file-name-hook', was added to handle the case when the file name of a tracked buffer changes. * lisp/autorevert.el (auto-revert-avoid-polling): Amend doc string. (auto-revert--global-mode): New buffer-local variable. (global-auto-revert-mode): Mark existing buffers and set up hooks when mode is entered; do the opposite when exited. (auto-revert--global-add-current-buffer) (auto-revert--global-adopt-current-buffer) (auto-revert--set-visited-file-name-advice): New functions. (auto-revert--polled-buffers, auto-revert--need-polling-p) (auto-revert-notify-handler) (auto-revert-active-p): Modify logic to cover global-auto-revert-mode. * lisp/files.el (after-set-visited-file-name-hook): New hook. (set-visited-file-name-hook): Call new hook. * test/lisp/autorevert-tests.el (top): Use lexical-binding. (auto-revert-test--write-file, auto-revert-test--buffer-string) (auto-revert-test--wait-for, auto-revert-test--wait-for-buffer-text) (auto-revert-test05-global-notify): New test. * doc/lispref/hooks.texi (Standard Hooks): Mention new hook (in a comment, since it's unclear whether it should actually be documented here) * etc/NEWS (Changes in Specialized Modes and Packages): Update entry. |
||
---|---|---|
.. | ||
charsets | ||
e | ||
forms | ||
gnus | ||
images | ||
nxml | ||
org | ||
refcards | ||
schema | ||
srecode | ||
themes | ||
tutorials | ||
AUTHORS | ||
CALC-NEWS | ||
ChangeLog.1 | ||
compilation.txt | ||
COPYING | ||
DEBUG | ||
DEVEL.HUMOR | ||
DISTRIB | ||
edt-user.el | ||
emacs-buffer.gdb | ||
emacs.appdata.xml | ||
emacs.desktop | ||
emacs.icon | ||
emacs.service | ||
enriched.txt | ||
ERC-NEWS | ||
ETAGS.EBNF | ||
ETAGS.README | ||
future-bug | ||
gnus-tut.txt | ||
grep.txt | ||
HELLO | ||
HISTORY | ||
JOKES | ||
MACHINES | ||
MH-E-NEWS | ||
NEWS | ||
NEWS.1-17 | ||
NEWS.18 | ||
NEWS.19 | ||
NEWS.20 | ||
NEWS.21 | ||
NEWS.22 | ||
NEWS.23 | ||
NEWS.24 | ||
NEWS.25 | ||
NEWS.26 | ||
NEXTSTEP | ||
NXML-NEWS | ||
ORG-NEWS | ||
package-keyring.gpg | ||
PROBLEMS | ||
ps-prin0.ps | ||
ps-prin1.ps | ||
publicsuffix.txt | ||
README | ||
rgb.txt | ||
ses-example.ses | ||
spook.lines | ||
TERMS | ||
TODO | ||
yow.lines |
This directory contains the architecture-independent files used by or with Emacs. This includes some text files of documentation for GNU Emacs or of interest to Emacs users, and the file of dumped docstrings for Emacs functions and variables. COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES File: emacs.icon Author: Sun Microsystems, Inc Copyright (C) 1999, 2001-2019 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING)