diff options
| author | Lars Ingebrigtsen | 2021-12-04 21:44:58 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-12-04 22:49:44 +0100 |
| commit | ae415e79714eecaf2bd32059df9dc223db1adb7d (patch) | |
| tree | bdb932a2bc6fbfe0cd33173aef9eb4b5ed63d0ff | |
| parent | 2898566fa0db33804cde57a34475e4c32f2f9bf2 (diff) | |
| download | emacs-ae415e79714eecaf2bd32059df9dc223db1adb7d.tar.gz emacs-ae415e79714eecaf2bd32059df9dc223db1adb7d.zip | |
Avoid having gud bug out if `C-x C-a' has been bound
* lisp/progmodes/gdb-mi.el (gud-global-map): Use gud-global-map.
* lisp/progmodes/gud.el (gud-global-map): Define a map instead of
assuming that `C-x C-a' is undefined (bug#6035).
(gud-def): Use the map.
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index cf1d62d3695..409ff940d96 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1266,7 +1266,7 @@ Used by Speedbar." | |||
| 1266 | :version "22.1") | 1266 | :version "22.1") |
| 1267 | 1267 | ||
| 1268 | (define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch) | 1268 | (define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch) |
| 1269 | (define-key global-map (vconcat gud-key-prefix "\C-w") 'gud-watch) | 1269 | (keymap-set gud-global-map "C-w" 'gud-watch) |
| 1270 | 1270 | ||
| 1271 | (declare-function tooltip-identifier-from-point "tooltip" (point)) | 1271 | (declare-function tooltip-identifier-from-point "tooltip" (point)) |
| 1272 | 1272 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 9b884c4ff80..d5bd2655174 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -90,8 +90,10 @@ pdb (Python), and jdb." | |||
| 90 | "Prefix of all GUD commands valid in C buffers." | 90 | "Prefix of all GUD commands valid in C buffers." |
| 91 | :type 'key-sequence) | 91 | :type 'key-sequence) |
| 92 | 92 | ||
| 93 | (global-set-key (vconcat gud-key-prefix "\C-l") #'gud-refresh) | 93 | (defvar-keymap gud-global-map |
| 94 | ;; (define-key ctl-x-map " " 'gud-break); backward compatibility hack | 94 | "C-l" #'gud-refresh) |
| 95 | |||
| 96 | (global-set-key gud-key-prefix gud-global-map) | ||
| 95 | 97 | ||
| 96 | (defvar gud-marker-filter nil) | 98 | (defvar gud-marker-filter nil) |
| 97 | (put 'gud-marker-filter 'permanent-local t) | 99 | (put 'gud-marker-filter 'permanent-local t) |
| @@ -433,7 +435,7 @@ we're in the GUD buffer)." | |||
| 433 | ;; Unused lexical warning if cmd does not use "arg". | 435 | ;; Unused lexical warning if cmd does not use "arg". |
| 434 | cmd)))) | 436 | cmd)))) |
| 435 | ,(if key `(local-set-key ,(concat "\C-c" key) #',func)) | 437 | ,(if key `(local-set-key ,(concat "\C-c" key) #',func)) |
| 436 | ,(if key `(global-set-key (vconcat gud-key-prefix ,key) #',func)))) | 438 | ,(if key `(define-key gud-global-map ,key #',func)))) |
| 437 | 439 | ||
| 438 | ;; Where gud-display-frame should put the debugging arrow; a cons of | 440 | ;; Where gud-display-frame should put the debugging arrow; a cons of |
| 439 | ;; (filename . line-number). This is set by the marker-filter, which scans | 441 | ;; (filename . line-number). This is set by the marker-filter, which scans |