mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 08:11:05 -08:00
(Fuser_variable_p): Check customizability too.
This commit is contained in:
parent
ed4d9494db
commit
caff32a7cb
1 changed files with 9 additions and 2 deletions
11
src/eval.c
11
src/eval.c
|
|
@ -680,7 +680,9 @@ DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0,
|
|||
"Returns t if VARIABLE is intended to be set and modified by users.\n\
|
||||
\(The alternative is a variable used internally in a Lisp program.)\n\
|
||||
Determined by whether the first character of the documentation\n\
|
||||
for the variable is `*'.")
|
||||
for the variable is `*' or if the variable is customizable (has a non-nil\n\
|
||||
value of any of `custom-type', `custom-loads' or `standard-value'\n\
|
||||
on its property list).")
|
||||
(variable)
|
||||
Lisp_Object variable;
|
||||
{
|
||||
|
|
@ -701,6 +703,11 @@ for the variable is `*'.")
|
|||
&& INTEGERP (XCDR (documentation))
|
||||
&& XINT (XCDR (documentation)) < 0)
|
||||
return Qt;
|
||||
/* Customizable? */
|
||||
if ((!NILP (Fget (variable, intern ("custom-type"))))
|
||||
|| (!NILP (Fget (variable, intern ("custom-loads"))))
|
||||
|| (!NILP (Fget (variable, intern ("standard-value")))))
|
||||
return Qt;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
@ -2128,7 +2135,7 @@ run_hook_with_args (nargs, args, cond)
|
|||
/* If we are dying or still initializing,
|
||||
don't do anything--it would probably crash if we tried. */
|
||||
if (NILP (Vrun_hooks))
|
||||
return;
|
||||
return Qnil;
|
||||
|
||||
sym = args[0];
|
||||
val = find_symbol_value (sym);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue