emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ae415e7: Avoid having gud bug out if `C-x C-a' has been bound


From: Lars Ingebrigtsen
Subject: master ae415e7: Avoid having gud bug out if `C-x C-a' has been bound
Date: Sat, 4 Dec 2021 16:50:00 -0500 (EST)

branch: master
commit ae415e79714eecaf2bd32059df9dc223db1adb7d
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/progmodes/gdb-mi.el | 2 +-
 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 cf1d62d..409ff94 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1266,7 +1266,7 @@ Used by Speedbar."
   :version "22.1")
 
 (define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch)
-(define-key global-map (vconcat gud-key-prefix "\C-w") 'gud-watch)
+(keymap-set gud-global-map "C-w" 'gud-watch)
 
 (declare-function tooltip-identifier-from-point "tooltip" (point))
 
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 9b884c4..d5bd265 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -90,8 +90,10 @@ pdb (Python), and jdb."
   "Prefix of all GUD commands valid in C buffers."
   :type 'key-sequence)
 
-(global-set-key (vconcat gud-key-prefix "\C-l") #'gud-refresh)
-;; (define-key ctl-x-map " " 'gud-break); backward compatibility hack
+(defvar-keymap gud-global-map
+  "C-l" #'gud-refresh)
+
+(global-set-key gud-key-prefix gud-global-map)
 
 (defvar gud-marker-filter nil)
 (put 'gud-marker-filter 'permanent-local t)
@@ -433,7 +435,7 @@ we're in the GUD buffer)."
            ;; Unused lexical warning if cmd does not use "arg".
            cmd))))
      ,(if key `(local-set-key ,(concat "\C-c" key) #',func))
-     ,(if key `(global-set-key (vconcat gud-key-prefix ,key) #',func))))
+     ,(if key `(define-key gud-global-map ,key #',func))))
 
 ;; Where gud-display-frame should put the debugging arrow; a cons of
 ;; (filename . line-number).  This is set by the marker-filter, which scans



reply via email to

[Prev in Thread] Current Thread [Next in Thread]