emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/cus-edit.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/cus-edit.el [lexbind]
Date: Tue, 06 Jul 2004 07:03:29 -0400

Index: emacs/lisp/cus-edit.el
diff -c emacs/lisp/cus-edit.el:1.157.2.8 emacs/lisp/cus-edit.el:1.157.2.9
*** emacs/lisp/cus-edit.el:1.157.2.8    Tue Jul  6 09:44:42 2004
--- emacs/lisp/cus-edit.el      Tue Jul  6 10:17:15 2004
***************
*** 2074,2084 ****
    :group 'custom-buffer
    :version "20.3")
  
  (define-widget 'custom-variable 'custom
    "Customize variable."
    :format "%v"
    :help-echo "Set or reset this variable."
!   :documentation-property 'variable-documentation
    :custom-category 'option
    :custom-state nil
    :custom-menu 'custom-variable-menu-create
--- 2074,2098 ----
    :group 'custom-buffer
    :version "20.3")
  
+ (defun custom-variable-documentation (variable)
+   "Return documentation of VARIABLE for use in Custom buffer.
+ Normally just return the docstring.  But if VARIABLE automatically
+ becomes buffer local when set, append a message to that effect."
+   (if (and (local-variable-if-set-p variable)
+          (or (not (local-variable-p variable))
+              (with-temp-buffer
+                (local-variable-if-set-p variable))))
+       (concat (documentation-property variable 'variable-documentation)
+             "\n
+ This variable automatically becomes buffer-local when set outside Custom.
+ However, setting it through Custom sets the default value.")
+     (documentation-property variable 'variable-documentation)))
+ 
  (define-widget 'custom-variable 'custom
    "Customize variable."
    :format "%v"
    :help-echo "Set or reset this variable."
!   :documentation-property #'custom-variable-documentation
    :custom-category 'option
    :custom-state nil
    :custom-menu 'custom-variable-menu-create




reply via email to

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