diff options
| author | Michael Albinus | 2013-02-14 14:32:04 +0100 |
|---|---|---|
| committer | Michael Albinus | 2013-02-14 14:32:04 +0100 |
| commit | 5267e6d3f62bb58473e9d7bbb485b470a4d2400d (patch) | |
| tree | 7b58e5787b2f18c3e9c0ab25ec759b5f7d3a2386 | |
| parent | 26280467c67d808e36b52fbe13d4357eb7654087 (diff) | |
| download | emacs-5267e6d3f62bb58473e9d7bbb485b470a4d2400d.tar.gz emacs-5267e6d3f62bb58473e9d7bbb485b470a4d2400d.zip | |
* net/tramp.el (tramp-debug-message): Add
`tramp-condition-case-unless-debug'.
(tramp-debug-on-error): New defvar.
(tramp-condition-case-unless-debug): New defun.
(tramp-file-name-handler): Use it.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 14 |
2 files changed, 20 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5be2e29ff6d..5a752fe0c3a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-02-14 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-debug-message): Add | ||
| 4 | `tramp-condition-case-unless-debug'. | ||
| 5 | (tramp-debug-on-error): New defvar. | ||
| 6 | (tramp-condition-case-unless-debug): New defun. | ||
| 7 | (tramp-file-name-handler): Use it. | ||
| 8 | |||
| 1 | 2013-02-14 Juri Linkov <juri@jurta.org> | 9 | 2013-02-14 Juri Linkov <juri@jurta.org> |
| 2 | 10 | ||
| 3 | * info.el (Info-isearch-filter): Treat non-nil values of | 11 | * info.el (Info-isearch-filter): Treat non-nil values of |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a4250f94988..89648b0e9a9 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1399,6 +1399,7 @@ ARGS to actually emit the message (if applicable)." | |||
| 1399 | "tramp-compat-condition-case-unless-debug" | 1399 | "tramp-compat-condition-case-unless-debug" |
| 1400 | "tramp-compat-funcall" | 1400 | "tramp-compat-funcall" |
| 1401 | "tramp-compat-with-temp-message" | 1401 | "tramp-compat-with-temp-message" |
| 1402 | "tramp-condition-case-unless-debug" | ||
| 1402 | "tramp-debug-message" | 1403 | "tramp-debug-message" |
| 1403 | "tramp-error" | 1404 | "tramp-error" |
| 1404 | "tramp-error-with-buffer" | 1405 | "tramp-error-with-buffer" |
| @@ -2011,6 +2012,15 @@ ARGS are the arguments OPERATION has been called with." | |||
| 2011 | res (cdr elt)))) | 2012 | res (cdr elt)))) |
| 2012 | res)))) | 2013 | res)))) |
| 2013 | 2014 | ||
| 2015 | (defvar tramp-debug-on-error nil | ||
| 2016 | "Like `debug-on-error' but used Tramp internal.") | ||
| 2017 | |||
| 2018 | (defmacro tramp-condition-case-unless-debug | ||
| 2019 | (var bodyform &rest handlers) | ||
| 2020 | "Like `condition-case-unless-debug' but `tramp-debug-on-error'." | ||
| 2021 | `(let ((debug-on-error tramp-debug-on-error)) | ||
| 2022 | (tramp-compat-condition-case-unless-debug ,var ,bodyform ,@handlers))) | ||
| 2023 | |||
| 2014 | ;; Main function. | 2024 | ;; Main function. |
| 2015 | ;;;###autoload | 2025 | ;;;###autoload |
| 2016 | (defun tramp-file-name-handler (operation &rest args) | 2026 | (defun tramp-file-name-handler (operation &rest args) |
| @@ -2026,7 +2036,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 2026 | (with-parsed-tramp-file-name filename nil | 2036 | (with-parsed-tramp-file-name filename nil |
| 2027 | ;; Call the backend function. | 2037 | ;; Call the backend function. |
| 2028 | (if foreign | 2038 | (if foreign |
| 2029 | (tramp-compat-condition-case-unless-debug err | 2039 | (tramp-condition-case-unless-debug err |
| 2030 | (let ((sf (symbol-function foreign)) | 2040 | (let ((sf (symbol-function foreign)) |
| 2031 | result) | 2041 | result) |
| 2032 | ;; Some packages set the default directory to a | 2042 | ;; Some packages set the default directory to a |
| @@ -2079,7 +2089,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 2079 | ;; in order to give the user a chance to correct the | 2089 | ;; in order to give the user a chance to correct the |
| 2080 | ;; file name in the minibuffer. | 2090 | ;; file name in the minibuffer. |
| 2081 | ;; In order to get a full backtrace, one could apply | 2091 | ;; In order to get a full backtrace, one could apply |
| 2082 | ;; (setq debug-on-error t debug-on-signal t) | 2092 | ;; (setq tramp-debug-on-error t) |
| 2083 | (error | 2093 | (error |
| 2084 | (cond | 2094 | (cond |
| 2085 | ((and completion (zerop (length localname)) | 2095 | ((and completion (zerop (length localname)) |