summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina <fgallina@cuca>2012-05-17 00:03:31 -0300
committerFabián Ezequiel Gallina <fgallina@gnu.org>2012-05-17 00:03:31 -0300
commit76a9ea3bbb02add4edca960f0314a42e85e0069a (patch)
treef21a8029e7239e87dd643377a5e190a411b02a16 /lisp/progmodes/python.el
parentf6b59cd19050e3ef07cef9480aa4a032982eb591 (diff)
Added `python-pdbtrack-activate' variable to allow users to activate/deactivate pdbtrack.
To keep in sync with the old behavior its default value is t.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index ce6382cf225..401d9fd0495 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1684,6 +1684,12 @@ to complete."
;;; 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)