Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster startup; ~5-20% general boost + reduce consing, function calls & garbage collection by preferring cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and various cl-lib filter/map/reduce functions) -- where possible + prefer functions with dedicated opcodes, like assq (see byte-defop's in bytecomp.el for more) + prefer pcase & cond (faster) over cl-case + general refactor for code readability + ensure naming & style conventions are adhered to + appease byte-compiler by marking unused variables with underscore + defer minor mode activation to after-init, emacs-startup or window-setup hooks; a customization opportunity for users + ensures custom functionality won't interfere with startup.
This commit is contained in:
parent
64a142b3fc
commit
c7254e7bdc
154 changed files with 1101 additions and 1118 deletions
|
@ -1,4 +1,4 @@
|
|||
;;; feature/evil/config.el
|
||||
;;; feature/evil/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; I'm a vimmer at heart. Its modal philosophy suits me better, and this module
|
||||
;; strives to make Emacs a much better vim than vim was.
|
||||
|
@ -41,7 +41,7 @@
|
|||
shift-select-mode nil)
|
||||
|
||||
:config
|
||||
(evil-mode +1)
|
||||
(add-hook 'emacs-startup-hook #'evil-mode)
|
||||
(evil-select-search-module 'evil-search-module 'evil-search)
|
||||
|
||||
(set! :popup
|
||||
|
@ -170,7 +170,7 @@ across windows."
|
|||
|
||||
|
||||
(def-package! evil-easymotion
|
||||
:defer 1
|
||||
:after evil-snipe
|
||||
:config
|
||||
(defvar +evil--snipe-repeat-fn
|
||||
(evilem-create #'evil-snipe-repeat
|
||||
|
@ -185,7 +185,6 @@ across windows."
|
|||
(setq evil-embrace-show-help-p nil)
|
||||
(evil-embrace-enable-evil-surround-integration)
|
||||
|
||||
;; Defuns
|
||||
(defun +evil--embrace-get-pair (char)
|
||||
(if-let (pair (cdr-safe (assoc (string-to-char char) evil-surround-pairs-alist)))
|
||||
pair
|
||||
|
@ -234,15 +233,15 @@ across windows."
|
|||
|
||||
|
||||
(def-package! evil-escape
|
||||
:demand t
|
||||
:commands evil-escape-mode
|
||||
:init
|
||||
(setq evil-escape-excluded-states '(normal visual multiedit emacs)
|
||||
evil-escape-excluded-major-modes '(neotree-mode)
|
||||
evil-escape-key-sequence "jk"
|
||||
evil-escape-delay 0.25)
|
||||
|
||||
(add-hook 'emacs-startup-hook #'evil-escape-mode)
|
||||
:config
|
||||
(evil-escape-mode +1)
|
||||
(map! :irvo "C-g" #'evil-escape))
|
||||
|
||||
|
||||
|
@ -330,7 +329,7 @@ the new algorithm is confusing, like in python or ruby."
|
|||
(?\] "[]})]")
|
||||
(?\; "[;:]")))
|
||||
:config
|
||||
(evil-snipe-override-mode +1))
|
||||
(add-hook 'emacs-startup-hook #'evil-snipe-override-mode))
|
||||
|
||||
|
||||
(def-package! evil-surround
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue