Commit 65411977 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Fuser_variable_p): For (STRING . INTEGER), test sign.

parent 30b4fc23
...@@ -635,7 +635,7 @@ DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0, ...@@ -635,7 +635,7 @@ 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\ "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\ \(The alternative is a variable used internally in a Lisp program.)\n\
Determined by whether the first character of the documentation\n\ Determined by whether the first character of the documentation\n\
for the variable is \"*\"") for the variable is `*'.")
(variable) (variable)
Lisp_Object variable; Lisp_Object variable;
{ {
...@@ -644,8 +644,14 @@ for the variable is \"*\"") ...@@ -644,8 +644,14 @@ for the variable is \"*\"")
documentation = Fget (variable, Qvariable_documentation); documentation = Fget (variable, Qvariable_documentation);
if (INTEGERP (documentation) && XINT (documentation) < 0) if (INTEGERP (documentation) && XINT (documentation) < 0)
return Qt; return Qt;
if ((STRINGP (documentation)) && if (STRINGP (documentation)
((unsigned char) XSTRING (documentation)->data[0] == '*')) && ((unsigned char) XSTRING (documentation)->data[0] == '*'))
return Qt;
/* If it is (STRING . INTEGER), a negative integer means a user variable. */
if (CONSP (documentation)
&& STRINGP (XCONS (documentation)->car)
&& INTEGERP (XCONS (documentation)->cdr)
&& XINT (XCONS (documentation)->cdr) < 0)
return Qt; return Qt;
return Qnil; return Qnil;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment