aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2012-01-06 18:53:41 +0800
committerChong Yidong2012-01-06 18:53:41 +0800
commit89bd9ccd5bf4c2553bb1403ba71f4ed51dbb09b5 (patch)
treeb2015490fad1c12f4b1504ae299f1f4bcb173ab3 /lisp
parent8034735f6fac4719a402face6d31e97f6c067803 (diff)
downloademacs-89bd9ccd5bf4c2553bb1403ba71f4ed51dbb09b5.tar.gz
emacs-89bd9ccd5bf4c2553bb1403ba71f4ed51dbb09b5.zip
More customization-related documentation updates.
* doc/emacs/custom.texi (Specifying File Variables): The mode: keyword doesn't have to be first anymore. Add example of specifying minor modes. (Directory Variables): Simplify example. Mention application to non-file buffers. (Disabling): Use "initialization file" terminology. (Init Examples): Fix hook example. * doc/lispref/variables.texi (Directory Local Variables): Document hack-dir-local-variables-non-file-buffer. * lisp/files.el (hack-dir-local-variables-non-file-buffer): Add doc. (hack-one-local-variable-eval-safep): Allow 0 arg for minor mode functions, along with 1 and -1.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/files.el6
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 39007b7e0d4..ec3eacfbc38 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-01-06 Chong Yidong <cyd@gnu.org>
2
3 * files.el (hack-dir-local-variables-non-file-buffer): Add doc.
4 (hack-one-local-variable-eval-safep): Allow 0 arg for minor mode
5 functions, along with 1 and -1.
6
12012-01-06 Eli Zaretskii <eliz@gnu.org> 72012-01-06 Eli Zaretskii <eliz@gnu.org>
2 8
3 * time.el (display-time-load-average) 9 * time.el (display-time-load-average)
diff --git a/lisp/files.el b/lisp/files.el
index 588fda43f5c..d4b06146090 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3294,7 +3294,7 @@ It is dangerous if either of these conditions are met:
3294 (and (symbolp (car exp)) 3294 (and (symbolp (car exp))
3295 ;; Allow (minor)-modes calls with no arguments. 3295 ;; Allow (minor)-modes calls with no arguments.
3296 ;; This obsoletes the use of "mode:" for such things. (Bug#8613) 3296 ;; This obsoletes the use of "mode:" for such things. (Bug#8613)
3297 (or (and (member (cdr exp) '(nil (1) (-1))) 3297 (or (and (member (cdr exp) '(nil (1) (0) (-1)))
3298 (string-match "-mode\\'" (symbol-name (car exp)))) 3298 (string-match "-mode\\'" (symbol-name (car exp))))
3299 (let ((prop (get (car exp) 'safe-local-eval-function))) 3299 (let ((prop (get (car exp) 'safe-local-eval-function)))
3300 (cond ((eq prop t) 3300 (cond ((eq prop t)
@@ -3577,6 +3577,10 @@ and `file-local-variables-alist', without applying them."
3577 (hack-local-variables-filter variables dir-name))))))) 3577 (hack-local-variables-filter variables dir-name)))))))
3578 3578
3579(defun hack-dir-local-variables-non-file-buffer () 3579(defun hack-dir-local-variables-non-file-buffer ()
3580 "Apply directory-local variables to a non-file buffer.
3581For non-file buffers, such as Dired buffers, directory-local
3582variables are looked for in `default-directory' and its parent
3583directories."
3580 (hack-dir-local-variables) 3584 (hack-dir-local-variables)
3581 (hack-local-variables-apply)) 3585 (hack-local-variables-apply))
3582 3586