]> git.eshelyaron.com Git - emacs.git/commitdiff
Make sure auth-source-pass is compatible with Emacs 25
authorDamien Cassou <damien@cassou.me>
Mon, 26 Mar 2018 04:28:17 +0000 (06:28 +0200)
committerNicolas Petton <nicolas@petton.fr>
Tue, 5 Jun 2018 13:52:02 +0000 (15:52 +0200)
* lisp/auth-source-pass.el: Use `advice-add' for Emacs 25 users as
`auth-source-backend-parser-functions' does not exist there.

lisp/auth-source-pass.el

index 1193d67954b22122172b1e5e224e0af8c16c430c..d5c61398143bcf2ecdfed69111e5e918747ea933 100644 (file)
@@ -92,7 +92,9 @@ See `auth-source-search' for details on SPEC."
   (when (eq entry 'password-store)
     (auth-source-backend-parse-parameters entry auth-source-pass-backend)))
 
-(add-hook 'auth-source-backend-parser-functions #'auth-source-pass-backend-parse)
+(if (boundp 'auth-source-backend-parser-functions)
+    (add-hook 'auth-source-backend-parser-functions #'auth-source-pass-backend-parse)
+  (advice-add 'auth-source-backend-parse :before-until #'auth-source-pass-backend-parse))
 
 \f
 (defun auth-source-pass-get (key entry)