> I believe that the reason you have problems is that define-minor-mode
> uses `custom-initialize-default' as the Custom :initialize function.
> That is correct if you want the minor mode disabled by default, but
> not if you want it enabled by default.  Then you need to use
> `custom-initialize-set'.  Passing an explicit :initialize keyword to
> `define-minor-mode' does not seem to help: it gets ignored.  I believe
> that `define-minor-mode' should use `custom-initialize-set' as the
> :initialize function if :init-value is non-nil.  Then the patches
> below would work.  _Currently they do not._  An alternate patch that
> does work right now is to call `custom-reevaluate-setting' in
> startup.el, but to me, that seems ugly.

Assuming it's still considered a good idea to make sure that loading a file
does not have any other side effect, I think it's better to keep
the :init-value at nil, and simply add a call to file-name-shadow-mode
somewhere (either in startup, or loadup).


        Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to