[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3a84860 040/215: DRY realgud:regexp-capture-num and add mo
From: |
Rocky Bernstein |
Subject: |
[elpa] master 3a84860 040/215: DRY realgud:regexp-capture-num and add more FSF copyrights |
Date: |
Sat, 30 Jul 2016 14:48:52 +0000 (UTC) |
branch: master
commit 3a8486030e36fe7928cabd45b51f0dbb7eaea137
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
DRY realgud:regexp-capture-num and add more FSF copyrights
---
realgud/debugger/bashdb/init.el | 23 +++++++++++++--
realgud/debugger/bashdb/track-mode.el | 19 +++++++++++-
realgud/debugger/trepan8/init.el | 8 +++--
realgud/debugger/zshdb/init.el | 21 +++++++++++--
realgud/lang/posix-shell.el | 52 +++++++++++++++++++++++----------
5 files changed, 98 insertions(+), 25 deletions(-)
diff --git a/realgud/debugger/bashdb/init.el b/realgud/debugger/bashdb/init.el
index c8e4559..81cf9b5 100644
--- a/realgud/debugger/bashdb/init.el
+++ b/realgud/debugger/bashdb/init.el
@@ -1,5 +1,21 @@
-;;; Copyright (C) 2010-2011, 2015 Rocky Bernstein <address@hidden>
-;;; Regular expressions for Bash shell debugger: bashdb
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
+
+;; Regular expressions for Bash shell debugger: bashdb
(eval-when-compile (require 'cl))
@@ -31,7 +47,8 @@ realgud-loc-pat struct")
;; bashdb<<1>>
(setf (gethash "prompt" realgud:bashdb-pat-hash)
(make-realgud-loc-pat
- :regexp "^bashdb[<]+[(]*\\([0-9]+\\)[)]*[>]+ "
+ :regexp (format "^bashdb[<]+[(]*%s[)]*[>]+ "
+ realgud:regexp-captured-num)
:num 1
))
diff --git a/realgud/debugger/bashdb/track-mode.el
b/realgud/debugger/bashdb/track-mode.el
index de4478d..7904d25 100644
--- a/realgud/debugger/bashdb/track-mode.el
+++ b/realgud/debugger/bashdb/track-mode.el
@@ -1,5 +1,22 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
;;; Copyright (C) 2012-2015 Rocky Bernstein <address@hidden>
-;;; Bash Debugger tracking in a comint buffer.
+
+;; Bash Debugger tracking in a comint or eshell buffer.
(eval-when-compile (require 'cl))
(require 'load-relative)
diff --git a/realgud/debugger/trepan8/init.el b/realgud/debugger/trepan8/init.el
index a6ba3d4..b6c9e39 100644
--- a/realgud/debugger/trepan8/init.el
+++ b/realgud/debugger/trepan8/init.el
@@ -20,7 +20,8 @@ realgud-loc-pat struct")
;; -- (kernel/common/scope.rb:134 remapped /tmp/scope.rb:134)
(setf (gethash "loc" realgud:trepan8-pat-hash)
(make-realgud-loc-pat
- :regexp ".. (\\(?:.+ \\(?:via\\|remapped\\)
\\)?\\(.+\\):\\([0-9]+\\)\\(?: @[0-9]+\\)?)"
+ :regexp (format ".. (\\(?:.+ \\(?:via\\|remapped\\)
\\)?\\(.+\\):%s\\(?: @[0-9]+\\)?)"
+ realgud:regexp-captured-num)
:file-group 1
:line-group 2))
@@ -56,7 +57,8 @@ realgud-loc-pat struct")
;; Deleted breakpoint 1.
(setf (gethash "brkpt-del" realgud:trepan8-pat-hash)
(make-realgud-loc-pat
- :regexp "^Deleted breakpoint \\([0-9]+\\).\n"
+ :regexp (format "^Deleted breakpoint %s.\n"
+ realgud:regexp-captured-num)
:num 1))
;; Regular expression that describes a Ruby $! string
@@ -66,7 +68,7 @@ realgud-loc-pat struct")
(setf (gethash "trepan8" realgud-pat-hash) realgud:trepan8-pat-hash)
(defconst realgud:trepan8-frame-file-line-regexp
- " at \\(.*\\):\\([0-9]+\\)$")
+ (format " at \\(.*\\):%s$" realgud:regexp-captured-num))
(defconst realgud:trepan8-frame-start-regexp realgud:trepan-frame-start-regexp)
(defconst realgud:trepan8-frame-num-regexp realgud:trepan-frame-start-regexp)
diff --git a/realgud/debugger/zshdb/init.el b/realgud/debugger/zshdb/init.el
index 4931105..e8bc9ff 100644
--- a/realgud/debugger/zshdb/init.el
+++ b/realgud/debugger/zshdb/init.el
@@ -1,5 +1,19 @@
-;;; Copyright (C) 2010, 2014-2015 Rocky Bernstein <address@hidden>
-;;; Regular expressions for Z shell debugger: zshdb
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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/>.
(eval-when-compile (require 'cl))
@@ -31,7 +45,8 @@ realgud-loc-pat struct")
;; zshdb<<1>>
(setf (gethash "prompt" realgud:zshdb-pat-hash)
(make-realgud-loc-pat
- :regexp "^zshdb[<]+[(]*\\([0-9]+\\)[)]*[>]+ "
+ :regexp (format "^zshdb[<]+[(]*%s[)]*[>]+ "
+ realgud:regexp-captured-num)
:num 1
))
diff --git a/realgud/lang/posix-shell.el b/realgud/lang/posix-shell.el
index 3cbc51a..4b5e017 100644
--- a/realgud/lang/posix-shell.el
+++ b/realgud/lang/posix-shell.el
@@ -1,10 +1,27 @@
-;;; Copyright (C) 2010-2011, 2015 Rocky Bernstein <address@hidden>
-;;;
-;;; Common POSIX-Shell like constants and regular expressions.
-;;; Actually a lot of this is not about POSIX shell as it is about the
-;;; common-ness of bashdb, zshdb, and kshdb. But since those are the
-;;; *only* debuggers I know of for POSIX shells, it's not too much of
-;;; a stretch to think of this as for all "shell".
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; 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 POSIX-Shell like constants and regular expressions.
+;; Actually a lot of this is not about POSIX shell as it is about the
+;; common-ness of bashdb, zshdb, and kshdb. But since those are the
+;; *only* debuggers I know of for POSIX shells, it's not too much of
+;; a stretch to think of this as for all "shell".
+
(eval-when-compile (require 'cl))
(require 'load-relative)
@@ -14,7 +31,8 @@
(defconst realgud-shell-backtrace-loc-pat
(make-realgud-loc-pat
- :regexp "^[ \t]+from \\([^:]+\\):\\([0-9]+\\)\\(?: in `.*'\\)?"
+ :regexp (format "^[ \t]+from \\([^:]+\\):%s\\(?: in `.*'\\)?"
+ realgud:regexp-captured-num)
:file-group 1
:line-group 2)
"A realgud-loc-pat struct that describes a Shell backtrace (or
@@ -24,13 +42,13 @@ traceback) line." )
"\\(?:^\\|\n\\)\\(->\\|##\\)")
(defconst realgud-shell-frame-num-regexp
- "\\([0-9]+\\)")
+ realgud:regexp-captured-num)
(defconst realgud-shell-frame-file-regexp
"[ \t\n]+\\(?:in\\|from\\) file `\\(.+\\)'")
(defconst realgud-shell-frame-line-regexp
- "[ \t\n]+at line \\([0-9]+\\)\\(?:\n\\|$\\)")
+ (format "[ \t\n]+at line %s\\(?:\n\\|$\\)" realgud:regexp-captured-num))
(defun realgud-posix-shell-populate-command-keys (&optional map)
"Bind the debugger function key layout used by many debuggers.
@@ -46,7 +64,9 @@ traceback) line." )
;; (/etc/init.d/apparmor:35):
(defconst realgud:POSIX-debugger-loc-pat
(make-realgud-loc-pat
- :regexp "\\(?:^\\|\n\\)(\\([^:]+\\):\\([0-9]*\\)):\\(?:\n\\(.+\\)\\)?"
+ :regexp (format
+ "\\(?:^\\|\n\\)(\\([^:]+\\):%s):\\(?:\n\\(.+\\)\\)?"
+ realgud:regexp-captured-num)
:file-group 1
:line-group 2
:text-group 3)
@@ -75,7 +95,8 @@ traceback) line." )
;; Regular expression that describes a "breakpoint set" line
(defconst realgud:POSIX-debugger-brkpt-set-pat
(make-realgud-loc-pat
- :regexp "^Breakpoint \\([0-9]+\\) set in file \\(.+\\), line
\\([0-9]+\\).\n"
+ :regexp (format "^Breakpoint \\([0-9]+\\) set in file \\(.+\\), line %s.\n"
+ realgud:regexp-captured-num)
:num 1
:file-group 2
:line-group 3))
@@ -85,7 +106,8 @@ traceback) line." )
;; Removed 1 breakpoint(s).
(defconst realgud:POSIX-debugger-brkpt-del-pat
(make-realgud-loc-pat
- :regexp "^Removed \\([0-9]+\\) breakpoint(s).\n"
+ :regexp (format "^Removed %s breakpoint(s).\n"
+ realgud:regexp-captured-num)
:num 1))
(defconst realgud:POSIX-debugger-font-lock-keywords
@@ -93,7 +115,7 @@ traceback) line." )
;; The frame number and first type name, if present.
;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
;; --^-
- ("^\\(->\\|##\\)\\([0-9]+\\) "
+ ((format "^\\(->\\|##\\)%s " realgud:regexp-captured-num)
(2 realgud-backtrace-number-face))
;; File name.
@@ -106,7 +128,7 @@ traceback) line." )
;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
;; --------^^
;; Line number.
- ("[ \t]+at line \\([0-9]+\\)$"
+ ((format "[ \t]+at line %s$" realgud:regexp-captured-num)
(1 realgud-line-number-face))
;; (trepan-frames-match-current-line
;; (0 trepan-frames-current-frame-face append))
- [elpa] master 74eedc2 030/215: Start js lang. add js backtrace regexp, (continued)
- [elpa] master 74eedc2 030/215: Start js lang. add js backtrace regexp, Rocky Bernstein, 2016/07/30
- [elpa] master 6df0f6a 051/215: trepanjs location format has changed, Rocky Bernstein, 2016/07/30
- [elpa] master bbab251 048/215: gdb: DRY captured number uses., Rocky Bernstein, 2016/07/30
- [elpa] master be999ea 054/215: trepanjs backtrace format changes next release, Rocky Bernstein, 2016/07/30
- [elpa] master 5078d4e 056/215: Doc gdb regexp more., Rocky Bernstein, 2016/07/30
- [elpa] master 0664fb9 037/215: trepanjs/init.el: handle newly added fully-qualified paths, Rocky Bernstein, 2016/07/30
- [elpa] master e5d0f95 057/215: Fix typo poined out by dfelch., Rocky Bernstein, 2016/07/30
- [elpa] master 071b66c 052/215: DRY gub init captured numbered re's., Rocky Bernstein, 2016/07/30
- [elpa] master bd45ec9 023/215: backtrace.el: fix some bugs and remove some warnings, Rocky Bernstein, 2016/07/30
- [elpa] master 8e1ef01 047/215: core.el: correct trepanjs options, Rocky Bernstein, 2016/07/30
- [elpa] master 3a84860 040/215: DRY realgud:regexp-capture-num and add more FSF copyrights,
Rocky Bernstein <=
- [elpa] master aa3125d 041/215: posix-shell.el: sometimes I can't use (format), Rocky Bernstein, 2016/07/30
- [elpa] master 2598619 039/215: init.el: bracketed short name is optional, Rocky Bernstein, 2016/07/30
- [elpa] master e554cad 027/215: Add trepanjs, Rocky Bernstein, 2016/07/30
- [elpa] master ba7a8b1 045/215: bang on trepanjs and nodejs., Rocky Bernstein, 2016/07/30
- [elpa] master 5f664e2 055/215: Python trepan debuggers include instruction offset in location, Rocky Bernstein, 2016/07/30
- [elpa] master a4f3509 058/215: Add realgud:pdb-remote for remote kinds of pdb execution, e.g. telnet, Rocky Bernstein, 2016/07/30
- [elpa] master 1790056 059/215: Typo: Issue #45, Rocky Bernstein, 2016/07/30
- [elpa] master a016c6f 050/215: Administrivia, Rocky Bernstein, 2016/07/30
- [elpa] master 0dd37e2 053/215: Revise trepanjs regexps and add regexp test., Rocky Bernstein, 2016/07/30
- [elpa] master dd0c60a 066/215: I said remove perl5db as an alias, Rocky Bernstein, 2016/07/30