Miles Bader wrote: > Seemingly, this has not happened yet. I think the discussion petered > off after somebody asked how one could actually auto-enable some minor > mode.
That was me... Does anyone have a quick answer to that question? 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. ===File ~/src-Makefile.in-diff============================== *** Makefile.in 30 Nov 2004 16:57:14 -0600 1.307 --- Makefile.in 17 Mar 2005 20:58:22 -0600 *************** *** 779,784 **** --- 779,785 ---- ${lispsource}emacs-lisp/timer.elc \ ${lispsource}vc-hooks.elc \ ${lispsource}ediff-hook.elc \ + ${lispsource}rfn-eshadow.elc \ VMS_SUPPORT \ MSDOS_SUPPORT \ WINNT_SUPPORT \ *************** *** 870,875 **** --- 871,877 ---- ../lisp/emacs-lisp/timer.elc \ ../lisp/vc-hooks.elc \ ../lisp/ediff-hook.elc \ + ../lisp/rfn-eshadow.elc \ ../lisp/widget.elc \ ../lisp/window.elc \ ../lisp/version.el ============================================================ ===File ~/loadup-diff======================================= *** loadup.el 27 Dec 2004 15:02:07 -0600 1.135 --- loadup.el 17 Mar 2005 21:50:40 -0600 *************** *** 192,197 **** --- 192,198 ---- (load "vc-hooks") (load "ediff-hook") + (load "rfn-eshadow") (message "%s" (garbage-collect)) ;If you want additional libraries to be preloaded and their ============================================================ ===File ~/rfn-eshadow-diff================================== *** rfn-eshadow.el 02 Sep 2003 07:36:02 -0500 1.12 --- rfn-eshadow.el 17 Mar 2005 21:45:48 -0600 *************** *** 207,212 **** --- 207,214 ---- With prefix argument ARG, turn on if positive, otherwise off. Returns non-nil if the new state is enabled." :global t + :init-value t :group 'minibuffer (if file-name-shadow-mode ;; Enable the mode ============================================================ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel