diff lisp/net/tramp.el @ 65359:71de05246686

* woman.el (top): Remap `man' command by `woman' in `woman-mode-map'. (Man-getpage-in-background-advice): Remove defadvice; it isn't necessary any longer with the remapped command. (Man-bgproc-sentinel-advice): Remove defadvice which counts formatting time only. * net/tramp.el (tramp-action-password) (tramp-multi-action-password): Compile the password prompt from `method', `user' and `host'. Sometimes it isn't obvious which password to enter, for example with remote files offered by recentf.el, or with multiple steps. Suggested by Robert Marshall <robert@chezmarshall.freeserve.co.uk>.
author Michael Albinus <michael.albinus@gmx.de>
date Wed, 07 Sep 2005 21:23:36 +0000
parents 379e08762d65
children efa862a76bc2 10fe5fadaf89
line wrap: on
line diff
--- a/lisp/net/tramp.el	Wed Sep 07 19:54:49 2005 +0000
+++ b/lisp/net/tramp.el	Wed Sep 07 21:23:36 2005 +0000
@@ -5213,7 +5213,10 @@
 
 (defun tramp-action-password (p multi-method method user host)
   "Query the user for a password."
-  (let ((pw-prompt (match-string 0)))
+  (let ((pw-prompt
+	 (format "Password for %s "
+		 (tramp-make-tramp-file-name
+		  nil method user host ""))))
     (tramp-message 9 "Sending password")
     (tramp-enter-password p pw-prompt user host)))
 
@@ -5300,8 +5303,12 @@
 
 (defun tramp-multi-action-password (p method user host)
   "Query the user for a password."
-  (tramp-message 9 "Sending password")
-  (tramp-enter-password p (match-string 0) user host))
+  (let ((pw-prompt
+	 (format "Password for %s "
+		 (tramp-make-tramp-file-name
+		  nil method user host ""))))
+    (tramp-message 9 "Sending password")
+    (tramp-enter-password p pw-prompt user host)))
 
 (defun tramp-multi-action-succeed (p method user host)
   "Signal success in finding shell prompt."