diff options
| author | Dave Love | 2000-01-06 16:37:03 +0000 |
|---|---|---|
| committer | Dave Love | 2000-01-06 16:37:03 +0000 |
| commit | caff32a7cbc91aba9422df5158627eca005543df (patch) | |
| tree | 81b941fcc2568ae655803b3519f956f28543e08c /src/eval.c | |
| parent | ed4d9494db5dfa77c5c437ce116e678610c24772 (diff) | |
| download | emacs-caff32a7cbc91aba9422df5158627eca005543df.tar.gz emacs-caff32a7cbc91aba9422df5158627eca005543df.zip | |
(Fuser_variable_p): Check customizability too.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index 1ae15218fd9..f9ca9ecfeb9 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -680,7 +680,9 @@ DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0, | |||
| 680 | "Returns t if VARIABLE is intended to be set and modified by users.\n\ | 680 | "Returns t if VARIABLE is intended to be set and modified by users.\n\ |
| 681 | \(The alternative is a variable used internally in a Lisp program.)\n\ | 681 | \(The alternative is a variable used internally in a Lisp program.)\n\ |
| 682 | Determined by whether the first character of the documentation\n\ | 682 | Determined by whether the first character of the documentation\n\ |
| 683 | for the variable is `*'.") | 683 | for the variable is `*' or if the variable is customizable (has a non-nil\n\ |
| 684 | value of any of `custom-type', `custom-loads' or `standard-value'\n\ | ||
| 685 | on its property list).") | ||
| 684 | (variable) | 686 | (variable) |
| 685 | Lisp_Object variable; | 687 | Lisp_Object variable; |
| 686 | { | 688 | { |
| @@ -701,6 +703,11 @@ for the variable is `*'.") | |||
| 701 | && INTEGERP (XCDR (documentation)) | 703 | && INTEGERP (XCDR (documentation)) |
| 702 | && XINT (XCDR (documentation)) < 0) | 704 | && XINT (XCDR (documentation)) < 0) |
| 703 | return Qt; | 705 | return Qt; |
| 706 | /* Customizable? */ | ||
| 707 | if ((!NILP (Fget (variable, intern ("custom-type")))) | ||
| 708 | || (!NILP (Fget (variable, intern ("custom-loads")))) | ||
| 709 | || (!NILP (Fget (variable, intern ("standard-value"))))) | ||
| 710 | return Qt; | ||
| 704 | return Qnil; | 711 | return Qnil; |
| 705 | } | 712 | } |
| 706 | 713 | ||
| @@ -2128,7 +2135,7 @@ run_hook_with_args (nargs, args, cond) | |||
| 2128 | /* If we are dying or still initializing, | 2135 | /* If we are dying or still initializing, |
| 2129 | don't do anything--it would probably crash if we tried. */ | 2136 | don't do anything--it would probably crash if we tried. */ |
| 2130 | if (NILP (Vrun_hooks)) | 2137 | if (NILP (Vrun_hooks)) |
| 2131 | return; | 2138 | return Qnil; |
| 2132 | 2139 | ||
| 2133 | sym = args[0]; | 2140 | sym = args[0]; |
| 2134 | val = find_symbol_value (sym); | 2141 | val = find_symbol_value (sym); |