]> code.delx.au - gnu-emacs/blobdiff - lisp/epa-hook.el
* net/gnutls.el (gnutls-negotiate): Fix setting of default trustfiles.
[gnu-emacs] / lisp / epa-hook.el
index 593b5dcf150f9b6625a22bef03ebb76f0d7e4585..5fb7e2c0bf3fe2f63339d1f509276346fbadc3f9 100644 (file)
@@ -1,8 +1,9 @@
 ;;; epa-hook.el --- preloaded code to enable epa-file.el
-;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Daiki Ueno <ueno@unixuser.org>
 ;; Keywords: PGP, GnuPG
+;; Package: emacs
 
 ;; This file is part of GNU Emacs.
 
@@ -31,7 +32,7 @@
   (if (fboundp 'epa-file-name-regexp-update)
       (epa-file-name-regexp-update)))
 
-(defcustom epa-file-name-regexp "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'"
+(defcustom epa-file-name-regexp (purecopy "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'")
   "Regexp which matches filenames to be encrypted with GnuPG.
 
 If you set this outside Custom while epa-file is already enabled, you
@@ -86,6 +87,11 @@ May either be a string or a list of strings.")
 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)