comparison lisp/net/tramp.el @ 112358:49f47421e4c1

* net/tramp.el (tramp-debug-message): Extend function exclude list. Use `regexp-opt'.
author Michael Albinus <michael.albinus@gmx.de>
date Tue, 18 Jan 2011 16:33:24 +0100
parents 4f72b1e43644
children
comparison
equal deleted inserted replaced
112357:c29a17e02c5b 112358:49f47421e4c1
1291 (insert "\n")) 1291 (insert "\n"))
1292 ;; Timestamp. 1292 ;; Timestamp.
1293 (let ((now (current-time))) 1293 (let ((now (current-time)))
1294 (insert (format-time-string "%T." now)) 1294 (insert (format-time-string "%T." now))
1295 (insert (format "%06d " (nth 2 now)))) 1295 (insert (format "%06d " (nth 2 now))))
1296 ;; Calling function. 1296 ;; Calling Tramp function. We suppress compat and trace
1297 ;; functions from being displayed.
1297 (let ((btn 1) btf fn) 1298 (let ((btn 1) btf fn)
1298 (while (not fn) 1299 (while (not fn)
1299 (setq btf (nth 1 (backtrace-frame btn))) 1300 (setq btf (nth 1 (backtrace-frame btn)))
1300 (if (not btf) 1301 (if (not btf)
1301 (setq fn "") 1302 (setq fn "")
1302 (when (symbolp btf) 1303 (when (symbolp btf)
1303 (setq fn (symbol-name btf)) 1304 (setq fn (symbol-name btf))
1304 (unless (and (string-match "^tramp" fn) 1305 (unless
1305 (not (string-match 1306 (and
1306 "^tramp\\(-debug\\)?\\(-message\\|-error\\|-compat\\(-funcall\\|-with-temp-message\\)\\)$" 1307 (string-match "^tramp" fn)
1307 fn))) 1308 (not
1309 (string-match
1310 (concat
1311 "^"
1312 (regexp-opt
1313 '("tramp-compat-funcall"
1314 "tramp-compat-with-temp-message"
1315 "tramp-debug-message"
1316 "tramp-error"
1317 "tramp-error-with-buffer"
1318 "tramp-message")
1319 t)
1320 "$")
1321 fn)))
1308 (setq fn nil))) 1322 (setq fn nil)))
1309 (setq btn (1+ btn)))) 1323 (setq btn (1+ btn))))
1310 ;; The following code inserts filename and line number. 1324 ;; The following code inserts filename and line number.
1311 ;; Should be deactivated by default, because it is time 1325 ;; Should be deactivated by default, because it is time
1312 ;; consuming. 1326 ;; consuming.