emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109073: Give permanent-local propert


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109073: Give permanent-local property to per-buffer variables without defaults.
Date: Fri, 13 Jul 2012 22:25:59 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109073
fixes bug: http://debbugs.gnu.org/11930
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Fri 2012-07-13 22:25:59 +0800
message:
  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.
modified:
  doc/emacs/ChangeLog
  doc/emacs/custom.texi
  lisp/ChangeLog
  lisp/bindings.el
  lisp/help-fns.el
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2012-07-13 07:06:09 +0000
+++ b/doc/emacs/ChangeLog       2012-07-13 14:25:59 +0000
@@ -1,5 +1,7 @@
 2012-07-13  Chong Yidong  <address@hidden>
 
+       * custom.texi (Examining): Update C-h v message.
+
        * buffers.texi (Misc Buffer): Document view-read-only.
 
 2012-07-07  Chong Yidong  <address@hidden>

=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi     2012-07-07 09:51:59 +0000
+++ b/doc/emacs/custom.texi     2012-07-13 14:25:59 +0000
@@ -766,7 +766,7 @@
 fill-column is a variable defined in `C source code'.
 fill-column's value is 70
 
-Automatically becomes buffer-local when set in any fashion.
+Automatically becomes buffer-local when set.
 This variable is safe as a file local variable if its value
 satisfies the predicate `integerp'.
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-07-13 07:06:09 +0000
+++ b/lisp/ChangeLog    2012-07-13 14:25:59 +0000
@@ -1,5 +1,13 @@
 2012-07-13  Chong Yidong  <address@hidden>
 
+       * bindings.el: Assign a non-nil permanent-local property to
+       per-buffer variables which lack a default value (Bug#11930).
+
+       * help-fns.el (describe-variable): In the "automatically becomes
+       local" notice, take note of permanent-local variables.
+
+2012-07-13  Chong Yidong  <address@hidden>
+
        * files.el (toggle-read-only): Doc fix and code cleanup.  New arg
        to allow printing the message when called from Lisp.
 

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2012-07-13 07:06:09 +0000
+++ b/lisp/bindings.el  2012-07-13 14:25:59 +0000
@@ -650,9 +650,22 @@
         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)

=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el  2012-07-03 07:12:22 +0000
+++ b/lisp/help-fns.el  2012-07-13 14:25:59 +0000
@@ -852,7 +852,10 @@
                              (with-temp-buffer
                                (local-variable-if-set-p variable))))
                 (setq extra-line t)
-                (princ "  Automatically becomes buffer-local when set in any 
fashion.\n"))
+                (princ "  Automatically becomes ")
+               (if (get variable 'permanent-local)
+                   (princ "permanently "))
+               (princ "buffer-local when set.\n"))
 
               ;; Mention if it's an alias
               (unless (eq alias variable)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]