help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: About how misspelled word are displayed


From: Drew Adams
Subject: RE: About how misspelled word are displayed
Date: Fri, 12 May 2017 10:32:36 -0700 (PDT)

> > Just use a separate `custom-file'.
> > Customize does not _want_ to fiddle with your
> > init file, but if you do not tell it another
> > file to use instead (`C-h v custom-file')
> > then your init file wins.
> >
> > For simple stuff, yes, you can code such
> > customizations by hand. But why do that
> > (except to practice and learn more, which
> > can be a fine reason)?
> >
> > And for stuff that is not so simple, it is
> > better to rely on Customize. It knows the
> > customize code better than you/we do.
> 
> OK, so when it gets not so simple, one should
> not rely on Customize anymore. But if one
> cannot solve so simple things without relying
> on Customize, how can one be expected to solve
> things that are not so simple suddenly?

Perhaps you misread what I wrote?

1. I'm talking only about customizations that Customize
is for, not arbitrary Lisp code, key bindings, etc.

2. For user options and faces, which is what Customize
is for, it is precisely those whose definitions are _not_
so simple that it is especially helpful to use Customize
and not just hand-code assignments etc.

For both simple and complex defcustoms and deffaces you
_can_ rely on Customize.  It is for the complex ones
that it can be especially helpful to use Customize (or
its functions).

> Apart from the principle, Customize is not
> easier than to put a couple of lines of code
> into a text file. 

I didn't argue about what someone might find easier but
about what is more prudent (sure).

I don't find it hard to "put a couple of lines of code
into a text file."  But I also don't find it hard to use
the Customize UI.  (It's not the best UI, but I can use
it to get the job done - and reliably so.)

If you really want to set user options or faces with Lisp
then it is better to use the `custom*' functions designed
for that.  You can do everything by Lisp that the Customize
UI can do, in terms of setting preferences.  But not if you
just toss around setq and modify-face.

It is particularly options, not faces, that can be
problematic if you don't use the `custom*' functions,
because of defcustom :set and :initialize triggers,
as I mentioned.

> Customize is much more complicated and I don't want to
> ever rely on complicated stuff, and certainly not for
> doing simple things.

If you are not the one who defined a given defcustom,
and if that defcustom uses a keyword such as :set, then a
complicated beast has likely been created for you already.

If you try to tame that beast without taking its nature
into account (e.g., using just `setq') you can find
yourself surprised.

You can even get into trouble by not respecting the
defcustom :type.  Things might be OK in some contexts
but not in others, and you might well have trouble
figuring out just what is wrong.

Knowing this won't stop you from doing whatever you
want, of course. ;-)

But if you're really interested in using Lisp to set
options or faces then you might want to get to know
function `customize-set-variable' (or `custom-set-faces'
or `custom-set-variables'), if you are not already
familiar with it.  Or not.



reply via email to

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