diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-09-19 09:42:28 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-09-19 09:43:05 +0200 |
commit | a53781470935fc0b7c7e576c3d02ed723c9587c4 (patch) | |
tree | 76d7f07acdfd0b045d4fb26460e890ac2d0adf62 /lisp/epa-hook.el | |
parent | 3fd2b00a4b20afa827afe0eee2b7ba5f08e4cce6 (diff) | |
download | emacs-a53781470935fc0b7c7e576c3d02ed723c9587c4.tar.gz |
Don't save bookmark context from encrypted files
* doc/emacs/regs.texi (Bookmarks): Mention this.
* lisp/bookmark.el (bookmark-make-record): Don't include context
in encrypted files (bug#57856).
* lisp/epa-hook.el (epa-file-name-p): New function.
Diffstat (limited to 'lisp/epa-hook.el')
-rw-r--r-- | lisp/epa-hook.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index 18e47c682e8..70c30308819 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -88,6 +88,10 @@ interface, update `file-name-handler-alist'." epa-file-inhibit-auto-save) (auto-save-mode 0))) +(defun epa-file-name-p (file) + "Say whether FILE is handled by `epa-file'." + (and auto-encryption-mode (string-match-p epa-file-name-regexp file))) + (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" |