Commit graph

586 commits

Author SHA1 Message Date
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Henrik Lissner
93f6591faf tweak: gcmh-idle-delay = 5 -> 0.5
Reduce the chance of memory leaks by being a little more aggressive
about idle GC. This *may* be too low; time will tell.
2021-07-28 12:42:46 -04:00
Henrik Lissner
cbb0ce9f85 Don't log hooks
Produces a lot of logging noise, and Doom already injects context into
errors that occur in hooks.
2021-07-11 17:52:08 -04:00
Henrik Lissner
d79cea2e4c Minor refactors, reformatting, & comment revision 2021-07-11 17:52:08 -04:00
Itai Y. Efrat
34fae1c01c Remove remaining Emacs27+ checks
- Remove remaining `EMACS27+` checks, since the whole codebase is
  assumed to run at version 27 or above now
- Remove `EMACS27+` definition since it's no longer needed
2021-07-10 16:03:41 +03:00
Henrik Lissner
19edcb9314 Change doom-version to 3.0.0-alpha
The future is now.
2021-07-06 02:32:38 -04:00
Henrik Lissner
044a1a5f2b Drop Emacs 26.x support
Emacs 27.x has been the stable version of Emacs for nearly a year, and
introduces a litany of bugfixes, performance, and quality-of-life
improvements that significantly reduce Doom's maintenance burden (like
XDG support, early-init.el, image manipulation without imagemagick, a
native JSON library, harfbuzz support, pdumper, and others).

With so many big changes on Doom's horizon, I like having one less (big)
thing to worry about.

Also reverts bb677cf7a (#5232) as it is no longer needed.
2021-07-06 02:31:52 -04:00
Henrik Lissner
c92f486750 Don't reload envvar file on doom/reload
Might address 'Device 1 not a termcap terminal device' errors
2021-06-06 11:52:49 -04:00
Henrik Lissner
72c3a79132 Ensure *-local-vars-hook runs on hack-local-variables-hook
Not sure why I removed this in cd88f65, but it ruins the original
purpose of these hooks -- to run after local variables have been set.
2021-06-02 23:12:38 -04:00
Henrik Lissner
a0174b7638 gcmh-high-cons-threshold = 16mb
Reverts 86fd6c621 which increased gcmh-high-cons-threshold from Doom's
16mb default to its upstream default (of 1gb). This was an experiment.
In theory, the user should idle enough that it would GC enough to stave
off freezes/stuttering/paging, but in practice, either users did not
idle enough or the GC didn't clean up enough when given the opportunity.
The result: terrible stuttering and freezing after long periods of use.

Back to 16mb gang.
2021-05-29 12:50:28 -04:00
Henrik Lissner
2a2969f3e0 org-roam-verbose = t
Its output is helpful. Let's not silence it.

But prevent output during incremental loading from hijacking the
minibuffer (likely the original reason org-roam-verbose was disabled).
2021-05-21 23:13:09 -04:00
Henrik Lissner
9e5ba5fd6c Don't suppress user-error errors
Refactor doom-run-hooks warning.
2021-05-15 14:09:08 -04:00
Henrik Lissner
6d2c6b44fa Refactor comp-effective-async-max-jobs advice
We only need this magic in CLI sessions. It's better to only use half
the CPUs in interactive sessions (if the user has enabled
comp-deferred-compilation for some reason).

Fixes #5042
2021-05-12 14:52:00 -04:00
Henrik Lissner
ce11a98b70 Alias native-comp-* on any Emacs 28+ build
Because boundp checks are too fallible as a guard.
2021-05-12 01:22:07 -04:00
Henrik Lissner
485f097297 Make native-comp-* aliases more robust
(defvaralias A B) throws an error if A is already defined. This breaks
Doom in the event that Doom's config is loaded late (e.g. with 'doom
run'), or these variables are set elsewhere (e.g. the sandbox). I didn't
want to have to do all these checks at startup, but it seems
unavoidable.

Since Doom will only support near-enough the latest commit of Emacs 28
HEAD, I will remove these fixes at the end of May, give or take a week.
2021-05-12 00:18:36 -04:00
Henrik Lissner
87d15700bd Fix #5038: sandbox redefining comp var aliases
Closes #5040
2021-05-11 21:29:54 -04:00
Henrik Lissner
6ad4f0698e Fix #4995: adapt to more renamed comp-* symbols
Two more variables were renamed upstream.
2021-05-11 19:03:18 -04:00
Henrik Lissner
5b50a57b85 Correct comments in doom-run-hook-on 2021-05-09 20:50:23 -04:00
Henrik Lissner
856f8b6aeb Fix #4995: adapt to renamed comp-* symbols
Adapting to native-comp changes on Emacs HEAD.
2021-05-08 14:46:51 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
e2a11d24fd core: minor refactors and comment revisions 2021-05-06 18:36:32 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Marien Zwart
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
Henrik Lissner
9d643b14ed Revise comments 2021-04-29 13:25:48 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
ivanbrennan
e8fe7582a3
fix doom-{after,before}-reload-hook doc strings 2021-03-10 20:27:57 -05:00
Henrik Lissner
c5e3f4d632 New autoload/system.el core library 2021-03-01 22:27:17 -05:00
Henrik Lissner
1274de3d34 Minor reformatting & refactors across the board 2021-02-25 13:59:43 -05:00
Henrik Lissner
3894611a8f Minor comment revision 2021-02-21 14:44:59 -05:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
3a4f182a3c Revise core docstrings & comments 2021-01-27 03:36:53 -05:00
Henrik Lissner
20e74206a8
Merge pull request #4531 from jbampton/fix-spelling
Fix spelling
2021-01-27 02:36:44 -05:00
Henrik Lissner
bb4d17efb7 Revert 8bac3bc6c, a9e6f8883
Add evil-collection-vterm and with-editor to comp blacklist.

Fixes #4517
2021-01-18 17:45:29 -05:00
John Bampton
583f854298 Fix spelling 2021-01-18 02:16:45 +10:00
Henrik Lissner
5cb2395e08
Set custom-theme-directory in core-ui 2021-01-10 08:07:27 -05:00
Henrik Lissner
8bac3bc6c6
Remove with-editor from comp blacklist 2021-01-09 04:12:54 -05:00
Henrik Lissner
a9e6f88831
Remove evil-collection-vterm from comp blacklist
Issue was fixed upstream in native-comp branch.
2021-01-09 03:10:43 -05:00
Henrik Lissner
cae1766d8e
redisplay-skip-fontification-on-input = t
This setting was introduced recently in Emacs HEAD.
2021-01-07 01:43:17 -05:00
Henrik Lissner
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
Henrik Lissner
b5e948054c
Refactor & reformat core.el
Backport a bit of core.el from our CLI rewrite.
2020-12-02 17:58:09 -05:00
Henrik Lissner
affd076d53
Minor refactors & reformatting 2020-12-01 13:53:46 -05:00