]> git.eshelyaron.com Git - emacs.git/commitdiff
Added `python-pdbtrack-activate' variable to allow users to activate/deactivate pdbtrack.
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:31 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:31 +0000 (00:03 -0300)
To keep in sync with the old behavior its default value is t.

lisp/progmodes/python.el

index ce6382cf2251fc535ab47842d04c53a74c944d87..401d9fd049514c10d69f7e872bc12767a4dada48 100644 (file)
@@ -1684,6 +1684,12 @@ to complete."
 \f
 ;;; PDB Track integration
 
+(defcustom python-pdbtrack-activate t
+  "Non-nil makes python shell enable pdbtracking."
+  :type 'boolean
+  :group 'python
+  :safe 'booleanp)
+
 (defcustom python-pdbtrack-stacktrace-info-regexp
   "^> \\([^\"(<]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
   "Regular Expression matching stacktrace information.
@@ -1717,7 +1723,7 @@ Returns the tracked buffer."
 (defun python-pdbtrack-comint-output-filter-function (output)
   "Move overlay arrow to current pdb line in tracked buffer.
 Argument OUTPUT is a string with the output from the comint process."
-  (when (not (string= output ""))
+  (when (and python-pdbtrack-activate (not (string= output "")))
     (let* ((full-output (ansi-color-filter-apply
                          (buffer-substring comint-last-input-end (point-max))))
            (line-number)