Major refactor of Doom core files

- Remove core-os and move many of its settings out to other core
  libraries, where they belong
- Significantly improve commenting & compartmentalization of many
  settings
- Correct some mis-named public hooks (that were named as if they were
  private)
- Move the vast majority of optimizations to "Optimizations" section in
  core.el
- Don't activate xclip-mode or osx-clipboard-mode if we're accessing
  Emacs through an SSH connection (does more bad than good there)
- Add fast-but-imprecise-scrolling = t
- Set bidi-display-reordering = 'left-to-right, at the recommendation of
  an Emacs dev. Apparently setting it to nil is undefined, as Emacs is
  designed to always assume it's set; setting it explicitly to
  left-to-right will still do what was originally intended by turning it
  off: to reduce line/text scans for bidirectional text, which gives us
  a moderate boost in general runtime snappiness
- Set inhibit-compacting-fon-caches = t on windows (where it struggles
  especially with icon fonts)
- Disables "literal" mode for very large files (because I will be
  backporting so-long.el from Emacs 27 in the next commit)
This commit is contained in:
Henrik Lissner 2019-07-21 04:02:09 +02:00
parent 81ab3dbc5d
commit fdcb259bcd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
9 changed files with 417 additions and 297 deletions

View file

@ -73,10 +73,11 @@ If any hook returns non-nil, all hooks after it are ignored.")
;;
;;; General + leader/localleader keys
(require 'general)
;; Convenience aliases
(defalias 'define-key! #'general-def)
(defalias 'unmap! #'general-unbind)
(use-package general
:config
;; Convenience aliases
(defalias 'define-key! #'general-def)
(defalias 'unmap! #'general-unbind))
;; `map!' uses this instead of `define-leader-key!' because it consumes 20-30%
;; more startup time, so we reimplement it ourselves.
@ -216,7 +217,7 @@ localleader prefix."
(?g . global))
"A list of cons cells that map a letter to a evil state symbol.")
(defun doom--keyword-to-states (keyword)
(defun doom--map-keyword-to-states (keyword)
"Convert a KEYWORD into a list of evil state symbols.
For example, :nvi will map to (list 'normal 'visual 'insert). See
@ -307,7 +308,9 @@ For example, :nvi will map to (list 'normal 'visual 'insert). See
doom--map-forms)))
(_
(condition-case _
(doom--map-def (pop rest) (pop rest) (doom--keyword-to-states key) desc)
(doom--map-def (pop rest) (pop rest)
(doom--map-keyword-to-states key)
desc)
(error
(error "Not a valid `map!' property: %s" key)))
(setq desc nil))))