diff options
| author | Juri Linkov | 2021-04-14 21:11:45 +0300 |
|---|---|---|
| committer | Juri Linkov | 2021-04-14 21:11:45 +0300 |
| commit | 94586ba26f8a50441349bf129362afa96b4cd5fe (patch) | |
| tree | 0fb324401f5dfdc2f69b86b2d9ad8b3178e14881 | |
| parent | 8205108217e2ba77b9d0d6176587033d38bbb20b (diff) | |
| download | emacs-94586ba26f8a50441349bf129362afa96b4cd5fe.tar.gz emacs-94586ba26f8a50441349bf129362afa96b4cd5fe.zip | |
* lisp/progmodes/gud.el (gud-repeat-map): New variable (bug#47688).
(gud-gdb): Populate gud-repeat-map with repeating keys.
| -rw-r--r-- | lisp/progmodes/gud.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index b105cbaa0ef..a37477dfa1e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -293,6 +293,10 @@ Used to gray out relevant toolbar icons.") | |||
| 293 | (tool-bar-local-item-from-menu | 293 | (tool-bar-local-item-from-menu |
| 294 | (car x) (cdr x) map gud-minor-mode-map)))) | 294 | (car x) (cdr x) map gud-minor-mode-map)))) |
| 295 | 295 | ||
| 296 | (defvar gud-repeat-map (make-sparse-keymap) | ||
| 297 | "Keymap to repeat gud stepping instructions `C-x C-a C-n n n'. | ||
| 298 | Used in `repeat-mode'.") | ||
| 299 | |||
| 296 | (defun gud-file-name (f) | 300 | (defun gud-file-name (f) |
| 297 | "Transform a relative file name to an absolute file name. | 301 | "Transform a relative file name to an absolute file name. |
| 298 | Uses `gud-<MINOR-MODE>-directories' to find the source files." | 302 | Uses `gud-<MINOR-MODE>-directories' to find the source files." |
| @@ -784,6 +788,17 @@ the buffer in which this command was invoked." | |||
| 784 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") | 788 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") |
| 785 | (gud-def gud-run "run" nil "Run the program.") | 789 | (gud-def gud-run "run" nil "Run the program.") |
| 786 | 790 | ||
| 791 | (dolist (cmd '(("n" . gud-next) | ||
| 792 | ("s" . gud-step) | ||
| 793 | ("i" . gud-stepi) | ||
| 794 | ("c" . gud-cont) | ||
| 795 | ("l" . gud-refresh) | ||
| 796 | ("f" . gud-finish) | ||
| 797 | ("<" . gud-up) | ||
| 798 | (">" . gud-down))) | ||
| 799 | (define-key gud-repeat-map (car cmd) (cdr cmd)) | ||
| 800 | (put (cdr cmd) 'repeat-map 'gud-repeat-map)) | ||
| 801 | |||
| 787 | (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point | 802 | (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point |
| 788 | nil 'local) | 803 | nil 'local) |
| 789 | (setq-local gud-gdb-completion-function 'gud-gdb-completions) | 804 | (setq-local gud-gdb-completion-function 'gud-gdb-completions) |