diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-03-04 12:16:51 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-03-04 12:16:51 +0200 |
commit | ea5fd375bb2656562f57325b3d5c6fd17f6b2e72 (patch) | |
tree | 0187968b52903fc0b1a952489ce7251fa168f445 /lisp/subr.el | |
parent | 4c16fd3a51286e1b1685bfb28e0cd6ae2358c37d (diff) | |
download | emacs-ea5fd375bb2656562f57325b3d5c6fd17f6b2e72.tar.gz |
Fix documentation of 'normal-mode' in buffers that don't visit files
* lisp/files.el (normal-mode):
* lisp/subr.el (run-mode-hooks):
* doc/emacs/modes.texi (Choosing Modes): Mention the caveat with
'normal-mode' in buffers not visiting files. (Bug#61925)
* lisp/files.el (hack-local-variables): Doc fix.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index a0a22072a18..b8bda0efd3d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2406,8 +2406,9 @@ If the variable `delay-mode-hooks' is non-nil, does not do anything, just adds the HOOKS to the list `delayed-mode-hooks'. Otherwise, runs hooks in the sequence: `change-major-mode-after-body-hook', `delayed-mode-hooks' (in reverse order), HOOKS, then runs -`hack-local-variables', runs the hook `after-change-major-mode-hook', and -finally evaluates the functions in `delayed-after-hook-functions' (see +`hack-local-variables' (if the buffer is visiting a file), +runs the hook `after-change-major-mode-hook', and finally +evaluates the functions in `delayed-after-hook-functions' (see `define-derived-mode'). Major mode functions should use this instead of `run-hooks' when |