Fix variable is void warnings at startup

which were caused by invocing
evilified-state-evilify-map in the init section.
This commit is contained in:
Maxi Wolff 2022-05-29 14:58:27 +02:00
parent 2325fc521f
commit 39b9def6d5
No known key found for this signature in database
GPG key ID: 2DD07025BFDBD89A
6 changed files with 199 additions and 208 deletions

View file

@ -21,33 +21,31 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq helm-packages
'(
ace-jump-helm-line
auto-highlight-symbol
bookmark
helm
helm-ag
helm-descbinds
helm-flx
(helm-ls-git :toggle (configuration-layer/layer-used-p 'git))
helm-make
helm-mode-manager
helm-org
helm-projectile
helm-swoop
helm-themes
(helm-spacemacs-help :location local)
(helm-spacemacs-faq :location local)
helm-xref
imenu
persp-mode
popwin
projectile
))
(defconst helm-packages
'(ace-jump-helm-line
auto-highlight-symbol
bookmark
helm
helm-ag
helm-descbinds
helm-flx
(helm-ls-git :toggle (configuration-layer/layer-used-p 'git))
helm-make
helm-mode-manager
helm-org
helm-projectile
helm-swoop
helm-themes
(helm-spacemacs-help :location local)
(helm-spacemacs-faq :location local)
helm-xref
imenu
persp-mode
popwin
projectile))
;; Initialization of packages
(defun helm/init-ace-jump-helm-line ()
(use-package ace-jump-helm-line
:defer (spacemacs/defer)
@ -218,93 +216,90 @@
(use-package helm-ag
:defer (spacemacs/defer)
:init
(progn
(setq helm-ag-use-grep-ignore-list t)
;; This overrides the default C-s action in helm-projectile-switch-project
;; to search using rg/ag/pt/whatever instead of just grep
(with-eval-after-load 'helm-projectile
(define-key helm-projectile-projects-map
(kbd "C-s") 'spacemacs/helm-projectile-grep)
;; `spacemacs/helm-projectile-grep' calls:
;; `spacemacs/helm-project-smart-do-search-in-dir'
;; which needs to be an action.
;; Delete the current action.
(helm-delete-action-from-source
"Grep in projects `C-s'" helm-source-projectile-projects)
(helm-add-action-to-source
"Search in projects `C-s'"
'spacemacs/helm-project-smart-do-search-in-dir
helm-source-projectile-projects))
(setq helm-ag-use-grep-ignore-list t)
;; This overrides the default C-s action in helm-projectile-switch-project
;; to search using rg/ag/pt/whatever instead of just grep
(with-eval-after-load 'helm-projectile
(define-key helm-projectile-projects-map
(kbd "C-s") 'spacemacs/helm-projectile-grep)
;; `spacemacs/helm-projectile-grep' calls:
;; `spacemacs/helm-project-smart-do-search-in-dir'
;; which needs to be an action.
;; Delete the current action.
(helm-delete-action-from-source
"Grep in projects `C-s'" helm-source-projectile-projects)
(helm-add-action-to-source
"Search in projects `C-s'"
'spacemacs/helm-project-smart-do-search-in-dir
helm-source-projectile-projects))
;; evilify the helm-grep buffer
(evilified-state-evilify-map helm-grep-mode-map
:mode helm-grep-mode
:bindings
(kbd "q") 'quit-window)
(spacemacs/set-leader-keys
;; helm-ag marks
"s`" 'helm-ag-pop-stack
;; opened buffers scope
"sb" 'spacemacs/helm-buffers-smart-do-search
"sB" 'spacemacs/helm-buffers-smart-do-search-region-or-symbol
"sab" 'helm-do-ag-buffers
"saB" 'spacemacs/helm-buffers-do-ag-region-or-symbol
"skb" 'spacemacs/helm-buffers-do-ack
"skB" 'spacemacs/helm-buffers-do-ack-region-or-symbol
"srb" 'spacemacs/helm-buffers-do-rg
"srB" 'spacemacs/helm-buffers-do-rg-region-or-symbol
"stb" 'spacemacs/helm-buffers-do-pt
"stB" 'spacemacs/helm-buffers-do-pt-region-or-symbol
;; current file scope
"ss" 'spacemacs/helm-file-smart-do-search
"sS" 'spacemacs/helm-file-smart-do-search-region-or-symbol
"saa" 'helm-ag-this-file
"saA" 'spacemacs/helm-file-do-ag-region-or-symbol
;; files scope
"sf" 'spacemacs/helm-files-smart-do-search
"sF" 'spacemacs/helm-files-smart-do-search-region-or-symbol
"saf" 'helm-do-ag
"saF" 'spacemacs/helm-files-do-ag-region-or-symbol
"skf" 'spacemacs/helm-files-do-ack
"skF" 'spacemacs/helm-files-do-ack-region-or-symbol
"srf" 'spacemacs/helm-files-do-rg
"srF" 'spacemacs/helm-files-do-rg-region-or-symbol
"stf" 'spacemacs/helm-files-do-pt
"stF" 'spacemacs/helm-files-do-pt-region-or-symbol
;; current dir scope
"sd" 'spacemacs/helm-dir-smart-do-search
"sD" 'spacemacs/helm-dir-smart-do-search-region-or-symbol
"sad" 'spacemacs/helm-dir-do-ag
"saD" 'spacemacs/helm-dir-do-ag-region-or-symbol
"skd" 'spacemacs/helm-dir-do-ack
"skD" 'spacemacs/helm-dir-do-ack-region-or-symbol
"srd" 'spacemacs/helm-dir-do-rg
"srD" 'spacemacs/helm-dir-do-rg-region-or-symbol
"std" 'spacemacs/helm-dir-do-pt
"stD" 'spacemacs/helm-dir-do-pt-region-or-symbol
;; current project scope
"/" 'spacemacs/helm-project-smart-do-search
"*" 'spacemacs/helm-project-smart-do-search-region-or-symbol
"sp" 'spacemacs/helm-project-smart-do-search
"sP" 'spacemacs/helm-project-smart-do-search-region-or-symbol
"sap" 'spacemacs/helm-project-do-ag
"saP" 'spacemacs/helm-project-do-ag-region-or-symbol
"skp" 'spacemacs/helm-project-do-ack
"skP" 'spacemacs/helm-project-do-ack-region-or-symbol
"srp" 'spacemacs/helm-project-do-rg
"srP" 'spacemacs/helm-project-do-rg-region-or-symbol
"stp" 'spacemacs/helm-project-do-pt
"stP" 'spacemacs/helm-project-do-pt-region-or-symbol))
(spacemacs/set-leader-keys
;; helm-ag marks
"s`" 'helm-ag-pop-stack
;; opened buffers scope
"sb" 'spacemacs/helm-buffers-smart-do-search
"sB" 'spacemacs/helm-buffers-smart-do-search-region-or-symbol
"sab" 'helm-do-ag-buffers
"saB" 'spacemacs/helm-buffers-do-ag-region-or-symbol
"skb" 'spacemacs/helm-buffers-do-ack
"skB" 'spacemacs/helm-buffers-do-ack-region-or-symbol
"srb" 'spacemacs/helm-buffers-do-rg
"srB" 'spacemacs/helm-buffers-do-rg-region-or-symbol
"stb" 'spacemacs/helm-buffers-do-pt
"stB" 'spacemacs/helm-buffers-do-pt-region-or-symbol
;; current file scope
"ss" 'spacemacs/helm-file-smart-do-search
"sS" 'spacemacs/helm-file-smart-do-search-region-or-symbol
"saa" 'helm-ag-this-file
"saA" 'spacemacs/helm-file-do-ag-region-or-symbol
;; files scope
"sf" 'spacemacs/helm-files-smart-do-search
"sF" 'spacemacs/helm-files-smart-do-search-region-or-symbol
"saf" 'helm-do-ag
"saF" 'spacemacs/helm-files-do-ag-region-or-symbol
"skf" 'spacemacs/helm-files-do-ack
"skF" 'spacemacs/helm-files-do-ack-region-or-symbol
"srf" 'spacemacs/helm-files-do-rg
"srF" 'spacemacs/helm-files-do-rg-region-or-symbol
"stf" 'spacemacs/helm-files-do-pt
"stF" 'spacemacs/helm-files-do-pt-region-or-symbol
;; current dir scope
"sd" 'spacemacs/helm-dir-smart-do-search
"sD" 'spacemacs/helm-dir-smart-do-search-region-or-symbol
"sad" 'spacemacs/helm-dir-do-ag
"saD" 'spacemacs/helm-dir-do-ag-region-or-symbol
"skd" 'spacemacs/helm-dir-do-ack
"skD" 'spacemacs/helm-dir-do-ack-region-or-symbol
"srd" 'spacemacs/helm-dir-do-rg
"srD" 'spacemacs/helm-dir-do-rg-region-or-symbol
"std" 'spacemacs/helm-dir-do-pt
"stD" 'spacemacs/helm-dir-do-pt-region-or-symbol
;; current project scope
"/" 'spacemacs/helm-project-smart-do-search
"*" 'spacemacs/helm-project-smart-do-search-region-or-symbol
"sp" 'spacemacs/helm-project-smart-do-search
"sP" 'spacemacs/helm-project-smart-do-search-region-or-symbol
"sap" 'spacemacs/helm-project-do-ag
"saP" 'spacemacs/helm-project-do-ag-region-or-symbol
"skp" 'spacemacs/helm-project-do-ack
"skP" 'spacemacs/helm-project-do-ack-region-or-symbol
"srp" 'spacemacs/helm-project-do-rg
"srP" 'spacemacs/helm-project-do-rg-region-or-symbol
"stp" 'spacemacs/helm-project-do-pt
"stP" 'spacemacs/helm-project-do-pt-region-or-symbol)
:config
(progn
(advice-add 'helm-ag--save-results :after 'spacemacs//gne-init-helm-ag)
(evil-define-key 'normal helm-ag-map (kbd dotspacemacs-leader-key) spacemacs-default-map)
(evilified-state-evilify-map helm-ag-mode-map
:mode helm-ag-mode
:bindings
(kbd "gr") 'helm-ag--update-save-results
(kbd "q") 'quit-window))))
(advice-add 'helm-ag--save-results :after 'spacemacs//gne-init-helm-ag)
(evil-define-key 'normal helm-ag-map
(kbd dotspacemacs-leader-key) spacemacs-default-map)
(evilified-state-evilify-map helm-grep-mode-map
:mode helm-grep-mode
:bindings
(kbd "q") 'quit-window)
(evilified-state-evilify-map helm-ag-mode-map
:mode helm-ag-mode
:bindings
(kbd "gr") 'helm-ag--update-save-results
(kbd "q") 'quit-window)))
(defun helm/init-helm-descbinds ()
(use-package helm-descbinds

View file

@ -33,13 +33,12 @@
emoji-cheat-sheet-plus-buffer
emoji-cheat-sheet-plus-display-mode)
:init
(progn
(spacemacs/set-leader-keys "afe" 'emoji-cheat-sheet-plus-buffer)
(spacemacs/set-leader-keys "ie" 'emoji-cheat-sheet-plus-insert))
(spacemacs/set-leader-keys "afe" 'emoji-cheat-sheet-plus-buffer)
(spacemacs/set-leader-keys "ie" 'emoji-cheat-sheet-plus-insert)
:config
(evilified-state-evilify emoji-cheat-sheet-plus-buffer-mode
emoji-cheat-sheet-plus-buffer-mode-map
"<RET>" 'emoji-cheat-sheet-plus-echo-and-copy)
(evilified-state-evilify-map emoji-cheat-sheet-plus-buffer-mode-map
:mode emoji-cheat-sheet-plus-buffer-mode
:bindings "<RET>" 'emoji-cheat-sheet-plus-echo-and-copy)
(spacemacs|hide-lighter emoji-cheat-sheet-plus-display-mode)))
(defun emoji/init-emojify ()

View file

@ -22,8 +22,7 @@
(defconst games-packages
'(
2048-game
'(2048-game
(helm-games :location local
:requires helm)
pacmacs
@ -36,25 +35,24 @@
(use-package 2048-mode
:defer t
:init
(progn
(push '("2048" . (2048-game :quit (kill-buffer-ask (get-buffer "2048"))
:reset 2048-init))
helm-games-list)
(evilified-state-evilify-map 2048-mode-map
:mode 2048-mode
:bindings
"j" '2048-down
"k" '2048-up
"h" '2048-left
"l" '2048-right))))
(push '("2048" . (2048-game :quit (kill-buffer-ask (get-buffer "2048"))
:reset 2048-init))
helm-games-list)
:config
(evilified-state-evilify-map 2048-mode-map
:mode 2048-mode
:bindings
"j" '2048-down
"k" '2048-up
"h" '2048-left
"l" '2048-right)))
(defun games/init-helm-games ()
(use-package helm-games
:commands helm-games
:init
(progn
(spacemacs/declare-prefix "afg" "games")
(spacemacs/set-leader-keys "afg" 'helm-games))))
(spacemacs/declare-prefix "afg" "games")
(spacemacs/set-leader-keys "afg" 'helm-games)))
(defun games/init-pacmacs ()
(use-package pacmacs
@ -64,6 +62,7 @@
:quit (kill-buffer-ask (get-buffer "*Pacmacs*"))
:reset pacmacs-start))
helm-games-list)
:config
(evilified-state-evilify-map pacmacs-mode-map
:mode pacmacs-mode
:bindings
@ -98,50 +97,49 @@
(use-package sudoku
:defer t
:init
(progn
(push '("sudoku" . (sudoku :quit (kill-buffer-ask (get-buffer "*Sudoku*"))
:reset sudoku-restart))
helm-games-list)
(evilified-state-evilify-map sudoku-mode-map
:mode sudoku-mode
:bindings
;; Movement
"j" 'sudoku-move-point-down
"J" 'sudoku-move-point-downmost
"k" 'sudoku-move-point-up
"K" 'sudoku-move-point-upmost
"h" 'sudoku-move-point-left
"H" 'sudoku-move-point-leftmost
"l" 'sudoku-move-point-right
"L" 'sudoku-move-point-rightmost
(push '("sudoku" . (sudoku :quit (kill-buffer-ask (get-buffer "*Sudoku*"))
:reset sudoku-restart))
helm-games-list)
(spacemacs/set-leader-keys-for-major-mode 'sudoku-mode
"c" 'sudoku-comment-puzzle
"h" 'sudoku-hint
"l" 'sudoku-load-puzzle
"L" 'sudoku-load-puzzle-collection
"s" 'sudoku-save-puzzle)
:config
(evilified-state-evilify-map sudoku-mode-map
:mode sudoku-mode
:bindings
;; Movement
"j" 'sudoku-move-point-down
"J" 'sudoku-move-point-downmost
"k" 'sudoku-move-point-up
"K" 'sudoku-move-point-upmost
"h" 'sudoku-move-point-left
"H" 'sudoku-move-point-leftmost
"l" 'sudoku-move-point-right
"L" 'sudoku-move-point-rightmost
;; Start/quit/print game
"N" 'sudoku
"q" 'sudoku-quit
"Q" 'sudoku-quit-immediately
"P" 'sudoku-print
;; Start/quit/print game
"N" 'sudoku
"q" 'sudoku-quit
"Q" 'sudoku-quit-immediately
"P" 'sudoku-print
;; Undo/redo
"u" 'sudoku-undo
"\C-r" 'sudoku-redo
;; Undo/redo
"u" 'sudoku-undo
"\C-r" 'sudoku-redo
;; Inserting values
"1" 'sudoku-change-point
"2" 'sudoku-change-point
"3" 'sudoku-change-point
"4" 'sudoku-change-point
"5" 'sudoku-change-point
"6" 'sudoku-change-point
"7" 'sudoku-change-point
"8" 'sudoku-change-point
"9" 'sudoku-change-point)
(spacemacs/set-leader-keys-for-major-mode 'sudoku-mode
"c" 'sudoku-comment-puzzle
"h" 'sudoku-hint
"l" 'sudoku-load-puzzle
"L" 'sudoku-load-puzzle-collection
"s" 'sudoku-save-puzzle))))
;; Inserting values
"1" 'sudoku-change-point
"2" 'sudoku-change-point
"3" 'sudoku-change-point
"4" 'sudoku-change-point
"5" 'sudoku-change-point
"6" 'sudoku-change-point
"7" 'sudoku-change-point
"8" 'sudoku-change-point
"9" 'sudoku-change-point)))
(defun games/init-typit ()
(use-package typit

View file

@ -27,16 +27,16 @@
(use-package xkcd-mode
:defer t
:init
(progn
(setq xkcd-cache-dir (concat spacemacs-cache-directory "xkcd/"))
(unless (file-directory-p xkcd-cache-dir)
(make-directory xkcd-cache-dir))
(spacemacs/set-leader-keys
"afx" 'xkcd)
(evilified-state-evilify-map xkcd-mode-map
:mode xkcd-mode
:bindings
"h" 'xkcd-prev
"j" 'xkcd-next
"k" 'xkcd-prev
"l" 'xkcd-next))))
(setq xkcd-cache-dir (concat spacemacs-cache-directory "xkcd/"))
(unless (file-directory-p xkcd-cache-dir)
(make-directory xkcd-cache-dir))
(spacemacs/set-leader-keys
"afx" 'xkcd)
:config
(evilified-state-evilify-map xkcd-mode-map
:mode xkcd-mode
:bindings
"h" 'xkcd-prev
"j" 'xkcd-next
"k" 'xkcd-prev
"l" 'xkcd-next)))

View file

@ -532,9 +532,19 @@
"dty" 'sayid-trace-all-ns-in-dir
"dV" 'sayid-set-view
"dw" 'sayid-get-workspace
"dx" 'sayid-reset-workspace))
"dx" 'sayid-reset-workspace)))
:config
(progn
;; If sayid-version is null the .elc file
;; is corrupted. Then force a reinstall and
;; reload the feature.
(when (null sayid-version)
(package-reinstall 'sayid)
(unload-feature 'sayid)
(require 'sayid)
(setq cider-jack-in-lein-plugins (delete `("com.billpiel/sayid" nil) cider-jack-in-lein-plugins)))
;; Make it evil
(evilified-state-evilify-map sayid-mode-map
:mode sayid-mode
:bindings
@ -545,7 +555,6 @@
(kbd "C-s V") 'sayid-set-view
(kbd "L") 'sayid-buf-back
(kbd "e") 'sayid-gen-instance-expr) ;Originally this was bound to 'g', but I feel this is still mnemonic and doesn't overlap with evil
(evilified-state-evilify-map sayid-pprint-mode-map
:mode sayid-pprint-mode
:bindings
@ -553,22 +562,12 @@
(kbd "n") 'sayid-pprint-buf-next
(kbd "N") 'sayid-pprint-buf-prev
(kbd "l") 'sayid-pprint-buf-exit)
(evilified-state-evilify-map sayid-traced-mode-map
:mode sayid-traced-mode
:bindings
(kbd "l") 'sayid-show-traced
(kbd "h") 'sayid-traced-buf-show-help))
:config
(progn
;; If sayid-version is null the .elc file
;; is corrupted. Then force a reinstall and
;; reload the feature.
(when (null sayid-version)
(package-reinstall 'sayid)
(unload-feature 'sayid)
(require 'sayid)
(setq cider-jack-in-lein-plugins (delete `("com.billpiel/sayid" nil) cider-jack-in-lein-plugins))))))
(kbd "h") 'sayid-traced-buf-show-help))))
(defun clojure/post-init-flycheck ()
;; When user has chosen to use multiple linters.

View file

@ -88,13 +88,13 @@
(kbd "<backtab>") 'log-view-file-prev
(kbd "<return>") 'log-view-find-revision
"H" 'log-view-toggle-entry-display
"o" 'ace-link-woman))
(evilified-state-evilify-map vc-svn-log-view-mode-map
:mode vc-svn-log-view-mode)
(evilified-state-evilify-map vc-git-log-view-mode-map
:mode vc-git-log-view-mode)
(evilified-state-evilify-map vc-git-log-view-mode-map
:mode vc-hg-log-view-mode)
"o" 'ace-link-woman)
(evilified-state-evilify-map vc-svn-log-view-mode-map
:mode vc-svn-log-view-mode)
(evilified-state-evilify-map vc-git-log-view-mode-map
:mode vc-git-log-view-mode)
(evilified-state-evilify-map vc-git-log-view-mode-map
:mode vc-hg-log-view-mode))
(with-eval-after-load 'vc-annotate
(evilified-state-evilify-map vc-annotate-mode-map
:mode vc-annotate-mode