Commit Graph

567 Commits

Author SHA1 Message Date
f989bf60f0 Rewrite how themes are loaded, and fonts reloaded
A follow-up to 578dddd, which wasn't sufficient.

Fixes #5000 (again)
2021-05-08 00:42:06 -04:00
113dcd74cf Refactor UTF-8 config
After studying set-language-environment, it seems to embody all these
lines. And without without it, non-English glyph rendering is very
slow (see https://emacs-china.org/t/org-mode/16918).

This may have other implications, however, so further testing is needed.
2021-05-08 00:41:41 -04:00
9561089ff5 Remove redundant comp-deferred-compilation setting
Already set in early-init.el, and deferred compilation is auto-disabled
in noninteractive sessions, so only matters to clients that load
early-init.el.
2021-05-07 02:32:51 -04:00
e2a11d24fd core: minor refactors and comment revisions 2021-05-06 18:36:32 -04:00
280bae0331 Eagerly trigger doom-first-* hooks early in daemon sessions
No need to lazy load as much in daemon sessions.
2021-05-06 18:36:32 -04:00
d4dec35658 Improve unicode, emoji, & symbol font support
+ Adds doom-emoji-fallback-font-families
+ Adds doom-symbol-fallback-font-families
+ Gives doom-unicode-font higher precedence (and sets it to nil by
  default, since Emacs defaults to symbola already).
+ Store custom face settings in psuedo theme, rather than crowding the
  user theme (which may be immortalized to custom-file, which we want to
  avoid).
+ Now, after-setting-font-hook is guaranteed to fire after *all* fonts
  are set, giving you a more reliable interface to add your own
  font(set) modifications.

More testing is needed to ensure the patched fonts our ligatures modules
don't conflict with this change.
2021-05-06 04:27:33 -04:00
ff64a9d106 Add doom-run-hooks
Produces more helpful (and harder-to-miss) error messages when a hook
emits an error. Also advises run-hook when doom-debug-mode is active, so
errors in hooks (generally, major mode hooks) don't quietly go
unnoticed.
2021-05-06 04:27:33 -04:00
df10383a26 Use symbol plists instead of internal variables
More in line with Emacs' built-in practice of storing a variable's
standard-value in a symbol property of the same name, with the added
benefit of less global state.
2021-05-06 04:27:33 -04:00
76523c401f Fix making doom-first-input-hook permanent-local
We were making the value of doom-first-input-hook permanent-local
instead of doom-first-input-hook itself. That value is normally nil at
this point, which seems to be harmless. Reloading core.el from a script
(while doom-first-input-hook is not empty) results in an error.

Fix it by adding the missing quote present in the other calls.
2021-05-01 23:49:10 +10:00
9d643b14ed Revise comments 2021-04-29 13:25:48 -04:00
86fd6c6214 Raise gcmh-high-cons-threshold to default (~1gb)
This could potentially cause stuttering for long lived sessions where
the user takes few breaks, but could yield great performance benefits in
the shorter term. We'll have to experiment.
2021-04-21 21:45:04 -04:00
a25582f9a8 Raise global default of read-process-output-max
I was conservative before. I didn't want to change this globally in case
it had a negative performance impact on shy servers that don't talk
much, but this turned out to be too paranoid. Untalkative servers are
barely, if at all, affected, and chatty ones perform better across the
board.
2021-04-21 21:45:04 -04:00
0683861f3f Make doom-first-*-hooks trigger less aggressively
This fixes a class of issues where doom-first-file-hook would fire even
for files not opened interactively (e.g. via org-agenda reading agenda
files or helpful scraping definitions from source files).

In instances like these, hooks like find-file-hook or pre-command-hook
are set to nil to speed up this process and reduce noise, but many
packages add to these hooks when they are loaded; these are lost when
their lexical values fall out of scope, leading to odd errors (like the
one in #4759).

Fixes #4759 (again)
First brought up in hlissner/doom-emacs@9f08db8
2021-04-14 23:43:45 -04:00
763d0b670c Change envvar file format
Storing it as a sexp eliminates the need to parse it.

Fixes #4802
2021-03-21 00:42:49 -04:00
e8fe7582a3 fix doom-{after,before}-reload-hook doc strings 2021-03-10 20:27:57 -05:00
c5e3f4d632 New autoload/system.el core library 2021-03-01 22:27:17 -05:00
1274de3d34 Minor reformatting & refactors across the board 2021-02-25 13:59:43 -05:00
3894611a8f Minor comment revision 2021-02-21 14:44:59 -05:00
0ff85015f8 s/defadvice!/advice-add in comp config block
Part 2 of 811099282.

The latest build of native-comp appears to eagerly load comp very early,
so defadvice! won't be defined when this block runs, causing this error.
2021-02-11 23:33:28 -05:00
8110992829 s/doom-partial/apply-partially
comp is loaded earlier on some builds of native-comp, for some reason?
2021-02-11 13:36:55 -05:00
3a4f182a3c Revise core docstrings & comments 2021-01-27 03:36:53 -05:00
20e74206a8 Merge pull request #4531 from jbampton/fix-spelling
Fix spelling
2021-01-27 02:36:44 -05:00
bb4d17efb7 Revert 8bac3bc6c, a9e6f8883
Add evil-collection-vterm and with-editor to comp blacklist.

Fixes #4517
2021-01-18 17:45:29 -05:00
583f854298 Fix spelling 2021-01-18 02:16:45 +10:00
5cb2395e08 Set custom-theme-directory in core-ui 2021-01-10 08:07:27 -05:00
8bac3bc6c6 Remove with-editor from comp blacklist 2021-01-09 04:12:54 -05:00
a9e6f88831 Remove evil-collection-vterm from comp blacklist
Issue was fixed upstream in native-comp branch.
2021-01-09 03:10:43 -05:00
cae1766d8e redisplay-skip-fontification-on-input = t
This setting was introduced recently in Emacs HEAD.
2021-01-07 01:43:17 -05:00
55e90f064f Load gcmh-mode a little sooner
Ensures it is loaded in time when files are loaded directly from the
terminal.
2020-12-11 01:41:38 -05:00
b5e948054c Refactor & reformat core.el
Backport a bit of core.el from our CLI rewrite.
2020-12-02 17:58:09 -05:00
affd076d53 Minor refactors & reformatting 2020-12-01 13:53:46 -05:00
c517be8e69 Advise locate-user-emacs-file to use doom-etc-dir
This is commonly used in Emacs packages to resolve to a location in
`~/.emacs.d`, as storage or a cache. Rather than addressing each
file/directory variable as they are encountered, better to address this
at the source.

Also: this makes some file/directory settings redundant, so they were
removed.

Closes #4347
2020-12-01 13:53:10 -05:00
cd88f6528e Refactor MODE-local-var-hook trigger 2020-11-30 23:35:03 -05:00
77924c8feb Remove tab-prefix-map fix
Since we've bumped project.el in the :tools lsp module, which was the
cause of this error to begin with.
2020-11-29 15:01:44 -05:00
b91a1b3e7b Extract CPU counting to doom-num-cpus function
And improves macOS support as discussed in hlissner/doom-emacs@db6a27c
2020-11-29 14:49:14 -05:00
b49c40bbb3 Minor refactors & comment revision 2020-11-29 14:37:32 -05:00
db6a27c37c native-comp: use all cores instead of half 2020-11-29 14:25:12 -05:00
6dc84f1671 Remove backwards compatibility for native-comp
It's too much hassle to wrestle with. If you're on native comp, you
revert to hlissner/doom-emacs@c83e5e75e until you can update.

Fixes #4317 (again)
2020-11-25 14:55:26 -05:00
90f16eaa76 Fix #4317: wrong-type-arg: number-or-marker-p many
Caused by a func-arity call on an advised function (returns the arity of
the advice, rather than the advised function itself).
2020-11-25 13:49:17 -05:00
d3e08c5d0b Update for the latest native-compile-async API
Renamed `comp-deferred-compilation-black-list` to
`comp-deferred-compilation-deny-list`.

Removed the `late` load flag which is no longer required.

Added a check against the deny list when compiling all Elisp on the
load-path, so we don't inadvertently compile something we shouldn't.

Added compatibility shims to ease transition from older builds of
native-comp.
2020-11-25 14:17:01 +10:00
db16e5c03e Fix error if autoloads file is missing at startup
Should warn the user to run 'doom sync' if the autoloads file is
missing, but was giving a less helpful, generic error instead.
2020-11-20 14:10:29 -05:00
4dab595ad3 Minor refactors & comment revision 2020-11-20 14:10:29 -05:00
a56f58d4ab Prevent native compilation for emacs-jupyter
Something in jupyter-channel.el does not get compiled correctly and
raises void-variable jupyter-channel errors.
2020-11-17 20:48:34 +01:00
e9394c7c06 Add with-editor.el to the compilation black-list 2020-11-16 14:52:41 +10:00
9ce9c6838e Add emacs version to autoloads file path
Prevents stale byte-code across Emacs versions.

Relevant to #4172
2020-10-29 01:42:04 -04:00
9e1ac0c0be Reduce active message-log-max; scale in debug mode
8kb of log isn't really necessary. We'll scale it up when debug mode is
on, instead.
2020-10-26 05:51:12 -04:00
f92f4aab97 Fix file-handlers for daemon sessions 2020-10-21 11:18:47 -04:00
b461f76b0d Fix *-local-vars-hook & doom-first-*-hook not triggering
When starting Emacs with a file path argument these hooks aren't set up
in time for the file to be processed.

Fixes #3891, #4082, #4104
2020-10-16 23:08:56 -04:00
35185b2175 Split doom-reload-hook into before/after hooks 2020-10-16 22:28:08 -04:00
3f24fc3737 regexp-quote comp blacklist entries 2020-10-11 16:41:05 -04:00