summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-09-28 07:54:24 -0700
committerGlenn Morris <rgm@gnu.org>2018-09-28 07:54:24 -0700
commit6aa93b45af9fb3631fb8fb6a04407db4d9a74107 (patch)
tree9446e698538c3cccc3a7ac40f61e63fa028d68eb /lisp/files.el
parent2d54710c36c8b5f7e0d25eefd45c318c0cb533ea (diff)
parent1908173a4d79649566fbef12962e251c69e300a2 (diff)
downloademacs-6aa93b45af9fb3631fb8fb6a04407db4d9a74107.tar.gz
Merge from origin/emacs-26
1908173 (origin/emacs-26) Fix Bug#32828 7f5086d * lisp/net/shr.el (shr-copy-url): Fix docstring. d309994 Fix typos in documentation 25cdd65 ; Spellcheck two more documentation strings c8bda05 ; * lisp/simple.el (save-interprogram-paste-before-kill): Fix... dc7fdee * doc/emacs/kmacro.texi (Basic Keyboard Macro): Mention old b... 17766a1 Improve docs of functions/variables related to 'display-buffer' a363931 * lisp/mouse.el (tear-off-window): Fix non-mouse use (bug#32799) 8b8a4c0 Improve documentation of directory-local variables c9c9756 Don't use obsolete variable 'save-place' in documentation ca208e8 Use save-place-mode instead of save-place
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 7efbf05b1a6..b8f6c461467 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -490,7 +490,8 @@ The functions are called in the order given until one of them returns non-nil.")
(defcustom find-file-hook nil
"List of functions to be called after a buffer is loaded from a file.
The buffer's local variables (if any) will have been processed before the
-functions are called."
+functions are called. This includes directory-local variables, if any,
+for the file's directory."
:group 'find-file
:type 'hook
:options '(auto-insert)
@@ -2431,7 +2432,7 @@ the file contents into it using `insert-file-contents-literally'."
_after-find-file-from-revert-buffer
nomodes)
"Called after finding a file and by the default revert function.
-Sets buffer mode, parses local variables.
+Sets buffer mode, parses file-local and directory-local variables.
Optional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an
error in reading the file. WARN non-nil means warn if there
exists an auto-save file more recent than the visited file.
@@ -2516,7 +2517,7 @@ unless NOMODES is non-nil."
(defun normal-mode (&optional find-file)
"Choose the major mode for this buffer automatically.
-Also sets up any specified local variables of the file.
+Also sets up any specified local variables of the file or its directory.
Uses the visited file name, the -*- line, and the local variables spec.
This function is called automatically from `find-file'. In that case,
@@ -3547,6 +3548,8 @@ DIR-NAME is the name of the associated directory. Otherwise it is nil."
(defun hack-local-variables (&optional handle-mode)
"Parse and put into effect this buffer's local variables spec.
+For buffers visiting files, also puts into effect directory-local
+variables.
Uses `hack-local-variables-apply' to apply the variables.
If HANDLE-MODE is nil, we apply all the specified local