Commit 929df0e7 authored by Michael Albinus's avatar Michael Albinus

* 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)
parent c8d3a25c
2012-06-29 Michael Albinus <michael.albinus@gmx.de>
* 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 <schwab@linux-m68k.org>
* calendar/cal-dst.el (calendar-current-time-zone):
......
......@@ -1200,6 +1200,11 @@ only return the directory part of FILE."
(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 @@ E.g.,
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment