branch: master
commit a02f3cdda61d42f81e965d7c2d4e8ff68ceaaeab
Author: rocky <[email protected]>
Commit: rocky <[email protected]>
Bind RET in shortkey to repeat-last; add FSF (C)
---
realgud/common/buffer/backtrace.el | 27 ++++++++++++++++++++++++---
realgud/common/cmds.el | 12 +++++++++---
realgud/common/eval.el | 9 +++++++--
realgud/common/key.el | 27 ++++++++++++++++++++++++++-
4 files changed, 66 insertions(+), 9 deletions(-)
diff --git a/realgud/common/buffer/backtrace.el
b/realgud/common/buffer/backtrace.el
index 7eb11bd..08a3faa 100644
--- a/realgud/common/buffer/backtrace.el
+++ b/realgud/common/buffer/backtrace.el
@@ -1,5 +1,27 @@
;;; Backtrace buffer
-;;; Copyright (C) 2010-2015 Rocky Bernstein <[email protected]>
+
+;; Author: Rocky Bernstein <[email protected]>
+;; Version: 1.1
+;; Keywords: internal
+;; URL: http://github.com/rocky/emacs-load-relative
+;; Compatibility: GNU Emacs 24.x
+
+;; Copyright (C) 2015 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/>.
+
(require 'load-relative)
(eval-when-compile (require 'cl-lib))
(require-relative-list
@@ -28,8 +50,7 @@
(declare-function realgud:cmd-frame 'realgud-buffer-command)
(declare-function realgud-get-cmdbuf(&optional opt-buffer))
-(declare-function realgud-command (fmt &optional arg no-record?
- frame-switch? realgud-prompts?))
+(declare-function realgud-command 'realgud-send)
(make-variable-buffer-local (defvar realgud-backtrace-info))
diff --git a/realgud/common/cmds.el b/realgud/common/cmds.el
index 49a546b..9ecc759 100644
--- a/realgud/common/cmds.el
+++ b/realgud/common/cmds.el
@@ -7,7 +7,7 @@
(declare-function buffer-killed? 'helper)
(declare-function realgud-cmdbuf-info-in-srcbuf?= 'realgud-buffer-command)
(declare-function realgud-cmdbuf? 'realgud-buffer-command)
-(declare-function realgud-command 'realgud-cmd)
+(declare-function realgud-command 'realgud-send)
(declare-function realgud-get-cmdbuf 'realgud-buffer-helper)
(declare-function realgud-get-command 'realgud-buffer-command)
(declare-function realgud-get-bpnum-from-line-num 'realgud-buffer-source)
@@ -170,15 +170,21 @@ With a numeric argument move that many levels back."
(realgud:cmd-remap arg "up" "up %p" ">" t t)
)
+(defun realgud:cmd-repeat-last(&optional arg)
+ "Repeat the last command (or generally what <enter> does."
+ (interactive "")
+ (realgud:cmd-remap arg "repeat-last" "\n" "." 't nil 't)
+)
+
(defun realgud:cmd-restart(&optional arg)
"Restart execution."
- (interactive "MRestart args: ")
+ (interactive "")
(realgud:cmd-remap arg "restart" "run" "R" 't nil 't)
)
(defun realgud:cmd-shell(&optional arg)
"Restart execution."
- (interactive "p")
+ (interactive "")
(realgud:cmd-remap arg "shell" "shell" "S")
)
diff --git a/realgud/common/eval.el b/realgud/common/eval.el
index 0137941..0d8ebb0 100644
--- a/realgud/common/eval.el
+++ b/realgud/common/eval.el
@@ -1,7 +1,12 @@
;; show expressions using tooltip
-;; Copyright (C) 2015 Free Software Foundation, Inc
;; Author: Rocky Bernstein <[email protected]>
+;; Version: 1.1
+;; Keywords: internal
+;; URL: http://github.com/rocky/emacs-load-relative
+;; Compatibility: GNU Emacs 24.x
+
+;; Copyright (C) 2015 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
@@ -26,7 +31,7 @@
(declare-function realgud:cmd-eval 'realgud-cmd)
(declare-function realgud-get-cmdbuf 'realgud-helper)
-(declare-function realgud-cmdbuf-pat 'realgud-command)
+(declare-function realgud-cmdbuf-pat 'realgud-send)
(declare-function realgud:strip 'realgud-utils)
(defun realgud:tooltip-eval (event)
diff --git a/realgud/common/key.el b/realgud/common/key.el
index 75e7797..e166881 100644
--- a/realgud/common/key.el
+++ b/realgud/common/key.el
@@ -1,4 +1,27 @@
-;;; Copyright (C) 2010-2011, 2014-2015 Rocky Bernstein <[email protected]>
+;; Author: Rocky Bernstein <[email protected]>
+;; Version: 1.1
+;; Keywords: internal
+;; URL: http://github.com/rocky/emacs-load-relative
+;; Compatibility: GNU Emacs 24.x
+
+;; Copyright (C) 2015 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/>.
+
+(provide 'key)
+;;; key.el ends here
+
(require 'load-relative)
(require-relative "custom" nil "realgud-")
@@ -83,6 +106,8 @@ Nor does it touch prefix keys; for that see
`realgud-populate-keys-standard'"
(define-key map "b" 'realgud:cmd-break)
(define-key map "D" 'realgud:cmd-delete)
(define-key map [delete] 'realgud:cmd-delete)
+ (define-key map [enter] 'realgud:cmd-repeat-last)
+ (define-key map (kbd "RET") 'realgud:cmd-repeat-last)
(define-key map " " 'realgud:cmd-step)
(define-key map "f" 'realgud:cmd-finish)
(define-key map "n" 'realgud:cmd-next)