emacs-devel
[Top][All Lists]
Advanced

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

Re: why do some programming modes have customize hooks and others do not


From: Nic Ferrier
Subject: Re: why do some programming modes have customize hooks and others do not?
Date: Mon, 20 Oct 2014 11:54:59 +0100

address@hidden writes:

>> If I sent patches (once we're on git, how goes that?) for customize any
>> hooks that aren't already customizable, they would get accepted?
>
> I'd like to point out that saving a hook with the customize interface is
> kind of asking for trouble.
>
> Hooks are routinely added by arbitrary packages. If an unsuspecting user
> customizes and saves a hook through the customize interface, any functions
> that other packages have added to it will be saved as well.
> If the user later removes one of these packages, he'll be confronted with
> "undefined function" errors which no amount of restarting will solve.
>
> The safe (and annoying) way to do this would be to define a second hook for
> the user, and make that a defcustom.

I agree this is a problem, though I've always seen it as a problem with
the packages that do that.

As a package author I try and always make a way to specify whether what
I'm adding to hooks should be done or not:

   my-mode-add-myself-to-such-and-such-a-hook y/n

for example.

Separating hooks into 2 sections might work but introduces other
problems.

If I use a hooked function to autoload my package, then using the
non-customize hook won't work. The user ends up having to require my
package in their .emacs.


I think the route of all this is that there are a significant number of
authors who don't care about customize and don't try and use it.

Is that fair?



Nic



reply via email to

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