* epa-file.el (epa-file-write-region): Supply the BUFFER argument
authorueno <ueno>
Tue, 29 May 2007 06:27:35 +0000 (06:27 +0000)
committerueno <ueno>
Tue, 29 May 2007 06:27:35 +0000 (06:27 +0000)
to local-variable-p.
(epa-file-name-regexp): Accept files created by vc-find-version.
(epa-file-find-file-hook): Mark the current buffer as unmodified.
Suggested by Adrian Aichner <adrian@elisp.de>

ChangeLog
epa-file.el

index f01150f..059b8b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-05-29  Daiki Ueno  <ueno@unixuser.org>
+
+       * epa-file.el (epa-file-write-region): Supply the BUFFER argument
+       to local-variable-p.
+       (epa-file-name-regexp): Accept files created by vc-find-version.
+       (epa-file-find-file-hook): Mark the current buffer as unmodified.
+       Suggested by Adrian Aichner <adrian@elisp.de>
+
 2007-04-29  Daiki Ueno  <ueno@unixuser.org>
 
        * epa-file.el (epa-file-write-region): Don't use epa-textmode.
index 5a50295..470f6f4 100644 (file)
@@ -34,7 +34,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 "\\.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
@@ -230,7 +230,8 @@ May either be a string or a list of strings.")
                 (epa-file--encode-coding-string (buffer-substring start end)
                                                 coding-system))
               (if (or epa-file-select-keys
-                      (not (local-variable-p 'epa-file-encrypt-to)))
+                      (not (local-variable-p 'epa-file-encrypt-to
+                                             (current-buffer))))
                   (epa-select-keys
                    context
                    "Select recipents for encryption.
@@ -265,7 +266,8 @@ If no one is selected, symmetric encryption will be performed.  "
   (if (and buffer-file-name
           (string-match epa-file-name-regexp buffer-file-name)
           epa-file-inhibit-auto-save)
-      (auto-save-mode 0)))
+      (auto-save-mode 0))
+  (set-buffer-modified-p nil))
 
 (defun epa-file-select-keys ()
   "Select recipients for encryption."