summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-05-26 00:35:47 -0700
committerGlenn Morris <rgm@gnu.org>2011-05-26 00:35:47 -0700
commit27b48e635a0abd153107846b834c24074b185815 (patch)
treeb581f198fdd710e2163b795af2d6642bdd3e6d70 /lisp/files.el
parent98f593b8d49dfe77fe37570e73dad02cdb358add (diff)
downloademacs-27b48e635a0abd153107846b834c24074b185815.tar.gz
* lisp/files.el (hack-local-variables, hack-local-variables-apply): Doc fixes.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 9749e9d75ef..4f037c2a997 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3147,6 +3147,8 @@ DIR-NAME is the name of the associated directory. Otherwise it is nil."
(defun hack-local-variables (&optional mode-only)
"Parse and put into effect this buffer's local variables spec.
+Uses `hack-local-variables-apply' to apply the variables.
+
If MODE-ONLY is non-nil, all we do is check whether a \"mode:\"
is specified, and return the corresponding mode symbol, or nil.
In this case, we try to ignore minor-modes, and only return a
@@ -3260,6 +3262,14 @@ major-mode."
(hack-local-variables-apply)))))
(defun hack-local-variables-apply ()
+ "Apply the elements of `file-local-variables-alist'.
+If there are any elements, runs `before-hack-local-variables-hook',
+then calls `hack-one-local-variable' to apply the alist elements one by one.
+Finishes by running `hack-local-variables-hook', regardless of whether
+the alist is empty or not.
+
+Note that this function ignores a `mode' entry if it specifies the same
+major mode as the buffer already has."
(when file-local-variables-alist
;; Any 'evals must run in the Right sequence.
(setq file-local-variables-alist