Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus fucks up my custom settings
@ 1999-03-05  9:15 Didier Verna
  1999-03-05 14:57 ` Colin Rafferty
  0 siblings, 1 reply; 3+ messages in thread
From: Didier Verna @ 1999-03-05  9:15 UTC (permalink / raw)




        HI folks.

        I've noticed this only few days ago, but the problem has probably been 
there for longer than that. I recently customized `gnus-group-mode-hook'
instead of just modifying it in my gnusrc file, and then I noticed that my
custom setting was overrided by gnus. I've tracked down the problem to
`gnus-xmas-redefine'. For instance, this function calls `add-hook' on
gnus-group-mode-hook, but 'gnus-group has not been required yet, so the
variable is not defcustom'ed.

        I see 2 solutions to this problem: either you require each library
from which you'll twiddle a variable (but then you might load libs that the
user wo't use), or you use defcustom instead of defvar (but then you have code
replication). Or maybe the concerned variables should be defined in a separate 
file instead of in their respective libs ? 

        Lars, waya think ?

-- 
    /     /   _   _       Didier Verna        http://www.inf.enst.fr/~verna/
 - / / - / / /_/ /      E.N.S.T. INF C201.1      mailto:verna@inf.enst.fr
/_/ / /_/ / /__ /        46 rue Barrault        Tel.   (33) 01 45 81 73 46
                      75634 Paris  cedex 13     Fax.   (33) 01 45 81 31 19


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gnus fucks up my custom settings
  1999-03-05  9:15 Gnus fucks up my custom settings Didier Verna
@ 1999-03-05 14:57 ` Colin Rafferty
  1999-03-05 20:22   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Rafferty @ 1999-03-05 14:57 UTC (permalink / raw)


Didier Verna writes:

>         I see 2 solutions to this problem: either you require each library
> from which you'll twiddle a variable (but then you might load libs that the
> user wo't use), or you use defcustom instead of defvar (but then you have code
> replication). Or maybe the concerned variables should be defined in a separate 
> file instead of in their respective libs ? 

I vote for your third solution.

This seems to be the simplest way to deal with large packages with
lots of variables, all of which need to be customized.

vm, cc-mode, and w3 all do it this way, and it makes sense.

-- 
Colin


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gnus fucks up my custom settings
  1999-03-05 14:57 ` Colin Rafferty
@ 1999-03-05 20:22   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-03-05 20:22 UTC (permalink / raw)


Colin Rafferty <craffert@ms.com> writes:

> > Or maybe the concerned variables should be defined in a separate 
> > file instead of in their respective libs ? 
> 
> I vote for your third solution.
> 
> This seems to be the simplest way to deal with large packages with
> lots of variables, all of which need to be customized.
> 
> vm, cc-mode, and w3 all do it this way, and it makes sense.

It makes sense in one way, but in other ways it doesn't.  For
instance, putting variables in one whopping big file means that they
aren't local to the functionality being provided.  So even if you
don't plan on using picons, you'll get a gazillion picons-related
variables defined when you start Gnus.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-03-05 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-05  9:15 Gnus fucks up my custom settings Didier Verna
1999-03-05 14:57 ` Colin Rafferty
1999-03-05 20:22   ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).