[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108799: * net/ange-ftp.el (ange-ftp-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108799: * net/ange-ftp.el (ange-ftp-get-passwd): Throw if `non-essential' |
Date: |
Fri, 29 Jun 2012 09:14:36 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108799
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2012-06-29 09:14:36 +0200
message:
* net/ange-ftp.el (ange-ftp-get-passwd): Throw if `non-essential'
is non-nil.
(ange-ftp-ignore-errors-if-non-essential): New defmacro.
(ange-ftp-file-name-all-completions): Use it. (Bug#11808)
modified:
lisp/ChangeLog
lisp/net/ange-ftp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-06-29 06:28:37 +0000
+++ b/lisp/ChangeLog 2012-06-29 07:14:36 +0000
@@ -1,3 +1,10 @@
+2012-06-29 Michael Albinus <address@hidden>
+
+ * net/ange-ftp.el (ange-ftp-get-passwd): Throw if `non-essential'
+ is non-nil.
+ (ange-ftp-ignore-errors-if-non-essential): New defmacro.
+ (ange-ftp-file-name-all-completions): Use it. (Bug#11808)
+
2012-06-29 Andreas Schwab <address@hidden>
* calendar/cal-dst.el (calendar-current-time-zone):
=== modified file 'lisp/net/ange-ftp.el'
--- a/lisp/net/ange-ftp.el 2012-06-20 06:51:53 +0000
+++ b/lisp/net/ange-ftp.el 2012-06-29 07:14:36 +0000
@@ -1200,6 +1200,11 @@
(defun ange-ftp-get-passwd (host user)
"Return the password for specified HOST and USER, asking user if necessary."
+ ;; If `non-essential' is non-nil, don't ask for a password. It will
+ ;; be catched in Tramp.
+ (when non-essential
+ (throw 'non-essential 'non-essential))
+
(ange-ftp-parse-netrc)
;; look up password in the hash table first; user might have overridden the
@@ -3969,10 +3974,15 @@
(string-match "\\`[a-zA-Z]:[/\\]\\'" dir))
(string-equal "/" dir)))
+(defmacro ange-ftp-ignore-errors-if-non-essential (&rest body)
+ `(if non-essential
+ (ignore-errors ,@body)
+ (progn ,@body)))
+
(defun ange-ftp-file-name-all-completions (file dir)
(let ((ange-ftp-this-dir (expand-file-name dir)))
(if (ange-ftp-ftp-name ange-ftp-this-dir)
- (progn
+ (ange-ftp-ignore-errors-if-non-essential
(ange-ftp-barf-if-not-directory ange-ftp-this-dir)
(setq ange-ftp-this-dir
(ange-ftp-real-file-name-as-directory ange-ftp-this-dir))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108799: * net/ange-ftp.el (ange-ftp-get-passwd): Throw if `non-essential',
Michael Albinus <=