emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 70f8b03 05/56: Hoist remove-ansi-schmutz above just js


From: Rocky Bernstein
Subject: [elpa] master 70f8b03 05/56: Hoist remove-ansi-schmutz above just js
Date: Sat, 27 May 2017 05:02:28 -0400 (EDT)

branch: master
commit 70f8b03f04cb3a8c25573802b3ad4c6ef2a5fc7d
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Hoist remove-ansi-schmutz above just js
---
 realgud/common/utils.el               | 11 +++++++++++
 realgud/debugger/nodejs/nodejs.el     |  5 +++--
 realgud/debugger/trepanjs/core.el     |  9 ---------
 realgud/debugger/trepanjs/trepanjs.el |  7 ++++---
 realgud/lang/js.el                    | 11 -----------
 5 files changed, 18 insertions(+), 25 deletions(-)

diff --git a/realgud/common/utils.el b/realgud/common/utils.el
index 7be79c5..f74d605 100644
--- a/realgud/common/utils.el
+++ b/realgud/common/utils.el
@@ -43,4 +43,15 @@ Or raise an error if neither."
        ('t (error "We can only handle comint, shell, or eshell buffers"))
        ))
 
+(defun realgud:remove-ansi-schmutz()
+  "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+  (interactive "")
+  (add-to-list
+   'comint-preoutput-filter-functions
+   (lambda (output)
+     (replace-regexp-in-string "\033\\[[0-9]+[GKJhl]" "" output)))
+  )
+
+
 (provide-me "realgud-")
diff --git a/realgud/debugger/nodejs/nodejs.el 
b/realgud/debugger/nodejs/nodejs.el
index 7ca4f5c..5096477 100644
--- a/realgud/debugger/nodejs/nodejs.el
+++ b/realgud/debugger/nodejs/nodejs.el
@@ -12,10 +12,11 @@
 (require-relative-list '("../../common/helper") "realgud-")
 (require-relative-list '("../../common/run")    "realgud:")
 (require-relative-list '("core" "track-mode")   "realgud:nodejs-")
+(require-relative-list '("../../common/utils")    "realgud-")
 (require-relative-list '("../../lang/js") "realgud-lang-")
 
-(declare-function realgud:js-remove-ansi-schmutz 'realgud-lang-js)
 (declare-function realgud:run-debugger 'realgud:run)
+(declare-function realgud:-remove-ansi-schmutz 'realgud-utils)
 
 ;; This is needed, or at least the docstring part of it is needed to
 ;; get the customization menu to work in Emacs 24.
@@ -72,7 +73,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:js-remove-ansi-schmutz)
+         (realgud:remove-ansi-schmutz)
          )
       )))
 
diff --git a/realgud/debugger/trepanjs/core.el 
b/realgud/debugger/trepanjs/core.el
index b3256c1..122cb44 100644
--- a/realgud/debugger/trepanjs/core.el
+++ b/realgud/debugger/trepanjs/core.el
@@ -131,15 +131,6 @@ Note that path elements have been expanded via 
`expand-file-name'.
                              realgud:trepanjs-minibuffer-history
                              "js" "\\.js$"))
 
-(defun realgud:trepanjs-remove-ansi-shmutz()
-  "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)))
-  )
-
 (defun realgud:trepanjs-reset ()
   "Trepanjs cleanup - remove debugger's internal buffers (frame,
 breakpoints, etc.)."
diff --git a/realgud/debugger/trepanjs/trepanjs.el 
b/realgud/debugger/trepanjs/trepanjs.el
index e0deb51..ed2d033 100644
--- a/realgud/debugger/trepanjs/trepanjs.el
+++ b/realgud/debugger/trepanjs/trepanjs.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2015-2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 
@@ -20,12 +20,13 @@
 (require 'load-relative)
 (require-relative-list '("../../common/helper") "realgud-")
 (require-relative-list '("../../common/run")    "realgud:")
+(require-relative-list '("../../common/utils")    "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:-remove-ansi-schmutz 'realgud-utils)
 (declare-function realgud:run-debugger 'realgud:run)
 
 ;; This is needed, or at least the docstring part of it is needed to
@@ -75,7 +76,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:js-remove-ansi-schmutz)
+         (realgud:remove-ansi-schmutz)
          )
       )))
 
diff --git a/realgud/lang/js.el b/realgud/lang/js.el
index ede33ef..8d19847 100644
--- a/realgud/lang/js.el
+++ b/realgud/lang/js.el
@@ -38,15 +38,4 @@
    :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"
-  (interactive "")
-  (add-to-list
-   'comint-preoutput-filter-functions
-   (lambda (output)
-     (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
-  )
-
-
 (provide-me "realgud-lang-")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]