emacs-devel
[Top][All Lists]
Advanced

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

Re: defvar interactively, user-variable-p


From: David Kastrup
Subject: Re: defvar interactively, user-variable-p
Date: Sun, 18 Oct 2015 12:39:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

> Hello
>
> I am no friend of defcustom, but would like to define variables in what
> that I can change their value interactively via set-variable.
>
> According to the manual
>
>
>
> ,----
> | Function: user-variable-p variable
> | 
> |     This function returns t if variable is a user option--a variable
> |     intended to be set by the user for customization--and nil otherwise.
> |     (Variables other than user options exist for the internal purposes
> |     of Lisp programs, and users need not know about them.)
> | 
> |     User option variables are distinguished from other variables either
> |     though being declared using defcustom(4) or by the first character
> |     of their variable-documentation property. If the property exists and
> |     is a string, and its first character is `*', then the variable is a
> |     user option.
> `----
>
> This is a feature I am familiar with from Xemacs.

I read

    user-variable-p is an alias for ‘custom-variable-p’.

    (user-variable-p VARIABLE)

    This function is obsolete since 24.3;
    use ‘custom-variable-p’ instead.

    Return non-nil if VARIABLE is a customizable variable.
    A customizable variable is either (i) a variable whose property
    list contains a non-nil ‘standard-value’ or ‘custom-autoload’
    property, or (ii) an alias for another customizable variable.

    [back]

as the function DOC string, and in the manual

 -- Function: custom-variable-p arg
     This function returns non-‘nil’ if ARG is a customizable variable.
     A customizable variable is either a variable that has a
     ‘standard-value’ or ‘custom-autoload’ property (usually meaning it
     was declared with ‘defcustom’), or an alias for another
     customizable variable.

while user-variable-p (understandably) is no longer documented.

So just what manual is it that you are consulting?

-- 
David Kastrup



reply via email to

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