branch: master commit d367cab6bf45dc2bec12befa369319c89087928a Author: rocky <ro...@gnu.org> Commit: rocky <ro...@gnu.org>
Correct python trepan enable/disable patterns --- realgud/debugger/trepan2/init.el | 14 ++++---------- realgud/debugger/trepan3k/init.el | 14 ++++---------- realgud/lang/python.el | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/realgud/debugger/trepan2/init.el b/realgud/debugger/trepan2/init.el index 371f44e..4e634d2 100644 --- a/realgud/debugger/trepan2/init.el +++ b/realgud/debugger/trepan2/init.el @@ -67,21 +67,15 @@ realgud-loc-pat struct") ;; Regular expression that describes a debugger "disable" (breakpoint) response. ;; For example: -;; Breakpoint entry 4 disabled. +;; Breakpoint 4 disabled. (setf (gethash "brkpt-disable" realgud:trepan2-pat-hash) - (make-realgud-loc-pat - :regexp (format "^Breakpoint entry %s disabled" - realgud:regexp-captured-num) - :num 1)) + realgud:python-trepan-brkpt-disable-pat) ;; Regular expression that describes a debugger "enable" (breakpoint) response. ;; For example: -;; Breakpoint entry 4 enabled. +;; Breakpoint 4 enabled. (setf (gethash "brkpt-enable" realgud:trepan2-pat-hash) - (make-realgud-loc-pat - :regexp (format "^Breakpoint entry %s enabled" - realgud:regexp-captured-num) - :num 1)) + realgud:python-trepan-brkpt-disable-pat) ;; Regular expression for a termination message. (setf (gethash "termination" realgud:trepan2-pat-hash) diff --git a/realgud/debugger/trepan3k/init.el b/realgud/debugger/trepan3k/init.el index ded4d56..9199257 100644 --- a/realgud/debugger/trepan3k/init.el +++ b/realgud/debugger/trepan3k/init.el @@ -65,21 +65,15 @@ realgud-loc-pat struct") ;; Regular expression that describes a debugger "disable" (breakpoint) response. ;; For example: -;; Breakpoint entry 4 disabled. +;; Breakpoint 4 disabled. (setf (gethash "brkpt-disable" realgud:trepan3k-pat-hash) - (make-realgud-loc-pat - :regexp (format "^Breakpoint entry %s disabled" - realgud:regexp-captured-num) - :num 1)) + realgud:python-trepan-brkpt-disable-pat) ;; Regular expression that describes a debugger "enable" (breakpoint) response. ;; For example: -;; Breakpoint entry 4 enabled. +;; Breakpoint 4 enabled. (setf (gethash "brkpt-enable" realgud:trepan3k-pat-hash) - (make-realgud-loc-pat - :regexp (format "^Breakpoint entry %s enabled" - realgud:regexp-captured-num) - :num 1)) + realgud:python-trepan-brkpt-enable-pat) ;; Regular expression for a termination message. (setf (gethash "termination" realgud:trepan3k-pat-hash) diff --git a/realgud/lang/python.el b/realgud/lang/python.el index 3737b9f..1ddea17 100644 --- a/realgud/lang/python.el +++ b/realgud/lang/python.el @@ -1,4 +1,20 @@ -;;; Copyright (C) 2011, 2014-2015 Rocky Bernstein <ro...@gnu.org> +;; Copyright (C) 2011, 2014, 2015 Free Software Foundation, Inc + +;; Author: Rocky Bernstein <ro...@gnu.org> + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + ;;; Common Python constants and regular expressions. (eval-when-compile (require 'cl)) @@ -94,6 +110,24 @@ traceback) line." ) :regexp "^Deleted breakpoint \\([0-9]+\\)\n" :num 1)) +;; Regular expression that describes a debugger "disable" (breakpoint) response. +;; For example: +;; Breakpoint entry 4 disabled. +(defconst realgud:python-trepan-brkpt-disable-pat + (make-realgud-loc-pat + :regexp (format "^Breakpoint %s disabled" + realgud:regexp-captured-num) + :num 1)) + +;; Regular expression that describes a debugger "enable" (breakpoint) response. +;; For example: +;; Breakpoint entry 4 enabled. +(defconst realgud:python-trepan-brkpt-enable-pat + (make-realgud-loc-pat + :regexp (format "^Breakpoint %s enabled" + realgud:regexp-captured-num) + :num 1)) + (defconst realgud:python-debugger-font-lock-keywords '( ;; The frame number and first type name, if present.