]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (top): Quote feature names. Remove
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 8 Jun 2008 10:49:19 +0000 (10:49 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 8 Jun 2008 10:49:19 +0000 (10:49 +0000)
`tramp-rfn-eshadow-setup-minibuffer' from
`rfn-eshadow-setup-minibuffer-hook' when unloading.
(tramp-read-passwd): There is only one call to
`auth-source-user-or-password' needed.  Pacify byte compiler.

lisp/ChangeLog
lisp/net/tramp.el

index 8a5b4058b5ed3bab99747d07b688e08629fbdc48..3cef51e02d8f110d08d11a600d7b82661c20455d 100644 (file)
@@ -1,3 +1,13 @@
+2008-06-08  Michael Albinus  <michael.albinus@gmx.de>
+
+       * uniquify.el (uniquify-get-proposed-name): Handle remote files.
+
+       * net/tramp.el (top): Quote feature names.  Remove
+       `tramp-rfn-eshadow-setup-minibuffer' from
+       `rfn-eshadow-setup-minibuffer-hook' when unloading.
+       (tramp-read-passwd): There is only one call to
+       `auth-source-user-or-password' needed.  Pacify byte compiler.
+
 2008-06-08  Andreas Schwab  <schwab@suse.de>
 
        * window.el (display-buffer): Use lru window if current window
index a026b45c4d24e07f9d6d342cd2b613fbb661e600..546bb69b02fd2788da300156cbe690046530fbc3 100644 (file)
        (require feature)
        (add-hook 'tramp-unload-hook
                 `(lambda ()
-                   (when (featurep ,feature)
-                     (unload-feature ,feature 'force)))))))
+                   (when (featurep (quote ,feature))
+                     (unload-feature (quote ,feature) 'force)))))))
 
 ;;; User Customizable Internal Variables:
 
@@ -2094,7 +2094,11 @@ special handling of `substitute-in-file-name'."
 
 (when (boundp 'rfn-eshadow-setup-minibuffer-hook)
   (add-hook 'rfn-eshadow-setup-minibuffer-hook
-           'tramp-rfn-eshadow-setup-minibuffer))
+           'tramp-rfn-eshadow-setup-minibuffer)
+  (add-hook 'tramp-unload-hook
+           '(lambda ()
+              (remove-hook 'rfn-eshadow-setup-minibuffer-hook
+                           'tramp-rfn-eshadow-setup-minibuffer))))
 
 (defun tramp-rfn-eshadow-update-overlay ()
   "Update `rfn-eshadow-overlay' to cover shadowed part of minibuffer input.
@@ -7218,16 +7222,12 @@ Invokes `password-read' if available, `read-passwd' else."
                (format "%s for %s " (capitalize (match-string 1)) key)))))
 
     (or
-     ;; see if auth-sources contains something useful, if it's bound
+     ;; See if auth-sources contains something useful, if it's bound.
      (when (boundp 'auth-sources)
-       (or
-       ;; 1. try with Tramp's current method
-       (auth-source-user-or-password
-        "password" tramp-current-host tramp-current-method)
-       ;; 2. hard-code the method to be "tramp"
-       (auth-source-user-or-password
-        "password" tramp-current-host "tramp")))
-     ;; 3. else, get the password interactively
+       ;; Try with Tramp's current method.
+       (funcall (symbol-function 'auth-source-user-or-password)
+               "password" tramp-current-host tramp-current-method))
+     ;; Else, get the password interactively.
      (if (functionp 'password-read)
         (let ((password (funcall (symbol-function 'password-read)
                                  pw-prompt key)))