Consolidate settings

Deprecate evil-collection-settings-setup-debugger-keys.
This commit is contained in:
James Nguyen 2019-05-02 18:36:16 -07:00
parent d165a975a4
commit afe6aeb479
4 changed files with 21 additions and 5 deletions

View File

@ -30,7 +30,6 @@
(require 'cl-lib)
(require 'cider nil t)
(require 'evil-collection)
(require 'evil-collection-settings)
(declare-function cider-debug-mode-send-reply "cider-debug")
@ -89,7 +88,7 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
(with-eval-after-load 'cider-eval-sexp-fu
(advice-add 'cider-esf--bounds-of-last-sexp :around 'evil-collection-cider-last-sexp)))
(when evil-collection-settings-setup-debugger-keys
(when evil-collection-setup-debugger-keys
(add-hook 'cider-mode-hook #'evil-normalize-keymaps)
(add-hook 'cider--debug-mode-hook #'evil-normalize-keymaps)
(evil-collection-define-key 'normal 'cider-mode-map

View File

@ -28,7 +28,6 @@
;;; Code:
(require 'evil-collection)
(require 'evil-collection-settings)
(require 'indium nil t)
(defconst evil-collection-indium-maps '(indium-debugger-mode-map
@ -41,7 +40,7 @@
;;;###autoload
(defun evil-collection-indium-setup ()
"Set up `evil' bindings for `indium'."
(when evil-collection-settings-setup-debugger-keys
(when evil-collection-setup-debugger-keys
(evil-collection-define-key 'normal 'indium-debugger-mode-map
"n" 'indium-debugger-step-over
"i" 'indium-debugger-step-into
@ -90,7 +89,7 @@
"gr" 'indium-update-script-source
"gz" 'indium-switch-to-repl-buffer)
(when evil-collection-settings-setup-debugger-keys
(when evil-collection-setup-debugger-keys
(evil-collection-define-key 'normal 'indium-interaction-mode-map
[left-fringe mouse-1] 'indium-mouse-toggle-breakpoint
[left-margin mouse-1] 'indium-mouse-toggle-breakpoint

View File

@ -28,6 +28,11 @@
(require 'evil-collection)
;;; Code:
(make-obsolete-variable
'evil-collection-settings-setup-debugger-keys
'evil-collection-setup-debugger-keys "2019/05/02")
(defcustom evil-collection-settings-setup-debugger-keys t
"Whether to bind debugger keys when debugger is active.

View File

@ -89,6 +89,19 @@ See https://github.com/emacs-evil/evil-collection/issues/60 for more details.")
:type 'boolean
:group 'evil-collection)
(defcustom evil-collection-setup-debugger-keys t
"Whether to bind debugger keys when debugger is active.
Debugger in this case is dependent on mode.
This is only relevant for debug modes that are part of another mode,
e.g. `indium'. Modes like `edebug' or `realgud' needs to be explicitly disabled
through removing their entry from `evil-collection-mode-list'."
:type 'boolean
:group 'evil-collection)
(defcustom evil-collection-mode-list
`(ag
alchemist