diff options
| author | Chong Yidong | 2012-01-25 13:48:11 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-01-25 13:48:11 +0800 |
| commit | 0b21c100be8937efef4a5b51c67750c05cfe31e2 (patch) | |
| tree | 47935f1795b24f5c348e7c35c14113bc85440eea | |
| parent | 5ddce96c6179e43047ed365dc4ae2818cdc93d7b (diff) | |
| download | emacs-0b21c100be8937efef4a5b51c67750c05cfe31e2.tar.gz emacs-0b21c100be8937efef4a5b51c67750c05cfe31e2.zip | |
Tweak custom-variable-p and user-variable-p docs.
* lisp/custom.el (custom-variable-p): Doc fix.
* src/eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
| -rw-r--r-- | admin/FOR-RELEASE | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/custom.el | 6 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/eval.c | 15 |
5 files changed, 21 insertions, 10 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index f704a3c9397..13490c479a2 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -126,7 +126,7 @@ TUTORIAL.zh | |||
| 126 | 126 | ||
| 127 | abbrevs.texi cyd | 127 | abbrevs.texi cyd |
| 128 | ack.texi | 128 | ack.texi |
| 129 | anti.texi | 129 | anti.texi cyd |
| 130 | arevert-xtra.texi cyd | 130 | arevert-xtra.texi cyd |
| 131 | basic.texi cyd | 131 | basic.texi cyd |
| 132 | buffers.texi cyd | 132 | buffers.texi cyd |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eff83cb8460..e1038b89072 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-01-25 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * custom.el (custom-variable-p): Doc fix. | ||
| 4 | |||
| 1 | 2012-01-25 Glenn Morris <rgm@gnu.org> | 5 | 2012-01-25 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * progmodes/compile.el (compilation-next-error-function): | 7 | * progmodes/compile.el (compilation-next-error-function): |
diff --git a/lisp/custom.el b/lisp/custom.el index 2ccfe094933..132576ac6e2 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -591,8 +591,10 @@ If NOSET is non-nil, don't bother autoloading LOAD when setting the variable." | |||
| 591 | 591 | ||
| 592 | ;; This test is also in the C code of `user-variable-p'. | 592 | ;; This test is also in the C code of `user-variable-p'. |
| 593 | (defun custom-variable-p (variable) | 593 | (defun custom-variable-p (variable) |
| 594 | "Return non-nil if VARIABLE is a custom variable. | 594 | "Return non-nil if VARIABLE is a customizable variable. |
| 595 | This recursively follows aliases." | 595 | A customizable variable is either (i) a variable whose property |
| 596 | list contains a non-nil `standard-value' or `custom-autoload' | ||
| 597 | property, or (ii) an alias for another customizable variable." | ||
| 596 | (setq variable (indirect-variable variable)) | 598 | (setq variable (indirect-variable variable)) |
| 597 | (or (get variable 'standard-value) | 599 | (or (get variable 'standard-value) |
| 598 | (get variable 'custom-autoload))) | 600 | (get variable 'custom-autoload))) |
diff --git a/src/ChangeLog b/src/ChangeLog index c8b1e654830..f9236f159cd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-01-25 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p. | ||
| 4 | |||
| 1 | 2012-01-21 Chong Yidong <cyd@gnu.org> | 5 | 2012-01-21 Chong Yidong <cyd@gnu.org> |
| 2 | 6 | ||
| 3 | * floatfns.c (Fcopysign): Make the second argument non-optional, | 7 | * floatfns.c (Fcopysign): Make the second argument non-optional, |
diff --git a/src/eval.c b/src/eval.c index 7b1c516d756..dbd06e7c1b1 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -926,13 +926,14 @@ lisp_indirect_variable (Lisp_Object sym) | |||
| 926 | DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0, | 926 | DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0, |
| 927 | doc: /* Return t if VARIABLE is intended to be set and modified by users. | 927 | doc: /* Return t if VARIABLE is intended to be set and modified by users. |
| 928 | \(The alternative is a variable used internally in a Lisp program.) | 928 | \(The alternative is a variable used internally in a Lisp program.) |
| 929 | A variable is a user variable if | 929 | |
| 930 | \(1) the first character of its documentation is `*', or | 930 | This function returns t if (i) the first character of its |
| 931 | \(2) it is customizable (its property list contains a non-nil value | 931 | documentation is `*', or (ii) it is customizable (its property list |
| 932 | of `standard-value' or `custom-autoload'), or | 932 | contains a non-nil value of `standard-value' or `custom-autoload'), or |
| 933 | \(3) it is an alias for another user variable. | 933 | \(iii) it is an alias for a user variable. |
| 934 | Return nil if VARIABLE is an alias and there is a loop in the | 934 | |
| 935 | chain of symbols. */) | 935 | But condition (i) is considered obsolete, so for most purposes this is |
| 936 | equivalent to `custom-variable-p'. */) | ||
| 936 | (Lisp_Object variable) | 937 | (Lisp_Object variable) |
| 937 | { | 938 | { |
| 938 | Lisp_Object documentation; | 939 | Lisp_Object documentation; |