summaryrefslogtreecommitdiff
path: root/lisp/bindings.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-07-13 22:25:59 +0800
committerChong Yidong <cyd@gnu.org>2012-07-13 22:25:59 +0800
commitdea31bd311229e7fa662e9b4b55f4c3683b7fe7b (patch)
tree2757baf59645676499db45eed4f17641076dd57d /lisp/bindings.el
parent2277de02b932b0c685a832dbcdc224885decbb30 (diff)
downloademacs-dea31bd311229e7fa662e9b4b55f4c3683b7fe7b.tar.gz
Give permanent-local property to per-buffer variables without defaults.
* doc/emacs/custom.texi (Examining): Update C-h v message. * lisp/bindings.el: Assign a non-nil permanent-local property to per-buffer variables which lack a default value. * lisp/help-fns.el (describe-variable): In the "automatically becomes local" notice, take note of permanent-local variables. Fixes: debbugs:11930
Diffstat (limited to 'lisp/bindings.el')
-rw-r--r--lisp/bindings.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index e0bea34cd0a..97450f788aa 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -650,9 +650,22 @@ okay. See `mode-line-format'.")
user-error ;; That's the main one!
))
-
(make-variable-buffer-local 'indent-tabs-mode)
+;; These per-buffer variables are never reset by
+;; `kill-all-local-variables', because they have no default value.
+;; For consistency, we give them the `permanent-local' property, even
+;; though `kill-all-local-variables' does not actually consult it.
+
+(mapcar (lambda (sym) (put sym 'permanent-local t))
+ '(buffer-file-name default-directory buffer-backed-up
+ buffer-saved-size buffer-auto-save-file-name
+ buffer-read-only buffer-undo-list mark-active
+ point-before-scroll buffer-file-truename
+ buffer-file-format buffer-auto-save-file-format
+ buffer-display-count buffer-display-time
+ enable-multibyte-characters))
+
;; We have base64, md5 and sha1 functions built in now.
(provide 'base64)
(provide 'md5)