[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0cc410e 2/2: Merge branch 'master' of git://bzr.sv.gnu.org
From: |
Michael Albinus |
Subject: |
[elpa] master 0cc410e 2/2: Merge branch 'master' of git://bzr.sv.gnu.org/emacs/elpa |
Date: |
Sat, 25 May 2019 02:42:49 -0400 (EDT) |
branch: master
commit 0cc410ef32ae020b285cee1cfa2f37b03a124bff
Merge: 0eee5cf 4caaae5
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Merge branch 'master' of git://bzr.sv.gnu.org/emacs/elpa
---
README | 23 +-
externals-list | 6 +
packages/excorporate/excorporate-diary.el | 2 +-
packages/excorporate/excorporate-org.el | 2 +-
packages/gnorb/gnorb-utils.el | 6 +-
packages/realgud-ipdb/.gitignore | 25 ---
packages/realgud-ipdb/Makefile.am | 49 ----
packages/realgud-ipdb/README.md | 1 -
packages/realgud-ipdb/autogen.sh | 12 -
packages/realgud-ipdb/common.mk.in | 24 --
packages/realgud-ipdb/configure.ac | 55 -----
packages/realgud-ipdb/ipdb/Makefile.am | 5 -
packages/realgud-ipdb/ipdb/core.el | 249 ---------------------
packages/realgud-ipdb/ipdb/init.el | 161 -------------
packages/realgud-ipdb/ipdb/ipdb.el | 125 -----------
packages/realgud-ipdb/ipdb/track-mode.el | 75 -------
packages/realgud-ipdb/realgud-ipdb.el | 46 ----
packages/realgud-ipdb/test/Makefile.am | 73 ------
packages/realgud-ipdb/test/gcd.py | 41 ----
packages/realgud-ipdb/test/make-check-filter.rb | 24 --
packages/realgud-ipdb/test/regexp-helper.el | 61 -----
packages/realgud-ipdb/test/test-ipdb.el | 40 ----
packages/realgud-ipdb/test/test-regexp-ipdb.el | 108 ---------
packages/realgud-node-debug/.gitignore | 21 --
packages/realgud-node-debug/INSTALL.md | 5 -
packages/realgud-node-debug/Makefile.am | 49 ----
packages/realgud-node-debug/README.md | 6 -
packages/realgud-node-debug/autogen.sh | 12 -
packages/realgud-node-debug/common.mk | 24 --
packages/realgud-node-debug/common.mk.in | 24 --
packages/realgud-node-debug/compute-lispdir.sh | 46 ----
packages/realgud-node-debug/configure.ac | 55 -----
packages/realgud-node-debug/realgud-node-debug.el | 50 -----
.../realgud-node-debug/.nosearch | 8 -
.../realgud-node-debug/Makefile.am | 5 -
.../realgud-node-debug/realgud-node-debug/core.el | 170 --------------
.../realgud-node-debug/realgud-node-debug/init.el | 188 ----------------
.../realgud-node-debug/realgud-node-debug/main.el | 85 -------
.../realgud-node-debug/track-mode.el | 84 -------
packages/realgud-node-debug/test/Makefile.am | 70 ------
packages/realgud-node-debug/test/gcd.js | 45 ----
.../realgud-node-debug/test/make-check-filter.rb | 24 --
packages/realgud-node-debug/test/regexp-helper.el | 50 -----
.../test/test-loc-regexp-node-debug.el | 118 ----------
.../realgud-node-debug/test/test-node-debug.el | 37 ---
packages/realgud-node-inspect/.gitignore | 21 --
packages/realgud-node-inspect/INSTALL.md | 5 -
packages/realgud-node-inspect/Makefile.am | 49 ----
packages/realgud-node-inspect/README.md | 6 -
packages/realgud-node-inspect/autogen.sh | 12 -
packages/realgud-node-inspect/common.mk | 24 --
packages/realgud-node-inspect/common.mk.in | 24 --
packages/realgud-node-inspect/compute-lispdir.sh | 46 ----
packages/realgud-node-inspect/configure.ac | 55 -----
.../realgud-node-inspect/realgud-node-inspect.el | 52 -----
.../realgud-node-inspect/.nosearch | 8 -
.../realgud-node-inspect/Makefile.am | 5 -
.../realgud-node-inspect/core.el | 172 --------------
.../realgud-node-inspect/init.el | 188 ----------------
.../realgud-node-inspect/main.el | 84 -------
.../realgud-node-inspect/track-mode.el | 84 -------
packages/realgud-node-inspect/test/Makefile.am | 70 ------
packages/realgud-node-inspect/test/gcd.js | 45 ----
.../realgud-node-inspect/test/make-check-filter.rb | 24 --
.../realgud-node-inspect/test/regexp-helper.el | 50 -----
.../test/test-loc-regexp-node-inspect.el | 118 ----------
.../realgud-node-inspect/test/test-node-inspect.el | 37 ---
67 files changed, 29 insertions(+), 3539 deletions(-)
diff --git a/README b/README
index e0c9faf..9589009 100644
--- a/README
+++ b/README
@@ -228,15 +228,28 @@ In the `external' case, the copy of the code is not kept
in `master` but in the
`externals/<pkg-name>' branch in the `elpa.git' repository.
To add a new externals package, first add this `elpa.git' repository as a
-new remote in your existing repository. Then push a local branch to a
+new remote in your existing repository.
+
+Then push a local branch to a
new remote branch in `elpa.git', named `externals/<pkgname>`. For example:
git push elpa <mybranch>:externals/<pkgname>
-Then edit the `externals-list' file as mentioned above, and push that
-change to `elpa's master branch. After it's added to the `externals-list'
-file, the package can be maintained just by pushing changes to the
-`externals/<pkgname>` branch.
+For example, let's say that you want to add `realgud-ipdb` which is currently
+checked out in `$HOME/github/realgud-ipdb`:
+
+ cd $HOME/github/realgud-ipdb
+ git remote add elpa address@hidden:/srv/git/emacs/elpa.git
+ git push elpa master:refs/heads/externals/realgud-ipdb
+
+
+Then edit the `externals-list' file as mentioned above, add the line
+
+ ("realgud-ipdb" :external "https://github.com/realgud/realgud-ipdb")
+
+and push that change to `elpa's master branch. After it's added to
+the `externals-list' file, the package can be maintained just by
+pushing changes to the `externals/<pkgname>` branch.
If you wish to check out all the external packages into the `packages'
directory, you can run the command:
diff --git a/externals-list b/externals-list
index cc97b58..e2e7c7a 100644
--- a/externals-list
+++ b/externals-list
@@ -118,6 +118,12 @@
("psgml" :external "https://github.com/lenst/psgml.git")
("python" :core "lisp/progmodes/python.el")
;;FIXME:("org" :external ??) ;; Need to introduce snapshots!!
+ ("realgud-ipdb" :external "https://github.com/realgud/realgud-ipdb")
+ ("realgud-jdb" :external "https://github.com/realgud/jdb")
+ ("realgud-lldb" :external "https://github.com/realgud/realgud-lldb")
+ ("realgud-node-debug" :external
"https://github.com/realgud/realgud-node-debug")
+ ("realgud-node-inspect" :external
"https://github.com/realgud/realgud-node-inspect")
+ ("realgud-trepan-ni" :external "https://github.com/realgud/realgud-ni")
("relint" :external "https://github.com/mattiase/relint")
("rich-minority" :subtree "https://github.com/Malabarba/rich-minority")
("rudel" :external nil) ;; Was
bzr::bzr://rudel.bzr.sourceforge.net/bzrroot/rudel/trunk
diff --git a/packages/excorporate/excorporate-diary.el
b/packages/excorporate/excorporate-diary.el
index c4c94e1..a418f71 100644
--- a/packages/excorporate/excorporate-diary.el
+++ b/packages/excorporate/excorporate-diary.el
@@ -123,7 +123,7 @@ Call FINALIZE after the meeting has been inserted."
(when (not (string-match "^Cancel[l]?ed: " subject))
;; FIXME: Sometimes meetings are duplicated if they have
;; overlapping (and (diary-cyclic ...) (diary-block ...)) ranges,
- ;; e.g., on in the today file and one in the transient file.
+ ;; e.g., one in the today file and one in the transient file.
;; Maybe we should de-duplicate them in the final display. If the
;; meeting start time is sometime today then put it in today's
;; diary file, otherwise put it in the transient one.
diff --git a/packages/excorporate/excorporate-org.el
b/packages/excorporate/excorporate-org.el
index 2266161..a17d060 100644
--- a/packages/excorporate/excorporate-org.el
+++ b/packages/excorporate/excorporate-org.el
@@ -121,7 +121,7 @@ are the requested participants."
(if (save-excursion (org-goto-first-child))
(org-sort-entries t ?s)
(forward-line 3)
- (insert "`♘")))))
+ (insert "`♘\n")))))
(defun exco-org-finalize-buffer ()
"Finalize text in buffer after all connections have responded."
diff --git a/packages/gnorb/gnorb-utils.el b/packages/gnorb/gnorb-utils.el
index cc9b7da..48af465 100644
--- a/packages/gnorb/gnorb-utils.el
+++ b/packages/gnorb/gnorb-utils.el
@@ -185,9 +185,9 @@ window."
(let* ((sum-buffer (gnus-summary-buffer-name group))
(target-buffer
(cond
- ((gnus-buffer-exists-p sum-buffer)
+ ((gnus-buffer-live-p sum-buffer)
sum-buffer)
- ((gnus-buffer-exists-p gnus-group-buffer)
+ ((gnus-buffer-live-p gnus-group-buffer)
gnus-group-buffer)
(t nil)))
(target-window (when target-buffer
@@ -202,7 +202,7 @@ window."
(if target-buffer
(switch-to-buffer target-buffer)))
(message "Following link...")
- (if (gnus-buffer-exists-p sum-buffer)
+ (if (gnus-buffer-live-p sum-buffer)
(gnus-summary-goto-article id nil t)
(gnorb-open-gnus-link group id))))
diff --git a/packages/realgud-ipdb/.gitignore b/packages/realgud-ipdb/.gitignore
deleted file mode 100644
index 98b94eb..0000000
--- a/packages/realgud-ipdb/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-*.elc
-*~
-/*-pkg.el
-/*.tar.gz
-/.byebug_history
-/.python-version
-/.ruby-version
-/README
-/aclocal.m4
-/autom4te.cache
-/common.mk
-/config.log
-/config.status
-/configure
-/configure.lineno
-/elpa
-/install-sh
-/missing
-/test/npm-debug.log
-/tmp
-Makefile
-Makefile.in
-elc-stamp
-elc-temp
-script
diff --git a/packages/realgud-ipdb/Makefile.am
b/packages/realgud-ipdb/Makefile.am
deleted file mode 100644
index e950187..0000000
--- a/packages/realgud-ipdb/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-# Note: This makefile include remake-style target comments.
-# These comments before the targets start with #:
-# remake --tasks to shows the targets and the comments
-
-SUBDIRS = ipdb test
-
-GIT2CL ?= git2cl
-RUBY ?= ruby
-
-lispdir = @lispdir@
-
-lisp_files = $(wildcard *.el)
-lisp_LISP = $(lisp_files)
-include common.mk
-
-PHONY=check clean dist distclean test check-short check-terse install-short
-
-EXTRA_DIST = common.mk.in INSTALL.md README.md THANKS $(lisp_files)
-
-if MAINTAINER_MODE
-
-#: Remove change log: ChangeLog
-rmChangeLog:
- rm ChangeLog || true
-
-#: Create a ChangeLog file from git logs
-ChangeLog: rmChangeLog
- git log --pretty --numstat --summary | $(GIT2CL) > $@
-
-ACLOCAL_AMFLAGS=-I .
-
-endif
-
-#: Run all tests
-test: check
-
-#: Run all tests without bloated output
-check-short:
- $(MAKE) check 2>&1 | $(RUBY) test/make-check-filter.rb
-
-#: Run all tests without and show just the failure lines
-check-terse:
- $(MAKE) check 2>&1 | $(RUBY) tes/make-check-filter.rb | grep failure
-
-#: Run "make install" non-verbosely
-install-short:
- $(MAKE) install 2>&1 | $(RUBY) test/make-check-filter.rb
-
-.PHONY: test check check-short rmChangeLog
diff --git a/packages/realgud-ipdb/README.md b/packages/realgud-ipdb/README.md
deleted file mode 100644
index 576a8f3..0000000
--- a/packages/realgud-ipdb/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Emacs Lisp Module to add [ipdb](https://pypi.org/project/ipdb/) support to
[realgud](http://github.com/rocky/emacs-dbgr).
diff --git a/packages/realgud-ipdb/autogen.sh b/packages/realgud-ipdb/autogen.sh
deleted file mode 100755
index 7beb4b9..0000000
--- a/packages/realgud-ipdb/autogen.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-# An autoconf setup script.
-# From inside emacs, make sure test-simple is installed and then
-# Press C-x C-e at the end of the next line run this script
-# (test-simple-run "EMACSLOADPATH=%s ./autogen.sh" (mapconcat 'identity
load-path ":"))
-ln -fs README.md README
-touch common.mk
-autoreconf -vfi && \
-autoconf && {
- echo "Running configure with --enable-maintainer-mode $@"
- ./configure --enable-maintainer-mode $@
-}
diff --git a/packages/realgud-ipdb/common.mk.in
b/packages/realgud-ipdb/common.mk.in
deleted file mode 100644
index 88f3a9d..0000000
--- a/packages/realgud-ipdb/common.mk.in
+++ /dev/null
@@ -1,24 +0,0 @@
-MOSTLYCLEANFILES = *.elc
address@hidden@
-
-short:
- $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
-
-%.short:
- $(MAKE) $(@:.short=) 2>&1 >/dev/null
-
-# This is the default target but We need to include an EMACSLOADPATH
-.el.elc:
- if test "$(EMACS)" != "no"; then \
- am__dir=. am__subdir_includes=''; \
- case $@ in */*) \
- am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
- am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
- esac; \
- test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
- EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch \
- $(AM_ELCFLAGS) --eval "(progn(package-initialize))" \
- $$am__subdir_includes -L $(builddir) -L $(srcdir) \
- --eval "(defun byte-compile-dest-file (f) \"address@hidden")" \
- --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
- else :; fi
diff --git a/packages/realgud-ipdb/configure.ac
b/packages/realgud-ipdb/configure.ac
deleted file mode 100644
index 000c4e9..0000000
--- a/packages/realgud-ipdb/configure.ac
+++ /dev/null
@@ -1,55 +0,0 @@
-dnl FIXME: pick up from realgud.el
-AC_INIT(realgud-ipdb, 1.0.0,)
-AC_CONFIG_SRCDIR(ipdb/ipdb.el)
-AM_INIT_AUTOMAKE([foreign])
-AM_MAINTAINER_MODE
-
-AC_PATH_PROG([EMACS], [emacs], [emacs])
-AC_ARG_WITH(emacs, AC_HELP_STRING([--with-emacs],
- [location of emacs program]), EMACS=$withval)
-
-AC_MSG_NOTICE("Checking emacs version")
-$EMACS -batch -q --no-site-file -eval \
- '(if (<= emacs-major-version 23)
- (progn
- (error "You need GNU Emacs 24 or better.")
- (kill-emacs 1)
- )
- )'
-if test $? -ne 0 ; then
- AC_MSG_ERROR([Can't continue until above error is corrected.])
-fi
-
-##################################################################
-# See if --with-lispdir was set. If not, set it to a reasonable default
-# based on where bash thinks bashdb is supposed to be installed.
-##################################################################
-
-AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir)
-
-# Check whether --with-lispdir was given.
-if test "${with_lispdir+set}" = set; then :
-else
- my_lispdir=$(EMACS_PROG=$EMACS $SH_PROG $(dirname $0)/compute-lispdir.sh)
- if test "${my_lispdir+set}" = set; then :
- with_lispdir=$my_lispdir
- echo "'compute-lispdir.sh' lispdir install directory override:
'$with_lispdir'"
- fi
-fi
-
-##
-## Find out where to install the debugger emacs lisp files
-##
-AM_PATH_LISPDIR
-lispdir_realgud=$lispdir/realgud
-AC_SUBST([lispdir])
-AC_SUBST([lispdir_realgud])
-
-AM_CONDITIONAL(INSTALL_EMACS_LISP, test "x$lispdir_realgud" != "x")
-
-AC_CONFIG_FILES([Makefile \
- common.mk \
- ipdb/Makefile \
- test/Makefile \
- ])
-AC_OUTPUT
diff --git a/packages/realgud-ipdb/ipdb/Makefile.am
b/packages/realgud-ipdb/ipdb/Makefile.am
deleted file mode 100644
index e8453c0..0000000
--- a/packages/realgud-ipdb/ipdb/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-lisp_files = $(wildcard *.el)
-EXTRA_DIST=$(lisp_files)
-lisp_LISP = $(lisp_files)
-include ../common.mk
-lispdir = @lispdir@/lldb
diff --git a/packages/realgud-ipdb/ipdb/core.el
b/packages/realgud-ipdb/ipdb/core.el
deleted file mode 100644
index 45c9568..0000000
--- a/packages/realgud-ipdb/ipdb/core.el
+++ /dev/null
@@ -1,249 +0,0 @@
-;; Copyright (C) 2016-2017, 2019 Free Software Foundation, Inc
-
-;; Author: Sean Farley <address@hidden>, 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.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.or/licenses/>.
-
-
-(require 'comint)
-(require 'realgud)
-
-(declare-function realgud-lang-mode? 'realgud-lang)
-(declare-function realgud-parse-command-arg 'realgud-core)
-(declare-function realgud-query-cmdline 'realgud-core)
-(declare-function realgud-suggest-invocation 'realgud-core)
-(declare-function realgud-get-cmdbuf 'realgud-buffer-helper)
-
-;; FIXME: I think the following could be generalized and moved to
-;; realgud-... probably via a macro.
-(defvar realgud--ipdb-minibuffer-history nil
- "minibuffer history list for the command `ipdb'.")
-
-(defvar realgud--ipdb-remote-minibuffer-history nil
- "minibuffer history list for the command `ipdb-remote'.")
-
-(easy-mmode-defmap ipdb-minibuffer-local-map
- '(("\C-i" . comint-dynamic-complete-filename))
- "Keymap for minibuffer prompting of debugger startup command."
- :inherit minibuffer-local-map)
-
-;; FIXME: I think this code and the keymaps and history
-;; variable chould be generalized, perhaps via a macro.
-(defun ipdb-query-cmdline (&optional opt-debugger)
- (realgud-query-cmdline
- 'ipdb-suggest-invocation
- ipdb-minibuffer-local-map
- 'realgud--ipdb-minibuffer-history
- opt-debugger))
-
-;; FIXME: I think this code and the keymaps and history
-;; variable chould be generalized, perhaps via a macro.
-(defun ipdb-remote-query-cmdline ()
- (realgud-query-cmdline
- 'ipdb-suggest-invocation
- ipdb-minibuffer-local-map
- 'realgud--ipdb-remote-minibuffer-history
- "telnet"))
-
-(defun ipdb-parse-cmd-args (orig-args)
- "Parse command line ORIG-ARGS for the annotate level and name of script to
debug.
-
-ORIG-ARGS should contain a tokenized list of the command line to run.
-
-We return the a list containing:
-* the command processor (e.g. python) and it's arguments if any - a list of
strings
-* the name of the debugger given (e.g. ipdb) and its arguments - a list of
strings
-* the script name and its arguments - list of strings
-* whether the annotate or emacs option was given ('-A', '--annotate' or
'--emacs) - a boolean
-
-For example for the following input:
- (map 'list 'symbol-name
- '(python2.6 -O -Qold ./gcd.py a b))
-
-we might return:
- ((\"python2.6\" \"-O\" \"-Qold\") (\"ipdb\") (\"/tmp/gcd.py\" \"a\" \"b\")
nil)
-
-Note that the script name path has been expanded via `expand-file-name'.
-"
-
- ;; Parse the following kind of pattern:
- ;; [python python-options] ipdb ipdb-options script-name script-options
- (let (
- (args orig-args)
- (pair) ;; temp return from
- (python-opt-two-args '())
- ;; Python doesn't have mandatory 2-arg options in our sense,
- ;; since the two args can be run together, e.g. "-C/tmp" or "-C /tmp"
- ;;
- (python-two-args '())
- ;; ipdb doesn't have any arguments
- (ipdb-two-args '())
- (ipdb-opt-two-args '())
- (interp-regexp
- (if (member system-type (list 'windows-nt 'cygwin 'msdos))
- "^python[-0-9.]*\\(.exe\\)?$"
- "^python[-0-9.]*$"))
-
- ;; Things returned
- (annotate-p nil)
- (debugger-args '())
- (debugger-name nil)
- (interpreter-args '())
- (script-args '())
- (script-name nil)
- )
-
- (if (not (and args))
- ;; Got nothing: return '(nil, nil)
- (list interpreter-args debugger-args script-args annotate-p)
- ;; else
- ;; Strip off optional "python" or "python182" etc.
- (when (string-match interp-regexp
- (file-name-sans-extension
- (file-name-nondirectory (car args))))
- (setq interpreter-args (list (pop args)))
-
- ;; Strip off Python-specific options
- (while (and args
- (string-match "^-" (car args)))
- (setq pair (realgud-parse-command-arg
- args python-two-args python-opt-two-args))
- (nconc interpreter-args (car pair))
- (setq args (cadr pair))))
-
- ;; Remove "ipdb" from "ipdb --ipdb-options script
- ;; --script-options"
- (setq debugger-name (file-name-sans-extension
- (file-name-nondirectory (car args))))
- (unless (string-match "^\\(ipdb\\|cli.py\\)$" debugger-name)
- (message
- "Expecting debugger name `%s' to be `ipdb' or `cli.py'"
- debugger-name))
- (setq debugger-args (list (pop args)))
-
- ;; Skip to the first non-option argument.
- (while (and args (not script-name))
- (let ((arg (car args)))
- (cond
- ;; Options with arguments.
- ((string-match "^-" arg)
- (setq pair (realgud-parse-command-arg
- args ipdb-two-args ipdb-opt-two-args))
- (nconc debugger-args (car pair))
- (setq args (cadr pair)))
- ;; Anything else must be the script to debug.
- (t (setq script-name (expand-file-name arg))
- (setq script-args (cons script-name (cdr args))))
- )))
- (list interpreter-args debugger-args script-args annotate-p))))
-
-(defun ipdb-parse-remote-cmd-args (orig-args)
- "Parse command line ORIG-ARGS
-ORIG-ARGS should contain a tokenized list of the command line to run.
-
-We return the a list containing:
-* the command processor (e.g. python) and it's arguments if any - a list of
strings
-* the name of the debugger given (e.g. ipdb) and its arguments - a list of
strings
-* the script name and its arguments - list of strings
-* nil
-
-For example for the following input:
- (map 'list 'symbol-name
- '(telnet localhost 6900))
-
-we might return:
- ((\"telnet\" \"localhost\" \"6900\") nil nil nil)
-
-Note that the script name path has been expanded via `expand-file-name'.
-"
- (list orig-args '("ipdb") nil nil nil)
- )
-
- ;; To silence Warning: reference to free variable
-(defvar realgud--ipdb-command-name)
-
-(defun ipdb-remote-suggest-invocation (debugger-name)
- "Suggest an ipdb command invocation via `realgud-suggest-invocaton'"
- "telnet 127.0.0.1 4000")
-
-(defun ipdb-suggest-invocation (debugger-name)
- "Suggest a ipdb command invocation via `realgud-suggest-invocaton'"
- (realgud-suggest-invocation (or debugger-name realgud--ipdb-command-name)
- realgud--ipdb-minibuffer-history
- "python" "\\.py"))
-
-(defun ipdb-reset ()
- "Ipdb cleanup - remove debugger's internal buffers (frame,
-breakpoints, etc.)."
- (interactive)
- ;; (ipdb-breakpoint-remove-all-icons)
- (dolist (buffer (buffer-list))
- (when (string-match "\\*ipdb-[a-z]+\\*" (buffer-name buffer))
- (let ((w (get-buffer-window buffer)))
- (when w
- (delete-window w)))
- (kill-buffer buffer))))
-
-;; (defun ipdb-reset-keymaps()
-;; "This unbinds the special debugger keys of the source buffers."
-;; (interactive)
-;; (setcdr (assq 'ipdb-debugger-support-minor-mode minor-mode-map-alist)
-;; ipdb-debugger-support-minor-mode-map-when-deactive))
-
-(defconst realgud--ipdb-complete-script
- (concat
- "from IPython import get_ipython;"
- "comp = '''%s''';"
- "prefix, candidates = get_ipython().Completer.complete(line_buffer = comp);"
- "print(';'.join([prefix] + candidates))"))
-
-(defun realgud--ipdb-backend-complete ()
- "Send a command to the ipdb buffer and parse the output.
-
-The idea here is to rely on the
-`comint-redirect-send-command-to-process' function to send a
-python command `realgud--ipdb-complete-script' that will return
-the completions for the given input."
- (interactive)
- (let ((buffer (current-buffer))
- (cmdbuf (realgud-get-cmdbuf))
- (process (get-buffer-process (current-buffer)))
- (start-pos (save-excursion (comint-goto-process-mark) (point)))
- (end-pos (point)))
-
- ;; get the input string
- (when (> end-pos start-pos)
- (let* ((input-str (buffer-substring-no-properties start-pos end-pos))
- (command-str (format realgud--ipdb-complete-script input-str))
- (output-str (with-temp-buffer
- (comint-redirect-send-command-to-process
- command-str (current-buffer) process nil t)
- ;; Wait for the process to complete
- (with-current-buffer (process-buffer process)
- (while (null comint-redirect-completed)
- (accept-process-output nil 0 5))) ;; wait 5ms
- (buffer-substring (point-min) (1- (point-max)))))
- (output-values (split-string output-str ";"))
- (prefix (car output-values)))
- (list (- end-pos (length prefix)) end-pos (cdr output-values))))))
-
-(defun realgud--ipdb-completion-at-point ()
- (let ((ipdb (realgud--ipdb-backend-complete)))
- (when ipdb
- (list (nth 0 ipdb)
- (nth 1 ipdb)
- (nth 2 ipdb)
- :exclusive 'yes))))
-
-(defun realgud--ipdb-customize ()
- "Use `customize' to edit the settings of the `ipdb' debugger."
- (interactive)
- (customize-group 'realgud--ipdb))
-
-(provide-me "realgud--ipdb-")
diff --git a/packages/realgud-ipdb/ipdb/init.el
b/packages/realgud-ipdb/ipdb/init.el
deleted file mode 100644
index 71998e2..0000000
--- a/packages/realgud-ipdb/ipdb/init.el
+++ /dev/null
@@ -1,161 +0,0 @@
-;; Copyright (C) 2016, 2018-2019 Free Software Foundation, Inc
-
-;; Author: Rocky Bernstein <address@hidden>
-;; Author: Sean Farley <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/>.
-;; ipdb: "interactive" debugger extension to Python debugger pdb
-
-(eval-when-compile (require 'cl-lib)) ;For setf.
-
-(require 'realgud)
-
-(defvar realgud-pat-hash)
-(declare-function make-realgud-loc-pat (realgud-loc))
-
-(defvar realgud--ipdb-pat-hash (make-hash-table :test 'equal)
- "Hash key is the what kind of pattern we want to match:
-backtrace, prompt, etc. The values of a hash entry is a
-realgud-loc-pat struct")
-
-(declare-function make-realgud-loc "realgud-loc" (a b c d e f))
-
-;; -------------------------------------------------------------------
-;; User-definable variables
-;;
-
-;; realgud-loc-pat that describes a ipdb location generally shown
-;; before a command prompt.
-;;
-;; Program-location lines look like this:
-;; > /usr/bin/zonetab2pot.py(15)<module>()
-;; or MS Windows:
-;; > c:\\mydirectory\\gcd.py(10)<module>
-(setf (gethash "loc" realgud:ipdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^> \\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/.\\\\ ]+\\)(\\([0-9]+\\))"
- :file-group 1
- :line-group 2))
-
-;; An initial list of regexps that don't generally have files
-;; associated with them and therefore we should not try to find file
-;; associations for them. This list is used to seed a field of the
-;; same name in the cmd-info structure inside a command buffer. A user
-;; may add additional files to the command-buffer's re-ignore-list.
-(setf (gethash "ignore-re-file-list" realgud:ipdb-pat-hash)
- (list realgud-python-ignore-file-re))
-
-(setf (gethash "prompt" realgud:ipdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^ipdb[>] "
- ))
-
-;; realgud-loc-pat that describes a Python backtrace line.
-(setf (gethash "lang-backtrace" realgud:ipdb-pat-hash)
- realgud-python-backtrace-loc-pat)
-
-(setf (gethash "debugger-backtrace" realgud:ipdb-pat-hash)
- realgud:python-trepan-backtrace-pat)
-
-;; realgud-loc-pat that describes a line a Python "info break" line.
-;; For example:
-;; 1 breakpoint keep y at /usr/local/bin/trepan3k:7
-(setf (gethash "debugger-breakpoint" realgud:ipdb-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "^%s[ \t]+\\(breakpoint\\)[ \t]+\\(keep\\|del\\)[
\t]+\\(yes\\|no\\)[ \t]+.*at \\(.+\\):%s"
- realgud:regexp-captured-num realgud:regexp-captured-num)
- :num 1
- :text-group 2 ;; misnamed Is "breakpoint" or "watchpoint"
- :string 3 ;; misnamed. Is "keep" or "del"
- :file-group 5
- :line-group 6))
-
-;; realgud-loc-pat that describes location in a pytest error
-(setf (gethash "pytest-error" realgud:ipdb-pat-hash)
- realgud-pytest-error-loc-pat)
-
-;; realgud-loc-pat that describes location in a flake8 message
-(setf (gethash "flake8-msg" realgud:ipdb-pat-hash)
- realgud-flake8-msg-loc-pat)
-
-;; realgud-loc-pat that describes a "breakpoint set" line. For example:
-;; Breakpoint 1 at /usr/bin/ipdb:7
-(setf (gethash "brkpt-set" realgud:ipdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^Breakpoint \\([0-9]+\\) at[
\t\n]+\\(.+\\):\\([0-9]+\\)\\(\n\\|$\\)"
- :num 1
- :file-group 2
- :line-group 3))
-
-;; realgud-loc-pat that describes a "delete breakpoint" line
-;; Python 3 includes a file name and line number; Python 2 doesn't
-(setf (gethash "brkpt-del" realgud:ipdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^Deleted breakpoint \\([0-9]+\\)"
- :num 1))
-
-(setf (gethash "font-lock-keywords" realgud:ipdb-pat-hash)
- '(
- ;; The frame number and first type name, if present.
- ("^\\(->\\|##\\)\\([0-9]+\\) \\(<module>\\)?
*\\([a-zA-Z_][a-zA-Z0-9_]*\\)(\\(.+\\))?"
- (2 realgud-backtrace-number-face)
- (4 font-lock-function-name-face nil t)) ; t means optional.
-
- ;; Parameter sequence, E.g. gcd(a=3, b=5)
- ;; ^^^^^^^^^
- ("(\\(.+\\))"
- (1 font-lock-variable-name-face))
-
- ;; File name. E.g file '/test/gcd.py'
- ;; ------^^^^^^^^^^^^-
- ("[ \t]+file '\\([^ ]+*\\)'"
- (1 realgud-file-name-face))
-
- ;; Line number. E.g. at line 28
- ;; ---------^^
- ("[ \t]+at line \\([0-9]+\\)$"
- (1 realgud-line-number-face))
-
- ;; Function name.
- ("\\<\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\.\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
- (1 font-lock-type-face)
- (2 font-lock-function-name-face))
- ;; (ipdb-frames-match-current-line
- ;; (0 ipdb-frames-current-frame-face append))
- ))
-
-(setf (gethash "ipdb" realgud-pat-hash) realgud:ipdb-pat-hash)
-
-(defvar realgud--ipdb-command-hash (make-hash-table :test 'equal)
- "Hash key is command name like 'finish' and the value is
-the ipdb command to use, like 'return'")
-
-;; Mappings between ipdb-specific names and GUD names
-(setf (gethash "finish" realgud:ipdb-command-hash) "return")
-(setf (gethash "kill" realgud:ipdb-command-hash) "quit")
-(setf (gethash "backtrace" realgud:ipdb-command-hash) "where")
-;; Clear in Python does both the usual “delete” and “clear”
-(setf (gethash "delete" realgud:ipdb-command-hash) "clear %p")
-(setf (gethash "clear" realgud:ipdb-command-hash) "clear %X:%l")
-;; Use ‘!’ instead of ‘p’, since ‘p’ only works for expressions, not statements
-(setf (gethash "eval" realgud:ipdb-command-hash) "pp %s")
-(setf (gethash "info-breakpoints" realgud:ipdb-command-hash) "break")
-
-;; Unsupported features:
-(setf (gethash "shell" realgud:ipdb-command-hash) "*not-implemented*")
-(setf (gethash "frame" realgud:ipdb-command-hash) "*not-implemented*")
-
-(setf (gethash "ipdb" realgud-command-hash) realgud:ipdb-command-hash)
-
-(provide-me "realgud--ipdb-")
diff --git a/packages/realgud-ipdb/ipdb/ipdb.el
b/packages/realgud-ipdb/ipdb/ipdb.el
deleted file mode 100644
index 4e5d0f7..0000000
--- a/packages/realgud-ipdb/ipdb/ipdb.el
+++ /dev/null
@@ -1,125 +0,0 @@
-;; Copyright (C) 2016, 2019 Free Software Foundation, Inc
-
-;; Author: Rocky Bernstein <address@hidden>
-;; Author: Sean Farley <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/>.
-
-;; `ipdb' Main interface to ipdb via Emacs
-(require 'load-relative)
-
-(require 'realgud)
-(require-relative-list '("core" "track-mode") "realgud--ipdb-")
-
-;; This is needed, or at least the docstring part of it is needed to
-;; get the customization menu to work in Emacs 24.
-(defgroup realgud:ipdb nil
- "The realgud interface to the Python ipdb debugger"
- :group 'realgud
- :version "24.3")
-
-(declare-function make-realgud-loc "realgud-loc" (a b c d e f))
-
-;; -------------------------------------------------------------------
-;; User-definable variables
-;;
-
-(defcustom realgud--ipdb-command-name
- "ipdb"
- "File name for executing the stock Python debugger and command options.
-This should be an executable on your path, or an absolute file name."
- :type 'string
- :group 'realgud:ipdb)
-;; -------------------------------------------------------------------
-;; The end.
-;;
-
-(declare-function ipdb-track-mode 'realgud:ipdb-track)
-(declare-function ipdb-query-cmdline 'realgud:ipdb-core)
-(declare-function ipdb-parse-cmd-args 'realgud:ipdb-core)
-(declare-function realgud:ipdb-completion-at-point 'realgud:ipdb-core)
-(declare-function realgud:run-debugger 'realgud:run)
-
-;;;###autoload
-(defun realgud--ipdb (&optional opt-cmd-line no-reset)
- "Invoke the ipdb Python debugger and start the Emacs user interface.
-
-String OPT-CMD-LINE specifies how to run ipdb. You will be prompted
-for a command line is one isn't supplied.
-
-OPT-COMMAND-LINE is treated like a shell string; arguments are
-tokenized by `split-string-and-unquote'. The tokenized string is
-parsed by `ipdb-parse-cmd-args' and path elements found by that
-are expanded using `realgud:expand-file-name-if-exists'.
-
-Normally, command buffers are reused when the same debugger is
-reinvoked inside a command buffer with a similar command. If we
-discover that the buffer has prior command-buffer information and
-NO-RESET is nil, then that information which may point into other
-buffers and source buffers which may contain marks and fringe or
-marginal icons is reset. See `loc-changes-clear-buffer' to clear
-fringe and marginal icons.
-"
- (interactive)
- (let ((cmd-buf (realgud:run-debugger "ipdb" 'ipdb-query-cmdline
- 'ipdb-parse-cmd-args
- 'realgud:ipdb-minibuffer-history
- opt-cmd-line no-reset))
- )
- (add-hook 'completion-at-point-functions
- 'realgud:ipdb-completion-at-point nil t)
- (with-current-buffer cmd-buf
- (add-hook 'completion-at-point-functions
- 'realgud:ipdb-completion-at-point nil t)
- )
- cmd-buf)
- )
-
-
-;;;###autoload
-(defun realgud--ipdb-remote (&optional opt-cmd-line no-reset)
- "Invoke the ipdb Python debugger and start the Emacs user interface.
-
-String OPT-CMD-LINE specifies how to run ipdb. You will be prompted
-for a command line is one isn't supplied.
-
-OPT-COMMAND-LINE is treated like a shell string; arguments are
-tokenized by `split-string-and-unquote'. The tokenized string is
-parsed by `ipdb-parse-remote-cmd-args' and path elements found by that
-are expanded using `realgud:expand-file-name-if-exists'.
-
-Normally, command buffers are reused when the same debugger is
-reinvoked inside a command buffer with a similar command. If we
-discover that the buffer has prior command-buffer information and
-NO-RESET is nil, then that information which may point into other
-buffers and source buffers which may contain marks and fringe or
-marginal icons is reset. See `loc-changes-clear-buffer' to clear
-fringe and marginal icons.
-"
- (interactive)
- (let ((cmd-buf (realgud:run-debugger "ipdb" 'ipdb-remote-query-cmdline
- 'ipdb-parse-remote-cmd-args
- 'realgud:ipdb-remote-minibuffer-history
- opt-cmd-line no-reset "remote-ipdb"))
- )
- (add-hook 'completion-at-point-functions
- 'realgud:ipdb-completion-at-point nil t)
- cmd-buf)
- )
-
-
-;;;###autoload
-(defalias 'ipdb 'realgud:ipdb)
-
-(provide-me "realgud--")
diff --git a/packages/realgud-ipdb/ipdb/track-mode.el
b/packages/realgud-ipdb/ipdb/track-mode.el
deleted file mode 100644
index 46e358d..0000000
--- a/packages/realgud-ipdb/ipdb/track-mode.el
+++ /dev/null
@@ -1,75 +0,0 @@
-;; Copyright (C) 2016, 2018, 2019 Free Software Foundation, Inc
-
-;; Author: Rocky Bernstein <address@hidden>
-;; Author: Sean Farley <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/>.
-;; Python "ipdb" Debugger tracking a comint buffer.
-
-(eval-when-compile (require 'cl-lib))
-
-(require 'realgud)
-
-(require-relative-list '("core" "init") "realgud--ipdb-")
-
-(realgud-track-mode-vars "ipdb")
-
-(declare-function realgud-track-mode 'realgud-track-mode)
-(declare-function realgud-track-mode-setup 'realgud-track-mode)
-(declare-function realgud:track-set-debugger 'realgud-track-mode)
-(declare-function realgud-python-populate-command-keys 'realgud-lang-python)
-(declare-function realgud:ipdb-completion-at-point 'realgud:ipdb-core)
-
-(realgud-python-populate-command-keys ipdb-track-mode-map)
-
-(defun ipdb-track-mode-hook()
- (if ipdb-track-mode
- (progn
- (use-local-map ipdb-track-mode-map)
- (realgud:remove-ansi-schmutz)
- (add-hook 'completion-at-point-functions
- 'realgud:ipdb-completion-at-point nil t)
- (message "using ipdb mode map")
- )
- (message "ipdb track-mode-hook disable called")
- )
-)
-
-(define-minor-mode ipdb-track-mode
- "Minor mode for tracking ipdb source locations inside a process shell via
realgud. ipdb is a Python debugger based on ipython.
-
-If called interactively with no prefix argument, the mode is toggled. A prefix
argument, captured as ARG, enables the mode if the argument is positive, and
disables it otherwise.
-
-a process shell.
-
-\\{ipdb-track-mode-map}
-"
- :init-value nil
- ;; :lighter " ipdb" ;; mode-line indicator from realgud-track is
sufficient.
- ;; The minor mode bindings.
- :global nil
- :group 'realgud:ipdb
- :keymap ipdb-track-mode-map
- (realgud:track-set-debugger "ipdb")
- (if ipdb-track-mode
- (progn
- (realgud-track-mode-setup 't)
- (ipdb-track-mode-hook))
- (progn
- (setq realgud-track-mode nil)
- ))
-)
-
-(provide-me "realgud--ipdb-")
-q
diff --git a/packages/realgud-ipdb/realgud-ipdb.el
b/packages/realgud-ipdb/realgud-ipdb.el
deleted file mode 100644
index c49fdea..0000000
--- a/packages/realgud-ipdb/realgud-ipdb.el
+++ /dev/null
@@ -1,46 +0,0 @@
-;;; realgud-ipdb.el --- Realgud front-end to ipdb
-
-;; Author: Rocky Bernstein
-;; Version: 1.0.0
-;; Package-Requires: ((realgud "1.4.5") (load-relative "1.2") (cl-lib "0.5")
(emacs "24"))
-;; URL: http://github.com/rocky/realgud-ipdb
-;; Compatibility: GNU Emacs 24.x
-
-;; Copyright (C) 2019 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/>.
-
-;;; Commentary:
-
-;; realgud support for the Python ipdb
-
-;;; Code:
-
-;; Press C-x C-e at the end of the next line configure the program in
-;; for building via "make" to get set up.
-;; (compile (format "EMACSLOADPATH=:%s:%s:%s:%s ./autogen.sh"
(file-name-directory (locate-library "loc-changes.elc")) (file-name-directory
(locate-library "test-simple.elc")) (file-name-directory (locate-library
"load-relative.elc")) (file-name-directory (locate-library "realgud.elc"))))
-
-(require 'load-relative)
-
-(defgroup realgud-ipdb nil
- "Realgud interface to ipdb"
- :group 'realgud
- :version "24.3")
-
-(require-relative-list '( "./ipdb/ipdb" ) "realgud-")
-
-(provide-me)
-;;; realgud-ipdb.el ends here
diff --git a/packages/realgud-ipdb/test/Makefile.am
b/packages/realgud-ipdb/test/Makefile.am
deleted file mode 100644
index 972821b..0000000
--- a/packages/realgud-ipdb/test/Makefile.am
+++ /dev/null
@@ -1,73 +0,0 @@
-lisp_files = $(wildcard *.el)
-EXTRA_DIST = $(lisp_files)
-lisp_LISP = $(lisp_files)
-include $(top_srcdir)/common.mk
-
-PHONY=check test all check-elget test-elget help
-
-#: overall help on running the make targets
-help:
- @echo "The main function of this Makefile is to facilitate running
tests."
- @echo
- @echo "To run all of the tests, use targets \"test\", \"check\" or
\"check-short\"."
- @echo "For example:"
- @echo
- @echo " make check"
- @echo "or:"
- @echo " make check-short"
- @echo
- @echo "The -short target uses a filter written in Ruby to remove
extreanous output."
- @echo
- @echo "To run a specific test like test-srcbuf.el, change \".el\" to"
- @echo "\".run\". For example:"
- @echo
- @echo " make test-srcbuf.run"
- @echo
- @echo "Tests can also be run via the Emacs el-get package and this
loads dependent emacs "
- @echo "package, like load-relative. To do this, use targets,
\"check-elget\","
- @echo "\"test-elget\", or \"check-short-elget\"."
- @echo
- @echo "To run a specific test like test-srcbuf.el via el-get change
\".el\""
- @echo "to \".elrun\" For example:"
- @echo
- @echo " make test-srcbuf.elrun"
-
-
-#: same thing as "check"
-test: check
-
-#: same thing as "check-elget"
-test-elget: check-elget
-
-test_files := $(wildcard test-*.el)
-
-CHECK_FILES = $(notdir $(test_files:.el=.run))
-EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))
-
-#: Run all tests
-check: $(CHECK_FILES)
-
-#: Run all tests via el-get
-check-elget: $(EL_GET_CHECK_FILES)
-
-#: Run all tests with minimum verbosity
-check-short:
- $(MAKE) check 2>&1 | ruby ../make-check-filter.rb
-
-#: Run all tests with minimum verbosity via el-get
-check-short-elget:
- $(MAKE) check-elget 2>&1 | ruby ../make-check-filter.rb
-
-test-%.run:
- (cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load $(@:.run=.el))
-
-#: Run tests using el-get to specify external Lisp dependencies
-test-%.elrun:
- (cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load ../el-get-install.el --load
$(@:.elrun=.el))
-
-install-lispLISP: $(lisp_LISP) $(ELCFILES)
-
-# Whatever it is you want to do, it should be forwarded to the
-# to top-level directories
-# %:
-# $(MAKE) -C .. $@
diff --git a/packages/realgud-ipdb/test/gcd.py
b/packages/realgud-ipdb/test/gcd.py
deleted file mode 100755
index e64f284..0000000
--- a/packages/realgud-ipdb/test/gcd.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/python
-"""Greatest Common Divisor
-
-Some characterstics of this program used for testing check_args() does
-not have a 'return' statement.
-
-check_args() raises an uncaught exception when given the wrong number
-of parameters.
-
-"""
-import sys
-
-def check_args():
- if len(sys.argv) != 3:
- # Rather than use sys.exit let's just raise an error
- raise Exception("Need to give two numbers")
- for i in range(2):
- try:
- sys.argv[i+1] = int(sys.argv[i+1])
- except ValueError:
- print("** Expecting an integer, got: %s" % repr(sys.argv[i]))
- sys.exit(2)
-
-def gcd(a,b):
- """ GCD. We assume positive numbers"""
-
- # Make: a <= b
- if a > b:
- (a, b) = (b, a)
-
- if a <= 0:
- return None
- if a == 1 or b-a == 0:
- return a
- return gcd(b-a, a)
-
-if __name__=='__main__':
- check_args()
-
- (a, b) = sys.argv[1:3]
- print("The GCD of %d and %d is %d" % (a, b, gcd(a, b)))
diff --git a/packages/realgud-ipdb/test/make-check-filter.rb
b/packages/realgud-ipdb/test/make-check-filter.rb
deleted file mode 100644
index 508c8f6..0000000
--- a/packages/realgud-ipdb/test/make-check-filter.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-# Use this to cut out the crud from make check.
-# Use like this:
-# make check 2>&1 | ruby ../make-check-filter.rb
-# See Makefile.am
-pats = ["^(?:Loading",
- '(re)?make\[',
- "Making check in",
- '\(cd \.\.',
- "make -C",
- "Test-Unit",
- "Fontifying",
- "`flet'",
- '\s*$',
- '##[<>]+$'
- ].join('|') + ')'
-# puts pats
-skip_re = /#{pats}/
-
-while gets()
- next if $_.encode!('UTF-8', 'binary',
- invalid: :replace, undef: :replace, replace: '') =~
skip_re
- puts $_
-end
diff --git a/packages/realgud-ipdb/test/regexp-helper.el
b/packages/realgud-ipdb/test/regexp-helper.el
deleted file mode 100644
index cdcecae..0000000
--- a/packages/realgud-ipdb/test/regexp-helper.el
+++ /dev/null
@@ -1,61 +0,0 @@
-(require 'test-simple)
-(require 'realgud)
-
-(eval-when-compile
- (defvar helper-bps)
- (defvar helper-info-brkpt)
- (defvar helper-loc)
- (defvar helper-tb)
- (defvar prompt-pat)
-)
-
-(declare-function realgud-loc-pat-regexp 'realgud-backtrace-mode)
-(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
-(declare-function test-simple-start 'test-simple)
-
-
-(defun setup-regexp-vars(pat-hash)
- (setq helper-bps (gethash "brkpt-set" pat-hash))
- (setq helper-info-brkpt (gethash "debugger-breakpoint" pat-hash))
- (setq helper-loc (gethash "loc" pat-hash))
- (setq helper-tb (gethash "lang-backtrace" pat-hash))
-)
-
-(defun loc-match(text regexp-list)
- "Match TEXT against regexp field REGEXP"
- (let ((regexp)
- (ret-val nil))
- (unless (listp regexp-list)
- (setq regexp-list (list regexp-list)))
- (while regexp-list
- (setq regexp (car regexp-list))
- (setq regexp-list (cdr regexp-list))
- (when (setq ret-val (string-match (realgud-loc-pat-regexp regexp) text))
- (setq regexp-list nil)))
- ret-val
- ))
-
-(defun bp-loc-match(text)
- (string-match (realgud-loc-pat-regexp helper-bps) text)
-)
-
-(defun tb-loc-match(text)
- (string-match (realgud-loc-pat-regexp helper-tb) text)
-)
-
-(defun cmdbuf-loc-match(text dbgr)
- "Match TEXT against cmdbuf-info-loc field VAR"
- (string-match (realgud-cmdbuf-info-loc-regexp dbgr) text)
- )
-
-(defun prompt-match(prompt-str &optional num-str fmt-str)
- (unless fmt-str (setq fmt-str "debugger prompt %s"))
- (assert-equal 0 (string-match (realgud-loc-pat-regexp prompt-pat)
- prompt-str)
- (format fmt-str prompt-str))
- (cond (num-str
- (assert-equal num-str (substring prompt-str
- (match-beginning 1) (match-end 1))))
- ('t 't))
- )
-(provide 'realgud-regexp-helper)
diff --git a/packages/realgud-ipdb/test/test-ipdb.el
b/packages/realgud-ipdb/test/test-ipdb.el
deleted file mode 100644
index 030a94b..0000000
--- a/packages/realgud-ipdb/test/test-ipdb.el
+++ /dev/null
@@ -1,40 +0,0 @@
-;; Press C-x C-e at the end of the next line to run this file test
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory
(locate-library "test-simple.elc")) buffer-file-name)
-
-(require 'test-simple)
-(require 'load-relative)
-(load-file "../ipdb/ipdb.el")
-
-(eval-when-compile (defvar test:run-process-save))
-
-(declare-function ipdb-parse-cmd-args 'realgud:ipdb-core)
-(declare-function realgud:ipdb 'realgud:ipdb)
-(declare-function __FILE__ 'load-relative)
-
-(test-simple-start)
-
-;; Save value realgud:run-process and change it to something we want
-(setq test:run-process-save (symbol-function 'realgud:run-process))
-(defun realgud:run-process(debugger-name script-filename cmd-args
- minibuffer-histroy &optional no-reset)
- "Fake realgud:run-process used in testing"
- (note
- (format "%s %s %s" debugger-name script-filename cmd-args))
- (assert-equal "ipdb" debugger-name "debugger name gets passed")
- (assert-equal (expand-file-name "./gcd.py") script-filename "file name
check")
- (assert-equal '("3" "5") (cddr cmd-args) "command args listified")
- (generate-new-buffer "*cmdbuf-test*")
- )
-
-(note "ipdb-parse-cmd-args")
-(assert-equal (list nil '("ipdb") (list (expand-file-name "foo")) nil)
- (ipdb-parse-cmd-args '("ipdb" "foo")))
-(assert-equal (list nil '("ipdb") (list (expand-file-name "program.py") "foo")
nil)
- (ipdb-parse-cmd-args
- '("ipdb" "program.py" "foo")))
-
-(realgud:ipdb "ipdb ./gcd.py 3 5")
-;; Restore the old value of realgud:run-process
-(fset 'realgud:run-process test:run-process-save)
-
-(end-tests)
diff --git a/packages/realgud-ipdb/test/test-regexp-ipdb.el
b/packages/realgud-ipdb/test/test-regexp-ipdb.el
deleted file mode 100644
index b9214d0..0000000
--- a/packages/realgud-ipdb/test/test-regexp-ipdb.el
+++ /dev/null
@@ -1,108 +0,0 @@
-;; Press C-x C-e at the end of the next line to run this file test
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory
(locate-library "test-simple.elc")) buffer-file-name)
-
-(require 'test-simple)
-(load-file "../ipdb/init.el")
-(load-file "./regexp-helper.el")
-
-(declare-function __FILE__ 'load-relative)
-(declare-function loc-match 'realgud-helper)
-(declare-function prompt-match 'regexp-helper)
-(declare-function realgud-loc-pat-file-group 'realgud-regexp)
-(declare-function realgud-loc-pat-line-group 'realgud-regexp)
-
-(test-simple-start)
-
-(eval-when-compile
- (defvar loc-pat) (defvar prompt-pat) (defvar realgud:ipdb-pat-hash)
- (defvar tb-pat) (defvar test-text) (defvar prompt-str)
- (defvar bps-pat)
-)
-
-(set (make-local-variable 'bps-pat)
- (gethash "brkpt-set" realgud:ipdb-pat-hash))
-
-(set (make-local-variable 'loc-pat)
- (gethash "loc" realgud:ipdb-pat-hash))
-
-(set (make-local-variable 'prompt-pat)
- (gethash "prompt" realgud:ipdb-pat-hash))
-
-(set (make-local-variable 'tb-pat)
- (gethash "lang-backtrace" realgud:ipdb-pat-hash))
-
-;; FIXME: we get a void variable somewhere in here when running
-;; even though we define it in lexical-let. Dunno why.
-;; setq however will workaround this.
-(setq test-text
- " File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
-(note "traceback location matching")
-
-(assert-t (numberp (loc-match test-text tb-pat)) "basic traceback location")
-
-(assert-equal "/usr/lib/python2.6/code.py"
- (match-string (realgud-loc-pat-file-group tb-pat)
- test-text))
-
-(setq test-text
- " File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
-(loc-match test-text tb-pat)
-(assert-equal "281"
- (match-string (realgud-loc-pat-line-group tb-pat)
- test-text) "extract line number")
-
-(note "breakpoint location matching")
-
-(setq test-text "Breakpoint 1 at /src/git/code/gcd.py:13")
-(assert-t (numberp (loc-match test-text bps-pat))
- "basic breakpoint location")
-
-(assert-equal "/src/git/code/gcd.py"
- (match-string (realgud-loc-pat-file-group
- bps-pat)
- test-text)
- "extract breakpoint file name")
-
-
-(assert-equal "13"
- (match-string (realgud-loc-pat-line-group
- bps-pat)
- test-text) "extract breakpoint line number")
-
-;; (set test-text "(c:\\working\\python\\helloworld.py:30): <module>")
-;;
-;; (assert-t (numberp (loc-match test-text loc-pat)) "MS DOS position
location")
-;; ;;
-;; (assert-equal "c:\\working\\python\\helloworld.py"
-;; (match-string (realgud-loc-pat-file-group loc-pat)
-;; test-text)
-;; (format "Failing file group is %s"
-;; (realgud-loc-pat-file-group tb-pat))
-;; "extract file name")
-;; (assert-equal "30"
-;; (match-string (realgud-loc-pat-line-group loc-pat)
-;; test-text) "extract line number")
-
-(setq test-text "> /usr/bin/ipython(24)<module>")
-(assert-t (numberp (loc-match test-text loc-pat)) "position location")
-(assert-equal "/usr/bin/ipython"
- (match-string (realgud-loc-pat-file-group loc-pat)
- test-text)
- (format "Failing file group is %s"
- (realgud-loc-pat-file-group tb-pat)))
-(assert-equal "24"
- (match-string (realgud-loc-pat-line-group
- loc-pat)
- test-text)
- "extract line number")
-
-
-(note "prompt matching")
-(set (make-local-variable 'prompt-str) "ipdb> ")
-(prompt-match prompt-str nil "debugger prompt: %s")
-(setq prompt-str "ipdb")
-(assert-nil (numberp (loc-match prompt-str prompt-pat))
- (format "%s %s" "invalid debugger prompt"
- prompt-str))
-
-(end-tests)
diff --git a/packages/realgud-node-debug/.gitignore
b/packages/realgud-node-debug/.gitignore
deleted file mode 100644
index 1e2b8ab..0000000
--- a/packages/realgud-node-debug/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-*.elc
-*~
-/*-pkg.el
-/*.tar.gz
-/README
-/aclocal.m4
-/autom4te.cache
-/config.log
-/config.status
-/configure
-/configure.lineno
-/elpa
-/install-sh
-/missing
-/test/npm-debug.log
-/tmp
-Makefile
-Makefile.in
-elc-stamp
-elc-temp
-script
diff --git a/packages/realgud-node-debug/INSTALL.md
b/packages/realgud-node-debug/INSTALL.md
deleted file mode 100644
index 4d46fae..0000000
--- a/packages/realgud-node-debug/INSTALL.md
+++ /dev/null
@@ -1,5 +0,0 @@
-* Have `realgud` installed.
-* From inside emacs, evaluate:
-```lisp
- (compile (format "EMACSLOADPATH=:%s:%s ./autogen.sh" (file-name-directory
(locate-library "test-simple.elc")) (file-name-directory (locate-library
"realgud.elc"))))
-```
diff --git a/packages/realgud-node-debug/Makefile.am
b/packages/realgud-node-debug/Makefile.am
deleted file mode 100644
index c1e36b4..0000000
--- a/packages/realgud-node-debug/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-# Note: This makefile include remake-style target comments.
-# These comments before the targets start with #:
-# remake --tasks to shows the targets and the comments
-
-SUBDIRS = realgud-node-debug test
-
-GIT2CL ?= git2cl
-RUBY ?= ruby
-
-lispdir = @lispdir@
-
-lisp_files = $(wildcard *.el)
-lisp_LISP = $(lisp_files)
-include common.mk
-
-PHONY=check clean dist distclean test check-short check-terse install-short
-
-EXTRA_DIST=common.mk.in README.md THANKS $(lisp_files) test/gcd.rb
-
-if MAINTAINER_MODE
-
-#: Remove change log: ChangeLog
-rmChangeLog:
- rm ChangeLog || true
-
-#: Create a ChangeLog file from git logs
-ChangeLog: rmChangeLog
- git log --pretty --numstat --summary | $(GIT2CL) > $@
-
-ACLOCAL_AMFLAGS=-I .
-
-endif
-
-#: Run all tests
-test: check
-
-#: Run all tests without bloated output
-check-short:
- $(MAKE) check 2>&1 | $(RUBY) test/make-check-filter.rb
-
-#: Run all tests without and show just the failure lines
-check-terse:
- $(MAKE) check 2>&1 | $(RUBY) tes/make-check-filter.rb | grep failure
-
-#: Run "make install"
-install-short:
- $(MAKE) install 2>&1 | $(RUBY) test/make-check-filter.rb
-
-.PHONY: test check check-short rmChangeLog
diff --git a/packages/realgud-node-debug/README.md
b/packages/realgud-node-debug/README.md
deleted file mode 100644
index 00ebb33..0000000
--- a/packages/realgud-node-debug/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Module to add the older [node
-debug]( https://nodejs.org/dist/latest-v6.x/docs/api/debugger.html) debugger
support to emacs
-[realgud](http://github.com/realgud/realgud). This protocol was used up until
version 6.3 and
-deprecated in node version 8.
-
-For node before after 6.3, use
[realgud-node-inspect](http://github.com/realgud/realgud-node-inspect).
diff --git a/packages/realgud-node-debug/autogen.sh
b/packages/realgud-node-debug/autogen.sh
deleted file mode 100755
index 7beb4b9..0000000
--- a/packages/realgud-node-debug/autogen.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-# An autoconf setup script.
-# From inside emacs, make sure test-simple is installed and then
-# Press C-x C-e at the end of the next line run this script
-# (test-simple-run "EMACSLOADPATH=%s ./autogen.sh" (mapconcat 'identity
load-path ":"))
-ln -fs README.md README
-touch common.mk
-autoreconf -vfi && \
-autoconf && {
- echo "Running configure with --enable-maintainer-mode $@"
- ./configure --enable-maintainer-mode $@
-}
diff --git a/packages/realgud-node-debug/common.mk
b/packages/realgud-node-debug/common.mk
deleted file mode 100644
index fc865e4..0000000
--- a/packages/realgud-node-debug/common.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-MOSTLYCLEANFILES = *.elc
-EMACSLOADPATH=
-
-short:
- $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
-
-%.short:
- $(MAKE) $(@:.short=) 2>&1 >/dev/null
-
-# This is the default rule, but we need to include an EMACLOADPATH
-.el.elc:
- if test "$(EMACS)" != "no"; then \
- am__dir=. am__subdir_includes=''; \
- case $@ in */*) \
- am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
- am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
- esac; \
- test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
- EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch \
- $(AM_ELCFLAGS) $(ELCFLAGS) \
- $$am__subdir_includes -L $(builddir) -L $(srcdir) \
- --eval "(defun byte-compile-dest-file (f) \"address@hidden")" \
- --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
- else :; fi
diff --git a/packages/realgud-node-debug/common.mk.in
b/packages/realgud-node-debug/common.mk.in
deleted file mode 100644
index c28f493..0000000
--- a/packages/realgud-node-debug/common.mk.in
+++ /dev/null
@@ -1,24 +0,0 @@
-MOSTLYCLEANFILES = *.elc
address@hidden@
-
-short:
- $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
-
-%.short:
- $(MAKE) $(@:.short=) 2>&1 >/dev/null
-
-# This is the default rule, but we need to include an EMACLOADPATH
-.el.elc:
- if test "$(EMACS)" != "no"; then \
- am__dir=. am__subdir_includes=''; \
- case $@ in */*) \
- am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
- am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
- esac; \
- test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
- EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch \
- $(AM_ELCFLAGS) $(ELCFLAGS) \
- $$am__subdir_includes -L $(builddir) -L $(srcdir) \
- --eval "(defun byte-compile-dest-file (f) \"address@hidden")" \
- --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
- else :; fi
diff --git a/packages/realgud-node-debug/compute-lispdir.sh
b/packages/realgud-node-debug/compute-lispdir.sh
deleted file mode 100755
index c46a66a..0000000
--- a/packages/realgud-node-debug/compute-lispdir.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-# Figures out a reasonable --prefix
-typeset -i rc=0
-typeset -i DEBUG=${DEBUG:-0}
-EMACS_PROG=${EMACS_PROG:-emacs}
-list=$($EMACS_PROG --batch --no-splash --no-site-file --eval '(message
(substring (format "%s" load-path) 1 -1))' 2>&1)
-rc=$?
-if (( rc != 0 )) ; then
- echo >&2 "Something went wrong running $EMACS_PROG"
- exit $rc
-$cmd
-fi
-for dir in $list ; do
- if [[ -d $dir ]] ; then
- case $dir in
- */emacs/site-lisp)
- ((DEBUG)) && echo "site lisp: $dir"
- echo "$dir"
- exit 0
- ;;
- esac
- fi
-done
-for dir in $list ; do
- if [[ -d $dir ]] ; then
- case $dir in
- */emacs/2[3-6]\.[0-9]/site-lisp)
- ((DEBUG)) && echo "versioned site lisp: $dir"
- echo "$dir"
- exit 0
- ;;
- esac
- fi
-done
-for dir in $list ; do
- if [[ -d $dir ]] ; then
- case $dir in
- */emacs/2[3-6]\.[0-9]/site-lisp)
- ((DEBUG)) && echo "versioned site lisp: $dir"
- echo "$dir"
- exit 0
- ;;
- esac
- fi
-done
-exit 0
diff --git a/packages/realgud-node-debug/configure.ac
b/packages/realgud-node-debug/configure.ac
deleted file mode 100644
index 457fce0..0000000
--- a/packages/realgud-node-debug/configure.ac
+++ /dev/null
@@ -1,55 +0,0 @@
-dnl FIXME: pick up from realgud.el
-AC_INIT(realgud-node-debug, 1.0.0,)
-AC_CONFIG_SRCDIR(realgud-node-debug/main.el)
-AM_INIT_AUTOMAKE([foreign])
-AM_MAINTAINER_MODE
-
-AC_PATH_PROG([EMACS], [emacs], [emacs])
-AC_ARG_WITH(emacs, AC_HELP_STRING([--with-emacs],
- [location of emacs program]), EMACS=$withval)
-
-AC_MSG_NOTICE("Checking emacs version")
-$EMACS -batch -q --no-site-file -eval \
- '(if (<= emacs-major-version 23)
- (progn
- (error "You need GNU Emacs 24 or better.")
- (kill-emacs 1)
- )
- )'
-if test $? -ne 0 ; then
- AC_MSG_ERROR([Can't continue until above error is corrected.])
-fi
-
-##################################################################
-# See if --with-lispdir was set. If not, set it to a reasonable default
-# based on where bash thinks bashdb is supposed to be installed.
-##################################################################
-
-AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir)
-
-# Check whether --with-lispdir was given.
-if test "${with_lispdir+set}" = set; then :
-else
- my_lispdir=$(EMACS_PROG=$EMACS $SH_PROG $(dirname $0)/compute-lispdir.sh)
- if test "${my_lispdir+set}" = set; then :
- with_lispdir=$my_lispdir
- echo "'compute-lispdir.sh' lispdir install directory override:
'$with_lispdir'"
- fi
-fi
-
-##
-## Find out where to install the debugger emacs lisp files
-##
-AM_PATH_LISPDIR
-lispdir_realgud=$lispdir/realgud
-AC_SUBST([lispdir])
-AC_SUBST([lispdir_realgud])
-
-AM_CONDITIONAL(INSTALL_EMACS_LISP, test "x$lispdir_realgud" != "x")
-
-AC_CONFIG_FILES([Makefile \
- common.mk \
- realgud-node-debug/Makefile \
- test/Makefile \
- ])
-AC_OUTPUT
diff --git a/packages/realgud-node-debug/realgud-node-debug.el
b/packages/realgud-node-debug/realgud-node-debug.el
deleted file mode 100644
index 26f69db..0000000
--- a/packages/realgud-node-debug/realgud-node-debug.el
+++ /dev/null
@@ -1,50 +0,0 @@
-;;; realgud-node-debug.el --- Realgud front-end to older nodejs "node debug"
-*- lexical-binding: t -*-
-
-;; Author: Rocky Bernstein
-;; Version: 1.0.0
-;; Package-Type: multi
-;; Package-Requires: ((realgud "1.4.5") (load-relative "1.2") (cl-lib "0.5")
(emacs "24"))
-;; URL: http://github.com/realgud/realgud-node-debug
-;; Compatibility: GNU Emacs 24.x
-
-;; Copyright (C) 2019 Free Software Foundation, Inc
-
-;; 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/>.
-
-;;; Commentary:
-
-;; Provides realgud support for the older "node debug" used up into node
-;; version 6 and deprecated starting with node version 8.
-;; https://nodejs.org/dist/latest-v6.x/docs/api/
-;;
-
-;;; Code:
-
-;; Press C-x C-e at the end of the next line configure the program in
-;; for building via "make" to get set up.
-;; (compile (format "EMACSLOADPATH=:%s:%s:%s:%s ./autogen.sh"
(file-name-directory (locate-library "test-simple.elc")) (file-name-directory
(locate-library "realgud.elc")) (file-name-directory (locate-library
"load-relative.elc")) (file-name-directory (locate-library "loc-changes.elc"))))
-
-(require 'load-relative)
-
-(defgroup realgud-node-debug nil
- "Realgud interface to the older 'node debug' debugger"
- :group 'realgud
- :version "24.3")
-
-(require-relative-list '( "./realgud-node-debug/main" ) "realgud-")
-(load-relative "./realgud-node-debug/main.el")
-
-(provide-me)
-
-;;; realgud-node-debug.el ends here
diff --git a/packages/realgud-node-debug/realgud-node-debug/.nosearch
b/packages/realgud-node-debug/realgud-node-debug/.nosearch
deleted file mode 100644
index 97f36a7..0000000
--- a/packages/realgud-node-debug/realgud-node-debug/.nosearch
+++ /dev/null
@@ -1,8 +0,0 @@
-site-lisp directories and their subdirectories may be automatically
-added to load path, in particular in Debian
-/usr/local/share/emacs/site-lisp/ is added to load-path before emacs
-system directories. So realgud-node-inspect's common/buffer/info.el is loaded
-before emacs's info.el
-
-Adding this ".nosearch" file prevents emacs from adding realgud-node-inspect
to the
-load-path.
diff --git a/packages/realgud-node-debug/realgud-node-debug/Makefile.am
b/packages/realgud-node-debug/realgud-node-debug/Makefile.am
deleted file mode 100644
index aa624b8..0000000
--- a/packages/realgud-node-debug/realgud-node-debug/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-lisp_files = $(wildcard *.el)
-EXTRA_DIST=$(lisp_files)
-lisp_LISP = $(lisp_files)
-include ../common.mk
-lispdir = @lispdir@/node-inspect
diff --git a/packages/realgud-node-debug/realgud-node-debug/core.el
b/packages/realgud-node-debug/realgud-node-debug/core.el
deleted file mode 100644
index 96d3092..0000000
--- a/packages/realgud-node-debug/realgud-node-debug/core.el
+++ /dev/null
@@ -1,170 +0,0 @@
-;; Copyright (C) 2019 Free Software Foundation, Inc
-;; 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-lib))
-
-(require 'realgud)
-
-(declare-function realgud:expand-file-name-if-exists 'realgud-core)
-(declare-function realgud-lang-mode? 'realgud-lang)
-(declare-function realgud-parse-command-arg 'realgud-core)
-(declare-function realgud-query-cmdline 'realgud-core)
-
-;; FIXME: I think the following could be generalized and moved to
-;; realgud-... probably via a macro.
-(declare-function realgud:expand-file-name-if-exists 'realgud-core)
-(declare-function realgud-parse-command-arg 'realgud-core)
-(declare-function realgud-query-cmdline 'realgud-core)
-(declare-function realgud-suggest-invocation 'realgud-core)
-
-;; FIXME: I think the following could be generalized and moved to
-;; realgud-... probably via a macro.
-(defvar realgud:node-debug-minibuffer-history nil
- "Minibuffer history list for the command `node-debug'.")
-
-(easy-mmode-defmap realgud:node-debug-minibuffer-local-map
- '(("\C-i" . comint-dynamic-complete-filename))
- "Keymap for minibuffer prompting of node-debug startup command."
- :inherit minibuffer-local-map)
-
-;; FIXME: I think this code and the keymaps and history
-;; variable chould be generalized, perhaps via a macro.
-(defun node-debug-query-cmdline (&optional opt-debugger)
- (realgud-query-cmdline
- 'realgud:node-debug-suggest-invocation
- realgud:node-debug-minibuffer-local-map
- 'realgud:node-debug-minibuffer-history
- opt-debugger))
-
-;;; FIXME: DRY this with other *-parse-cmd-args routines
-(defun node-debug-parse-cmd-args (orig-args)
- "Parse command line ORIG-ARGS for the name of script to debug.
-
-ORIG-ARGS should contain a tokenized list of the command line to run.
-
-We return the a list containing
-* the name of the debugger given (e.g. ‘node-debug’) and its arguments ,
- a list of strings
-* the script name and its arguments - list of strings
-
-For example for the following input:
- (map 'list 'symbol-name
- '(node --interactive --debugger-port 5858 /tmp node-debug ./gcd.js a b))
-
-we might return:
- ((\"node\" \"--interactive\" \"--debugger-port\" \"5858\") nil
- (\"/tmp/gcd.js\" \"a\" \"b\"))
-
-Note that path elements have been expanded via `expand-file-name'."
-
- ;; Parse the following kind of pattern:
- ;; node node-debug-options script-name script-options
- (let (
- (args orig-args)
- (pair) ;; temp return from
- (node-two-args '("-debugger_port" "C" "D" "i" "l" "m" "-module" "x"))
- ;; node doesn't have any optional two-arg options
- (node-opt-two-args '())
-
- ;; One dash is added automatically to the below, so
- ;; h is really -h and -debugger_port is really --debugger_port.
- (node-debug-two-args '("-debugger_port"))
- (node-debug-opt-two-args '())
-
- ;; Things returned
- (script-name nil)
- (debugger-name nil)
- (interpreter-args '())
- (script-args '())
- )
- (if (not (and args))
- ;; Got nothing: return '(nil, nil, nil)
- (list interpreter-args nil script-args)
- ;; else
- (progn
- ;; Remove "node-debug" (or "nodemon" or "node") from invocation like:
- ;; node-debug --node-debug-options script --script-options
- (setq debugger-name (file-name-sans-extension
- (file-name-nondirectory (car args))))
- (unless (string-match "^node\\(?:js\\|mon\\)?$" debugger-name)
- (message
- "Expecting debugger name `%s' to be `node', `nodemon', or
`node-debug'"
- debugger-name))
- (setq interpreter-args (list (pop args)))
-
- ;; Skip to the first non-option argument.
- (while (and args (not script-name))
- (let ((arg (car args)))
- (cond
- ((equal "debug" arg)
- (nconc interpreter-args (list arg))
- (setq args (cdr args))
- )
-
- ;; Options with arguments.
- ((string-match "^-" arg)
- (setq pair (realgud-parse-command-arg
- args node-debug-two-args node-debug-opt-two-args))
- (nconc interpreter-args (car pair))
- (setq args (cadr pair)))
- ;; Anything else must be the script to debug.
- (t (setq script-name (realgud:expand-file-name-if-exists arg))
- (setq script-args (cons script-name (cdr args))))
- )))
- (list interpreter-args nil script-args)))
- ))
-
-;; To silence Warning: reference to free variable
-(defvar realgud:node-debug-command-name)
-
-(defun realgud:node-debug-suggest-invocation (debugger-name)
- "Suggest a ‘node-debug’ command invocation via `realgud-suggest-invocaton'.
-Argument DEBUGGER-NAME is not used - it is there function compatibility."
- (realgud-suggest-invocation realgud:node-debug-command-name
- realgud:node-debug-minibuffer-history
- "js" "\\.js$"))
-
-(defun realgud:node-debug-remove-ansi-shmutz()
- "Remove ASCII escape sequences that node.js 'decorates' in
-prompts and interactive output."
- (add-to-list
- 'comint-preoutput-filter-functions
- (lambda (output)
- (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
- )
-
-(defun realgud:node-debug-reset ()
- "Node-Debug cleanup - remove debugger's internal buffers (frame,
breakpoints, etc.)."
- (interactive)
- ;; (node-debug-breakpoint-remove-all-icons)
- (dolist (buffer (buffer-list))
- (when (string-match "\\*node-debug-[a-z]+\\*" (buffer-name buffer))
- (let ((w (get-buffer-window buffer)))
- (when w
- (delete-window w)))
- (kill-buffer buffer))))
-
-;; (defun node-debug-reset-keymaps()
-;; "This unbinds the special debugger keys of the source buffers."
-;; (interactive)
-;; (setcdr (assq 'node-debug-debugger-support-minor-mode
minor-mode-map-alist)
-;; node-debug-debugger-support-minor-mode-map-when-deactive))
-
-
-(defun realgud:node-debug-customize ()
- "Use `customize' to edit the settings of the `node-debug' debugger."
- (interactive)
- (customize-group 'realgud:node-debug))
-
-(provide-me "realgud:node-debug-")
diff --git a/packages/realgud-node-debug/realgud-node-debug/init.el
b/packages/realgud-node-debug/realgud-node-debug/init.el
deleted file mode 100644
index fe3a5c3..0000000
--- a/packages/realgud-node-debug/realgud-node-debug/init.el
+++ /dev/null
@@ -1,188 +0,0 @@
-;; Copyright (C) 2019 Free Software Foundation, Inc
-;; Author: Rocky Bernstein
-
-;; 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/>.
-
-;;; "node debug" debugger
-
-;;; Note: this protocol is was in use up until node version 6 and
-;;; became became deprecated with node version 8. The newer protocol
-;;; is in realgud-node-inspect
-;;;
-;;; Regular expressions for nodejs Javascript debugger with "node debug"
protocol.
-
-(eval-when-compile (require 'cl-lib)) ;For setf.
-
-(require 'realgud)
-(require 'realgud-lang-js)
-(require 'ansi-color)
-
-(defvar realgud:node-debug-pat-hash)
-(declare-function make-realgud-loc-pat (realgud-loc))
-
-(defvar realgud:node-debug-pat-hash (make-hash-table :test 'equal)
- "Hash key is the what kind of pattern we want to match:
-backtrace, prompt, etc. The values of a hash entry is a
-realgud-loc-pat struct")
-
-;; before a command prompt.
-;; For example:
-;; break in /home/indutny/Code/git/indutny/myscript.js:1
-(setf (gethash "loc" realgud:node-debug-pat-hash)
- (make-realgud-loc-pat
- :regexp (format
- "\\(?:%s\\)*\\(?:break\\|exception\\) in %s:%s"
- realgud:js-term-escape "\\([^:]+\\)"
- realgud:regexp-captured-num)
- :file-group 1
- :line-group 2))
-
-;; Regular expression that describes a node-debug command prompt
-;; For example:
-;; debug>
-(setf (gethash "prompt" realgud:node-debug-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "^\\(?:%s\\)*debug> " realgud:js-term-escape)
- ))
-
-;; Need an improved setbreak for this.
-;; ;; Regular expression that describes a "breakpoint set" line
-;; ;; 3 const armlet = require('armlet');
-;; ;; * 4 const client = new armlet.Client(
-;; ;; ^^^^
-;; ;;
-;; (setf (gethash "brkpt-set" realgud:node-debug-pat-hash)
-;; (make-realgud-loc-pat
-;; :regexp "^\*[ ]*\\([0-9]+\\) \\(.+\\)"
-;; :line-group 1
-;; :text-group 2))
-
-;; Regular expression that describes a V8 backtrace line.
-;; For example:
-;; at repl:1:7
-;; at Interface.controlEval
(/src/external-vcs/github/trepanjs/lib/interface.js:352:18)
-;; at REPLServer.b [as eval] (domain.js:183:18)
-(setf (gethash "lang-backtrace" realgud:node-debug-pat-hash)
- realgud:js-backtrace-loc-pat)
-
-;; Regular expression that describes a debugger "delete" (breakpoint)
-;; response.
-;; For example:
-;; Removed 1 breakpoint(s).
-(setf (gethash "brkpt-del" realgud:node-debug-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "^Removed %s breakpoint(s).\n"
- realgud:regexp-captured-num)
- :num 1))
-
-
-(defconst realgud:node-debug-frame-start-regexp "\\(?:^\\|\n\\)\\(?:#\\)")
-(defconst realgud:node-debug-frame-num-regexp realgud:regexp-captured-num)
-(defconst realgud:node-debug-frame-module-regexp "[^ \t\n]+")
-(defconst realgud:node-debug-frame-file-regexp "[^ \t\n]+")
-
-;; Regular expression that describes a node-debug location generally shown
-;; Regular expression that describes a debugger "backtrace" command line.
-;; For example:
-;; #0 module.js:380:17
-;; #1 dbgtest.js:3:9
-;; #2 Module._compile module.js:456:26
-;; #3 Module._extensions..js module.js:474:10
-;; #4 Module.load module.js:356:32
-;; #5 Module._load module.js:312:12
-;; #6 Module.runMain module.js:497:10
-; ;#7 timers.js:110:15
-(setf (gethash "debugger-backtrace" realgud:node-debug-pat-hash)
- (make-realgud-loc-pat
- :regexp (concat realgud:node-debug-frame-start-regexp
- realgud:node-debug-frame-num-regexp " "
- "\\(?:" realgud:node-debug-frame-module-regexp " \\)?"
- "\\(" realgud:node-debug-frame-file-regexp "\\)"
- ":"
- realgud:regexp-captured-num
- ":"
- realgud:regexp-captured-num
- )
- :num 1
- :file-group 2
- :line-group 3
- :char-offset-group 4))
-
-(defconst realgud:node-debug-debugger-name "node-debug" "Name of debugger.")
-
-;; ;; Regular expression that for a termination message.
-;; (setf (gethash "termination" realgud:node-debug-pat-hash)
-;; "^node-debug: That's all, folks...\n")
-
-(setf (gethash "font-lock-keywords" realgud:node-debug-pat-hash)
- '(
- ;; #0 module.js:380:17
- ;; ^ ^^^^^^^^^ ^^^ ^^
- (concat realgud:node-debug-frame-start-regexp
- realgud:node-debug-frame-num-regexp " "
- "\\(?:" realgud:node-debug-frame-module-regexp " \\)?"
- "\\(" realgud:node-debug-frame-file-regexp "\\)"
- ":"
- realgud:regexp-captured-num
- )
- (1 realgud-file-name-face)
- (2 realgud-line-number-face)
- )
- )
-
-(setf (gethash "node-debug" realgud-pat-hash)
- realgud:node-debug-pat-hash)
-
-;; Prefix used in variable names (e.g. short-key-mode-map) for
-;; this debugger
-
-(setf (gethash "node-debug" realgud:variable-basename-hash)
- "realgud:node-debug")
-
-(defvar realgud:node-debug-command-hash (make-hash-table :test 'equal)
- "Hash key is command name like 'finish' and the value is the node-debug
command to use, like 'out'.")
-
-(setf (gethash realgud:node-debug-debugger-name
- realgud-command-hash)
- realgud:node-debug-command-hash)
-
-(setf (gethash "backtrace" realgud:node-debug-command-hash) "backtrace")
-(setf (gethash "break" realgud:node-debug-command-hash)
- "setBreakpoint('%X',%l)")
-(setf (gethash "clear" realgud:node-debug-command-hash)
- "clearBreakpoint('%X', %l)")
-(setf (gethash "continue" realgud:node-debug-command-hash) "cont")
-(setf (gethash "kill" realgud:node-debug-command-hash) "kill")
-(setf (gethash "quit" realgud:node-debug-command-hash) ".exit")
-(setf (gethash "finish" realgud:node-debug-command-hash) "out")
-(setf (gethash "shell" realgud:node-debug-command-hash) "repl")
-(setf (gethash "eval" realgud:node-debug-command-hash)
"exec('%s')")
-(setf (gethash "info-breakpoints" realgud:node-debug-command-hash)
"breakpoints")
-
-;; We need aliases for step and next because the default would
-;; do step 1 and node-debug doesn't handle this. And if it did,
-;; it would probably look like step(1).
-(setf (gethash "step" realgud:node-debug-command-hash) "step")
-(setf (gethash "next" realgud:node-debug-command-hash) "next")
-
-;; Unsupported features:
-(setf (gethash "jump" realgud:node-debug-command-hash)
"*not-implemented*")
-(setf (gethash "up" realgud:node-debug-command-hash)
"*not-implemented*")
-(setf (gethash "down" realgud:node-debug-command-hash)
"*not-implemented*")
-(setf (gethash "frame" realgud:node-debug-command-hash)
"*not-implemented*")
-
-(setf (gethash "node-debug" realgud-command-hash)
realgud:node-debug-command-hash)
-(setf (gethash "node-debug" realgud-pat-hash) realgud:node-debug-pat-hash)
-
-(provide-me "realgud:node-debug-")
diff --git a/packages/realgud-node-debug/realgud-node-debug/main.el
b/packages/realgud-node-debug/realgud-node-debug/main.el
deleted file mode 100644
index 187a9c4..0000000
--- a/packages/realgud-node-debug/realgud-node-debug/main.el
+++ /dev/null
@@ -1,85 +0,0 @@
-;; Copyright (C) 2019 Free Software Foundation, Inc
-;; Author: Rocky Bernstein
-
-;; 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/>.
-
-;; `realgud:node-debug' Main interface to older "node debugb" debugger via
Emacs
-
-(require 'cl-lib)
-(require 'load-relative)
-(require 'realgud)
-(require-relative-list '("core" "track-mode") "realgud:node-debug-")
-
-;; This is needed, or at least the docstring part of it is needed to
-;; get the customization menu to work in Emacs 24.
-(defgroup realgud:node-debug nil
- "The realgud interface to the node-debug debugger"
- :group 'realgud
- :version "24.3")
-
-;; -------------------------------------------------------------------
-;; User-definable variables
-;;
-
-(defcustom realgud:node-debug-command-name
- "node debug"
- "File name for executing the Javascript debugger and command options.
-This should be an executable on your path, or an absolute file name."
- :type 'string
- :group 'realgud:node-debug)
-
-;; -------------------------------------------------------------------
-;; The end.
-;;
-
-(declare-function node-debug-track-mode 'realgud-node-debug-track-mode)
-(declare-function node-debug-query-cmdline 'realgud:node-debug-core)
-(declare-function node-debug-parse-cmd-args 'realgud:node-debug-core)
-
-;;;###autoload
-(defun realgud:node-debug (&optional opt-cmd-line no-reset)
- "Invoke the node-debug shell debugger and start the Emacs user interface.
-
-String OPT-CMD-LINE specifies how to run node-debug.
-
-OPT-CMD-LINE is treated like a shell string; arguments are
-tokenized by `split-string-and-unquote'. The tokenized string is
-parsed by `node-debug-parse-cmd-args' and path elements found by that
-are expanded using `realgud:expand-file-name-if-exists'.
-
-Normally, command buffers are reused when the same debugger is
-reinvoked inside a command buffer with a similar command. If we
-discover that the buffer has prior command-buffer information and
-NO-RESET is nil, then that information which may point into other
-buffers and source buffers which may contain marks and fringe or
-marginal icons is reset. See `loc-changes-clear-buffer' to clear
-fringe and marginal icons."
- (interactive)
- (let ((cmd-buf
- (realgud:run-debugger "node-debug"
- 'node-debug-query-cmdline
'node-debug-parse-cmd-args
- 'realgud:node-debug-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:remove-ansi-schmutz)
- ;; )
- ;; )
- ))
-
-(defalias 'node-debug 'realgud:node-debug)
-
-(provide-me "realgud-")
diff --git a/packages/realgud-node-debug/realgud-node-debug/track-mode.el
b/packages/realgud-node-debug/realgud-node-debug/track-mode.el
deleted file mode 100644
index f18fd0b..0000000
--- a/packages/realgud-node-debug/realgud-node-debug/track-mode.el
+++ /dev/null
@@ -1,84 +0,0 @@
-;; track-mode.el ---
-;; Copyright (C) 2019 Free Software Foundation, Inc
-;; Author: Rocky Bernstein
-
-;; 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/>.
-
-;; "node debug" tracking a comint or eshell buffer.
-
-(declare-function realgud:track-set-debugger 'realgud-track-mode)
-(declare-function realgud-track-mode-setup 'realgud-track-mode)
-(declare-function realgud:remove-ansi-schmutz 'realgud:utils)
-
-(require 'realgud)
-
-(require-relative-list '("core" "init") "realgud:node-debug-")
-
-(realgud-track-mode-vars "realgud:node-debug")
-
-(defun realgud:node-debug-track-mode-hook()
- (if realgud:node-debug-track-mode
- (progn
- (use-local-map realgud:node-debug-track-mode-map)
- (realgud:remove-ansi-schmutz)
- (message "using node-debug mode map")
- )
- (message "node-debug track-mode-hook disable called"))
-)
-
-;; FIXME: this shouldn't be needed
-(defvar realgud:node-debug-track-mode-map (make-keymap))
-(define-key realgud:node-debug-track-mode-map
- (kbd "C-c !f") 'realgud:js-goto-file-line)
-
-(define-minor-mode realgud:node-debug-track-mode
- "Minor mode for tracking node-debug source locations inside a node-debug
shell via realgud.
-
-If called interactively with no prefix argument, the mode is
-toggled. A prefix argument, captured as ARG, enables the mode if
-the argument is positive, and disables it otherwise.
-
-\\{realgud:node-debug-track-mode-map}"
- :init-value nil
- ;; :lighter " node-debug" ;; mode-line indicator from realgud-track is
sufficient.
- ;; The minor mode bindings.
- :global nil
- :group 'realgud:node-debug
- :keymap realgud:node-debug-track-mode-map
-
- (if realgud:node-debug-track-mode
- (progn
- (realgud:track-set-debugger "node-debug")
- (realgud:node-debug-track-mode-hook)
- (realgud:track-mode-enable))
- (progn
- (setq realgud-track-mode nil)
- ))
- )
-
-;; ;; Debugger commands that node-debug doesn't have
-;; (define-key node-debug-track-mode-map
-;; [remap realgud:cmd-newer-frame] 'undefined)
-;; (define-key node-debug-track-mode-map
-;; [remap realgud:cmd-older-frame] 'undefined)
-(defvar realgud:node-debug-short-key-mode-map (make-keymap))
-
-(define-key realgud:node-debug-short-key-mode-map
- [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
-(define-key realgud:node-debug-short-key-mode-map
- [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
-(define-key realgud:node-debug-short-key-mode-map
- [remap realgud:cmd-next] 'realgud:cmd-next-no-arg)
-
-(provide-me "realgud:node-debug-")
diff --git a/packages/realgud-node-debug/test/Makefile.am
b/packages/realgud-node-debug/test/Makefile.am
deleted file mode 100644
index fbfb2c6..0000000
--- a/packages/realgud-node-debug/test/Makefile.am
+++ /dev/null
@@ -1,70 +0,0 @@
-include $(top_srcdir)/common.mk
-
-PHONY=check test all check-elget test-elget help
-
-#: overall help on running the make targets
-help:
- @echo "The main function of this Makefile is to facilitate running
tests."
- @echo
- @echo "To run all of the tests, use targets \"test\", \"check\" or
\"check-short\"."
- @echo "For example:"
- @echo
- @echo " make check"
- @echo "or:"
- @echo " make check-short"
- @echo
- @echo "The -short target uses a filter written in Ruby to remove
extreanous output."
- @echo
- @echo "To run a specific test like test-srcbuf.el, change \".el\" to"
- @echo "\".run\". For example:"
- @echo
- @echo " make test-srcbuf.run"
- @echo
- @echo "Tests can also be run via the Emacs el-get package and this
loads dependent emacs "
- @echo "package, like load-relative. To do this, use targets,
\"check-elget\","
- @echo "\"test-elget\", or \"check-short-elget\"."
- @echo
- @echo "To run a specific test like test-srcbuf.el via el-get change
\".el\""
- @echo "to \".elrun\" For example:"
- @echo
- @echo " make test-srcbuf.elrun"
-
-
-#: same thing as "check"
-test: check
-
-#: same thing as "check-elget"
-test-elget: check-elget
-
-test_files := $(wildcard test-*.el)
-
-CHECK_FILES = $(notdir $(test_files:.el=.run))
-EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))
-
-#: Run all tests
-check: $(CHECK_FILES)
-
-#: Run all tests via el-get
-check-elget: $(EL_GET_CHECK_FILES)
-
-#: Run all tests with minimum verbosity
-check-short:
- $(MAKE) check 2>&1 | ruby ../make-check-filter.rb
-
-#: Run all tests with minimum verbosity via el-get
-check-short-elget:
- $(MAKE) check-elget 2>&1 | ruby ../make-check-filter.rb
-
-test-%.run:
- (cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load $(@:.run=.el))
-
-#: Run tests using el-get to specify external Lisp dependencies
-test-%.elrun:
- (cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load ../el-get-install.el --load
$(@:.elrun=.el))
-
-install-lispLISP: $(lisp_LISP) $(ELCFILES)
-
-# Whatever it is you want to do, it should be forwarded to the
-# to top-level directories
-# %:
-# $(MAKE) -C .. $@
diff --git a/packages/realgud-node-debug/test/gcd.js
b/packages/realgud-node-debug/test/gcd.js
deleted file mode 100644
index ee56555..0000000
--- a/packages/realgud-node-debug/test/gcd.js
+++ /dev/null
@@ -1,45 +0,0 @@
-//!/usr/bin/env node
-var util = require("util");
-require("console");
-
-function ask(question, format, callback) {
- var stdin = process.stdin, stdout = process.stdout;
-
- stdin.resume();
- stdout.write(question + ": ");
-
- stdin.once('data', function(data) {
- data = data.toString().trim();
-
- if (format.test(data)) {
- callback(data);
- } else {
- stdout.write("It should match: "+ format +"\n");
- ask(question, format, callback);
- }
- });
-}
-
-// GCD. We assume positive numbers
-function gcd(a, b) {
- // Make: a <= b
- if (a > b) {
- var temp = a;
- a = b;
- b = temp;
- }
-
- if (a <= 0) { return null };
-
- if (a == 1 || b-a == 0) {
- return a;
- }
- return gcd(b-a, a);
-}
-
-var a = parseInt(process.argv[0]) || 24,
- b = parseInt(process.argv[0]) || 5;
-
-console.log(util.format("The GCD of %d and %d is %d", a, b,
- gcd(a, b)));
-process.exit();
diff --git a/packages/realgud-node-debug/test/make-check-filter.rb
b/packages/realgud-node-debug/test/make-check-filter.rb
deleted file mode 100644
index 508c8f6..0000000
--- a/packages/realgud-node-debug/test/make-check-filter.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-# Use this to cut out the crud from make check.
-# Use like this:
-# make check 2>&1 | ruby ../make-check-filter.rb
-# See Makefile.am
-pats = ["^(?:Loading",
- '(re)?make\[',
- "Making check in",
- '\(cd \.\.',
- "make -C",
- "Test-Unit",
- "Fontifying",
- "`flet'",
- '\s*$',
- '##[<>]+$'
- ].join('|') + ')'
-# puts pats
-skip_re = /#{pats}/
-
-while gets()
- next if $_.encode!('UTF-8', 'binary',
- invalid: :replace, undef: :replace, replace: '') =~
skip_re
- puts $_
-end
diff --git a/packages/realgud-node-debug/test/regexp-helper.el
b/packages/realgud-node-debug/test/regexp-helper.el
deleted file mode 100644
index 2660077..0000000
--- a/packages/realgud-node-debug/test/regexp-helper.el
+++ /dev/null
@@ -1,50 +0,0 @@
-(require 'test-simple)
-(require 'realgud)
-
-(eval-when-compile
- (defvar helper-bps)
- (defvar helper-loc)
- (defvar helper-tb)
- (defvar prompt-pat)
-)
-
-(declare-function realgud-loc-pat-regexp 'realgud-backtrace-mode)
-(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
-(declare-function test-simple-start 'test-simple)
-
-
-(defun setup-regexp-vars(pat-hash)
- (setq helper-bps (gethash "brkpt-set" pat-hash))
- (setq helper-loc (gethash "loc" pat-hash))
- (setq helper-tb (gethash "lang-backtrace" pat-hash))
-)
-
-(defun loc-match(text var)
- "Match TEXT against regexp field VAR"
- (string-match (realgud-loc-pat-regexp var) text)
-)
-
-(defun bp-loc-match(text)
- (string-match (realgud-loc-pat-regexp helper-bps) text)
-)
-
-(defun tb-loc-match(text)
- (string-match (realgud-loc-pat-regexp helper-tb) text)
-)
-
-(defun cmdbuf-loc-match(text dbgr)
- "Match TEXT against cmdbuf-info-loc field VAR"
- (string-match (realgud-cmdbuf-info-loc-regexp dbgr) text)
- )
-
-(defun prompt-match(prompt-str &optional num-str fmt-str)
- (unless fmt-str (setq fmt-str "debugger prompt %s"))
- (assert-equal 0 (string-match (realgud-loc-pat-regexp prompt-pat)
- prompt-str)
- (format fmt-str prompt-str))
- (cond (num-str
- (assert-equal num-str (substring prompt-str
- (match-beginning 1) (match-end 1))))
- ('t 't))
- )
-(provide 'realgud-regexp-helper)
diff --git a/packages/realgud-node-debug/test/test-loc-regexp-node-debug.el
b/packages/realgud-node-debug/test/test-loc-regexp-node-debug.el
deleted file mode 100644
index 538fe29..0000000
--- a/packages/realgud-node-debug/test/test-loc-regexp-node-debug.el
+++ /dev/null
@@ -1,118 +0,0 @@
-;; Press C-x C-e at the end of the next line to run this file test
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory
(locate-library "test-simple.elc")) buffer-file-name)
-
-(require 'test-simple)
-(require 'load-relative)
-(require 'realgud)
-
-(load-file "./regexp-helper.el")
-(load-file "../realgud-node-debug/init.el")
-
-(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
-(declare-function cmdbuf-loc-match 'realgud-regexp-helper)
-(declare-function realgud-loc-pat-regexp 'realgud-regexp)
-(declare-function realgud-loc-pat-file-group 'realgud-regexp)
-(declare-function realgud-loc-pat-line-group 'realgud-regexp)
-(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
-(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
-(declare-function realgud-cmdbuf-info 'realgud-regexp)
-(declare-function make-realgud-cmdbuf-info 'realgud-regexp)
-(declare-function realgud-loc-pat-num 'realgud-regexp)
-(declare-function test-simple-start 'test-simple)
-(declare-function assert-t 'test-simple)
-(declare-function assert-equal 'test-simple)
-(declare-function note 'test-simple)
-(declare-function end-tests 'test-simple)
-(declare-function realgud-loc-pat-char-offset-group 'realgud:nodejs-init)
-
-(test-simple-start)
-
-(eval-when-compile
- (defvar file-group)
- (defvar frame-re)
- (defvar line-group)
- (defvar num-group)
- (defvar col-group)
- (defvar test-pos)
- (defvar bt-re)
- (defvar dbg-name)
- (defvar realgud-pat-hash)
- (defvar loc-pat)
- (defvar test-dbgr)
- (defvar test-s1)
- (defvar realgud-pat-bt)
- (defvar realgud:nodejs-pat-hash)
-)
-
-; Some setup usually done in setting up the buffer.
-; We customize this for the debugger trepan. Others may follow.
-; FIXME: encapsulate this.
-(setq dbg-name "nodejs")
-(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
-
-(setq test-dbgr (make-realgud-cmdbuf-info
- :debugger-name dbg-name
- :loc-regexp (realgud-loc-pat-regexp loc-pat)
- :file-group (realgud-loc-pat-file-group loc-pat)
- :line-group (realgud-loc-pat-line-group loc-pat)))
-
-
-(note "debugger-backtrace")
-(setq realgud-pat-bt (gethash "debugger-backtrace"
- realgud:nodejs-pat-hash))
-(setq test-s1
- "#0 module.js:380:17
-#1 Module._compile module2.js:456:26
-#2 Module._extensions..js module.js:474:10
-#3 Module.load module.js:356:32
-")
-
-(setq bt-re (realgud-loc-pat-regexp realgud-pat-bt))
-(setq num-group (realgud-loc-pat-num realgud-pat-bt))
-(setq file-group (realgud-loc-pat-file-group realgud-pat-bt))
-(setq line-group (realgud-loc-pat-line-group realgud-pat-bt))
-(setq col-group (realgud-loc-pat-char-offset-group realgud-pat-bt))
-(assert-equal 0 (string-match bt-re test-s1))
-(assert-equal "0" (substring test-s1
- (match-beginning num-group)
- (match-end num-group)))
-(assert-equal "module.js"
- (substring test-s1
- (match-beginning file-group)
- (match-end file-group)))
-(assert-equal "380"
- (substring test-s1
- (match-beginning line-group)
- (match-end line-group)))
-(assert-equal "17" (substring test-s1
- (match-beginning col-group)
- (match-end col-group)))
-
-(setq test-pos (match-end 0))
-(assert-equal 19 (string-match bt-re test-s1 test-pos))
-
-(setq test-s1
- "#1 Module._compile module2.js:456:26
-#2 Module._extensions..js module.js:474:10
-#3 Module.load module.js:356:32
-")
-(assert-equal 0 (string-match bt-re test-s1))
-
-(assert-equal "1" (substring test-s1
- (match-beginning num-group)
- (match-end num-group)))
-(assert-equal "module2.js"
- (substring test-s1
- (match-beginning file-group)
- (match-end file-group)))
-(assert-equal "456"
- (substring test-s1
- (match-beginning line-group)
- (match-end line-group)))
-(assert-equal "26" (substring test-s1
- (match-beginning col-group)
- (match-end col-group)))
-(setq test-pos (match-end 0))
-(assert-equal 36 test-pos)
-
-(end-tests)
diff --git a/packages/realgud-node-debug/test/test-node-debug.el
b/packages/realgud-node-debug/test/test-node-debug.el
deleted file mode 100644
index 7762de6..0000000
--- a/packages/realgud-node-debug/test/test-node-debug.el
+++ /dev/null
@@ -1,37 +0,0 @@
-;; Press C-x C-e at the end of the next line to run this file test
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory
(locate-library "test-simple.elc")) buffer-file-name)
-
-(require 'test-simple)
-(load-file "../realgud-node-debug/main.el")
-
-(eval-when-compile (defvar test:run-process-save))
-
-(declare-function nodejs-parse-cmd-args 'realgud:nodejs)
-(declare-function nodejs 'realgud:nodejs)
-(declare-function __FILE__ 'load-relative)
-
-(test-simple-start)
-
-;; Save value realgud:run-process and change it to something we want
-(setq test:run-process-save (symbol-function 'realgud:run-process))
-(defun realgud:run-process(debugger-name script-filename cmd-args
- minibuf-history &optional no-reset)
- "Fake realgud:run-process used in testing"
- (note
- (format "%s %s %s" debugger-name script-filename cmd-args))
- (assert-equal "node" debugger-name "debugger name gets passed")
- (let ((expanded-name (expand-file-name "./gcd.js")))
- (assert-equal expanded-name script-filename "file name check")
- ))
-
-(note "nodejs-parse-cmd-args")
-(assert-equal (list '("node" "debug") nil '("foo"))
- (nodejs-parse-cmd-args '("node" "debug" "foo")))
-
-;; FIXME: need to mock remove-ansi-schmutz in realgud:nodejs
-;; (realgud:nodejs "node debug ./gcd.js 3 5")
-
-;; Restore the old value of realgud:run-process
-(fset 'realgud:run-process test:run-process-save)
-
-(end-tests)
diff --git a/packages/realgud-node-inspect/.gitignore
b/packages/realgud-node-inspect/.gitignore
deleted file mode 100644
index 1e2b8ab..0000000
--- a/packages/realgud-node-inspect/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-*.elc
-*~
-/*-pkg.el
-/*.tar.gz
-/README
-/aclocal.m4
-/autom4te.cache
-/config.log
-/config.status
-/configure
-/configure.lineno
-/elpa
-/install-sh
-/missing
-/test/npm-debug.log
-/tmp
-Makefile
-Makefile.in
-elc-stamp
-elc-temp
-script
diff --git a/packages/realgud-node-inspect/INSTALL.md
b/packages/realgud-node-inspect/INSTALL.md
deleted file mode 100644
index 4d46fae..0000000
--- a/packages/realgud-node-inspect/INSTALL.md
+++ /dev/null
@@ -1,5 +0,0 @@
-* Have `realgud` installed.
-* From inside emacs, evaluate:
-```lisp
- (compile (format "EMACSLOADPATH=:%s:%s ./autogen.sh" (file-name-directory
(locate-library "test-simple.elc")) (file-name-directory (locate-library
"realgud.elc"))))
-```
diff --git a/packages/realgud-node-inspect/Makefile.am
b/packages/realgud-node-inspect/Makefile.am
deleted file mode 100644
index 1878250..0000000
--- a/packages/realgud-node-inspect/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-# Note: This makefile include remake-style target comments.
-# These comments before the targets start with #:
-# remake --tasks to shows the targets and the comments
-
-SUBDIRS = realgud-node-inspect test
-
-GIT2CL ?= git2cl
-RUBY ?= ruby
-
-lispdir = @lispdir@
-
-lisp_files = $(wildcard *.el)
-lisp_LISP = $(lisp_files)
-include common.mk
-
-PHONY=check clean dist distclean test check-short check-terse install-short
-
-EXTRA_DIST=common.mk.in README.md THANKS $(lisp_files) test/gcd.rb
-
-if MAINTAINER_MODE
-
-#: Remove change log: ChangeLog
-rmChangeLog:
- rm ChangeLog || true
-
-#: Create a ChangeLog file from git logs
-ChangeLog: rmChangeLog
- git log --pretty --numstat --summary | $(GIT2CL) > $@
-
-ACLOCAL_AMFLAGS=-I .
-
-endif
-
-#: Run all tests
-test: check
-
-#: Run all tests without bloated output
-check-short:
- $(MAKE) check 2>&1 | $(RUBY) test/make-check-filter.rb
-
-#: Run all tests without and show just the failure lines
-check-terse:
- $(MAKE) check 2>&1 | $(RUBY) tes/make-check-filter.rb | grep failure
-
-#: Run "make install"
-install-short:
- $(MAKE) install 2>&1 | $(RUBY) test/make-check-filter.rb
-
-.PHONY: test check check-short rmChangeLog
diff --git a/packages/realgud-node-inspect/README.md
b/packages/realgud-node-inspect/README.md
deleted file mode 100644
index 5ab2126..0000000
--- a/packages/realgud-node-inspect/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Module to add [node inspect](https://nodejs.org/api/debugger.html)'s
[V8-inspector-protocol](https://chromedevtools.github.io/devtools-protocol/v8/Debugger)
-debugger support to emacs
-[realgud](http://github.com/realgud/realgud).
-
-Note: for node before version 6.3, an older protocol is used. In realgud,
-that debugger for the older version is called `node-debug`.
diff --git a/packages/realgud-node-inspect/autogen.sh
b/packages/realgud-node-inspect/autogen.sh
deleted file mode 100755
index 7beb4b9..0000000
--- a/packages/realgud-node-inspect/autogen.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-# An autoconf setup script.
-# From inside emacs, make sure test-simple is installed and then
-# Press C-x C-e at the end of the next line run this script
-# (test-simple-run "EMACSLOADPATH=%s ./autogen.sh" (mapconcat 'identity
load-path ":"))
-ln -fs README.md README
-touch common.mk
-autoreconf -vfi && \
-autoconf && {
- echo "Running configure with --enable-maintainer-mode $@"
- ./configure --enable-maintainer-mode $@
-}
diff --git a/packages/realgud-node-inspect/common.mk
b/packages/realgud-node-inspect/common.mk
deleted file mode 100644
index 36fbedc..0000000
--- a/packages/realgud-node-inspect/common.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-MOSTLYCLEANFILES = *.elc
-EMACSLOADPATH=:/home/rocky/.emacs.d/elpa/test-simple-20170527.1532/:/home/rocky/.emacs.d/elpa/realgud-20190504.1238/:/home/rocky/.emacs.d/elpa/load-relative-20170526.1010/:/home/rocky/.emacs.d/elpa/loc-changes-20160801.1708/
-
-short:
- $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
-
-%.short:
- $(MAKE) $(@:.short=) 2>&1 >/dev/null
-
-# This is the default rule, but we need to include an EMACLOADPATH
-.el.elc:
- if test "$(EMACS)" != "no"; then \
- am__dir=. am__subdir_includes=''; \
- case $@ in */*) \
- am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
- am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
- esac; \
- test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
- EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch \
- $(AM_ELCFLAGS) $(ELCFLAGS) \
- $$am__subdir_includes -L $(builddir) -L $(srcdir) \
- --eval "(defun byte-compile-dest-file (f) \"address@hidden")" \
- --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
- else :; fi
diff --git a/packages/realgud-node-inspect/common.mk.in
b/packages/realgud-node-inspect/common.mk.in
deleted file mode 100644
index c28f493..0000000
--- a/packages/realgud-node-inspect/common.mk.in
+++ /dev/null
@@ -1,24 +0,0 @@
-MOSTLYCLEANFILES = *.elc
address@hidden@
-
-short:
- $(MAKE) 2>&1 >/dev/null | ruby $(top_srcdir)/make-check-filter.rb
-
-%.short:
- $(MAKE) $(@:.short=) 2>&1 >/dev/null
-
-# This is the default rule, but we need to include an EMACLOADPATH
-.el.elc:
- if test "$(EMACS)" != "no"; then \
- am__dir=. am__subdir_includes=''; \
- case $@ in */*) \
- am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
- am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
- esac; \
- test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
- EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS) --batch \
- $(AM_ELCFLAGS) $(ELCFLAGS) \
- $$am__subdir_includes -L $(builddir) -L $(srcdir) \
- --eval "(defun byte-compile-dest-file (f) \"address@hidden")" \
- --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
- else :; fi
diff --git a/packages/realgud-node-inspect/compute-lispdir.sh
b/packages/realgud-node-inspect/compute-lispdir.sh
deleted file mode 100755
index 220befd..0000000
--- a/packages/realgud-node-inspect/compute-lispdir.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-# Figures out a reasonable --prefix
-typeset -i rc=0
-typeset -i DEBUG=${DEBUG:-0}
-EMACS_PROG=${EMACS_PROG:-emacs}
-list=$($EMACS_PROG --batch --no-splash --no-site-file --eval '(message
(substring (format "%s" load-path) 1 -1))' 2>&1)
-rc=$?
-if (( rc != 0 )) ; then
- echo >&2 "Something went wrong running $EMACS_PROG"
- exit $rc
-$cmd
-fi
-for dir in $list ; do
- if [[ -d $dir ]] ; then
- case $dir in
- */emacs/site-lisp)
- ((DEBUG)) && echo "site lisp: $dir"
- echo "$dir"
- exit 0
- ;;
- esac
- fi
-done
-for dir in $list ; do
- if [[ -d $dir ]] ; then
- case $dir in
- */emacs/2[34]\.[0-9]/site-lisp)
- ((DEBUG)) && echo "versioned site lisp: $dir"
- echo "$dir"
- exit 0
- ;;
- esac
- fi
-done
-for dir in $list ; do
- if [[ -d $dir ]] ; then
- case $dir in
- */emacs/2[34]\.[0-9]/site-lisp)
- ((DEBUG)) && echo "versioned site lisp: $dir"
- echo "$dir"
- exit 0
- ;;
- esac
- fi
-done
-exit 0
diff --git a/packages/realgud-node-inspect/configure.ac
b/packages/realgud-node-inspect/configure.ac
deleted file mode 100644
index 7a672b0..0000000
--- a/packages/realgud-node-inspect/configure.ac
+++ /dev/null
@@ -1,55 +0,0 @@
-dnl FIXME: pick up from realgud.el
-AC_INIT(realgud-inspect, 1.0.0,)
-AC_CONFIG_SRCDIR(realgud-node-inspect/main.el)
-AM_INIT_AUTOMAKE([foreign])
-AM_MAINTAINER_MODE
-
-AC_PATH_PROG([EMACS], [emacs], [emacs])
-AC_ARG_WITH(emacs, AC_HELP_STRING([--with-emacs],
- [location of emacs program]), EMACS=$withval)
-
-AC_MSG_NOTICE("Checking emacs version")
-$EMACS -batch -q --no-site-file -eval \
- '(if (<= emacs-major-version 23)
- (progn
- (error "You need GNU Emacs 24 or better.")
- (kill-emacs 1)
- )
- )'
-if test $? -ne 0 ; then
- AC_MSG_ERROR([Can't continue until above error is corrected.])
-fi
-
-##################################################################
-# See if --with-lispdir was set. If not, set it to a reasonable default
-# based on where bash thinks bashdb is supposed to be installed.
-##################################################################
-
-AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir)
-
-# Check whether --with-lispdir was given.
-if test "${with_lispdir+set}" = set; then :
-else
- my_lispdir=$(EMACS_PROG=$EMACS $SH_PROG $(dirname $0)/compute-lispdir.sh)
- if test "${my_lispdir+set}" = set; then :
- with_lispdir=$my_lispdir
- echo "'compute-lispdir.sh' lispdir install directory override:
'$with_lispdir'"
- fi
-fi
-
-##
-## Find out where to install the debugger emacs lisp files
-##
-AM_PATH_LISPDIR
-lispdir_realgud=$lispdir/realgud
-AC_SUBST([lispdir])
-AC_SUBST([lispdir_realgud])
-
-AM_CONDITIONAL(INSTALL_EMACS_LISP, test "x$lispdir_realgud" != "x")
-
-AC_CONFIG_FILES([Makefile \
- common.mk \
- realgud-node-inspect/Makefile \
- test/Makefile \
- ])
-AC_OUTPUT
diff --git a/packages/realgud-node-inspect/realgud-node-inspect.el
b/packages/realgud-node-inspect/realgud-node-inspect.el
deleted file mode 100644
index 383a6d5..0000000
--- a/packages/realgud-node-inspect/realgud-node-inspect.el
+++ /dev/null
@@ -1,52 +0,0 @@
-;;; realgud-node-inspect.el --- Realgud front-end to newer "node inspect" -*-
lexical-binding: t -*-
-
-;; Author: Rocky Bernstein
-;; Version: 1.0.0
-;; Package-Type: multi
-;; Package-Requires: ((realgud "1.4.5") (load-relative "1.2") (cl-lib "0.5")
(emacs "24"))
-;; URL: http://github.com/realgud/realgud-node-inspect
-;; Compatibility: GNU Emacs 24.x
-
-;; Copyright (C) 2019 Free Software Foundation, Inc
-
-;; 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/>.
-
-;;; Commentary:
-
-;; realgud support for the "node inspect" with V8 inspector support.
-;; See https://nodejs.org/api/debugger.html
-;;
-;; Note: for node before version 6.3, an older protocol is used. In
-;; realgud, that debugger for the older version is called
-;; `node-debug`.
-;;
-;;; Code:
-
-;; Press C-x C-e at the end of the next line configure the program in
-;; for building via "make" to get set up.
-;; (compile (format "EMACSLOADPATH=:%s:%s:%s:%s ./autogen.sh"
(file-name-directory (locate-library "test-simple.elc")) (file-name-directory
(locate-library "realgud.elc")) (file-name-directory (locate-library
"load-relative.elc")) (file-name-directory (locate-library "loc-changes.elc"))))
-(require 'load-relative)
-
-(defgroup realgud-node-inspector nil
- "Realgud interface to the 'node inspect' debugger"
- :group 'realgud
- :version "24.3")
-
-(require-relative-list '( "./realgud-node-inspect/main" ) "realgud-")
-(load-relative "./realgud-node-inspect/main.el")
-(load-relative "./realgud-node-inspect/track-mode.el")
-
-(provide-me)
-
-;;; realgud-node-inspect.el ends here
diff --git a/packages/realgud-node-inspect/realgud-node-inspect/.nosearch
b/packages/realgud-node-inspect/realgud-node-inspect/.nosearch
deleted file mode 100644
index 97f36a7..0000000
--- a/packages/realgud-node-inspect/realgud-node-inspect/.nosearch
+++ /dev/null
@@ -1,8 +0,0 @@
-site-lisp directories and their subdirectories may be automatically
-added to load path, in particular in Debian
-/usr/local/share/emacs/site-lisp/ is added to load-path before emacs
-system directories. So realgud-node-inspect's common/buffer/info.el is loaded
-before emacs's info.el
-
-Adding this ".nosearch" file prevents emacs from adding realgud-node-inspect
to the
-load-path.
diff --git a/packages/realgud-node-inspect/realgud-node-inspect/Makefile.am
b/packages/realgud-node-inspect/realgud-node-inspect/Makefile.am
deleted file mode 100644
index aa624b8..0000000
--- a/packages/realgud-node-inspect/realgud-node-inspect/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-lisp_files = $(wildcard *.el)
-EXTRA_DIST=$(lisp_files)
-lisp_LISP = $(lisp_files)
-include ../common.mk
-lispdir = @lispdir@/node-inspect
diff --git a/packages/realgud-node-inspect/realgud-node-inspect/core.el
b/packages/realgud-node-inspect/realgud-node-inspect/core.el
deleted file mode 100644
index 27ee471..0000000
--- a/packages/realgud-node-inspect/realgud-node-inspect/core.el
+++ /dev/null
@@ -1,172 +0,0 @@
-;; Copyright (C) 2019 Free Software Foundation, Inc
-;; Author: Rocky Bernstein
-
-;; 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-lib))
-
-(require 'realgud)
-
-(declare-function realgud:expand-file-name-if-exists 'realgud-core)
-(declare-function realgud-lang-mode? 'realgud-lang)
-(declare-function realgud-parse-command-arg 'realgud-core)
-(declare-function realgud-query-cmdline 'realgud-core)
-
-;; FIXME: I think the following could be generalized and moved to
-;; realgud-... probably via a macro.
-(declare-function realgud:expand-file-name-if-exists 'realgud-core)
-(declare-function realgud-parse-command-arg 'realgud-core)
-(declare-function realgud-query-cmdline 'realgud-core)
-(declare-function realgud-suggest-invocation 'realgud-core)
-
-;; FIXME: I think the following could be generalized and moved to
-;; realgud-... probably via a macro.
-(defvar realgud:node-inspect-minibuffer-history nil
- "Minibuffer history list for the command `node-inspect'.")
-
-(easy-mmode-defmap realgud:node-inspect-minibuffer-local-map
- '(("\C-i" . comint-dynamic-complete-filename))
- "Keymap for minibuffer prompting of node-inspect startup command."
- :inherit minibuffer-local-map)
-
-;; FIXME: I think this code and the keymaps and history
-;; variable chould be generalized, perhaps via a macro.
-(defun node-inspect-query-cmdline (&optional opt-debugger)
- (realgud-query-cmdline
- 'realgud:node-inspect-suggest-invocation
- realgud:node-inspect-minibuffer-local-map
- 'realgud:node-inspect-minibuffer-history
- opt-debugger))
-
-;;; FIXME: DRY this with other *-parse-cmd-args routines
-(defun node-inspect-parse-cmd-args (orig-args)
- "Parse command line ORIG-ARGS for the name of script to debug.
-
-ORIG-ARGS should contain a tokenized list of the command line to run.
-
-We return the a list containing
-* the name of the debugger given (e.g. node-inspect) and its arguments ,
- a list of strings
-* the script name and its arguments - list of strings
-
-For example for the following input:
- (map 'list 'symbol-name
- '(node --interactive --debugger-port 5858 /tmp node-inspect ./gcd.js a b))
-
-we might return:
- ((\"node\" \"--interactive\" \"--debugger-port\" \"5858\") nil
- (\"/tmp/gcd.js\" \"a\" \"b\"))
-
-Note that path elements have been expanded via `expand-file-name'."
-
- ;; Parse the following kind of pattern:
- ;; node node-inspect-options script-name script-options
- (let (
- (args orig-args)
- (pair) ;; temp return from
- (node-two-args '("-debugger_port" "C" "D" "i" "l" "m" "-module" "x"))
- ;; node doesn't have any optional two-arg options
- (node-opt-two-args '())
-
- ;; One dash is added automatically to the below, so
- ;; h is really -h and -debugger_port is really --debugger_port.
- (node-inspect-two-args '("-debugger_port"))
- (node-inspect-opt-two-args '())
-
- ;; Things returned
- (script-name nil)
- (debugger-name nil)
- (interpreter-args '())
- (script-args '())
- )
- (if (not (and args))
- ;; Got nothing: return '(nil, nil, nil)
- (list interpreter-args nil script-args)
- ;; else
- (progn
- ;; Remove "node-inspect" (or "nodemon" or "node") from invocation like:
- ;; node-inspect --node-inspect-options script --script-options
- (setq debugger-name (file-name-sans-extension
- (file-name-nondirectory (car args))))
- (unless (string-match "^node\\(?:js\\|mon\\)?$" debugger-name)
- (message
- "Expecting debugger name `%s' to be `node', `nodemon', or
`node-inspect'"
- debugger-name))
- (setq interpreter-args (list (pop args)))
-
- ;; Skip to the first non-option argument.
- (while (and args (not script-name))
- (let ((arg (car args)))
- (cond
- ((equal "debug" arg)
- (nconc interpreter-args (list arg))
- (setq args (cdr args))
- )
-
- ;; Options with arguments.
- ((string-match "^-" arg)
- (setq pair (realgud-parse-command-arg
- args node-inspect-two-args node-inspect-opt-two-args))
- (nconc interpreter-args (car pair))
- (setq args (cadr pair)))
- ;; Anything else must be the script to debug.
- (t (setq script-name (realgud:expand-file-name-if-exists arg))
- (setq script-args (cons script-name (cdr args))))
- )))
- (list interpreter-args nil script-args)))
- ))
-
-;; To silence Warning: reference to free variable
-(defvar realgud:node-inspect-command-name)
-
-(defun realgud:node-inspect-suggest-invocation (debugger-name)
- "Suggest a node-inspect command invocation via `realgud-suggest-invocaton'."
- (realgud-suggest-invocation realgud:node-inspect-command-name
- realgud:node-inspect-minibuffer-history
- "js" "\\.js$"))
-
-(defun realgud:node-inspect-remove-ansi-shmutz()
- "Remove ASCII escape sequences that node.js 'decorates' in
-prompts and interactive output."
- (add-to-list
- 'comint-preoutput-filter-functions
- (lambda (output)
- (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
- )
-
-(defun realgud:node-inspect-reset ()
- "Node-Inspect cleanup - remove debugger's internal buffers (frame,
-breakpoints, etc.)."
- (interactive)
- ;; (node-inspect-breakpoint-remove-all-icons)
- (dolist (buffer (buffer-list))
- (when (string-match "\\*node-inspect-[a-z]+\\*" (buffer-name buffer))
- (let ((w (get-buffer-window buffer)))
- (when w
- (delete-window w)))
- (kill-buffer buffer))))
-
-;; (defun node-inspect-reset-keymaps()
-;; "This unbinds the special debugger keys of the source buffers."
-;; (interactive)
-;; (setcdr (assq 'node-inspect-debugger-support-minor-mode
minor-mode-map-alist)
-;; node-inspect-debugger-support-minor-mode-map-when-deactive))
-
-
-(defun realgud:node-inspect-customize ()
- "Use `customize' to edit the settings of the `node-inspect' debugger."
- (interactive)
- (customize-group 'realgud:node-inspect))
-
-(provide-me "realgud:node-inspect-")
diff --git a/packages/realgud-node-inspect/realgud-node-inspect/init.el
b/packages/realgud-node-inspect/realgud-node-inspect/init.el
deleted file mode 100644
index a206378..0000000
--- a/packages/realgud-node-inspect/realgud-node-inspect/init.el
+++ /dev/null
@@ -1,188 +0,0 @@
-;; Copyright (C) 2019 Free Software Foundation, Inc
-;; Author: Rocky Bernstein
-
-;; 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/>.
-
-;;; "node inspect" debugger
-
-(eval-when-compile (require 'cl-lib)) ;For setf.
-
-(require 'realgud)
-(require 'realgud-lang-js)
-(require 'ansi-color)
-
-(defvar realgud:node-inspect-pat-hash)
-(declare-function make-realgud-loc-pat (realgud-loc))
-
-(defvar realgud:node-inspect-pat-hash (make-hash-table :test 'equal)
- "Hash key is the what kind of pattern we want to match:
-backtrace, prompt, etc. The values of a hash entry is a
-realgud-loc-pat struct")
-
-;; before a command prompt.
-;; For example:
-;; break in /home/indutny/Code/git/indutny/myscript.js:1
-(setf (gethash "loc" realgud:node-inspect-pat-hash)
- (make-realgud-loc-pat
- :regexp (format
- "\\(?:%s\\)*\\(?:break\\|exception\\|Break on start\\) in
\\(?:file://\\)?%s:%s"
- realgud:js-term-escape "\\([^:]+\\)"
- realgud:regexp-captured-num)
- :file-group 1
- :line-group 2))
-
-;; Regular expression that describes a node-inspect command prompt
-;; For example:
-;; debug>
-(setf (gethash "prompt" realgud:node-inspect-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "^\\(?:%s\\)*debug> " realgud:js-term-escape)
- ))
-
-;; Need an improved setbreak for this.
-;; ;; Regular expression that describes a "breakpoint set" line
-;; ;; 3 const armlet = require('armlet');
-;; ;; * 4 const client = new armlet.Client(
-;; ;; ^^^^
-;; ;;
-;; (setf (gethash "brkpt-set" realgud:node-inspect-pat-hash)
-;; (make-realgud-loc-pat
-;; :regexp "^\*[ ]*\\([0-9]+\\) \\(.+\\)"
-;; :line-group 1
-;; :text-group 2))
-
-;; Regular expression that describes a V8 backtrace line.
-;; For example:
-;; at repl:1:7
-;; at Interface.controlEval
(/src/external-vcs/github/trepanjs/lib/interface.js:352:18)
-;; at REPLServer.b [as eval] (domain.js:183:18)
-(setf (gethash "lang-backtrace" realgud:node-inspect-pat-hash)
- realgud:js-backtrace-loc-pat)
-
-;; Regular expression that describes a debugger "delete" (breakpoint)
-;; response.
-;; For example:
-;; Removed 1 breakpoint(s).
-(setf (gethash "brkpt-del" realgud:node-inspect-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "^Removed %s breakpoint(s).\n"
- realgud:regexp-captured-num)
- :num 1))
-
-
-(defconst realgud:node-inspect-frame-start-regexp "\\(?:^\\|\n\\)\\(?:#\\)")
-(defconst realgud:node-inspect-frame-num-regexp realgud:regexp-captured-num)
-(defconst realgud:node-inspect-frame-module-regexp "[^ \t\n]+")
-(defconst realgud:node-inspect-frame-file-regexp "[^ \t\n]+")
-
-;; Regular expression that describes a debugger "backtrace" command line.
-;; For example:
-;; #0 module.js:380:17
-;; #1 dbgtest.js:3:9
-;; #2 Module._compile module.js:456:26
-;;
-;; and with a newer node inspect:
-;;
-;; #0 file:///tmp/module.js:380:17
-;; #1 file:///tmp/dbgtest.js:3:9
-;; #2 Module._compile file:///tmpmodule.js:456:26
-(setf (gethash "debugger-backtrace" realgud:node-inspect-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "%s%s\\(?: %s\\)?
\\(?:file://\\)?\\(%s\\):%s:%s"
- realgud:node-inspect-frame-start-regexp
- realgud:node-inspect-frame-num-regexp
- realgud:node-inspect-frame-module-regexp
- realgud:node-inspect-frame-file-regexp
- realgud:regexp-captured-num
- realgud:regexp-captured-num
- )
- :num 1
- :file-group 2
- :line-group 3
- :char-offset-group 4))
-
-(defconst realgud:node-inspect-debugger-name "node-inspect" "Name of
debugger.")
-
-;; ;; Regular expression that for a termination message.
-;; (setf (gethash "termination" realgud:node-inspect-pat-hash)
-;; "^node-inspect: That's all, folks...\n")
-
-(setf (gethash "font-lock-keywords" realgud:node-inspect-pat-hash)
- '(
- ;; The frame number and first type name, if present.
- ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
- ;; --^-
- ("^\\(->\\|##\\)\\([0-9]+\\) "
- (2 realgud-backtrace-number-face))
-
- ;; File name.
- ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
- ;; ---------^^^^^^^^^^^^^^^^^^^^-
- ("[ \t]+\\(in\\|from\\) file `\\(.+\\)'"
- (2 realgud-file-name-face))
-
- ;; File name.
- ;; E.g. ->0 in file `/etc/init.d/apparmor' at line 35
- ;; --------^^
- ;; Line number.
- ("[ \t]+at line \\([0-9]+\\)$"
- (1 realgud-line-number-face))
- ))
-
-(setf (gethash "node-inspect" realgud-pat-hash)
- realgud:node-inspect-pat-hash)
-
-;; Prefix used in variable names (e.g. short-key-mode-map) for
-;; this debugger
-
-(setf (gethash "node-inspect" realgud:variable-basename-hash)
- "realgud:node-inspect")
-
-(defvar realgud:node-inspect-command-hash (make-hash-table :test 'equal)
- "Hash key is command name like 'finish' and the value is
-the node-inspect command to use, like 'out'.")
-
-(setf (gethash realgud:node-inspect-debugger-name
- realgud-command-hash)
- realgud:node-inspect-command-hash)
-
-(setf (gethash "backtrace" realgud:node-inspect-command-hash)
"backtrace")
-(setf (gethash "break" realgud:node-inspect-command-hash)
- "setBreakpoint('%X',%l)")
-(setf (gethash "clear" realgud:node-inspect-command-hash)
- "clearBreakpoint('%X', %l)")
-(setf (gethash "continue" realgud:node-inspect-command-hash) "cont")
-(setf (gethash "eval" realgud:node-inspect-command-hash)
"exec('%s')")
-(setf (gethash "finish" realgud:node-inspect-command-hash) "out")
-(setf (gethash "info-breakpoints" realgud:node-inspect-command-hash)
"breakpoints")
-(setf (gethash "kill" realgud:node-inspect-command-hash) "kill")
-(setf (gethash "quit" realgud:node-inspect-command-hash) ".exit")
-(setf (gethash "shell" realgud:node-inspect-command-hash) "repl")
-
-;; We need aliases for step and next because the default would
-;; do step 1 and node-inspect doesn't handle this. And if it did,
-;; it would probably look like step(1).
-(setf (gethash "step" realgud:node-inspect-command-hash) "step")
-(setf (gethash "next" realgud:node-inspect-command-hash) "next")
-
-;; Unsupported features:
-(setf (gethash "jump" realgud:node-inspect-command-hash)
"*not-implemented*")
-(setf (gethash "up" realgud:node-inspect-command-hash)
"*not-implemented*")
-(setf (gethash "down" realgud:node-inspect-command-hash)
"*not-implemented*")
-(setf (gethash "frame" realgud:node-inspect-command-hash)
"*not-implemented*")
-
-(setf (gethash "node-inspect" realgud-command-hash)
realgud:node-inspect-command-hash)
-(setf (gethash "node-inspect" realgud-pat-hash) realgud:node-inspect-pat-hash)
-
-(provide-me "realgud:node-inspect-")
diff --git a/packages/realgud-node-inspect/realgud-node-inspect/main.el
b/packages/realgud-node-inspect/realgud-node-inspect/main.el
deleted file mode 100644
index d511886..0000000
--- a/packages/realgud-node-inspect/realgud-node-inspect/main.el
+++ /dev/null
@@ -1,84 +0,0 @@
-;; Copyright (C) 2016, 2018-2019 Rocky Bernstein
-
-;; 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/>.
-
-;; `realgud:node-inspect' Main interface to "node inspect" debugger via Emacs
-
-(require 'cl-lib)
-(require 'load-relative)
-(require 'realgud)
-(require-relative-list '("core" "track-mode") "realgud:node-inspect-")
-
-;; This is needed, or at least the docstring part of it is needed to
-;; get the customization menu to work in Emacs 24.
-(defgroup realgud:node-inspect nil
- "The realgud interface to the node-inspect debugger"
- :group 'realgud
- :version "24.3")
-
-;; -------------------------------------------------------------------
-;; User-definable variables
-;;
-
-(defcustom realgud:node-inspect-command-name
- "node inspect"
- "File name for executing the Javascript debugger and command options.
-This should be an executable on your path, or an absolute file name."
- :type 'string
- :group 'realgud:node-inspect)
-
-;; -------------------------------------------------------------------
-;; The end.
-;;
-
-(declare-function node-inspect-track-mode 'realgud-node-inspect-track-mode)
-(declare-function node-inspect-query-cmdline 'realgud:node-inspect-core)
-(declare-function node-inspect-parse-cmd-args 'realgud:node-inspect-core)
-
-;;;###autoload
-(defun realgud:node-inspect (&optional opt-cmd-line no-reset)
- "Invoke the node-inspect shell debugger and start the Emacs user interface.
-
-String OPT-CMD-LINE specifies how to run node-inspect.
-
-OPT-CMD-LINE is treated like a shell string; arguments are
-tokenized by `split-string-and-unquote'. The tokenized string is
-parsed by `node-inspect-parse-cmd-args' and path elements found by that
-are expanded using `realgud:expand-file-name-if-exists'.
-
-Normally, command buffers are reused when the same debugger is
-reinvoked inside a command buffer with a similar command. If we
-discover that the buffer has prior command-buffer information and
-NO-RESET is nil, then that information which may point into other
-buffers and source buffers which may contain marks and fringe or
-marginal icons is reset. See `loc-changes-clear-buffer' to clear
-fringe and marginal icons."
- (interactive)
- (let ((cmd-buf
- (realgud:run-debugger "node-inspect"
- 'node-inspect-query-cmdline
'node-inspect-parse-cmd-args
- 'realgud:node-inspect-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:remove-ansi-schmutz)
- ;; )
- ;; )
- ))
-
-(defalias 'node-inspect 'realgud:node-inspect)
-
-(provide-me "realgud-")
diff --git a/packages/realgud-node-inspect/realgud-node-inspect/track-mode.el
b/packages/realgud-node-inspect/realgud-node-inspect/track-mode.el
deleted file mode 100644
index 0640bae..0000000
--- a/packages/realgud-node-inspect/realgud-node-inspect/track-mode.el
+++ /dev/null
@@ -1,84 +0,0 @@
-;;; track-mode.el ---
-;; Copyright (C) 2019 Free Software Foundation, Inc
-;; Author: Rocky Bernstein
-
-;; 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/>.
-
-;; "node inspect" tracking a comint or eshell buffer.
-
-(declare-function realgud:track-set-debugger 'realgud-track-mode)
-(declare-function realgud-track-mode-setup 'realgud-track-mode)
-(declare-function realgud:remove-ansi-schmutz 'realgud:utils)
-
-(require 'realgud)
-
-(require-relative-list '("core" "init") "realgud:node-inspect-")
-
-(realgud-track-mode-vars "realgud:node-inspect")
-
-(defun realgud:node-inspect-track-mode-hook()
- (if realgud:node-inspect-track-mode
- (progn
- (use-local-map realgud:node-inspect-track-mode-map)
- (realgud:remove-ansi-schmutz)
- (message "using node-inspect mode map")
- )
- (message "node-inspect track-mode-hook disable called"))
-)
-
-;; FIXME: this shouldn't be needed
-(defvar realgud:node-inspect-track-mode-map (make-keymap))
-(define-key realgud:node-inspect-track-mode-map
- (kbd "C-c !f") 'realgud:js-goto-file-line)
-
-(define-minor-mode realgud:node-inspect-track-mode
- "Minor mode for tracking node-inspect source locations inside a node-inspect
shell via realgud.
-
-If called interactively with no prefix argument, the mode is
-toggled. A prefix argument, captured as ARG, enables the mode if
-the argument is positive, and disables it otherwise.
-
-\\{realgud:node-inspect-track-mode-map}"
- :init-value nil
- ;; :lighter " node-inspect" ;; mode-line indicator from realgud-track is
sufficient.
- ;; The minor mode bindings.
- :global nil
- :group 'realgud:node-inspect
- :keymap realgud:node-inspect-track-mode-map
-
- (if realgud:node-inspect-track-mode
- (progn
- (realgud:track-set-debugger "node-inspect")
- (realgud:node-inspect-track-mode-hook)
- (realgud:track-mode-enable))
- (progn
- (setq realgud-track-mode nil)
- ))
- )
-
-;; ;; Debugger commands that node-inspect doesn't have
-;; (define-key node-inspect-track-mode-map
-;; [remap realgud:cmd-newer-frame] 'undefined)
-;; (define-key node-inspect-track-mode-map
-;; [remap realgud:cmd-older-frame] 'undefined)
-(defvar realgud:node-inspect-short-key-mode-map (make-keymap))
-
-(define-key realgud:node-inspect-short-key-mode-map
- [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
-(define-key realgud:node-inspect-short-key-mode-map
- [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
-(define-key realgud:node-inspect-short-key-mode-map
- [remap realgud:cmd-next] 'realgud:cmd-next-no-arg)
-
-(provide-me "realgud:node-inspect-")
diff --git a/packages/realgud-node-inspect/test/Makefile.am
b/packages/realgud-node-inspect/test/Makefile.am
deleted file mode 100644
index fbfb2c6..0000000
--- a/packages/realgud-node-inspect/test/Makefile.am
+++ /dev/null
@@ -1,70 +0,0 @@
-include $(top_srcdir)/common.mk
-
-PHONY=check test all check-elget test-elget help
-
-#: overall help on running the make targets
-help:
- @echo "The main function of this Makefile is to facilitate running
tests."
- @echo
- @echo "To run all of the tests, use targets \"test\", \"check\" or
\"check-short\"."
- @echo "For example:"
- @echo
- @echo " make check"
- @echo "or:"
- @echo " make check-short"
- @echo
- @echo "The -short target uses a filter written in Ruby to remove
extreanous output."
- @echo
- @echo "To run a specific test like test-srcbuf.el, change \".el\" to"
- @echo "\".run\". For example:"
- @echo
- @echo " make test-srcbuf.run"
- @echo
- @echo "Tests can also be run via the Emacs el-get package and this
loads dependent emacs "
- @echo "package, like load-relative. To do this, use targets,
\"check-elget\","
- @echo "\"test-elget\", or \"check-short-elget\"."
- @echo
- @echo "To run a specific test like test-srcbuf.el via el-get change
\".el\""
- @echo "to \".elrun\" For example:"
- @echo
- @echo " make test-srcbuf.elrun"
-
-
-#: same thing as "check"
-test: check
-
-#: same thing as "check-elget"
-test-elget: check-elget
-
-test_files := $(wildcard test-*.el)
-
-CHECK_FILES = $(notdir $(test_files:.el=.run))
-EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))
-
-#: Run all tests
-check: $(CHECK_FILES)
-
-#: Run all tests via el-get
-check-elget: $(EL_GET_CHECK_FILES)
-
-#: Run all tests with minimum verbosity
-check-short:
- $(MAKE) check 2>&1 | ruby ../make-check-filter.rb
-
-#: Run all tests with minimum verbosity via el-get
-check-short-elget:
- $(MAKE) check-elget 2>&1 | ruby ../make-check-filter.rb
-
-test-%.run:
- (cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load $(@:.run=.el))
-
-#: Run tests using el-get to specify external Lisp dependencies
-test-%.elrun:
- (cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load ../el-get-install.el --load
$(@:.elrun=.el))
-
-install-lispLISP: $(lisp_LISP) $(ELCFILES)
-
-# Whatever it is you want to do, it should be forwarded to the
-# to top-level directories
-# %:
-# $(MAKE) -C .. $@
diff --git a/packages/realgud-node-inspect/test/gcd.js
b/packages/realgud-node-inspect/test/gcd.js
deleted file mode 100644
index ee56555..0000000
--- a/packages/realgud-node-inspect/test/gcd.js
+++ /dev/null
@@ -1,45 +0,0 @@
-//!/usr/bin/env node
-var util = require("util");
-require("console");
-
-function ask(question, format, callback) {
- var stdin = process.stdin, stdout = process.stdout;
-
- stdin.resume();
- stdout.write(question + ": ");
-
- stdin.once('data', function(data) {
- data = data.toString().trim();
-
- if (format.test(data)) {
- callback(data);
- } else {
- stdout.write("It should match: "+ format +"\n");
- ask(question, format, callback);
- }
- });
-}
-
-// GCD. We assume positive numbers
-function gcd(a, b) {
- // Make: a <= b
- if (a > b) {
- var temp = a;
- a = b;
- b = temp;
- }
-
- if (a <= 0) { return null };
-
- if (a == 1 || b-a == 0) {
- return a;
- }
- return gcd(b-a, a);
-}
-
-var a = parseInt(process.argv[0]) || 24,
- b = parseInt(process.argv[0]) || 5;
-
-console.log(util.format("The GCD of %d and %d is %d", a, b,
- gcd(a, b)));
-process.exit();
diff --git a/packages/realgud-node-inspect/test/make-check-filter.rb
b/packages/realgud-node-inspect/test/make-check-filter.rb
deleted file mode 100644
index 508c8f6..0000000
--- a/packages/realgud-node-inspect/test/make-check-filter.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-# Use this to cut out the crud from make check.
-# Use like this:
-# make check 2>&1 | ruby ../make-check-filter.rb
-# See Makefile.am
-pats = ["^(?:Loading",
- '(re)?make\[',
- "Making check in",
- '\(cd \.\.',
- "make -C",
- "Test-Unit",
- "Fontifying",
- "`flet'",
- '\s*$',
- '##[<>]+$'
- ].join('|') + ')'
-# puts pats
-skip_re = /#{pats}/
-
-while gets()
- next if $_.encode!('UTF-8', 'binary',
- invalid: :replace, undef: :replace, replace: '') =~
skip_re
- puts $_
-end
diff --git a/packages/realgud-node-inspect/test/regexp-helper.el
b/packages/realgud-node-inspect/test/regexp-helper.el
deleted file mode 100644
index 2660077..0000000
--- a/packages/realgud-node-inspect/test/regexp-helper.el
+++ /dev/null
@@ -1,50 +0,0 @@
-(require 'test-simple)
-(require 'realgud)
-
-(eval-when-compile
- (defvar helper-bps)
- (defvar helper-loc)
- (defvar helper-tb)
- (defvar prompt-pat)
-)
-
-(declare-function realgud-loc-pat-regexp 'realgud-backtrace-mode)
-(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
-(declare-function test-simple-start 'test-simple)
-
-
-(defun setup-regexp-vars(pat-hash)
- (setq helper-bps (gethash "brkpt-set" pat-hash))
- (setq helper-loc (gethash "loc" pat-hash))
- (setq helper-tb (gethash "lang-backtrace" pat-hash))
-)
-
-(defun loc-match(text var)
- "Match TEXT against regexp field VAR"
- (string-match (realgud-loc-pat-regexp var) text)
-)
-
-(defun bp-loc-match(text)
- (string-match (realgud-loc-pat-regexp helper-bps) text)
-)
-
-(defun tb-loc-match(text)
- (string-match (realgud-loc-pat-regexp helper-tb) text)
-)
-
-(defun cmdbuf-loc-match(text dbgr)
- "Match TEXT against cmdbuf-info-loc field VAR"
- (string-match (realgud-cmdbuf-info-loc-regexp dbgr) text)
- )
-
-(defun prompt-match(prompt-str &optional num-str fmt-str)
- (unless fmt-str (setq fmt-str "debugger prompt %s"))
- (assert-equal 0 (string-match (realgud-loc-pat-regexp prompt-pat)
- prompt-str)
- (format fmt-str prompt-str))
- (cond (num-str
- (assert-equal num-str (substring prompt-str
- (match-beginning 1) (match-end 1))))
- ('t 't))
- )
-(provide 'realgud-regexp-helper)
diff --git a/packages/realgud-node-inspect/test/test-loc-regexp-node-inspect.el
b/packages/realgud-node-inspect/test/test-loc-regexp-node-inspect.el
deleted file mode 100644
index 3918b7c..0000000
--- a/packages/realgud-node-inspect/test/test-loc-regexp-node-inspect.el
+++ /dev/null
@@ -1,118 +0,0 @@
-;; Press C-x C-e at the end of the next line to run this file test
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory
(locate-library "test-simple.elc")) buffer-file-name)
-
-(require 'test-simple)
-(require 'load-relative)
-(require 'realgud)
-
-(load-file "./regexp-helper.el")
-(load-file "../realgud-node-inspect/init.el")
-
-(declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
-(declare-function cmdbuf-loc-match 'realgud-regexp-helper)
-(declare-function realgud-loc-pat-regexp 'realgud-regexp)
-(declare-function realgud-loc-pat-file-group 'realgud-regexp)
-(declare-function realgud-loc-pat-line-group 'realgud-regexp)
-(declare-function realgud-cmdbuf-info-file-group 'realgud-regexp)
-(declare-function realgud-cmdbuf-info-line-group 'realgud-regexp)
-(declare-function realgud-cmdbuf-info 'realgud-regexp)
-(declare-function make-realgud-cmdbuf-info 'realgud-regexp)
-(declare-function realgud-loc-pat-num 'realgud-regexp)
-(declare-function test-simple-start 'test-simple)
-(declare-function assert-t 'test-simple)
-(declare-function assert-equal 'test-simple)
-(declare-function note 'test-simple)
-(declare-function end-tests 'test-simple)
-(declare-function realgud-loc-pat-char-offset-group 'realgud:nodejs-init)
-
-(test-simple-start)
-
-(eval-when-compile
- (defvar file-group)
- (defvar frame-re)
- (defvar line-group)
- (defvar num-group)
- (defvar col-group)
- (defvar test-pos)
- (defvar bt-re)
- (defvar dbg-name)
- (defvar realgud-pat-hash)
- (defvar loc-pat)
- (defvar test-dbgr)
- (defvar test-s1)
- (defvar realgud-pat-bt)
- (defvar realgud:nodejs-pat-hash)
-)
-
-; Some setup usually done in setting up the buffer.
-; We customize this for the debugger trepan. Others may follow.
-; FIXME: encapsulate this.
-(setq dbg-name "nodejs")
-(setq loc-pat (gethash "loc" (gethash dbg-name realgud-pat-hash)))
-
-(setq test-dbgr (make-realgud-cmdbuf-info
- :debugger-name dbg-name
- :loc-regexp (realgud-loc-pat-regexp loc-pat)
- :file-group (realgud-loc-pat-file-group loc-pat)
- :line-group (realgud-loc-pat-line-group loc-pat)))
-
-
-(note "debugger-backtrace")
-(setq realgud-pat-bt (gethash "debugger-backtrace"
- realgud:nodejs-pat-hash))
-(setq test-s1
- "#0 module.js:380:17
-#1 Module._compile module2.js:456:26
-#2 Module._extensions..js module.js:474:10
-#3 Module.load module.js:356:32
-")
-
-(setq bt-re (realgud-loc-pat-regexp realgud-pat-bt))
-(setq num-group (realgud-loc-pat-num realgud-pat-bt))
-(setq file-group (realgud-loc-pat-file-group realgud-pat-bt))
-(setq line-group (realgud-loc-pat-line-group realgud-pat-bt))
-(setq col-group (realgud-loc-pat-char-offset-group realgud-pat-bt))
-(assert-equal 0 (string-match bt-re test-s1))
-(assert-equal "0" (substring test-s1
- (match-beginning num-group)
- (match-end num-group)))
-(assert-equal "module.js"
- (substring test-s1
- (match-beginning file-group)
- (match-end file-group)))
-(assert-equal "380"
- (substring test-s1
- (match-beginning line-group)
- (match-end line-group)))
-(assert-equal "17" (substring test-s1
- (match-beginning col-group)
- (match-end col-group)))
-
-(setq test-pos (match-end 0))
-(assert-equal 19 (string-match bt-re test-s1 test-pos))
-
-(setq test-s1
- "#1 Module._compile module2.js:456:26
-#2 Module._extensions..js module.js:474:10
-#3 Module.load module.js:356:32
-")
-(assert-equal 0 (string-match bt-re test-s1))
-
-(assert-equal "1" (substring test-s1
- (match-beginning num-group)
- (match-end num-group)))
-(assert-equal "module2.js"
- (substring test-s1
- (match-beginning file-group)
- (match-end file-group)))
-(assert-equal "456"
- (substring test-s1
- (match-beginning line-group)
- (match-end line-group)))
-(assert-equal "26" (substring test-s1
- (match-beginning col-group)
- (match-end col-group)))
-(setq test-pos (match-end 0))
-(assert-equal 36 test-pos)
-
-(end-tests)
diff --git a/packages/realgud-node-inspect/test/test-node-inspect.el
b/packages/realgud-node-inspect/test/test-node-inspect.el
deleted file mode 100644
index 6750d45..0000000
--- a/packages/realgud-node-inspect/test/test-node-inspect.el
+++ /dev/null
@@ -1,37 +0,0 @@
-;; Press C-x C-e at the end of the next line to run this file test
non-interactively
-;; (test-simple-run "emacs -batch -L %s -l %s" (file-name-directory
(locate-library "test-simple.elc")) buffer-file-name)
-
-(require 'test-simple)
-(load-file "../realgud-node-inspect/main.el")
-
-(eval-when-compile (defvar test:run-process-save))
-
-(declare-function nodejs-parse-cmd-args 'realgud:nodejs)
-(declare-function nodejs 'realgud:nodejs)
-(declare-function __FILE__ 'load-relative)
-
-(test-simple-start)
-
-;; Save value realgud:run-process and change it to something we want
-(setq test:run-process-save (symbol-function 'realgud:run-process))
-(defun realgud:run-process(debugger-name script-filename cmd-args
- minibuf-history &optional no-reset)
- "Fake realgud:run-process used in testing"
- (note
- (format "%s %s %s" debugger-name script-filename cmd-args))
- (assert-equal "node" debugger-name "debugger name gets passed")
- (let ((expanded-name (expand-file-name "./gcd.js")))
- (assert-equal expanded-name script-filename "file name check")
- ))
-
-(note "node-inspect-parse-cmd-args")
-(assert-equal '(("node") nil ("inspect" "foo"))
- (node-inspect-parse-cmd-args '("node" "inspect" "foo")))
-
-;; FIXME: need to mock remove-ansi-schmutz in realgud:nodejs
-;; (realgud:nodejs "node inspect ./gcd.js 3 5")
-
-;; Restore the old value of realgud:run-process
-(fset 'realgud:run-process test:run-process-save)
-
-(end-tests)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 0cc410e 2/2: Merge branch 'master' of git://bzr.sv.gnu.org/emacs/elpa,
Michael Albinus <=