Mercurial > emacs
comparison src/eval.c @ 27226:44dc06740e6c
(Fuser_variable_p): Check customizability too.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 06 Jan 2000 16:37:03 +0000 |
parents | 083866c85a33 |
children | 1e2af531f308 |
comparison
equal
deleted
inserted
replaced
27225:ee242fddb1ab | 27226:44dc06740e6c |
---|---|
678 | 678 |
679 DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0, | 679 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 { |
687 Lisp_Object documentation; | 689 Lisp_Object documentation; |
688 | 690 |
698 /* If it is (STRING . INTEGER), a negative integer means a user variable. */ | 700 /* If it is (STRING . INTEGER), a negative integer means a user variable. */ |
699 if (CONSP (documentation) | 701 if (CONSP (documentation) |
700 && STRINGP (XCAR (documentation)) | 702 && STRINGP (XCAR (documentation)) |
701 && INTEGERP (XCDR (documentation)) | 703 && INTEGERP (XCDR (documentation)) |
702 && XINT (XCDR (documentation)) < 0) | 704 && XINT (XCDR (documentation)) < 0) |
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"))))) | |
703 return Qt; | 710 return Qt; |
704 return Qnil; | 711 return Qnil; |
705 } | 712 } |
706 | 713 |
707 DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0, | 714 DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0, |
2126 struct gcpro gcpro1, gcpro2, gcpro3; | 2133 struct gcpro gcpro1, gcpro2, gcpro3; |
2127 | 2134 |
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); |
2135 ret = (cond == until_failure ? Qt : Qnil); | 2142 ret = (cond == until_failure ? Qt : Qnil); |
2136 | 2143 |