emacs-devel
[Top][All Lists]
Advanced

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

Re: define-minor-mode


From: Gerd Moellmann
Subject: Re: define-minor-mode
Date: Thu, 12 Oct 2000 15:46:15 +0200 (CEST)
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.90

Miles Bader <address@hidden> writes:

> Auto-compression-mode was recently changed to use `define-minor-mode'.
> 
> However, define-minor-mode attempts to immediately call the defined
> function if the associated variable is non-nil; if it's situated in the
> middle of a file being loaded, this fails if some of the functions used
> by the minor-mode function are not yet defined.
> 
> If fixed this in jka-compr.el by just moving the define-minor-mode to
> near the end of the file, but I think that this really shouldn't be
> necessary, since define-minor-mode `feels' like a function definition,
> and function definitions can typically be in any order in elisp.
> 
> I don't know what the correct thing to change is, though, since the
> offending feature of define-minor-mode seems useful.  Is it possible
> to push forms onto a list to be evaluated when a file is done loading?

I'm not sure.  Could you make use of after-load-alist and load-file-name?



reply via email to

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