diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-04-07 07:17:19 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-04-07 07:17:19 +0000 |
commit | 8893994b63b9a3b93a1e691f2180f1407b2b108b (patch) | |
tree | 4d16877ee614ec780a885be481d8c8aa8154dade /src/eval.c | |
parent | ae1bab65cb3a36668c30793c827d277bfe5c9068 (diff) | |
download | emacs-8893994b63b9a3b93a1e691f2180f1407b2b108b.tar.gz |
(Fuser_variable_p): For (STRING . INTEGER), test sign.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index a67bc3c1a17..eb90dbd131a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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\ \(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 `*'.") (variable) Lisp_Object variable; { @@ -644,8 +644,14 @@ for the variable is \"*\"") documentation = Fget (variable, Qvariable_documentation); if (INTEGERP (documentation) && XINT (documentation) < 0) return Qt; - if ((STRINGP (documentation)) && - ((unsigned char) XSTRING (documentation)->data[0] == '*')) + if (STRINGP (documentation) + && ((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 Qnil; } |