[Top][All Lists]

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

Re: defvar vs setqif..

From: D. Goel
Subject: Re: defvar vs setqif..
Date: 20 May 2002 15:00:02 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

> > If there was a special-form that did exactly what defvar does, hopefully
> > people would stop using defvar when they didn't mean to...
> The way they're using defvar is correct.

yeah, true.  i didn't mean to suggest otherwise.  i just mean that

> It would be much better to fix the definition-finding functions to
> prefer defvars that initialize the variable over those that don't, since
> the `real' definition almost always initializes the value (and should).

how can a definition-finding function tell which of the several
defvar's it may encounter.  AFAICT, there is no way for a
definition-finding function like tag-creation-function to tell which
is the 'defining' defvar and which is not...

> > So i was wondering is a special-form like 'setqif' could be
> > provided whose only difference from 'defvar' is in a name...
> That name would be wrong, because the usage of defvar you're
> complaining about doesn't set the variable at all.

but that's why i had an 'if' at the end.. to suggest that setq only if
not already defined.. else don't setq..

> In any case, we should just make defvar work correctly.


in any case, all this is a very 'cosmetic' issue.. no big deal if 
folks didn't like the idea :)

Have a good day,

D                                  <http://www.glue.umd.edu/~deego/>

reply via email to

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