[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104374: * lisp/files.el (hack-local-
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104374: * lisp/files.el (hack-local-variables, hack-local-variables-apply): Doc fixes. |
Date: |
Thu, 26 May 2011 00:35:47 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104374
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-05-26 00:35:47 -0700
message:
* lisp/files.el (hack-local-variables, hack-local-variables-apply): Doc fixes.
modified:
lisp/ChangeLog
lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-05-26 07:23:11 +0000
+++ b/lisp/ChangeLog 2011-05-26 07:35:47 +0000
@@ -2,6 +2,7 @@
* files.el (hack-local-variables-prop-line, hack-local-variables):
Downcase mode names, as seems to be traditional.
+ (hack-local-variables, hack-local-variables-apply): Doc fixes.
* mail/emacsbug.el (report-emacs-bug): Mention checking From address.
(report-emacs-bug-hook): Try to validate the From address. (Bug#8038)
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2011-05-26 07:23:11 +0000
+++ b/lisp/files.el 2011-05-26 07:35:47 +0000
@@ -3147,6 +3147,8 @@
(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 @@
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104374: * lisp/files.el (hack-local-variables, hack-local-variables-apply): Doc fixes.,
Glenn Morris <=