branch: externals/inspector
commit c125f45645bc0fde76145867fb32f2080fd70cea
Author: Mariano Montone <[email protected]>
Commit: Mariano Montone <[email protected]>

    Add key bindings to debug maps only if they are not taken already
---
 inspector.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/inspector.el b/inspector.el
index ebf9d378d0..dbbc49fb50 100644
--- a/inspector.el
+++ b/inspector.el
@@ -676,6 +676,10 @@ When PRESERVE-HISTORY is T, inspector history is not 
cleared."
     (inspector-inspect (list :frame frame
                              :locals (inspector--alist-to-plist locals)))))
 
+;; Press letter 'i' in debugger backtrace to inspect locals.
+(when (not (keymap-lookup debugger-mode-map "i"))
+  (keymap-set debugger-mode-map "i" #'inspect-debugger-frame-and-locals))
+
 ;; ----- edebug-mode---------------------------------------
 
 ;;;###autoload
@@ -684,10 +688,10 @@ When PRESERVE-HISTORY is T, inspector history is not 
cleared."
   (interactive "xInspect edebug expression: " edebug-mode)
   (inspector-inspect (edebug-eval expr)))
 
-;;--------- Inspector mode ---------------------------------
+(when (not (keymap-lookup edebug-mode-map "C-c C-i"))
+  (keymap-set edebug-mode-map "C-c C-i" #'inspect-edebug-expression))
 
-;; Press letter 'i' in debugger backtrace to inspect locals.
-(keymap-set debugger-mode-map (kbd "i") #'inspect-debugger-frame-and-locals)
+;;--------- Inspector mode ---------------------------------
 
 (defvar inspector-mode-map
   (let ((map (make-keymap)))

Reply via email to