emacs-devel
[Top][All Lists]
Advanced

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

Re: update of the EasyPG integration patch (Re: minor fixes for EasyPG


From: Stefan Monnier
Subject: Re: update of the EasyPG integration patch (Re: minor fixes for EasyPG
Date: Tue, 29 Apr 2008 04:01:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>  ;;;###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"
>    (setq file-name-handler-alist
>       (delq epa-file-handler file-name-handler-alist))
>    (remove-hook 'find-file-hooks 'epa-file-find-file-hook)
>    (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry
>                             auto-mode-alist))
> -  (when epa-file-mode
> +  (when auto-encryption-mode
>      (setq file-name-handler-alist
>         (cons epa-file-handler file-name-handler-alist))
> -    (add-hook 'find-file-hooks 'epa-file-find-file-hook)
> +    (add-hook 'find-file-hook 'epa-file-find-file-hook)
> +    (add-hook 'find-file-not-found-functions
> +           'epa-file-find-file-not-found-functions)
>      (setq auto-mode-alist (cons epa-file-auto-mode-alist-entry
>                               auto-mode-alist))))
 
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.

Maybe you want to add a call to custom-reevaluate-setting to deal
with this problem (but it should be in a preloaded file).


        Stefan






reply via email to

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