]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak custom-variable-p and user-variable-p docs.
authorChong Yidong <cyd@gnu.org>
Wed, 25 Jan 2012 05:48:11 +0000 (13:48 +0800)
committerChong Yidong <cyd@gnu.org>
Wed, 25 Jan 2012 05:48:11 +0000 (13:48 +0800)
* lisp/custom.el (custom-variable-p): Doc fix.

* src/eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.

admin/FOR-RELEASE
lisp/ChangeLog
lisp/custom.el
src/ChangeLog
src/eval.c

index f704a3c93979bc8e2e1b96fd6c4b350bf5cd7b04..13490c479a27b01ab06237a5da07f56daf2c489d 100644 (file)
@@ -126,7 +126,7 @@ TUTORIAL.zh
 
 abbrevs.texi      cyd
 ack.texi          
-anti.texi
+anti.texi         cyd
 arevert-xtra.texi cyd
 basic.texi        cyd
 buffers.texi      cyd
index eff83cb8460ab8367cc5ab699add74b56c765b1c..e1038b8907201f7172e0a4524d59d5479c1a7389 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-25  Chong Yidong  <cyd@gnu.org>
+
+       * custom.el (custom-variable-p): Doc fix.
+
 2012-01-25  Glenn Morris  <rgm@gnu.org>
 
        * progmodes/compile.el (compilation-next-error-function):
index 2ccfe0949331e06b5ee8f36a6ab96c15db795373..132576ac6e2adbebf5a7b9fd6ee0c9385a39b0e7 100644 (file)
@@ -591,8 +591,10 @@ If NOSET is non-nil, don't bother autoloading LOAD when setting the variable."
 
 ;; This test is also in the C code of `user-variable-p'.
 (defun custom-variable-p (variable)
-  "Return non-nil if VARIABLE is a custom variable.
-This recursively follows aliases."
+  "Return non-nil if VARIABLE is a customizable variable.
+A customizable variable is either (i) a variable whose property
+list contains a non-nil `standard-value' or `custom-autoload'
+property, or (ii) an alias for another customizable variable."
   (setq variable (indirect-variable variable))
   (or (get variable 'standard-value)
       (get variable 'custom-autoload)))
index c8b1e65483024fcc242b5af7af39f593d1a609d0..f9236f159cd0e8d5c7f9f097f26d547e4d8410e4 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-25  Chong Yidong  <cyd@gnu.org>
+
+       * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
+
 2012-01-21  Chong Yidong  <cyd@gnu.org>
 
        * floatfns.c (Fcopysign): Make the second argument non-optional,
index 7b1c516d756aaa53c7f4c9bcd691272daab111f6..dbd06e7c1b1ae9dde15cf314589f47cc9f5095b1 100644 (file)
@@ -926,13 +926,14 @@ lisp_indirect_variable (Lisp_Object sym)
 DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0,
        doc: /* Return t if VARIABLE is intended to be set and modified by users.
 \(The alternative is a variable used internally in a Lisp program.)
-A variable is a user variable if
-\(1) the first character of its documentation is `*', or
-\(2) it is customizable (its property list contains a non-nil value
-    of `standard-value' or `custom-autoload'), or
-\(3) it is an alias for another user variable.
-Return nil if VARIABLE is an alias and there is a loop in the
-chain of symbols.  */)
+
+This function returns t if (i) the first character of its
+documentation is `*', or (ii) it is customizable (its property list
+contains a non-nil value of `standard-value' or `custom-autoload'), or
+\(iii) it is an alias for a user variable.
+
+But condition (i) is considered obsolete, so for most purposes this is
+equivalent to `custom-variable-p'.  */)
   (Lisp_Object variable)
 {
   Lisp_Object documentation;