summaryrefslogtreecommitdiff
path: root/lisp/epa-hook.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-09-22 13:14:46 +0200
committerMichael Albinus <michael.albinus@gmx.de>2022-09-22 13:14:46 +0200
commit4cb53c0528aad73ac001a5d0b4ae336b8ec65408 (patch)
tree8a92638ba671d4368d1a6e3be00b98150124c0a6 /lisp/epa-hook.el
parent9369e4242fa51d53b05ce95842f124522289d8a3 (diff)
downloademacs-4cb53c0528aad73ac001a5d0b4ae336b8ec65408.tar.gz
Improve don't save bookmark context from encrypted files
* etc/NEWS: Mention 'bookmark-inhibit-context-functions'. Fix typos. * lisp/bookmark.el (bookmark-inhibit-context-functions): New defcustom. (bookmark-make-record): Use it. * lisp/auth-source-pass.el (auth-source-pass-file-name-p): * lisp/auth-source.el (auth-source-file-name-p): New defuns. Add them to `bookmark-inhibit-context-functions'. * lisp/epa-hook.el (epa-file-name-p): * lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Add them to `bookmark-inhibit-context-functions'.
Diffstat (limited to 'lisp/epa-hook.el')
-rw-r--r--lisp/epa-hook.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el
index 70c30308819..386bd739640 100644
--- a/lisp/epa-hook.el
+++ b/lisp/epa-hook.el
@@ -92,6 +92,10 @@ interface, update `file-name-handler-alist'."
"Say whether FILE is handled by `epa-file'."
(and auto-encryption-mode (string-match-p epa-file-name-regexp file)))
+(with-eval-after-load 'bookmark
+ (add-hook 'bookmark-inhibit-context-functions
+ #'epa-file-name-p))
+
(define-minor-mode auto-encryption-mode
"Toggle automatic file encryption/decryption (Auto Encryption mode)."
:global t :init-value t :group 'epa-file :version "23.1"