* menu-bar.el (menu-bar-tools-menu): Add Semantic and EDE menu
[bpt/emacs.git] / lisp / epa-hook.el
index 57c5304..0987b2a 100644 (file)
@@ -1,5 +1,5 @@
 ;;; epa-hook.el --- preloaded code to enable epa-file.el
-;; Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author: Daiki Ueno <ueno@unixuser.org>
 ;; Keywords: PGP, GnuPG
@@ -79,14 +79,18 @@ May either be a string or a list of strings.")
   (if (and buffer-file-name
           (string-match epa-file-name-regexp buffer-file-name)
           epa-file-inhibit-auto-save)
-      (auto-save-mode 0))
-  (set-buffer-modified-p nil))
+      (auto-save-mode 0)))
 
 (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 t :group 'epa-file :version "23.1"
+  ;; We'd like to use custom-initialize-set here so the setup is done
+  ;; before dumping, but at the point where the defcustom is evaluated,
+  ;; the corresponding function isn't defined yet, so
+  ;; custom-initialize-set signals an error.
+  :initialize 'custom-initialize-delay
   (setq file-name-handler-alist
        (delq epa-file-handler file-name-handler-alist))
   (remove-hook 'find-file-hooks 'epa-file-find-file-hook)
@@ -102,7 +106,7 @@ Return the new status of auto encryption (non-nil means on)."
 (put 'epa-file-handler 'safe-magic t)
 (put 'epa-file-handler 'operations '(write-region insert-file-contents))
 
-(provide 'epa-file-hook)
+(provide 'epa-hook)
 
 ;; arch-tag: f75c8a50-d32e-4eb3-9ec6-9e940c1fc8b5
-;;; epa-file-hook.el ends here
+;;; epa-hook.el ends here