Skip to content

Commit 9b1bfd9

Browse files
committed
Lower the priority of normal keymap and remove some shims
1 parent 36c86fb commit 9b1bfd9

File tree

2 files changed

+3
-116
lines changed

2 files changed

+3
-116
lines changed

meow-core.el

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ there's no chance for meow to call an init function."
185185
;; raise Meow keymap priority
186186
(add-to-ordered-list 'emulation-mode-map-alists
187187
`((meow-motion-mode . ,meow-motion-state-keymap)))
188-
(add-to-ordered-list 'emulation-mode-map-alists
189-
`((meow-normal-mode . ,meow-normal-state-keymap)))
190188
(add-to-ordered-list 'emulation-mode-map-alists
191189
`((meow-keypad-mode . ,meow-keypad-state-keymap)))
192190
(add-to-ordered-list 'emulation-mode-map-alists

meow-shims.el

Lines changed: 3 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -82,51 +82,7 @@ Argument ENABLE non-nill means turn on."
8282
(apply #'eldoc-remove-command meow--eldoc-commands)))
8383

8484
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
85-
;; company
86-
87-
(defvar meow--company-setup nil
88-
"Whether already setup company.")
89-
90-
(declare-function company--active-p "company")
91-
(declare-function company-abort "company")
92-
93-
(defvar company-candidates)
94-
95-
(defun meow--company-maybe-abort-advice ()
96-
"Adviced for `meow-insert-exit'."
97-
(when company-candidates
98-
(company-abort)))
99-
100-
(defun meow--setup-company (enable)
101-
"Setup for company.
102-
Argument ENABLE non-nil means turn on."
103-
(setq meow--company-setup enable)
104-
(if enable
105-
(add-hook 'meow-insert-exit-hook #'meow--company-maybe-abort-advice)
106-
(remove-hook 'meow-insert-exit-hook #'meow--company-maybe-abort-advice)))
107-
108-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
109-
;; corfu
110-
111-
(declare-function corfu-quit "corfu")
112-
113-
(defvar meow--corfu-setup nil
114-
"Whether already setup corfu.")
115-
116-
(defun meow--corfu-maybe-abort-advice ()
117-
"Adviced for `meow-insert-exit'."
118-
(when (bound-and-true-p corfu-mode) (corfu-quit)))
119-
120-
(defun meow--setup-corfu (enable)
121-
"Setup for corfu.
122-
Argument ENABLE non-nil means turn on."
123-
(setq meow--corfu-setup enable)
124-
(if enable
125-
(add-hook 'meow-insert-exit-hook #'meow--corfu-maybe-abort-advice)
126-
(remove-hook 'meow-insert-exit-hook #'meow--corfu-maybe-abort-advice)))
127-
128-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
129-
;; repeat-map
85+
;; diff-hl
13086

13187
(defvar meow--diff-hl-setup nil
13288
"Whether already setup diff-hl.")
@@ -215,63 +171,6 @@ Argument ENABLE non-nil means turn on."
215171
(add-hook 'rectangle-mark-mode-hook 'meow--rectangle-mark-init)
216172
(remove-hook 'rectangle-mark-mode-hook 'meow--rectangle-mark-init)))
217173

218-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
219-
;; edebug
220-
221-
(defvar meow--edebug-setup nil)
222-
223-
(defun meow--edebug-hook-function ()
224-
"Switch meow state when entering/leaving edebug."
225-
(if (bound-and-true-p edebug-mode)
226-
(meow--switch-to-motion)
227-
(meow--switch-to-normal)))
228-
229-
(defun meow--setup-edebug (enable)
230-
"Setup edebug.
231-
Argument ENABLE non-nil means turn on."
232-
(setq meow--edebug-setup enable)
233-
(if enable
234-
(add-hook 'edebug-mode-hook 'meow--edebug-hook-function)
235-
(remove-hook 'edebug-mode-hook 'meow--edebug-hook-function)))
236-
237-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
238-
;; magit
239-
240-
(defvar meow--magit-setup nil)
241-
242-
(defun meow--magit-blame-hook-function ()
243-
"Switch meow state when entering/leaving magit-blame-read-only-mode."
244-
(if (bound-and-true-p magit-blame-read-only-mode)
245-
(meow--switch-to-motion)
246-
(meow--switch-to-normal)))
247-
248-
(defun meow--setup-magit (enable)
249-
"Setup magit.
250-
Argument ENABLE non-nil means turn on."
251-
(setq meow--magit-setup enable)
252-
(if enable
253-
(add-hook 'magit-blame-mode-hook 'meow--magit-blame-hook-function)
254-
(remove-hook 'magit-blame-mode-hook 'meow--magit-blame-hook-function)))
255-
256-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
257-
;; cider (debug)
258-
259-
(defvar meow--cider-setup nil)
260-
261-
(defun meow--cider-debug-hook-function ()
262-
"Switch meow state when entering/leaving cider debug."
263-
(if (bound-and-true-p cider--debug-mode)
264-
(meow--switch-to-motion)
265-
(meow--switch-to-normal)))
266-
267-
(defun meow--setup-cider (enable)
268-
"Setup cider.
269-
Argument ENABLE non-nil means turn on."
270-
(setq meow--cider-setup enable)
271-
(if enable
272-
(add-hook 'cider--debug-mode-hook 'meow--cider-debug-hook-function)
273-
(remove-hook 'cider--debug-mode-hook 'meow--cider-debug-hook-function)))
274-
275174
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
276175
;; sly (db)
277176

@@ -482,18 +381,13 @@ Argument ENABLE non-nil means turn on."
482381

483382
(eval-after-load "macrostep" (lambda () (meow--setup-macrostep t)))
484383
(eval-after-load "wdired" (lambda () (meow--setup-wdired t)))
485-
(eval-after-load "edebug" (lambda () (meow--setup-edebug t)))
486-
(eval-after-load "magit" (lambda () (meow--setup-magit t)))
487384
(eval-after-load "wgrep" (lambda () (meow--setup-wgrep t)))
488-
(eval-after-load "company" (lambda () (meow--setup-company t)))
489-
(eval-after-load "corfu" (lambda () (meow--setup-corfu t)))
490385
(eval-after-load "polymode" (lambda () (meow--setup-polymode t)))
491-
(eval-after-load "cider" (lambda () (meow--setup-cider t)))
492386
(eval-after-load "sly" (lambda () (meow--setup-sly t)))
493387
(eval-after-load "realgud" (lambda () (meow--setup-realgud t)))
494388
(eval-after-load "which-key" (lambda () (meow--setup-which-key t)))
495389
(eval-after-load "undo-tree" (lambda () (meow--setup-undo-tree t)))
496-
(eval-after-load "diff-hl" (lambda () (meow--setup-diff-hl t)))
390+
;; (eval-after-load "diff-hl" (lambda () (meow--setup-diff-hl t)))
497391
(eval-after-load "quail" (lambda () (meow--setup-input-method t)))
498392
(eval-after-load "skk" (lambda () (meow--setup-ddskk t))))
499393

@@ -504,15 +398,10 @@ Argument ENABLE non-nil means turn on."
504398
(when meow--eldoc-setup (meow--setup-eldoc nil))
505399
(when meow--rectangle-mark-setup (meow--setup-rectangle-mark nil))
506400
(when meow--wdired-setup (meow--setup-wdired nil))
507-
(when meow--edebug-setup (meow--setup-edebug nil))
508-
(when meow--magit-setup (meow--setup-magit nil))
509-
(when meow--company-setup (meow--setup-company nil))
510-
(when meow--corfu-setup (meow--setup-corfu nil))
511401
(when meow--wgrep-setup (meow--setup-wgrep nil))
512402
(when meow--polymode-setup (meow--setup-polymode nil))
513-
(when meow--cider-setup (meow--setup-cider nil))
514403
(when meow--which-key-setup (meow--setup-which-key nil))
515-
(when meow--diff-hl-setup (meow--setup-diff-hl nil))
404+
;; (when meow--diff-hl-setup (meow--setup-diff-hl nil))
516405
(when meow--input-method-setup (meow--setup-input-method nil))
517406
(when meow--ddskk-setup (meow--setup-ddskk nil)))
518407

0 commit comments

Comments
 (0)