branch: externals/realgud commit df03ba5e6b43bed794b422afa050268c4247871c Merge: 59b2563 1180d9f Author: R. Bernstein <ro...@users.noreply.github.com> Commit: GitHub <nore...@github.com>
Merge pull request #195 from jodonnell/eval-at-point add eval at point and bind it to E in shortkey mode --- realgud/common/cmds.el | 5 +++++ realgud/common/shortkey.el | 1 + 2 files changed, 6 insertions(+) diff --git a/realgud/common/cmds.el b/realgud/common/cmds.el index 0696ec9..06a202f 100644 --- a/realgud/common/cmds.el +++ b/realgud/common/cmds.el @@ -288,6 +288,11 @@ EVENT should be a mouse click on the left fringe or margin." #'realgud:cmd-eval-region #'realgud:cmd-eval))) +(defun realgud:cmd-eval-at-point() + "Eval symbol under point." + (interactive) + (realgud:cmd-run-command (thing-at-point 'symbol) "eval")) + (defun realgud:cmd-finish(&optional arg) "Run until the completion of the current stack frame. diff --git a/realgud/common/shortkey.el b/realgud/common/shortkey.el index 43c741f..364bfda 100644 --- a/realgud/common/shortkey.el +++ b/realgud/common/shortkey.el @@ -62,6 +62,7 @@ (define-key map "j" 'realgud:cmd-jump) (define-key map "c" 'realgud:cmd-continue) (define-key map "e" 'realgud:cmd-eval-dwim) + (define-key map "E" 'realgud:cmd-eval-at-point) (define-key map "U" 'realgud:cmd-until) (define-key map [mouse-2] 'realgud:tooltip-eval) (define-key map [left-fringe mouse-1] #'realgud-cmds--mouse-add-remove-bp)