[Top][All Lists]

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

Re: doc elisp intro cross reference fixes

From: Kevin Rodgers
Subject: Re: doc elisp intro cross reference fixes
Date: Thu, 20 Nov 2003 13:13:53 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Stefan Monnier wrote:

I disagree.  It is a useful distinction, and programmers can take
advantage of it to prevent users from setting variables in a way that
they shouldn't (and thence submitting bug reports when they don't get
the desired effect).

Can you give concrete examples where the distinction makes sense ?

The example from the "Variable Definitions" node of the Emacs Lisp manual

(cited by Luc): global-font-lock-mode

I don't find the explanation of Variable Definitions in the Emacs Lisp
manual that Luc cited to be too subtle.

How many elisp programmers know about it and understand it ?

How would I know either thing about other programmers?  But ignorance of

the law is no defense.

set-variable and customize are independent mechanisms that are enabled
by a doc string convention and the custom-* symbol properties
respectively, and as a programmer I'd like to retain control over those

Why should they be independent mechanisms ?
What is the benefit ?  Why should something be only allowed via M-x
customize-variable but not via M-x set-variable (and vice-versa, BTW) ?

They are independent because customize was introduced as a new mechanism,
instead of extending set-variable.  Whether they remain so is apparently
up for discussion.  (Would you feel comfortable removing set-variable, or
aliasing it to customize?)

Personally, I only use set-variable and avoid customize completely.  I
understand that programmers (including myself) want to provide the
customize interface to the features they provide.  But if I (as a user)
have to use customize to enable feature foo, I'd rather just do M-x
turn-on-foo-mode; and I don't want to be allowed to set-variable
foo-mode if it doesn't do the right thing.

As a programmer, the distinction seems very faint and I have a hard time
coming up with cases where it could make sense to prevent one use
and allow the other.

As a user it just makes for inconsistency where some variables can be set
via M-x set-variable while others need M-x customize-variable.

That "inconsistency" accurately reflects the difference between variables
whose values (alone) determine Emacs' behavior and those that don't (because
they interact with other things).

Kevin Rodgers

reply via email to

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