Conform nav-flash commands to naming conventions

This commit is contained in:
Henrik Lissner 2017-05-26 11:51:18 +02:00
parent 33a87cec5b
commit 7fc4447ef6
2 changed files with 11 additions and 12 deletions

View file

@ -28,7 +28,7 @@
"M-;" #'eval-expression "M-;" #'eval-expression
"A-;" #'eval-expression "A-;" #'eval-expression
[f9] #'doom/what-face [f9] #'doom/what-face
[f10] #'doom/blink-cursor [f10] #'+doom/blink-cursor
"C-`" #'doom/popup-toggle "C-`" #'doom/popup-toggle
;; Text-scaling ;; Text-scaling
"M-+" (λ! (text-scale-set 0)) "M-+" (λ! (text-scale-set 0))

View file

@ -99,7 +99,7 @@
(def-package! nav-flash (def-package! nav-flash
:commands nav-flash-show :commands nav-flash-show
:init :init
(defun doom*blink-cursor-maybe (orig-fn &rest args) (defun +doom*blink-cursor-maybe (orig-fn &rest args)
"Blink current line if the window has moved." "Blink current line if the window has moved."
(interactive) (interactive)
(let ((point (save-excursion (goto-char (window-start)) (let ((point (save-excursion (goto-char (window-start))
@ -108,9 +108,9 @@
(unless (equal point (unless (equal point
(save-excursion (goto-char (window-start)) (save-excursion (goto-char (window-start))
(point-marker))) (point-marker)))
(doom/blink-cursor)))) (+doom/blink-cursor))))
(defun doom/blink-cursor (&rest _) (defun +doom/blink-cursor (&rest _)
"Blink current line using `nav-flash'." "Blink current line using `nav-flash'."
(interactive) (interactive)
(unless (minibufferp) (unless (minibufferp)
@ -118,17 +118,16 @@
;; only show in the current window ;; only show in the current window
(overlay-put compilation-highlight-overlay 'window (selected-window)))) (overlay-put compilation-highlight-overlay 'window (selected-window))))
(add-hook! ;; NOTE In :feature jump `recenter' is hooked to a bunch of jumping commands,
'(imenu-after-jump-hook evil-jumps-post-jump-hook find-file-hook) ;; which will trigger nav-flash.
#'doom/blink-cursor)
(advice-add #'windmove-do-window-select :around #'doom*blink-cursor-maybe) (advice-add #'windmove-do-window-select :around #'+doom*blink-cursor-maybe)
(advice-add #'recenter :around #'doom*blink-cursor-maybe) (advice-add #'recenter :around #'+doom*blink-cursor-maybe)
(after! evil (after! evil
(advice-add #'evil-window-top :after #'doom/blink-cursor) (advice-add #'evil-window-top :after #'+doom/blink-cursor)
(advice-add #'evil-window-middle :after #'doom/blink-cursor) (advice-add #'evil-window-middle :after #'+doom/blink-cursor)
(advice-add #'evil-window-bottom :after #'doom/blink-cursor))) (advice-add #'evil-window-bottom :after #'+doom/blink-cursor)))
(after! hideshow (after! hideshow