[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0a1dbc4 036/215: Remove node asci schmutz. put in lang/js.
From: |
Rocky Bernstein |
Subject: |
[elpa] master 0a1dbc4 036/215: Remove node asci schmutz. put in lang/js.el |
Date: |
Sat, 30 Jul 2016 14:48:51 +0000 (UTC) |
branch: master
commit 0a1dbc4ceda0c8f790f4f6e6ff9f694f559aaa61
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Remove node asci schmutz. put in lang/js.el
Add more FSF copyrights
---
realgud/debugger/nodejs/nodejs.el | 23 ++++++++++++++++++--
realgud/debugger/trepanjs/trepanjs.el | 38 +++++++++++++++++++++++++++------
realgud/lang/js.el | 10 +++++++++
3 files changed, 63 insertions(+), 8 deletions(-)
diff --git a/realgud/debugger/nodejs/nodejs.el
b/realgud/debugger/nodejs/nodejs.el
index 23b7a38..33cb74f 100644
--- a/realgud/debugger/nodejs/nodejs.el
+++ b/realgud/debugger/nodejs/nodejs.el
@@ -1,12 +1,31 @@
+;; 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 nodejs Javascript debugger.
;;; Copyright (C) 2014-2015 Rocky Bernstein <address@hidden>
+
;; `nodejs' Main interface to nodejs debugger via Emacs
(require 'list-utils)
(require 'load-relative)
(require-relative-list '("../../common/helper") "realgud-")
(require-relative-list '("../../common/run") "realgud:")
(require-relative-list '("core" "track-mode") "realgud:nodejs-")
+(require-relative-list '("../../lang/js") "realgud-lang-")
-(declare-function realgud:nodejs-remove-ansi-shmutz 'realgud-core)
+(declare-function realgud:js-remove-ansi-schmutz 'realgud-lang-js)
(declare-function realgud:run-debugger 'realgud:run)
;; This is needed, or at least the docstring part of it is needed to
@@ -65,7 +84,7 @@ fringe and marginal icons.
(with-current-buffer cmd-buf
;; FIXME should allow customization whether to do or not
;; and also only do if hook is not already there.
- (realgud:nodejs-remove-ansi-shmutz)
+ (realgud:js-remove-ansi-schmutz)
)
)))
diff --git a/realgud/debugger/trepanjs/trepanjs.el
b/realgud/debugger/trepanjs/trepanjs.el
index f153a3f..9742d1d 100644
--- a/realgud/debugger/trepanjs/trepanjs.el
+++ b/realgud/debugger/trepanjs/trepanjs.el
@@ -1,12 +1,31 @@
-;;; Copyright (C) 2010-2011, 2013-2015 Rocky Bernstein <address@hidden>
+;; 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 nodejs Javascript debugger.
+
;; `trepanjs' Main interface to trepanjs via Emacs
(require 'load-relative)
(require-relative-list '("../../common/helper") "realgud-")
(require-relative-list '("../../common/run") "realgud:")
(require-relative-list '("core" "track-mode") "realgud:trepanjs-")
+(require-relative-list '("../../lang/js") "realgud-lang-")
(declare-function realgud:trepanjs-query-cmdline 'realgud:trepanjs-core)
(declare-function realgud:trepanjs-parse-cmd-args 'realgud:trepanjs-core)
+(declare-function realgud:js-remove-ansi-schmutz 'realgud-lang-js)
(declare-function realgud:run-debugger 'realgud:run)
;; This is needed, or at least the docstring part of it is needed to
@@ -47,11 +66,18 @@ marginal icons is reset. See `loc-changes-clear-buffer' to
clear
fringe and marginal icons.
"
(interactive)
- (realgud:run-debugger "trepanjs" 'realgud:trepanjs-query-cmdline
- 'realgud:trepanjs-parse-cmd-args
- 'realgud:trepanjs-minibuffer-history
- opt-cmd-line no-reset)
- )
+ (let ((cmd-buf
+ (realgud:run-debugger "trepanjs" 'realgud:trepanjs-query-cmdline
+ 'realgud:trepanjs-parse-cmd-args
+ 'realgud:trepanjs-minibuffer-history
+ opt-cmd-line no-reset)))
+ (if cmd-buf
+ (with-current-buffer cmd-buf
+ ;; FIXME should allow customization whether to do or not
+ ;; and also only do if hook is not already there.
+ (realgud:js-remove-ansi-schmutz)
+ )
+ )))
(defalias 'trepanjs 'realgud:trepanjs)
(provide-me "realgud-")
diff --git a/realgud/lang/js.el b/realgud/lang/js.el
index bb5ab38..6ab462f 100644
--- a/realgud/lang/js.el
+++ b/realgud/lang/js.el
@@ -35,4 +35,14 @@
:char-offset-group 4)
"A realgud-loc-pat struct that describes a V8 backtrace location")
+(defun realgud:js-remove-ansi-schmutz()
+ "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+ (add-to-list
+ 'comint-preoutput-filter-functions
+ (lambda (output)
+ (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
+ )
+
+
(provide-me "realgud-lang-")
- [elpa] master 2acb30c 031/215: Start js lang. add js backtrace regexp, (continued)
- [elpa] master 2acb30c 031/215: Start js lang. add js backtrace regexp, Rocky Bernstein, 2016/07/30
- [elpa] master 1868152 025/215: core.el: remove duplicate command buffer creation, Rocky Bernstein, 2016/07/30
- [elpa] master b920afc 043/215: trepanjs: handle eval properly, Rocky Bernstein, 2016/07/30
- [elpa] master ea27a82 026/215: More copyright assignments to FSF, Rocky Bernstein, 2016/07/30
- [elpa] master 3d74bb5 013/215: More FSF copyright assignments., Rocky Bernstein, 2016/07/30
- [elpa] master 0e68d8d 038/215: common/regexp.el: start to DRY regexps, Rocky Bernstein, 2016/07/30
- [elpa] master 03ecacd 049/215: trepanjs msg change: stop in -> call in, Rocky Bernstein, 2016/07/30
- [elpa] master 986585b 035/215: Revert "Squelch one of the many compiler warnings", Rocky Bernstein, 2016/07/30
- [elpa] master 78aba8b 044/215: DRY with respect to realgud:regexp-captured-num, Rocky Bernstein, 2016/07/30
- [elpa] master bfa52c5 046/215: caddr -> cl-caddr. Fill in %s on format., Rocky Bernstein, 2016/07/30
- [elpa] master 0a1dbc4 036/215: Remove node asci schmutz. put in lang/js.el,
Rocky Bernstein <=
- [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