Make edebug-mode-map take precedence

* lisp/emacs-lisp/edebug.el (edebug--recursive-edit): Bind
minor-mode-overriding-map-alist to avoid other minor modes hiding the
edebug commands (bug#11018).
This commit is contained in:
Lars Ingebrigtsen 2019-10-20 17:07:01 +02:00
parent 270ca8c273
commit cd4f707a98

View file

@ -2856,6 +2856,8 @@ See `edebug-behavior-alist' for implementations.")
(defvar edebug-inside-windows)
(defvar edebug-interactive-p)
(defvar edebug-mode-map) ; will be defined fully later.
(defun edebug--recursive-edit (arg-mode)
;; Start up a recursive edit inside of edebug.
;; The current buffer is the edebug-buffer, which is put into edebug-mode.
@ -2902,6 +2904,10 @@ See `edebug-behavior-alist' for implementations.")
;; Don't get confused by the user's keymap changes.
(overriding-local-map nil)
(overriding-terminal-local-map nil)
;; Override other minor modes that may bind the keys
;; edebug uses.
(minor-mode-overriding-map-alist
(list (cons 'edebug-mode edebug-mode-map)))
;; Bind again to outside values.
(debug-on-error edebug-outside-debug-on-error)
@ -3561,8 +3567,6 @@ This is useful for exiting even if `unwind-protect' code may be executed."
(edebug-Go-nonstop-mode . Go-nonstop))
"Association list between commands and the modes they set.")
(defvar edebug-mode-map) ; will be defined fully later.
(defun edebug-set-initial-mode ()
"Set the initial execution mode of Edebug.
The mode is requested via the key that would be used to set the mode in