Mercurial > emacs
changeset 107278:a47ad081a03c
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 15 Feb 2010 21:54:07 +0000 |
parents | 260c94ced579 (current diff) 2c62b10c201b (diff) |
children | 6e3f2cca063f |
files | |
diffstat | 5 files changed, 50 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Feb 14 21:55:14 2010 +0000 +++ b/lisp/ChangeLog Mon Feb 15 21:54:07 2010 +0000 @@ -1,3 +1,19 @@ +2010-02-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/advice.el (ad-compile-function): Suppress byte-compiler + warnings, since it is annoying for the user to see them each time he + runs the code. + +2010-02-15 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-process-actions, tramp-read-passwd): + * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): Use VEC + instead of PROC for caching "first-password-request". Otherwise, + new processes would not profit from passwords already entered. + + * net/tramp-cache.el (tramp-dump-connection-properties): + Don't save "first-password-request" property. + 2010-02-14 Juanma Barranquero <lekktu@gmail.com> * outline.el (outline-head-from-level):
--- a/lisp/emacs-lisp/advice.el Sun Feb 14 21:55:14 2010 +0000 +++ b/lisp/emacs-lisp/advice.el Mon Feb 15 21:54:07 2010 +0000 @@ -2685,7 +2685,9 @@ (ad-with-auto-activation-disabled (require 'bytecomp) (let ((symbol (make-symbol "advice-compilation")) - (byte-compile-warnings byte-compile-warnings)) + (byte-compile-warnings byte-compile-warnings) + ;; Don't pop up windows showing byte-compiler warnings. + (warning-suppress-types '((bytecomp)))) (if (featurep 'cl) (byte-compile-disable-warning 'cl-functions)) (fset symbol (symbol-function function))
--- a/lisp/net/tramp-cache.el Sun Feb 14 21:55:14 2010 +0000 +++ b/lisp/net/tramp-cache.el Mon Feb 15 21:54:07 2010 +0000 @@ -1,7 +1,7 @@ ;;; tramp-cache.el --- file information caching for Tramp -;; Copyright (C) 2000, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2005, 2006, 2007, 2008, 2009, +;; 2010 Free Software Foundation, Inc. ;; Author: Daniel Pittman <daniel@inanna.danann.net> ;; Michael Albinus <michael.albinus@gmx.de> @@ -295,7 +295,8 @@ (if (and (vectorp key) (not (tramp-file-name-localname key))) (progn (remhash "process-name" value) - (remhash "process-buffer" value)) + (remhash "process-buffer" value) + (remhash "first-password-request" value)) (remhash key cache))) cache) ;; Dump it.
--- a/lisp/net/tramp-gvfs.el Sun Feb 14 21:55:14 2010 +0000 +++ b/lisp/net/tramp-gvfs.el Mon Feb 15 21:54:07 2010 +0000 @@ -1057,8 +1057,7 @@ vec 3 "Opening connection for %s@%s using %s..." user host method)) ;; Enable auth-sorce and password-cache. - (tramp-set-connection-property - (tramp-get-connection-process vec) "first-password-request" t) + (tramp-set-connection-property vec "first-password-request" t) ;; There will be a callback of "askPassword", when a password is ;; needed.
--- a/lisp/net/tramp.el Sun Feb 14 21:55:14 2010 +0000 +++ b/lisp/net/tramp.el Mon Feb 15 21:54:07 2010 +0000 @@ -6539,7 +6539,7 @@ (defun tramp-process-actions (proc vec actions &optional timeout) "Perform actions until success or TIMEOUT." ;; Enable auth-source and password-cache. - (tramp-set-connection-property proc "first-password-request" t) + (tramp-set-connection-property vec "first-password-request" t) (let (exit) (while (not exit) (tramp-message proc 3 "Waiting for prompts from remote shell") @@ -8320,26 +8320,27 @@ (with-current-buffer (process-buffer proc) (tramp-check-for-regexp proc tramp-password-prompt-regexp) (format "%s for %s " (capitalize (match-string 1)) key))))) - (prog1 - (or - ;; See if auth-sources contains something useful, if it's bound. - (and (boundp 'auth-sources) - (tramp-get-connection-property proc "first-password-request" nil) - ;; Try with Tramp's current method. - (funcall (symbol-function 'auth-source-user-or-password) - "password" tramp-current-host tramp-current-method)) - ;; Try the password cache. - (when (functionp 'password-read) - (unless (tramp-get-connection-property - proc "first-password-request" nil) - (funcall (symbol-function 'password-cache-remove) key)) - (let ((password - (funcall (symbol-function 'password-read) pw-prompt key))) - (funcall (symbol-function 'password-cache-add) key password) - password)) - ;; Else, get the password interactively. - (read-passwd pw-prompt)) - (tramp-set-connection-property proc "first-password-request" nil)))) + (with-parsed-tramp-file-name key nil + (prog1 + (or + ;; See if auth-sources contains something useful, if it's bound. + (and (boundp 'auth-sources) + (tramp-get-connection-property v "first-password-request" nil) + ;; Try with Tramp's current method. + (funcall (symbol-function 'auth-source-user-or-password) + "password" tramp-current-host tramp-current-method)) + ;; Try the password cache. + (when (functionp 'password-read) + (unless (tramp-get-connection-property + v "first-password-request" nil) + (funcall (symbol-function 'password-cache-remove) key)) + (let ((password + (funcall (symbol-function 'password-read) pw-prompt key))) + (funcall (symbol-function 'password-cache-add) key password) + password)) + ;; Else, get the password interactively. + (read-passwd pw-prompt)) + (tramp-set-connection-property v "first-password-request" nil))))) (defun tramp-clear-passwd (vec) "Clear password cache for connection related to VEC." @@ -8585,7 +8586,7 @@ ;; rsync). ;; * Keep a second connection open for out-of-band methods like scp or ;; rsync. -;; * Support ptys in `tramp-handle-start-file-process'. +;; * Support ptys in `tramp-handle-start-file-process'. (Bug#4604) ;; * IMHO, it's a drawback that currently Tramp doesn't support ;; Unicode in Dired file names by default. Is it possible to ;; improve Tramp to set LC_ALL to "C" only for commands where Tramp @@ -8596,6 +8597,9 @@ ;; * Load Tramp subpackages only when needed. (Bug#1529, Bug#5448) ;; * Try telnet+curl as new method. It might be useful for busybox, ;; without built-in uuencode/uudecode. +;; * Let `shell-dynamic-complete-*' and `comint-dynamic-complete' work +;; on remote hosts. +;; * Use secrets.el for password handling. ;; Functions for file-name-handler-alist: ;; diff-latest-backup-file -- in diff.el