- 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 is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:
1. Replace the bar | to indicate a hook function with a -h suffix, e.g.
doom|init-ui -> doom-init-ui-h
doom|run-local-var-hooks -> doom-run-local-var-hooks-h
2. And add a -fn suffix for functions meant to be set on variables,
e.g.
(setq magit-display-buffer-function #'+magit-display-buffer-fn)
See ccf327f8 for the reasoning behind these changes.
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.
In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.
doom*shut-up -> doom-shut-up-a
doom*recenter -> doom-recenter-a
+evil*static-reindent -> +evil--static-reindent-a
The rationale behind this change is:
1. Elisp's own formatting/indenting tools would occasionally struggle
with | and * (particularly pp and cl-prettyprint). They have no
problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
github markdown) struggle with it, sometimes refusing to highlight
code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
on haphazardly way back when Doom was simply "my private config".
Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.
Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
macro. The old pair weren't as useful. The new def-advice! saves on a
lot of space.
- Removed "stage" assertions to make sure you were using the right
macros in the right place. Turned out to not be necessary, we'll
employ better checks later.
Due to a load order issue, the doom-local-dir regexp wouldn't be mapped
through our custom recentf-filename-handlers. `file-in-directory-p` is
more robust.
- Move subr-x/cl-lib loading to core-lib
- Revise docstrings for and rename various CLI functions to be more
descriptive and up-to-date
- After regenerating autoloads file, bin/doom will try to reload
autoloads files remotely, through the server/daemon, if possible. This
is highly experimental and could break
- Updates file order on window switch
- Adds dired directories to recentf list
- Reduce recentf-max-saved-items from 300 to 200 (reduce worst-case
resorting costs)
Instead of using auto-revert-mode or global-auto-revert-mode, we employ
lazy auto reverting on focus-in-hook, doom-switch-buffer-hook and
after-save-hook.
We do this because autorevert abuses inotify handles, which can grind
Emacs to a halt if you have hundreds of buffers open and something
performs expensive mtime or attribute-altering IO on their files outside
of Emacs. We only really need revert checks when we switch to or save a
buffer, or when we focus the Emacs frame.
But only if zstd is available. Also strips text properties from the undo
list. This often provides a 30-50% size benefit, with a negligible
performance impact.
It's wasted space now that dtrt-indent logs changes to indentation.
Also resolves a performance issue where the tab/space unicode character
would cause long 3-5s delays on startup or first-file load.
Patch the apropos button types so they call helpful instead of the
built-in describe functions. Also add some bindings to apropos-mode-map
so it behaves like other help modes.
Add `doom/describe-symbol` function, which shows documentation for
callable and variable symbols. If a symbol is both a variable and a
callable, it dispatches to apropos. This gives a better workflow than
`helpful-symbol`, which annoyingly prompts the user.
Remap `describe-symbol` to `doom/describe-symbol`, and update
`+emacs-lisp-lookup-documentation` to call it also.
+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
times it gets triggered.