>>>>> In >>>>> Stefan Monnier wrote: > > ;;;###autoload > > -(define-minor-mode epa-file-mode > > +(define-minor-mode auto-encryption-mode > > "Toggle automatic file encryption and decryption. > > With prefix argument ARG, turn auto encryption on if positive, else off. > > Return the new status of auto encryption (non-nil means on)." > > - :global t :init-value nil :group 'epa-file :version "23.1" > > + :global t :init-value t :group 'epa-file :version "23.1" > This sets the variable to t by default, but doesn't run the body > accordingly, so auto-encryption-mode is non-nil, but > file-name-handler-alist does not contain epa-file-handler. Yes. Though I previously wrote "it turned out that just setting :init-value of define-minor-mode runs the body of auto-encryption-mode as expected", it was my misunderstanding. > Maybe you want to add a call to custom-reevaluate-setting to deal > with this problem (but it should be in a preloaded file). Here is a patch to do this. I've separated epa-file-hook.el, which is preloaded, from epa-file.el. P.S. With this patch, I wonder why `C-h v auto-encryption-mode' shows "Not documented as a variable." Am I missing something? 2008-04-30 Daiki Ueno * epa-file-hook.el: New file which is separated from epa-file.el. * loadup.el: Load "epa-file-hook". * startup.el (command-line): Eval the body of auto-encryption-mode.