diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2022-09-22 13:14:46 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2022-09-22 13:14:46 +0200 |
commit | 4cb53c0528aad73ac001a5d0b4ae336b8ec65408 (patch) | |
tree | 8a92638ba671d4368d1a6e3be00b98150124c0a6 /lisp/auth-source-pass.el | |
parent | 9369e4242fa51d53b05ce95842f124522289d8a3 (diff) | |
download | emacs-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/auth-source-pass.el')
-rw-r--r-- | lisp/auth-source-pass.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el index 86e0b48a79d..0955e2ed07e 100644 --- a/lisp/auth-source-pass.el +++ b/lisp/auth-source-pass.el @@ -319,6 +319,16 @@ then NAME & USER, then NAME & PORT, then just NAME." (list (format "%s" name))))) +(defun auth-source-pass-file-name-p (file) + "Say whether FILE is used by `auth-source-pass'." + (and (stringp file) (stringp auth-source-pass-filename) + (string-equal + (expand-file-name file) (expand-file-name auth-source-pass-filename)))) + +(with-eval-after-load 'bookmark + (add-hook 'bookmark-inhibit-context-functions + #'auth-source-pass-file-name-p)) + (provide 'auth-source-pass) ;;; auth-source-pass.el ends here |