emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111782: * net/tramp.el (tramp-debug-


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111782: * net/tramp.el (tramp-debug-message): Add
Date: Thu, 14 Feb 2013 14:32:04 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111782
committer: Michael Albinus <address@hidden
branch nick: trunk
timestamp: Thu 2013-02-14 14:32:04 +0100
message:
  * 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.
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-14 09:15:55 +0000
+++ b/lisp/ChangeLog    2013-02-14 13:32:04 +0000
@@ -1,3 +1,11 @@
+2013-02-14  Michael Albinus  <address@hidden>
+
+       * 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.
+
 2013-02-14  Juri Linkov  <address@hidden>
 
        * info.el (Info-isearch-filter): Treat non-nil values of

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-02-13 16:23:15 +0000
+++ b/lisp/net/tramp.el 2013-02-14 13:32:04 +0000
@@ -1399,6 +1399,7 @@
                         "tramp-compat-condition-case-unless-debug"
                         "tramp-compat-funcall"
                         "tramp-compat-with-temp-message"
+                        "tramp-condition-case-unless-debug"
                         "tramp-debug-message"
                         "tramp-error"
                         "tramp-error-with-buffer"
@@ -2011,6 +2012,15 @@
                  res (cdr elt))))
        res))))
 
+(defvar tramp-debug-on-error nil
+  "Like `debug-on-error' but used Tramp internal.")
+
+(defmacro tramp-condition-case-unless-debug
+  (var bodyform &rest handlers)
+  "Like `condition-case-unless-debug' but `tramp-debug-on-error'."
+  `(let ((debug-on-error tramp-debug-on-error))
+     (tramp-compat-condition-case-unless-debug ,var ,bodyform ,@handlers)))
+
 ;; Main function.
 ;;;###autoload
 (defun tramp-file-name-handler (operation &rest args)
@@ -2026,7 +2036,7 @@
          (with-parsed-tramp-file-name filename nil
            ;; Call the backend function.
            (if foreign
-               (tramp-compat-condition-case-unless-debug err
+               (tramp-condition-case-unless-debug err
                    (let ((sf (symbol-function foreign))
                          result)
                      ;; Some packages set the default directory to a
@@ -2079,7 +2089,7 @@
                  ;; in order to give the user a chance to correct the
                  ;; file name in the minibuffer.
                  ;; In order to get a full backtrace, one could apply
-                 ;;   (setq debug-on-error t debug-on-signal t)
+                 ;;   (setq tramp-debug-on-error t)
                  (error
                   (cond
                    ((and completion (zerop (length localname))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]