branch: externals/realgud commit 388a650dccdd532486d71ed04d20e3f1017e5836 Author: rocky <ro...@gnu.org> Commit: rocky <ro...@gnu.org>
Sync with savanah ELPA --- realgud/common/buffer/command.el | 20 +++++++++++++++ realgud/common/track.el | 1 + test/node_modules/gcd.js/gcd.js | 47 ----------------------------------- test/node_modules/gcd.js/package.json | 12 --------- 4 files changed, 21 insertions(+), 59 deletions(-) diff --git a/realgud/common/buffer/command.el b/realgud/common/buffer/command.el index 89659b5..db159f8 100644 --- a/realgud/common/buffer/command.el +++ b/realgud/common/buffer/command.el @@ -33,6 +33,26 @@ ) (require 'cl-lib) +(defface debugger-running + '((((class color) (min-colors 16) (background light)) + (:foreground "Green4" :weight bold)) + (((class color) (min-colors 88) (background dark)) + (:foreground "Green1" :weight bold)) + (((class color) (min-colors 16) (background dark)) + (:foreground "Green" :weight bold)) + (((class color)) (:foreground "green" :weight bold)) + (t (:weight bold))) + "Face used to highlight debugger run information." + :group 'realgud + :version "24.3") + +(defface debugger-not-running + '((t :inherit font-lock-warning-face)) + "Face used when debugger or process is not running." + :group 'realgud + :version "24.3") + + (cl-defstruct realgud-cmdbuf-info "The debugger object/structure specific to a process buffer." debugger-name ;; Name of debugger diff --git a/realgud/common/track.el b/realgud/common/track.el index 73fc0f1..d081449 100644 --- a/realgud/common/track.el +++ b/realgud/common/track.el @@ -594,6 +594,7 @@ of the breakpoints found in command buffer." ; that struct is the regexp hash to match positions. By setting the ; the fields of realgud-cmdbuf-info appropriately we can accomodate a ; family of debuggers -- one at a time -- for the buffer process. + (setq cmdbuf (or cmdbuf (current-buffer))) (with-current-buffer cmdbuf (unless (realgud:track-complain-if-not-in-cmd-buffer cmdbuf t) diff --git a/test/node_modules/gcd.js/gcd.js b/test/node_modules/gcd.js/gcd.js deleted file mode 100644 index 6d7ce32..0000000 --- a/test/node_modules/gcd.js/gcd.js +++ /dev/null @@ -1,47 +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=24; - -ask("GCD of 24 and", /^\d+$/, function(b_str) { - var b = parseInt(b_str, 10); - console.log(util.format("The GCD of %d and %d is %d", a, b, - gcd(a, b))); - process.exit(); -}); diff --git a/test/node_modules/gcd.js/package.json b/test/node_modules/gcd.js/package.json deleted file mode 100644 index 06a4cee..0000000 --- a/test/node_modules/gcd.js/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "emacs-dbgr", - "private": false, - "version": "1.0.0", - "description": "Debugging is going to be realgud.", - "repository": "https://github.com/rocky/emacs-dbgr", - "dependencies": {}, - "devDependencies": {}, - "scripts": { - "start": "node --debug gcd.js" - } -}