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 @@
|
|||
;;; private/hlissner/+bindings.el
|
||||
;;; private/hlissner/+bindings.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; I've swapped these keys on my keyboard
|
||||
(setq x-super-keysym 'alt
|
||||
|
@ -347,9 +347,7 @@
|
|||
:i "C-s" #'company-yasnippet
|
||||
:i "C-o" #'company-capf
|
||||
:i "C-n" #'company-dabbrev-code
|
||||
:i "C-p" (λ! (let ((company-selection-wrap-around t))
|
||||
(call-interactively #'company-dabbrev-code)
|
||||
(company-select-previous-or-abort))))
|
||||
:i "C-p" #'+company/dabbrev-code-previous)
|
||||
(:after company
|
||||
(:map company-active-map
|
||||
;; Don't interfere with `evil-delete-backward-word' in insert mode
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
;;; private/hlissner/+commands.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defalias 'ex! 'evil-ex-define-cmd)
|
||||
|
||||
;;; Commands defined elsewhere
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; private/hlissner/autoload/evil.el
|
||||
;;; private/hlissner/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload (autoload '+hlissner:multi-next-line "private/hlissner/autoload/evil" nil t)
|
||||
(evil-define-motion +hlissner:multi-next-line (count)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; private/hlissner/autoload/hlissner.el
|
||||
;;; private/hlissner/autoload/hlissner.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +hlissner/install-snippets ()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; private/hlissner/config.el
|
||||
;;; private/hlissner/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (featurep 'evil)
|
||||
(load! +bindings) ; my key bindings
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; private/hlissner/init.el
|
||||
;;; private/hlissner/init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This is a special file, unique to private modules, that is loaded after DOOM
|
||||
;; core but before any module is activated, giving you an opportunity to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue