* net/tramp.el (tramp-debug-message): Extend function exclude
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 18 Jan 2011 15:33:24 +0000 (16:33 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 18 Jan 2011 15:33:24 +0000 (16:33 +0100)
list.  Use `regexp-opt'.

lisp/ChangeLog
lisp/net/tramp.el

index e83a2cf..7282231 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-18  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-debug-message): Extend function exclude
+       list.  Use `regexp-opt'.
+
 2011-01-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * textmodes/tex-mode.el (tex-font-lock-verb): Make sure \verb
index ef312af..6fe176f 100644 (file)
@@ -1293,7 +1293,8 @@ ARGS to actually emit the message (if applicable)."
       (let ((now (current-time)))
         (insert (format-time-string "%T." now))
         (insert (format "%06d " (nth 2 now))))
-      ;; Calling function.
+      ;; Calling Tramp function.  We suppress compat and trace
+      ;; functions from being displayed.
       (let ((btn 1) btf fn)
        (while (not fn)
          (setq btf (nth 1 (backtrace-frame btn)))
@@ -1301,10 +1302,23 @@ ARGS to actually emit the message (if applicable)."
              (setq fn "")
            (when (symbolp btf)
              (setq fn (symbol-name btf))
-             (unless (and (string-match "^tramp" fn)
-                          (not (string-match
-                                "^tramp\\(-debug\\)?\\(-message\\|-error\\|-compat\\(-funcall\\|-with-temp-message\\)\\)$"
-                                fn)))
+             (unless
+                 (and
+                  (string-match "^tramp" fn)
+                  (not
+                   (string-match
+                    (concat
+                     "^"
+                     (regexp-opt
+                      '("tramp-compat-funcall"
+                        "tramp-compat-with-temp-message"
+                        "tramp-debug-message"
+                        "tramp-error"
+                        "tramp-error-with-buffer"
+                        "tramp-message")
+                      t)
+                     "$")
+                    fn)))
                (setq fn nil)))
            (setq btn (1+ btn))))
        ;; The following code inserts filename and line number.