[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: document custom-variable-p

From: Drew Adams
Subject: RE: document custom-variable-p
Date: Mon, 11 Jun 2007 07:58:58 -0700

>     "Lisp programs should use `custom-variable-p', not `user-variable-p',
>     whenever they want to test whether a variable is something that a user
>     can customize and save."
>   By the latter, I meant user Lisp programs, not just internal
>   Lisp programs -
> Why do you think this is something user Lisp programs are likely
> to want to do?

Customize is good for interactive editing and saving of options etc. But its
UI is fixed and somewhat limited. I expect that users (e.g. third-party
libraries) may well want to provide commands or other UI thingies that let
you interface with the functionalities provided by custom: editing that
respects specified types, and possibly saving changes.

To create such UI extensions, it would be useful to be able to recognize
variables that are editable and savable in custom from other user variables
(those that just have "*..." as doc string).

This would also be useful for user Lisp code that provides information
(help) about variables.

More generally, I think it makes sense for such type predicates to be
advertised. Whether such a type test actually is used in user code is less
important than being able to identify the possible types and their
associated predicates. IOW, as a general principle, I think type predicates
should be exposed (documented). Exceptions can be made for "types" that are
little more than different internal representations (if such types exist).
But being a subtype of `user-variable-p' that corresponds to customizable
options seems like an important type, to me.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]