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/eval/autoload/build.el
|
||||
;;; feature/eval/autoload/build.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar-local +eval-last-builder nil
|
||||
"The last builder run in the current buffer.")
|
||||
|
@ -22,9 +22,7 @@ functions.")
|
|||
:key 'cdr))
|
||||
(if (= (length builders) 1)
|
||||
(car builders)
|
||||
(when-let (builder (completing-read "Build: "
|
||||
(mapcar #'car builders)
|
||||
nil t))
|
||||
(when-let (builder (completing-read "Build: " (mapcar #'car builders) nil t))
|
||||
(assq (intern builder) builders)))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -36,9 +34,8 @@ functions.")
|
|||
(error "No builder for this buffer"))))
|
||||
(unless builder
|
||||
(error "Builder not found in registered builders"))
|
||||
(let* ((name (car builder))
|
||||
(plist (cdr builder))
|
||||
(fn (plist-get plist :fn)))
|
||||
(let ((name (car builder))
|
||||
(fn (plist-get (cdr builder) :fn)))
|
||||
(message "Running %s" name)
|
||||
(if (or (functionp fn)
|
||||
(and (symbolp fn) (fboundp fn)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue