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

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

Re: "custom" threatens modular thinking?


From: Francis Litterio
Subject: Re: "custom" threatens modular thinking?
Date: Mon, 11 Feb 2002 14:25:13 -0500
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/20.7 (i386-*-nt5.0.2195)

abraham@dina.kvl.dk (Per Abrahamsen) writes:

> jidanni@deadspam.com (Dan Jacobson) writes:
>
>> Is it true that if a user gets into the habit of using the "custom"
>> utility, his .emacs will get filled with flat lists of
>> (custom-set-variables
>>  '(some-variable t)
>>  '(some-variable t)
>
> Yes.
>
>> whereas if he were to write his .emacs by hand, he perhaps would nest
>> the needed variables in hooks only to be called when necessary, etc.
>
> Maybe.  If he went to hook route (rather than just using setq), it
> would have mostly the same effect as the customize declaration above.
> The variables will not actually be set until the files where they are
> declared are loaded.

Here's something to beware of when setting hooks in your .emacs file.  If
your .emacs file contains:

  (add-hook 'xyzzy-hook 'my-xyzzy-hook-func)

and later package xyzzy.el is loaded, and xyzzy.el contains a default
value for xyzzy-hook, such as:

  (defvar xyzzy-hook 'xyzzy-do-it "...")

then the value of the hook ends up being:

  (my-xyzzy-hook-func)

and not:

  (xyzzy-do-it my-xyzzy-hook-func)

which might make the package malfunction.
--
Francis Litterio
franl-remove@world.omit-this.std.com



reply via email to

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