mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for small lists (under 250 items), which is exactly how I've been using them. The only caveat is alist-get's signature is different on Emacs 25, thus a polyfill is necessary in core-lib.
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
;;; lang/data/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Built in plugins
|
||||
(dolist (spec '(("/sxhkdrc\\'" . conf-mode)
|
||||
("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode)
|
||||
("\\.plist\\'" . nxml-mode)))
|
||||
(map-put auto-mode-alist (car spec) (cdr spec)))
|
||||
(unless after-init-time
|
||||
(push '("/sxhkdrc\\'" . conf-mode) auto-mode-alist)
|
||||
(push '("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode) auto-mode-alist)
|
||||
(push '("\\.plist\\'" . nxml-mode) auto-mode-alist))
|
||||
|
||||
(after! nxml-mode
|
||||
(set-company-backend! 'nxml-mode '(company-nxml company-yasnippet)))
|
||||
|
Reference in New Issue
Block a user