From 1aa719bb1ce87e68084d7d076f0dba45291e91fe Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 12 Jun 2024 12:46:10 +0200 Subject: [PATCH] Fix tramp-compat-auth-info-password * 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index f1e7a801ec1..a324c4fa826 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -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) -- 2.39.2