Hi John Paul --
Thanks for the patch and the bug report. I’m a little uncomfortable with
the approach, since involves duplicate code (the implementation of
#'custom-variable-p) for no good reason that I can see; if it’s a question
of speed (given that user-variable-p is called on everything in obarray from
#'read-variable), then #'custom-variable-p should be in C, and called from
#'user-variable-p.
I think I’ll do that, and also follow the variable alias chain as GNU
does. Anyone got suggestions to the contrary?
Bye,
Aidan
Ar an naoú lá déag de mí Lúnasa, scríobh John Paul Wallington:
Hi,
The XEmacs is: XEmacs 21.5-b28 "fuki" (+CVS-20070925) configured for
`i586-pc-win32'.
(user-variable-p 'garbage-collection-messages) returns nil, but I
don't think it should.
Of course, there's no askterisk in the variable's docstring, so maybe
that should be fixed.
More importantly, I think `user-variable-p' should return non-nil for
Customizable variables, checking by doing what `custom-variable-p'
does.
That how GNU Emacs works. Oh, in addition, it returns non-nil if
VARIABLE is an alias for another user variable.
Here's something pinched from GNU Emacs that could be installed, but I
don't have an SDK and can't even say whether it compiles:
diff -u c:\src\xemacs-21.5\src\eval.c~ c:\src\xemacs-21.5\src\eval.c
--- c:\src\xemacs-21.5\src\eval.c~ 2008-08-19 01:43:53.828125000 +0100
+++ c:\src\xemacs-21.5\src\eval.c 2008-08-19 01:43:53.859375000 +0100
@@ -1359,8 +1359,9 @@
DEFUN ("user-variable-p", Fuser_variable_p, 1, 1, 0, /*
Return t if VARIABLE is intended to be set and modified by users.
\(The alternative is a variable used internally in a Lisp program.)
-Determined by whether the first character of the documentation
-for the variable is `*'.
+Determined by whether the first character of the documentation for the
+variable is `*' or whether the variable is customizable; see
+also `custom-variable-p'.
*/
(variable))
{
@@ -1376,7 +1377,10 @@
(CONSP (documentation)
&& STRINGP (XCAR (documentation))
&& INTP (XCDR (documentation))
- && XINT (XCDR (documentation)) < 0)) ?
+ && XINT (XCDR (documentation)) < 0)) ||
+ /* Customizable? See `custom-variable-p'. */
+ (!NILP (Fget (variable, intern ("standard-value"))))
+ || (!NILP (Fget (variable, intern ("custom-autoload")))) ?
Qt : Qnil;
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta