[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud ca3c108 1/3: [WIP] Release 1.5.0
From: |
Rocky Bernstein |
Subject: |
[elpa] externals/realgud ca3c108 1/3: [WIP] Release 1.5.0 |
Date: |
Tue, 28 May 2019 14:01:12 -0400 (EDT) |
branch: externals/realgud
commit ca3c1080fbe9999d8bfb404d6f0119503605dc64
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
[WIP] Release 1.5.0
---
compute-lispdir.sh | 46 ++++++
configure.ac | 10 +-
elisp-comp | 93 ------------
realgud.el | 14 +-
realgud/common/attach.el | 2 +-
realgud/debugger/Makefile.am | 4 +-
realgud/debugger/ipdb/Makefile.am | 5 -
realgud/debugger/ipdb/core.el | 255 ---------------------------------
realgud/debugger/ipdb/init.el | 166 ---------------------
realgud/debugger/ipdb/ipdb.el | 125 ----------------
realgud/debugger/ipdb/track-mode.el | 80 -----------
realgud/debugger/jdb/Makefile.am | 5 -
realgud/debugger/jdb/README | 2 -
realgud/debugger/jdb/backtrack-mode.el | 78 ----------
realgud/debugger/jdb/core.el | 192 -------------------------
realgud/debugger/jdb/file.el | 241 -------------------------------
realgud/debugger/jdb/init.el | 237 ------------------------------
realgud/debugger/jdb/jdb.el | 115 ---------------
realgud/debugger/jdb/track-mode.el | 93 ------------
realgud/debugger/nodejs/Makefile.am | 5 -
realgud/debugger/nodejs/core.el | 166 ---------------------
realgud/debugger/nodejs/init.el | 185 ------------------------
realgud/debugger/nodejs/nodejs.el | 87 -----------
realgud/debugger/nodejs/track-mode.el | 90 ------------
24 files changed, 60 insertions(+), 2236 deletions(-)
diff --git a/compute-lispdir.sh b/compute-lispdir.sh
new file mode 100755
index 0000000..553b579
--- /dev/null
+++ b/compute-lispdir.sh
@@ -0,0 +1,46 @@
+#!/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[5-8]\.[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[5-8]\.[0-9]/site-lisp)
+ ((DEBUG)) && echo "versioned site lisp: $dir"
+ echo "$dir"
+ exit 0
+ ;;
+ esac
+ fi
+done
+exit 0
diff --git a/configure.ac b/configure.ac
index e893eb8..cfa1433 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl FIXME: pick up from realgud.el
-AC_INIT(emacs-realgud, 1.4.8,)
+AC_INIT(emacs-realgud, 1.5.0,)
AC_CONFIG_SRCDIR(realgud.el)
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
@@ -10,9 +10,9 @@ AC_ARG_WITH(emacs, AC_HELP_STRING([--with-emacs],
AC_MSG_NOTICE("Checking emacs version")
$EMACS -batch -q --no-site-file -eval \
- '(if (< emacs-major-version 24)
+ '(if (< emacs-major-version 25)
(progn
- (error "You need GNU Emacs 24 or better.")
+ (error "You need GNU Emacs 25 or better.")
(kill-emacs 1)
)
)'
@@ -41,7 +41,7 @@ AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir)
# Check whether --with-lispdir was given.
if test "${with_lispdir+set}" = set; then :
else
- my_lispdir="${datadir}/emacs/site-lisp"
+ my_lispdir=$(EMACS_PROG=$EMACS $SH_PROG $(dirname $0)/compute-lispdir.sh)
if test "${my_lispdir+set}" = set; then :
with_lispdir=$my_lispdir
fi
@@ -67,7 +67,6 @@ AC_CONFIG_FILES([Makefile \
realgud/debugger/gdb/Makefile \
realgud/debugger/gub/Makefile \
realgud/debugger/ipdb/Makefile \
- realgud/debugger/jdb/Makefile \
realgud/debugger/kshdb/Makefile \
realgud/debugger/nodejs/Makefile \
realgud/debugger/perldb/Makefile \
@@ -78,7 +77,6 @@ AC_CONFIG_FILES([Makefile \
realgud/debugger/trepan2/Makefile \
realgud/debugger/trepan3k/Makefile \
realgud/debugger/trepan.pl/Makefile \
- realgud/debugger/trepanjs/Makefile \
realgud/debugger/zshdb/Makefile \
realgud/lang/Makefile \
test/Makefile \
diff --git a/elisp-comp b/elisp-comp
deleted file mode 100755
index 8277552..0000000
--- a/elisp-comp
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
-
-scriptversion=2014-02-09.22; # UTC
-
-# Franc,ois Pinard <address@hidden>, 1995.
-#
-# 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 2, 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/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <address@hidden> or send patches to
-# <address@hidden>.
-
-case $1 in
- '')
- echo "$0: No files. Try '$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: elisp-comp [--help] [--version] FILES...
-
-This script byte-compiles all '.el' files listed as FILES using GNU
-Emacs, and put the resulting '.elc' files into the current directory,
-so disregarding the original directories used in '.el' arguments.
-
-This script manages in such a way that all Emacs LISP files to
-be compiled are made visible between themselves, in the event
-they require or load-library one another.
-
-Report bugs to <address@hidden>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "elisp-comp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$EMACS" || test "$EMACS" = "t"; then
- # Value of "t" means we are running in a shell under Emacs.
- # Just assume Emacs is called "emacs".
- EMACS=emacs
-fi
-
-tempdir=elc.$$
-
-# Cleanup the temporary directory on exit.
-trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
-do_exit='(exit $ret); exit $ret'
-trap "ret=129; $do_exit" 1
-trap "ret=130; $do_exit" 2
-trap "ret=141; $do_exit" 13
-trap "ret=143; $do_exit" 15
-
-# mkdir $tempdir
-# cp "$@" $tempdir
-
-(
- # cd $tempdir
- echo "(setq load-path (cons nil (cons \"$abs_srcdir\" load-path)))" > script
- $EMACS -batch -q -l script -f batch-byte-compile-if-not-done *.el || exit $?
- # mv *.elc ..
-) || exit $?
-
-(exit 0); exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/realgud.el b/realgud.el
index 83367e7..93c30e4 100644
--- a/realgud.el
+++ b/realgud.el
@@ -1,11 +1,11 @@
-;;; realgud.el --- A modular front-end for interacting with external debuggers
+;;; realgud.el --- A modular front-end for interacting with external debuggers
-*- lexical-binding: t -*-
;; Author: Rocky Bernstein <address@hidden>
-;; Version: 1.4.8
+;; Version: 1.5.0
;; Package-Type: multi
-;; Package-Requires: ((load-relative "1.2") (loc-changes "1.2") (test-simple
"1.2.0") (cl-lib "0.5") (emacs "24"))
+;; Package-Requires: ((load-relative "1.2") (loc-changes "1.2") (test-simple
"1.2.0") (cl-lib "0.5") (emacs "25"))
;; URL: http://github.com/realgud/realgud/
-;; Keywords: debugger, gdb, python, perl, go, bash, nodejs, zsh, bashdb,
zshdb, remake, trepan, perldb, pdb
+;; Keywords: debugger, gdb, python, perl, go, bash, zsh, bashdb, zshdb,
remake, trepan, perldb, pdb
;; Copyright (C) 2015-2019 Free Software Foundation, Inc
@@ -49,7 +49,7 @@
;; Oh, and because global variables are largely banned, we can support
;; several simultaneous debug sessions.
-;; RealGUD supports many external debuggers. See URL
+;; RealGUD supports many external debuggers. See URL
;; `https://github.com/realgud/realgud/wiki/Debuggers-Supported' for a
;; list. However, if you don't see your favorite debugger, see URL
;; `https://github.com/realgud/realgud/wiki/How-to-add-a-new-debugger/'
@@ -68,7 +68,7 @@
;; [1] Four or more years in, as of 2018 realgud sports a number of
;; old debuggers too. However we *mark* them as such, and move them
-;; out of the main code base. See for example:
+;; out of the main code base. See for example:
;; https://github.com/realgud/realgud-old-debuggers. So that's
;; another difference: this code better *maintained*.
@@ -84,7 +84,7 @@
"The Grand Cathedral Debugger rewrite"
:group 'processes
:group 'tools
- :version "24.3")
+ :version "25.1")
;; FIXME: extend require-relative for "autoload".
(defun realgud:load-features()
diff --git a/realgud/common/attach.el b/realgud/common/attach.el
index 957df80..866f7b1 100644
--- a/realgud/common/attach.el
+++ b/realgud/common/attach.el
@@ -29,7 +29,7 @@
(declare-function realgud-srcbuf-init-or-update 'realgud-source)
(declare-function realgud-short-key-mode-setup 'realgud-shortkey)
-(defvar realgud:attach-cmdbuf-history nil "attach command buffer history
list'.")
+(defvar realgud:attach-cmdbuf-history nil "Attach command buffer history
list'.")
;;;###autoload
diff --git a/realgud/debugger/Makefile.am b/realgud/debugger/Makefile.am
index 5f7a769..e001fce 100644
--- a/realgud/debugger/Makefile.am
+++ b/realgud/debugger/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = \
- bashdb gdb gub ipdb jdb kshdb nodejs \
+ bashdb gdb gub kshdb nodejs \
pdb perldb rdebug remake \
- trepan trepan2 trepan3k trepan.pl trepanjs \
+ trepan trepan2 trepan3k trepan.pl \
zshdb
EXTRA_DIST = common.mk
diff --git a/realgud/debugger/ipdb/Makefile.am
b/realgud/debugger/ipdb/Makefile.am
deleted file mode 100644
index e6c68b4..0000000
--- a/realgud/debugger/ipdb/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../common.mk
-
-lisp_files = $(wildcard *.el)
-lisp_LISP = $(lisp_files)
-EXTRA_DIST = $(lisp_files)
diff --git a/realgud/debugger/ipdb/core.el b/realgud/debugger/ipdb/core.el
deleted file mode 100644
index 12939f2..0000000
--- a/realgud/debugger/ipdb/core.el
+++ /dev/null
@@ -1,255 +0,0 @@
-;; Copyright (C) 2016-2017 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 'load-relative)
-(require-relative-list '("../../common/track"
- "../../common/core"
- "../../common/lang")
- "realgud-")
-(require-relative-list '("init") "realgud:ipdb-")
-
-
-(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/realgud/debugger/ipdb/init.el b/realgud/debugger/ipdb/init.el
deleted file mode 100644
index d995d5f..0000000
--- a/realgud/debugger/ipdb/init.el
+++ /dev/null
@@ -1,166 +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 'load-relative)
-(require-relative-list '("../../common/regexp"
- "../../common/loc"
- "../../common/init")
- "realgud-")
-(require-relative-list '("../../lang/python") "realgud-lang-")
-
-(defvar realgud-pat-hash)
-(declare-function make-realgud-loc-pat 'realgud-regexp)
-
-(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/realgud/debugger/ipdb/ipdb.el b/realgud/debugger/ipdb/ipdb.el
deleted file mode 100644
index a17a041..0000000
--- a/realgud/debugger/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-relative-list '("core" "track-mode") "realgud:ipdb-")
-(require-relative-list '("../../common/run") "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/realgud/debugger/ipdb/track-mode.el
b/realgud/debugger/ipdb/track-mode.el
deleted file mode 100644
index e33ce11..0000000
--- a/realgud/debugger/ipdb/track-mode.el
+++ /dev/null
@@ -1,80 +0,0 @@
-;; Copyright (C) 2016, 2018 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.
-
-(require 'load-relative)
-(require-relative-list '(
- "../../common/cmds"
- "../../common/menu"
- "../../common/track"
- "../../common/track-mode"
- "../../common/utils"
- )
- "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)
-(declare-function realgud:remove-ansi-schmutz 'realgud:utils)
-
-(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-")
diff --git a/realgud/debugger/jdb/Makefile.am b/realgud/debugger/jdb/Makefile.am
deleted file mode 100644
index 2c88842..0000000
--- a/realgud/debugger/jdb/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-include $(srcdir)/../common.mk
-
-lisp_files = $(wildcard *.el)
-lisp_LISP = $(lisp_files)
-EXTRA_DIST = $(lisp_files)
diff --git a/realgud/debugger/jdb/README b/realgud/debugger/jdb/README
deleted file mode 100644
index d37044a..0000000
--- a/realgud/debugger/jdb/README
+++ /dev/null
@@ -1,2 +0,0 @@
-Supporting JDB is going to be a mess.
-Consider using something else. Eclipse anyone?
diff --git a/realgud/debugger/jdb/backtrack-mode.el
b/realgud/debugger/jdb/backtrack-mode.el
deleted file mode 100644
index 1454edc..0000000
--- a/realgud/debugger/jdb/backtrack-mode.el
+++ /dev/null
@@ -1,78 +0,0 @@
-;; Copyright (C) 2015-2016 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/>.
-;; Mode for parsing various kinds of backtraces found in Java
-
-(require 'load-relative)
-(require-relative-list '(
- "../../common/cmds"
- "../../common/menu"
- "../../common/track-mode"
- "../../common/backtrack-mode"
- )
- "realgud-")
-(require-relative-list '("core" "init") "realgud:jdb-")
-(require-relative-list '("../../lang/ruby") "realgud-lang-")
-
-(realgud-backtrack-mode-vars "jdb")
-(set-keymap-parent jdb-backtrack-mode-map realgud-backtrack-mode-map)
-
-(declare-function realgud-backtrack-mode
'realgud-common-backtrack-mode)
-(declare-function realgud-backtrack-set-debugger
'realgud-common-backtrack-mode)
-(declare-function realgud-goto-line-for-pt
'realgud-common-backtrack-mode)
-(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
-
-(defun realgud:jdb-goto-control-frame-line (pt)
- "Display the location mentioned by a control-frame line
-described by PT."
- (interactive "d")
- (realgud-goto-line-for-pt pt "control-frame"))
-
-(realgud:ruby-populate-command-keys jdb-backtrack-mode-map)
-(define-key jdb-backtrack-mode-map
- (kbd "C-c !c") 'realgud:jdb-goto-control-frame-line)
-
-(define-minor-mode jdb-backtrack-mode
- "Minor mode for tracking ruby debugging inside a file which may not have
process shell.
-
-\\{jdb-backtrack-mode-map}"
- :init-value nil
- ;; :lighter " jdb" ;; mode-line indicator from realgud-track is sufficient.
- ;; The minor mode bindings.
- :global nil
- :group 'realgud:jdb
- :keymap jdb-backtrack-mode-map
-
- (realgud-backtrack-set-debugger "jdb")
- (if jdb-backtrack-mode
- (progn
- (realgud-backtrack-mode 't)
- (run-mode-hooks (intern (jdb-backtrack-mode-hook))))
- (progn
- (realgud-backtrack-mode nil)
- ))
-)
-
-(defun jdb-backtrack-mode-hook()
- (if jdb-backtrack-mode
- (progn
- (use-local-map jdb-backtrack-mode-map)
- (message "using jdb mode map")
- )
- (message "jdb backtrack-mode-hook disable called"))
-)
-
-(provide-me "realgud:jdb-")
diff --git a/realgud/debugger/jdb/core.el b/realgud/debugger/jdb/core.el
deleted file mode 100644
index 227a67b..0000000
--- a/realgud/debugger/jdb/core.el
+++ /dev/null
@@ -1,192 +0,0 @@
-;; Copyright (C) 2014, 2016, 2018-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.
-
-;; We use gud to handle the classpath-to-filename mapping
-(require 'gud)
-
-(require 'load-relative)
-(require-relative-list '("../../common/track"
- "../../common/core"
- "../../common/file"
- "../../common/lang"
- "../../common/utils")
- "realgud-")
-(require-relative-list '("init") "realgud:jdb-")
-
-(declare-function realgud:strip 'realgud-utils)
-(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)
-(declare-function realgud:file-loc-from-line 'realgud-file)
-(declare-function realgud:find-file 'realgud-file)
-
-;; FIXME: I think the following could be generalized and moved to
-;; realgud-... probably via a macro.
-(defvar realgud:jdb-minibuffer-history nil
- "minibuffer history list for the command `realgud:jdb'.")
-
-(easy-mmode-defmap jdb-minibuffer-local-map
- '(("\C-i" . comint-dynamic-complete-filename))
- "Keymap for minibuffer prompting of gud 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 realgud:jdb-query-cmdline (&optional opt-debugger)
- (realgud-query-cmdline
- 'jdb-suggest-invocation
- jdb-minibuffer-local-map
- 'realgud:jdb-minibuffer-history
- opt-debugger))
-
-(defun realgud:jdb-dot-to-slash (str)
- "Change '.' to '/' in STR but chop off from the last . to the end. For
example
-ca.mgcill.rocky.snpEff.main => ca/mcgill/rocky/snpEff"
- ;;(setq str (replace-regexp-in-string "\\([^\\.]+\\.\\)[^\\.]+$" "\\1"
str))
- ;;(setq str (replace-regexp-in-string "\\.$" "" str))
- (setq str (replace-regexp-in-string "\\." "/" str))
- str)
-
-(defun realgud:jdb-find-file(marker filename directory)
- "A find-file specific for java/jdb. We use `gdb-jdb-find-source' to map a
-name to a filename. Failing that we can add on .java to the name. Failing that
-we will prompt for a mapping and save that the remap."
- (let* ((transformed-file)
- (cmdbuf (realgud-get-cmdbuf))
- (ignore-re-file-list (realgud-cmdbuf-ignore-re-file-list cmdbuf))
- (filename-remap-alist (realgud-cmdbuf-filename-remap-alist))
- (stripped-filename (realgud:strip filename))
- (gud-jdb-filename (gud-jdb-find-source stripped-filename))
- (remapped-filename
- (assoc filename filename-remap-alist))
- )
- (cond
- ((and gud-jdb-filename (file-exists-p gud-jdb-filename))
- gud-jdb-filename)
- ((file-exists-p (setq transformed-file (concat stripped-filename
".java")))
- transformed-file)
- ((realgud:file-ignore filename ignore-re-file-list)
- (message "tracking ignored for %s" filename) nil)
- (t
- (if remapped-filename
- (if (file-exists-p (cdr remapped-filename))
- (cdr remapped-filename)
- ;; else remove from map since no find
- (and (realgud-cmdbuf-filename-remap-alist=
- (delq (assoc remapped-filename filename-remap-alist)
- filename-remap-alist))
- nil))
- ;; else
- (let ((remapped-filename)
- (guess-filename (realgud:jdb-dot-to-slash filename)))
- (setq remapped-filename
- (buffer-file-name
- (realgud:find-file marker guess-filename
- directory "%s.java")))
- (when (and remapped-filename (file-exists-p remapped-filename))
- (realgud-cmdbuf-filename-remap-alist=
- (cons
- (cons filename remapped-filename)
- filename-remap-alist))
- ))
- ))
- )))
-
-(defun realgud:jdb-loc-fn-callback(text filename lineno source-str
- cmd-mark directory)
- (realgud:file-loc-from-line filename lineno
- cmd-mark source-str nil
- 'realgud:jdb-find-file directory))
-
-(defun realgud:jdb-parse-cmd-args (orig-args)
- "Parse command line 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 debugger (e.g. jdb)
-
-* debugger command arguments if any - a list of strings
-
-* the script name and its arguments - list of strings
-
-For example for the following input
- '(\"jdb\" \"-classpath . ./TestMe.java a b\"))
-
-we might return:
- (\"jdb\" nil \"TestMe\"))
-
-Note that the script name path has been expanded via `expand-file-name'.
-"
-
- ;; Parse the following kind of pattern:
- ;; [ruby ruby-options] jdb jdb-options script-name script-options
- (let (
- (args orig-args)
- (interp-regexp
- (if (member system-type (list 'windows-nt 'cygwin 'msdos))
- "^jdb*\\(.exe\\)?$"
- "^jdb*$"))
- (jdb-name)
- ;;
- ;; One dash is added automatically to the below, so
- ;; attach is really -attach
- (jdb-two-args '("attach" "sourcepath" "classpath" "dbgtrace"))
-
- ;; Things returned
- (debugger-args '())
- (program-args '()))
-
- (if (not (and args))
- ;; Got nothing: return '(nil nil nil)
- (list jdb-name nil debugger-args program-args)
- ;; else
- ;; Strip off optional "jdb" or "jdb.exe" etc.
- (when (string-match interp-regexp (car args))
- (setq jdb-name (car args))
- (setq program-args (nconc program-args (cdr args))))
-
- (list jdb-name debugger-args program-args))))
-
-;; To silence Warning: reference to free variable
-(defvar realgud:jdb-command-name)
-
-(defun jdb-suggest-invocation (debugger-name)
- "Suggest a jdb command invocation via `realgud-suggest-invocaton'"
- (realgud-suggest-invocation (or debugger-name realgud:jdb-command-name)
- realgud:jdb-minibuffer-history
- "java" "\\.java$" "jdb"))
-
-(defun jdb-reset ()
- "Jdb cleanup - remove debugger's internal buffers (frame,
-breakpoints, etc.)."
- (interactive)
- ;; (jdb-breakpoint-remove-all-icons)
- (dolist (buffer (buffer-list))
- (when (string-match "\\*jdb-[a-z]+\\*" (buffer-name buffer))
- (let ((w (get-buffer-window buffer)))
- (when w
- (delete-window w)))
- (kill-buffer buffer))))
-
-;; (defun jdb-reset-keymaps()
-;; "This unbinds the special debugger keys of the source buffers."
-;; (interactive)
-;; (setcdr (assq 'jdb-debugger-support-minor-mode minor-mode-map-alist)
-;; jdb-debugger-support-minor-mode-map-when-deactive))
-
-
-(defun realgud:jdb-customize ()
- "Use `customize' to edit the settings of the `jdb' debugger."
- (interactive)
- (customize-group 'realgud:jdb))
-
-(provide-me "realgud:jdb-")
diff --git a/realgud/debugger/jdb/file.el b/realgud/debugger/jdb/file.el
deleted file mode 100644
index 388478a..0000000
--- a/realgud/debugger/jdb/file.el
+++ /dev/null
@@ -1,241 +0,0 @@
-;; Copyright (C) 2016 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.
-;; Association list of fully qualified class names (package + class name)
-;; and their source files.
-(defvar gud-jdb-class-source-alist nil
- "Association list of fully qualified class names and source files.")
-
-;; This is used to hold a source file during analysis.
-(defvar gud-jdb-analysis-buffer nil)
-
-(defvar gud-jdb-classpath-string nil
- "Holds temporary classpath values.")
-
-(defun gud-jdb-build-source-files-list (path extn)
- "Return a list of java source files (absolute paths).
-PATH gives the directories in which to search for files with
-extension EXTN. Normally EXTN is given as the regular expression
- \"\\.java$\" ."
- (apply 'nconc (mapcar (lambda (d)
- (when (file-directory-p d)
- (directory-files d t extn nil)))
- path)))
-
-;; Move point past whitespace.
-(defun gud-jdb-skip-whitespace ()
- (skip-chars-forward " \n\r\t\014"))
-
-;; Move point past a "// <eol>" type of comment.
-(defun gud-jdb-skip-single-line-comment ()
- (end-of-line))
-
-;; Move point past a "/* */" or "/** */" type of comment.
-(defun gud-jdb-skip-traditional-or-documentation-comment ()
- (forward-char 2)
- (catch 'break
- (while (not (eobp))
- (if (eq (following-char) ?*)
- (progn
- (forward-char)
- (if (not (eobp))
- (if (eq (following-char) ?/)
- (progn
- (forward-char)
- (throw 'break nil)))))
- (forward-char)))))
-
-;; Move point past any number of consecutive whitespace chars and/or comments.
-(defun gud-jdb-skip-whitespace-and-comments ()
- (gud-jdb-skip-whitespace)
- (catch 'done
- (while t
- (cond
- ((looking-at "//")
- (gud-jdb-skip-single-line-comment)
- (gud-jdb-skip-whitespace))
- ((looking-at "/\\*")
- (gud-jdb-skip-traditional-or-documentation-comment)
- (gud-jdb-skip-whitespace))
- (t (throw 'done nil))))))
-
-;; Move point past things that are id-like. The intent is to skip regular
-;; id's, such as class or interface names as well as package and interface
-;; names.
-(defun gud-jdb-skip-id-ish-thing ()
- (skip-chars-forward "^ /\n\r\t\014,;{"))
-
-;; Move point past a string literal.
-(defun gud-jdb-skip-string-literal ()
- (forward-char)
- (while (not (cond
- ((eq (following-char) ?\\)
- (forward-char))
- ((eq (following-char) ?\042))))
- (forward-char))
- (forward-char))
-
-;; Move point past a character literal.
-(defun gud-jdb-skip-character-literal ()
- (forward-char)
- (while
- (progn
- (if (eq (following-char) ?\\)
- (forward-char 2))
- (not (eq (following-char) ?\')))
- (forward-char))
- (forward-char))
-
-;; Move point past the following block. There may be (legal) cruft before
-;; the block's opening brace. There must be a block or it's the end of life
-;; in petticoat junction.
-(defun gud-jdb-skip-block ()
-
- ;; Find the beginning of the block.
- (while
- (not (eq (following-char) ?{))
-
- ;; Skip any constructs that can harbor literal block delimiter
- ;; characters and/or the delimiters for the constructs themselves.
- (cond
- ((looking-at "//")
- (gud-jdb-skip-single-line-comment))
- ((looking-at "/\\*")
- (gud-jdb-skip-traditional-or-documentation-comment))
- ((eq (following-char) ?\042)
- (gud-jdb-skip-string-literal))
- ((eq (following-char) ?\')
- (gud-jdb-skip-character-literal))
- (t (forward-char))))
-
- ;; Now at the beginning of the block.
- (forward-char)
-
- ;; Skip over the body of the block as well as the final brace.
- (let ((open-level 1))
- (while (not (eq open-level 0))
- (cond
- ((looking-at "//")
- (gud-jdb-skip-single-line-comment))
- ((looking-at "/\\*")
- (gud-jdb-skip-traditional-or-documentation-comment))
- ((eq (following-char) ?\042)
- (gud-jdb-skip-string-literal))
- ((eq (following-char) ?\')
- (gud-jdb-skip-character-literal))
- ((eq (following-char) ?{)
- (setq open-level (+ open-level 1))
- (forward-char))
- ((eq (following-char) ?})
- (setq open-level (- open-level 1))
- (forward-char))
- (t (forward-char))))))
-
-;; Find the package and class definitions in Java source file FILE. Assumes
-;; that FILE contains a legal Java program. BUF is a scratch buffer used
-;; to hold the source during analysis.
-(defun gud-jdb-analyze-source (buf file)
- (let ((l nil))
- (set-buffer buf)
- (insert-file-contents file nil nil nil t)
- (goto-char 0)
- (catch 'abort
- (let ((p ""))
- (while (progn
- (gud-jdb-skip-whitespace)
- (not (eobp)))
- (cond
-
- ;; Any number of semi's following a block is legal. Move point
- ;; past them. Note that comments and whitespace may be
- ;; interspersed as well.
- ((eq (following-char) ?\073)
- (forward-char))
-
- ;; Move point past a single line comment.
- ((looking-at "//")
- (gud-jdb-skip-single-line-comment))
-
- ;; Move point past a traditional or documentation comment.
- ((looking-at "/\\*")
- (gud-jdb-skip-traditional-or-documentation-comment))
-
- ;; Move point past a package statement, but save the PackageName.
- ((looking-at "package")
- (forward-char 7)
- (gud-jdb-skip-whitespace-and-comments)
- (let ((s (point)))
- (gud-jdb-skip-id-ish-thing)
- (setq p (concat (buffer-substring s (point)) "."))
- (gud-jdb-skip-whitespace-and-comments)
- (if (eq (following-char) ?\073)
- (forward-char))))
-
- ;; Move point past an import statement.
- ((looking-at "import")
- (forward-char 6)
- (gud-jdb-skip-whitespace-and-comments)
- (gud-jdb-skip-id-ish-thing)
- (gud-jdb-skip-whitespace-and-comments)
- (if (eq (following-char) ?\073)
- (forward-char)))
-
- ;; Move point past the various kinds of ClassModifiers.
- ((looking-at "public")
- (forward-char 6))
- ((looking-at "abstract")
- (forward-char 8))
- ((looking-at "final")
- (forward-char 5))
-
- ;; Move point past a ClassDeclaration, but save the class
- ;; Identifier.
- ((looking-at "class")
- (forward-char 5)
- (gud-jdb-skip-whitespace-and-comments)
- (let ((s (point)))
- (gud-jdb-skip-id-ish-thing)
- (setq
- l (nconc l (list (concat p (buffer-substring s (point)))))))
- (gud-jdb-skip-block))
-
- ;; Move point past an interface statement.
- ((looking-at "interface")
- (forward-char 9)
- (gud-jdb-skip-block))
-
- ;; Anything else means the input is invalid.
- (t
- (message "Error parsing file %s." file)
- (throw 'abort nil))))))
- l))
-
-(defun gud-jdb-build-class-source-alist-for-file (file)
- (mapcar
- (lambda (c)
- (cons c file))
- (gud-jdb-analyze-source gud-jdb-analysis-buffer file)))
-
-;; Return an alist of fully qualified classes and the source files
-;; holding their definitions. SOURCES holds a list of all the source
-;; files to examine.
-(defun gud-jdb-build-class-source-alist (sources)
- (setq gud-jdb-analysis-buffer (get-buffer-create " *gud-jdb-scratch*"))
- (prog1
- (apply
- 'nconc
- (mapcar
- 'gud-jdb-build-class-source-alist-for-file
- sources))
- (kill-buffer gud-jdb-analysis-buffer)
- (setq gud-jdb-analysis-buffer nil)))
diff --git a/realgud/debugger/jdb/init.el b/realgud/debugger/jdb/init.el
deleted file mode 100644
index e1bb4e6..0000000
--- a/realgud/debugger/jdb/init.el
+++ /dev/null
@@ -1,237 +0,0 @@
-;; Copyright (C) 2014-2017 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.
-
-(eval-when-compile (require 'cl-lib)) ;For setf.
-
-(require 'load-relative)
-(require-relative-list '("../../common/regexp"
- "../../common/loc"
- "../../common/init")
- "realgud-")
-
-(require-relative-list '("../../lang/java") "realgud-lang-")
-
-(defvar realgud-pat-hash)
-(declare-function make-realgud-loc-pat 'realgud-regexp)
-
-(defconst realgud:jdb-identifier "[A-Za-z_][A-Za-z0-9_.]+"
-"Regexp string that matches a Java identifier possily with class
-name. For example java.lang.Class.getDeclaredMethods")
-
-(defvar realgud:jdb-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")
-
-(setf (gethash "loc-callback-fn" realgud:jdb-pat-hash)
- 'realgud:jdb-loc-fn-callback)
-
-;; realgud-loc-pat that describes a jdb location generally shown
-;; before a command prompt. For example:
-;; Breakpoint hit: "thread=main", TestMe.main(), line=7 bci=0
-;; Step completed: "thread=main", TestMe.<init>(), line=15 bci=0
-
-(setf (gethash "loc" realgud:jdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "\\(?:Breakpoint hit\\|Step completed\\): \"thread=.+\",
\\(.+\\)?[.]\\(.+\\)(), line=\\([0-9]+\\)
bci=\\([0-9]+\\)\\(?:\n\\([0-9]+\\)\\(.*\\)\\)?"
- :file-group 1
- :line-group 3
- :text-group 6))
-
-;; realgud-loc-pat that describes a jdb command prompt
-;; For example:
-;; main[1]
-;; main[2]
-;; >
-;; FIXME: I think the pattern is thread-name[stack-level]
-;; Here, we only deal with main.
-(setf (gethash "prompt" realgud:jdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^\\(?:main\\[\\([0-9]+\\)\\]\\|>\\) "
- :num 1
- ))
-
-;; realgud-loc-pat that describes a Java syntax error line.
-;; (setf (gethash "syntax-error" realgud:jdb-pat-hash)
-;; realgud-java-syntax-error-pat)
-
-;; realgud-loc-pat that describes a Java backtrace line.
-;; For example:
-;; [1] ca.snpEffect.commandLine.SnpEff.run (SnpEff.java:7)
-(setf (gethash "lang-backtrace" realgud:jdb-pat-hash)
- (make-realgud-loc-pat
- ;; FIXME: use realgud:jdb-identifier
- :regexp "^\\(?:[ ]*[\\[0-9\\]+]\\) \\([A-Za-z_.][A-Za-z0-9.]+\\)
(\\([A-Za-z_.][A-Za-z0-9.]+\\):\\([0-9]+\\))"
- :file-group 1
- :line-group 2))
-
-;; realgud-loc-pat that describes a "breakpoint set" line.
-;; For example:
-;; Set breakpoint TestMe:7
-(setf (gethash "brkpt-set" realgud:jdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^Set breakpoint \\(.+\\):\\([0-9]+\\)"
- :num 1
- :line-group 2))
-
-;; realgud-loc-pat that describes a debugger "delete" (breakpoint) response.
-;; For example:
-;; Removed: breakpoint TestMe:7
-(setf (gethash "brkpt-del" realgud:jdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^Removed breakpoint \\(.+\\):\\([0-9]+\\)\n"
- :line-group 1))
-
-(defconst realgud:jdb-selected-frame-indicator "-->"
-"String that describes which frame is selected in a debugger
-backtrace listing.")
-
-(defconst realgud:jdb-frame-file-regexp
- "[ \t\n]+in file \\([^ \n]+\\)")
-
-(defconst realgud:jdb-debugger-name "jdb" "Name of debugger")
-
-;; Top frame number
-(setf (gethash "top-frame-num" realgud:jdb-pat-hash) 0)
-
-;; realgud-loc-pat that describes a debugger "selected" frame in
-;; a frame-motion command.
-;; For example:
-;; --> #1 [1] TestMe.main (TestMe.java:7)
-;; Rocky: sometimes I am not getting the frame indicator.
-(setf (gethash "selected-frame" realgud:jdb-pat-hash)
- (make-realgud-loc-pat
- :regexp
- (format "^%s #\\([0-9]+\\) .*%s"
- realgud:jdb-selected-frame-indicator
- realgud:jdb-frame-file-regexp)
- :num 1))
-
-;; realgud-loc-pat that describes a jdb backtrace line.
-;; For example:
-;; [1] TestMe.main (TestMe.java:7)
-;; [2] java.lang.Class.privateGetDeclaredMethods (Class.java:2,570)
-;; [3] java.lang.Class.getMethod0 (Class.java:2,813)
-;; [4] java.lang.Class.getMethod (Class.java:1,663)
-;; [5] sun.launcher.LauncherHelper.getMainMethod (LauncherHelper.java:494)
-;; [6] sun.launcher.LauncherHelper.checkAndLoadMain (LauncherHelper.java:486)
-(setf (gethash "debugger-backtrace" realgud:jdb-pat-hash)
- (make-realgud-loc-pat
- :regexp "^\\(?:[\t ]*[\\[[0-9]+\\]
\\)\\([A-Za-z_.][A-Za-z0-9.]+\\):\\([0-9]+\\)"
- :file-group 1
- :line-group 2))
-
-;; Regular expression that describes location in a maven error
-(setf (gethash "maven-error" realgud:jdb-pat-hash)
- realgud-maven-error-loc-pat)
-
-(setf (gethash "font-lock-keywords" realgud:jdb-pat-hash)
- '(
- ;; The frame number and first type name, if present.
- ;; FIXME: use realgud:jdb-identifier
- ("^\\(-->\\| \\)? #\\([0-9]+\\) \\([A-Z]+\\)
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?"
- (2 realgud-backtrace-number-face)
- (3 font-lock-keyword-face) ; e.g. METHOD, TOP
- (4 font-lock-constant-face) ; e.g. Object
- (5 font-lock-function-name-face nil t)) ; t means optional
- ;; Instruction sequence
- ("<\\(.+\\)>"
- (1 font-lock-variable-name-face))
- ;; "::Type", which occurs in class name of function and in parameter
list.
- ;; Parameter sequence
- ("(\\(.+\\))"
- (1 font-lock-variable-name-face))
- ;; "::Type", which occurs in class name of function and in parameter
list.
- ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
- (1 font-lock-type-face))
- ;; File name.
- ("[ \t]+in file \\([^ ]+*\\)"
- (1 realgud-file-name-face))
- ;; Line number.
- ("[ \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))
- ;; (jdb-frames-match-current-line
- ;; (0 jdb-frames-current-frame-face append))
- ))
-
-;; (setf (gethash "font-lock-keywords" realgud:jdb-pat-hash)
-;; '(
-;; ;; The frame number and first type name, if present.
-;; ((concat realgud:jdb-frame-start-regexp " "
-;; realgud:jdb-frame-num-regexp " "
-;; "\\([A-Z]+\\)
*\\([A-Z_][a-zA-Z0-9_]*\\)[#]\\([a-zA-Z_][a-zA-Z_[0-9]]*\\)?")
-;; (2 realgud-backtrace-number-face)
-;; (3 font-lock-keyword-face) ; e.g. METHOD, TOP
-;; (4 font-lock-constant-face) ; e.g. Object
-;; (5 font-lock-function-name-face nil t)) ; t means optional
-;; ;; Instruction sequence
-;; ("<\\(.+\\)>"
-;; (1 font-lock-variable-name-face))
-;; ;; "::Type", which occurs in class name of function and in
-;; ;; parameter list. Parameter sequence
-;; ("(\\(.+\\))"
-;; (1 font-lock-variable-name-face))
-;; ;; "::Type", which occurs in class name of function and in
-;; ;; parameter list.
-;; ("::\\([a-zA-Z_][a-zA-Z0-9_]*\\)"
-;; (1 font-lock-type-face))
-;; ;; File name.
-;; (realgud:jdb-frame-file-regexp (1 realgud-file-name-face))
-;; ;; Line number.
-;; (realgud:jdb-frame-line-regexp (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))
-;; ;; (jdb-frames-match-current-line
-;; ;; (0 jdb-frames-current-frame-face append))
-;; ))
-
-;; realgud-loc-pat for a termination message.
-(setf (gethash "termination" realgud:jdb-pat-hash)
- "^The application exited\n")
-
-(setf (gethash realgud:jdb-debugger-name realgud-pat-hash)
realgud:jdb-pat-hash)
-
-(defvar realgud:jdb-command-hash (make-hash-table :test 'equal)
- "Hash key is command name like 'quit' and the value is
- the jdb command to use, like 'quit!'")
-
-(setf (gethash realgud:jdb-debugger-name
- realgud-command-hash) realgud:jdb-command-hash)
-
-;; Prefix used in variable names (e.g. short-key-mode-map) for
-;; this debugger
-
-(setf (gethash "jdb" realgud:variable-basename-hash) "realgud:jdb")
-
-
-(setf (gethash "backtrace" realgud:jdb-command-hash) "where")
-
-;; For these we need to deal with java classpaths.
-;; Also jdb is pretty sucky when it comes to giving an prompt that
-;; we can write a regex for. So we don't even know often when there
-;; is a prompt!
-(setf (gethash "break" realgud:jdb-command-hash) "*not-implemented*")
-(setf (gethash "clear" realgud:jdb-command-hash) "*not-implemented*")
-(setf (gethash "restart" realgud:jdb-command-hash) "*not-implemented*")
-
-(setf (gethash "info-breakpoints" realgud:jdb-command-hash) "clear")
-
-(setf (gethash "continue" realgud:jdb-command-hash) "cont")
-(setf (gethash "finish" realgud:jdb-command-hash) "step up")
-(setf (gethash "up" realgud:jdb-command-hash) "up\C-Mwhere")
-(setf (gethash "down" realgud:jdb-command-hash) "down\C-Mwhere")
-
-
-(provide-me "realgud:jdb-")
diff --git a/realgud/debugger/jdb/jdb.el b/realgud/debugger/jdb/jdb.el
deleted file mode 100644
index f0bef31..0000000
--- a/realgud/debugger/jdb/jdb.el
+++ /dev/null
@@ -1,115 +0,0 @@
-;; Copyright (C) 2014-2017 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.
-
-;; `jdb' Main interface to jdb via Emacs
-
-(require 'gud) ;; For class-path and source-path handling
-
-(require 'load-relative)
-(require-relative-list '("../../common/run") "realgud:")
-(require-relative-list '("../../common/helper" "../../common/utils")
- "realgud-")
-(require-relative-list '("core" "track-mode") "realgud:jdb-")
-
-(declare-function realgud:jdb-query-cmdline 'realgud:jdb-core)
-(declare-function realgud:jdb-parse-cmd-args 'realgud:jdb-core)
-(declare-function realgud:run-process 'realgud:core)
-(declare-function realgud:flatten 'realgud-utils)
-
-(defvar realgud:jdb-file-remap nil
- "A buffer-local hash table to map a Java file reproted by jdb into a file
seen in the filesystem."
-)
-
-
-;; 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:jdb nil
- "The realgud interface to the Java's jdb debugger"
- :group 'java
- :group 'realgud
- :version "24.3")
-
-;; -------------------------------------------------------------------
-;; User-definable variables
-;;
-
-(defcustom realgud:jdb-command-name
- ;;"jdb --emacs 3"
- "jdb"
- "File name for executing the Java debugger and command options.
-This should be an executable on your path, or an absolute file name."
- :type 'string
- :group 'realgud:jdb)
-
-;;;###autoload
-(defun realgud:jdb (&optional opt-cmd-line no-reset)
- "Invoke the Java jdb debugger and start the Emacs user interface.
-
-String OPT-CMD-LINE is treated like a shell string; arguments are
-tokenized by `split-string-and-unquote'. The tokenized string is
-parsed by `jdb-parse-cmd-args' and path elements found by that
-are expanded using `expand-file-name'.
-
-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)
-
- (setq gud-jdb-classpath nil)
- (setq gud-jdb-sourcepath nil)
- ;; Set gud-jdb-classpath from the CLASSPATH environment variable,
- ;; if CLASSPATH is set.
- (setq gud-jdb-classpath-string (or (getenv "CLASSPATH") "."))
- (if gud-jdb-classpath-string
- (setq gud-jdb-classpath
- (gud-jdb-parse-classpath-string gud-jdb-classpath-string)))
-
- (setq gud-jdb-class-source-alist
- (gud-jdb-build-class-source-alist
- (setq gud-jdb-source-files
- (gud-jdb-build-source-files-list gud-jdb-directories
- "\\.java$"))))
- (fset 'gud-jdb-find-source 'gud-jdb-find-source-file)
-
-
- ;; reset for future invocations
- (setq gud-jdb-classpath-string nil)
-
- (let* (
- (cmd-str (or opt-cmd-line (realgud:jdb-query-cmdline "jdb")))
- (cmd-args (split-string-and-unquote cmd-str))
- (parsed-args (realgud:jdb-parse-cmd-args cmd-args))
- (script-args (caddr parsed-args))
- (script-name (car script-args))
- (parsed-cmd-args
- (cl-remove-if 'nil (realgud:flatten parsed-args)))
- (cmd-buf (realgud:run-process "jdb" script-name parsed-cmd-args
- 'realgud:jdb-track-mode-hook no-reset))
- )
- (if cmd-buf
- (with-current-buffer cmd-buf
- (set (make-local-variable 'realgud:jdb-file-remap)
- (make-hash-table :test 'equal))
- )
- )
- )
- )
-
-;;;###autoload
-(defalias 'jdb 'realgud:jdb)
-(provide-me "realgud-")
-
-;; Local Variables:
-;; byte-compile-warnings: (not cl-functions)
-;; End:
diff --git a/realgud/debugger/jdb/track-mode.el
b/realgud/debugger/jdb/track-mode.el
deleted file mode 100644
index 567cc74..0000000
--- a/realgud/debugger/jdb/track-mode.el
+++ /dev/null
@@ -1,93 +0,0 @@
-;; Copyright (C) 2015-2017 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.
-
-;; Java "jdb" Debugger tracking a comint or eshell buffer.
-
-(require 'load-relative)
-(require-relative-list '(
- "../../common/cmds"
- "../../common/menu"
- "../../common/track"
- "../../common/track-mode"
- )
- "realgud-")
-(require-relative-list '("core" "init") "realgud:jdb-")
-(require-relative-list '("../../lang/java") "realgud-lang-")
-
-(declare-function realgud-track-mode 'realgud-track-mode)
-(declare-function realgud-track-mode-hook 'realgud-track-mode)
-(declare-function realgud-track-mode-setup 'realgud-track-mode)
-(declare-function realgud:track-set-debugger 'realgud-track-mode)
-(declare-function realgud-goto-line-for-pt 'realgud-track-mode)
-(declare-function realgud-java-populate-command-keys 'realgud-lang-java)
-
-(realgud-track-mode-vars "realgud:jdb")
-;;(defvaralias 'jdb-short-key-mode-map 'realgud:jdb-short-key-mode-map)
-;;(defvaralias 'jdb-track-mode 'realgud:track-mode)
-
-(realgud-java-populate-command-keys realgud:jdb-track-mode-map)
-
-
-(define-key realgud-track-mode-map
- (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
-(define-key realgud-track-mode-map
- (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
-
-(defun realgud:jdb-goto-control-frame-line (pt)
- "Display the location mentioned by a control-frame line
-described by PT."
- (interactive "d")
- (realgud-goto-line-for-pt pt "control-frame"))
-
-(defun realgud:jdb-goto-syntax-error-line (pt)
- "Display the location mentioned in a Syntax error line
-described by PT."
- (interactive "d")
- (realgud-goto-line-for-pt pt "syntax-error"))
-
-(define-key realgud:jdb-track-mode-map
- (kbd "C-c !c") 'realgud:jdb-goto-control-frame-line)
-(define-key realgud:jdb-track-mode-map
- (kbd "C-c !s") 'realgud:jdb-goto-syntax-error-line)
-
-(defun realgud:jdb-track-mode-hook()
- (if realgud:jdb-track-mode
- (progn
- (use-local-map realgud:jdb-track-mode-map)
- (message "using realgud:jdb-track-mode-map"))
- ;; else
- (progn
- (setq realgud-track-mode nil)
- ))
-)
-
-(define-minor-mode realgud:jdb-track-mode
- "Minor mode for tracking jdb source locations inside a process shell via
realgud. jdb is a Ruby debugger.
-
-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:jdb-track-mode-map}
-"
- :init-value nil
- ;; :lighter " jdb" ;; mode-line indicator from realgud-track is sufficient.
- ;; The minor mode bindings.
- :global nil
- :group 'realgud:jdb
- :keymap realgud:jdb-track-mode-map
- (realgud:track-set-debugger "jdb")
- (if realgud:jdb-track-mode
- (progn
- (realgud-track-mode-setup 't)
- (realgud:jdb-track-mode-hook))
- (progn
- (setq realgud-track-mode nil)
- ))
-)
-
-(provide-me "realgud:jdb-")
diff --git a/realgud/debugger/nodejs/Makefile.am
b/realgud/debugger/nodejs/Makefile.am
deleted file mode 100644
index e6c68b4..0000000
--- a/realgud/debugger/nodejs/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../common.mk
-
-lisp_files = $(wildcard *.el)
-lisp_LISP = $(lisp_files)
-EXTRA_DIST = $(lisp_files)
diff --git a/realgud/debugger/nodejs/core.el b/realgud/debugger/nodejs/core.el
deleted file mode 100644
index c60af97..0000000
--- a/realgud/debugger/nodejs/core.el
+++ /dev/null
@@ -1,166 +0,0 @@
-;; Copyright (C) 2015-2017 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/>.
-
-(require 'load-relative)
-(require-relative-list '("../../common/track" "../../common/core")
- "realgud-")
-(require-relative-list '("init") "realgud:nodejs-")
-
-(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:nodejs-minibuffer-history nil
- "minibuffer history list for the command `nodejs'.")
-
-(easy-mmode-defmap realgud:nodejs-minibuffer-local-map
- '(("\C-i" . comint-dynamic-complete-filename))
- "Keymap for minibuffer prompting of nodejs 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 nodejs-query-cmdline (&optional opt-debugger)
- (realgud-query-cmdline
- 'realgud:nodejs-suggest-invocation
- realgud:nodejs-minibuffer-local-map
- 'realgud:nodejs-minibuffer-history
- opt-debugger))
-
-;;; FIXME: DRY this with other *-parse-cmd-args routines
-(defun nodejs-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. nodejs) 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 nodejs ./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 nodejs-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.
- (nodejs-two-args '("-debugger_port"))
- (nodejs-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 "nodejs" (or "nodemon" or "node") from invocation like:
- ;; nodejs --nodejs-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 `nodejs'"
- 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 nodejs-two-args nodejs-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:nodejs-command-name)
-
-(defun realgud:nodejs-suggest-invocation (debugger-name)
- "Suggest a nodejs command invocation via `realgud-suggest-invocaton'"
- (realgud-suggest-invocation realgud:nodejs-command-name
- realgud:nodejs-minibuffer-history
- "js" "\\.js$"))
-
-(defun realgud:nodejs-remove-ansi-shmutz()
- "Remove ASCII escape sequences that node.js 'decorates' in
-prompts and interactive output with"
- (add-to-list
- 'comint-preoutput-filter-functions
- (lambda (output)
- (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
- )
-
-(defun realgud:nodejs-reset ()
- "Nodejs cleanup - remove debugger's internal buffers (frame,
-breakpoints, etc.)."
- (interactive)
- ;; (nodejs-breakpoint-remove-all-icons)
- (dolist (buffer (buffer-list))
- (when (string-match "\\*nodejs-[a-z]+\\*" (buffer-name buffer))
- (let ((w (get-buffer-window buffer)))
- (when w
- (delete-window w)))
- (kill-buffer buffer))))
-
-;; (defun nodejs-reset-keymaps()
-;; "This unbinds the special debugger keys of the source buffers."
-;; (interactive)
-;; (setcdr (assq 'nodejs-debugger-support-minor-mode minor-mode-map-alist)
-;; nodejs-debugger-support-minor-mode-map-when-deactive))
-
-
-(defun realgud:nodejs-customize ()
- "Use `customize' to edit the settings of the `nodejs' debugger."
- (interactive)
- (customize-group 'realgud:nodejs))
-
-(provide-me "realgud:nodejs-")
diff --git a/realgud/debugger/nodejs/init.el b/realgud/debugger/nodejs/init.el
deleted file mode 100644
index 915b43f..0000000
--- a/realgud/debugger/nodejs/init.el
+++ /dev/null
@@ -1,185 +0,0 @@
-;; Copyright (C) 2015-2016, 2018 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/>.
-
-;;; "node debug" debugger
-
-;;; Note: this code is obsolete. FIXME: Move into another repository
-;;; Regular expressions for nodejs Javascript debugger.
-
-(eval-when-compile (require 'cl-lib)) ;For setf.
-
-(require 'load-relative)
-(require-relative-list '("../../common/regexp"
- "../../common/loc"
- "../../common/init")
- "realgud-")
-(require-relative-list '("../../lang/js") "realgud-lang-")
-
-(defvar realgud:nodejs-pat-hash)
-(declare-function make-realgud-loc-pat 'realgud-regexp)
-
-(defvar realgud:nodejs-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:nodejs-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:nodejs-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "^\\(?:%s\\)*debug> " realgud:js-term-escape)
- ))
-
-;; Regular expression that describes a "breakpoint set" line
-;;
-;; (setf (gethash "brkpt-set" realgud:nodejs-pat-hash)
-;; (make-realgud-loc-pat
-;; :regexp "^[*] \\([0-9]+\\) "
-;; :line-group 1))
-
-;; 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:nodejs-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:nodejs-pat-hash)
- (make-realgud-loc-pat
- :regexp (format "^Removed %s breakpoint(s).\n"
- realgud:regexp-captured-num)
- :num 1))
-
-
-(defconst realgud:nodejs-frame-start-regexp "\\(?:^\\|\n\\)\\(?:#\\)")
-(defconst realgud:nodejs-frame-num-regexp realgud:regexp-captured-num)
-(defconst realgud:nodejs-frame-module-regexp "[^ \t\n]+")
-(defconst realgud:nodejs-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:nodejs-pat-hash)
- (make-realgud-loc-pat
- :regexp (concat realgud:nodejs-frame-start-regexp
- realgud:nodejs-frame-num-regexp " "
- "\\(?:" realgud:nodejs-frame-module-regexp " \\)?"
- "\\(" realgud:nodejs-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:nodejs-debugger-name "nodejs" "Name of debugger")
-
-;; ;; Regular expression that for a termination message.
-;; (setf (gethash "termination" realgud:nodejs-pat-hash)
-;; "^nodejs: That's all, folks...\n")
-
-(setf (gethash "font-lock-keywords" realgud:nodejs-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 realgud:nodejs-debugger-name realgud-pat-hash)
- realgud:nodejs-pat-hash)
-
-;; Prefix used in variable names (e.g. short-key-mode-map) for
-;; this debugger
-
-(setf (gethash "nodejs" realgud:variable-basename-hash)
- "nodejs")
-
-(defvar realgud:nodejs-command-hash (make-hash-table :test 'equal)
- "Hash key is command name like 'finish' and the value is
- the nodejs command to use, like 'out'")
-
-(setf (gethash realgud:nodejs-debugger-name
- realgud-command-hash)
- realgud:nodejs-command-hash)
-
-(setf (gethash "backtrace" realgud:nodejs-command-hash) "backtrace")
-(setf (gethash "break" realgud:nodejs-command-hash)
- "setBreakpoint('%X',%l)")
-(setf (gethash "continue" realgud:nodejs-command-hash) "cont")
-(setf (gethash "quit" realgud:nodejs-command-hash) "quit")
-(setf (gethash "finish" realgud:nodejs-command-hash) "out")
-(setf (gethash "shell" realgud:nodejs-command-hash) "repl")
-(setf (gethash "eval" realgud:nodejs-command-hash) "exec(%q)")
-
-;; We need aliases for step and next because the default would
-;; do step 1 and nodejs doesn't handle this. And if it did,
-;; it would probably look like step(1).
-(setf (gethash "step" realgud:nodejs-command-hash) "step")
-(setf (gethash "next" realgud:nodejs-command-hash) "next")
-
-;; Unsupported features:
-(setf (gethash "jump" realgud:nodejs-command-hash) "*not-implemented*")
-(setf (gethash "up" realgud:nodejs-command-hash) "*not-implemented*")
-(setf (gethash "down" realgud:nodejs-command-hash) "*not-implemented*")
-(setf (gethash "frame" realgud:nodejs-command-hash) "*not-implemented*")
-
-
-(provide-me "realgud:nodejs-")
diff --git a/realgud/debugger/nodejs/nodejs.el
b/realgud/debugger/nodejs/nodejs.el
deleted file mode 100644
index 055d004..0000000
--- a/realgud/debugger/nodejs/nodejs.el
+++ /dev/null
@@ -1,87 +0,0 @@
-;; Copyright (C) 2014-2016, 2018 Free Software Foundation, Inc
-
-;; Author: 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.
-
-;; `nodejs' Main interface to nodejs debugger via Emacs
-(require 'load-relative)
-(require-relative-list '("../../common/helper") "realgud-")
-(require-relative-list '("../../common/run") "realgud:")
-(require-relative-list '("core" "track-mode") "realgud:nodejs-")
-(require-relative-list '("../../lang/js") "realgud-lang-")
-
-(declare-function realgud:run-debugger 'realgud:run)
-
-;; 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:nodejs nil
- "The realgud interface to the nodejs debugger"
- :group 'realgud
- :version "24.3")
-
-;; -------------------------------------------------------------------
-;; User-definable variables
-;;
-
-(defcustom realgud:nodejs-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:nodejs)
-
-;; -------------------------------------------------------------------
-;; The end.
-;;
-
-(declare-function nodejs-track-mode 'realgud-nodejs-track-mode)
-(declare-function nodejs-query-cmdline 'realgud:nodejs-core)
-(declare-function nodejs-parse-cmd-args 'realgud:nodejs-core)
-
-;;;###autoload
-(defun realgud:nodejs (&optional opt-cmd-line no-reset)
- "Invoke the nodejs shell debugger and start the Emacs user interface.
-
-String OPT-CMD-LINE specifies how to run nodejs.
-
-OPT-CMD-LINE is treated like a shell string; arguments are
-tokenized by `split-string-and-unquote'. The tokenized string is
-parsed by `nodejs-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 "nodejs"
- 'nodejs-query-cmdline 'nodejs-parse-cmd-args
- 'realgud:nodejs-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)
- ;; )
- ;; )
- ))
-
-;; Note: There is already a nodejs command in `nodejs-repl'.
-
-;;;###autoload
-(defalias 'realgud:node-debug 'realgud:nodejs)
-
-;;;###autoload
-(defalias 'node-debug 'realgud:nodejs)
-
-(provide-me "realgud-")
diff --git a/realgud/debugger/nodejs/track-mode.el
b/realgud/debugger/nodejs/track-mode.el
deleted file mode 100644
index 2c4c88c..0000000
--- a/realgud/debugger/nodejs/track-mode.el
+++ /dev/null
@@ -1,90 +0,0 @@
-;; Copyright (C) 2015-2016 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/>.
-;;; nodejs tracking a comint buffer.
-
-(require 'load-relative)
-(require-relative-list '(
- "../../common/cmds"
- "../../common/menu"
- "../../common/track"
- "../../common/track-mode"
- "../../common/utils"
- )
- "realgud-")
-(require-relative-list '("core" "init") "realgud:nodejs-")
-;; (require-relative-list '("../../lang/js") "realgud-lang-")
-
-(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)
-
-(realgud-track-mode-vars "nodejs")
-
-(declare-function realgud-track-mode(bool))
-
-(defun nodejs-track-mode-hook()
- (if nodejs-track-mode
- (progn
- (use-local-map nodejs-track-mode-map)
- (realgud:remove-ansi-schmutz)
- (message "using nodejs mode map")
- )
- (message "nodejs track-mode-hook disable called"))
-)
-
-(define-minor-mode nodejs-track-mode
- "Minor mode for tracking nodejs source locations inside a nodejs 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.
-
-\\{nodejs-track-mode-map}"
- :init-value nil
- ;; :lighter " nodejs" ;; mode-line indicator from realgud-track is
sufficient.
- ;; The minor mode bindings.
- :global nil
- :group 'realgud:nodejs
-
- :keymap nodejs-track-mode-map
-
- (realgud:track-set-debugger "nodejs")
- (realgud:nodejs-track-mode-internal)
-)
-
-(defun realgud:nodejs-track-mode-internal (&optional arg)
- (realgud:track-set-debugger "nodejs")
- (if nodejs-track-mode
- (progn
- (realgud-track-mode-setup 't)
- (nodejs-track-mode-hook))
- (progn
- (setq realgud-track-mode nil)
- ))
- )
-
-;; ;; Debugger commands that nodejs doesn't have
-;; (define-key nodejs-track-mode-map
-;; [remap realgud:cmd-newer-frame] 'undefined)
-;; (define-key nodejs-track-mode-map
-;; [remap realgud:cmd-older-frame] 'undefined)
-(define-key nodejs-short-key-mode-map
- [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
-(define-key nodejs-short-key-mode-map
- [remap realgud:cmd-step] 'realgud:cmd-step-no-arg)
-(define-key nodejs-short-key-mode-map
- [remap realgud:cmd-next] 'realgud:cmd-next-no-arg)
-
-(provide-me "realgud:nodejs-")