[Top][All Lists]

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

RE: void variable problem

From: Drew Adams
Subject: RE: void variable problem
Date: Wed, 23 Mar 2011 16:14:01 -0700

> Thank you and Eli for pointing out what should have been 
> obvious to me. 
> I was blissfully unaware of the Customize feature of emacs, and wonder
> why you recommend it in this case.

The recommendation is not of the things-won't-work-otherwise sort.  Regardless
of its off-putting UI, I recommend Customize in general, for several reasons,
including these:

1. It is type-aware.  You cannot assign a value of the wrong type.  Of course,
the programmer who wrote the `defcustom' defining the option needs to have
defined it with a reasonable type.  If the type is too general (more or less
anything) then you lose the power of type-checking.

2. It is less error-prone in general (e.g. typos).

> As best I can make out, it creates a set of values for variables.


> But I don't see that the synonyms command requires setting values
> for variables, unless it is the name and location of the thesaurus
> and cache,

Right, it does not require you to change any other options.  But there are other
options you can change, if you want: `synonyms-append-result-flag',
`synonyms-fill-column', `synonyms-match-more-flag', `synonyms-mode-hook',
`synonyms-use-cygwin-flag', `synonyms-dictionary-url',
`synonyms-dictionary-url', and `synonyms-dictionary-alternate-url'.

> which at this point I simply define in .emacs
> initiatialization. Why is it better to do it some other way?

See above.  There is nothing wrong with doing everything in your .emacs.  I
recommend Customize in general, because it provides those benefits, but you need
not use it.  If you had used it then type-checking would have prevented the
problem you ran into by forgetting to use double-quotes with `setq', as one

HTH - Drew

reply via email to

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