]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tramp-compat-auth-info-password
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 12 Jun 2024 10:46:10 +0000 (12:46 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 12 Jun 2024 14:20:36 +0000 (16:20 +0200)
* lisp/net/tramp-compat.el (tramp-compat-auth-info-password):
Use original function only for Emacs 30+.

(cherry picked from commit 9c2fad55fd2725da5bf30677d07541f6f6d1c45b)

lisp/net/tramp-compat.el

index f1e7a801ec163144cb9a7c26b0e97705b8564413..a324c4fa82635fe27c22de42ea4e21ac476529d6 100644 (file)
@@ -252,10 +252,11 @@ Also see `ignore'."
       (tramp-error vec tramp-permission-denied file)
     (tramp-error vec tramp-permission-denied "Permission denied: %s" file)))
 
-;; Function `auth-info-password' is new in Emacs 29.1.
+;; Function `auth-info-password' is new in Emacs 29.1.  However, it
+;; doesn't obey cascaded functions, which is fixed in Emacs 30.1 only.
 (defalias 'tramp-compat-auth-info-password
-  (if (fboundp 'auth-info-password)
-      #'auth-info-password
+  (if (>= emacs-major-version 30)
+      'auth-info-password
     (lambda (auth-info)
       (let ((secret (plist-get auth-info :secret)))
        (while (functionp secret)