Commit graph

29 commits

Author SHA1 Message Date
e2cd50cd0c dev: merging from main 2024-04-05 14:34:14 -04:00
Henrik Lissner
6b55c6adc6
refactor: inline doom--make-font-specs
This function isn't (and won't be) used anywhere else. No reason for it
to be its own function.
2024-03-19 20:47:21 -04:00
Henrik Lissner
c20c2aa36e
fix: tiny fonts in (daemon) GUI frames
Due to a suppressed void-variable error, font initialization is
short-circuited across daemon frames when the fonts are reloaded or
changed (which is also triggered by changing themes), resulting in
malformed (often tiny) fonts in GUI frames.

Fix: #7730
2024-03-13 11:02:12 -04:00
StrawberryTea
645c856de0 fix(popup): allow killing popup buffers
Currently, `SPC b k` does not allow us to kill popup buffers. If we are
say using a comint/eshell/eat buffer and we borked the state while
testing hooks or we sent EOF to the underlying process, our intention
with `SPC b k` is to kill the underlying buffer.
2024-03-05 01:14:38 -05:00
Henrik Lissner
98d753e103
fix: blank frame on can't-find-font error during startup
Due to our inhibit-redisplay hack, a missing font could lead to a blank
Emacs after startup. This change fixes that so that not only is an error
emitted when Emacs can't find your font, but the error will be a little
more readable.

This is a stopgap solution until I finish a better one I'm preparing for
v3.

Fix: #7055
2024-02-20 05:37:28 -05:00
Liam Hupfer
edd95854fd
fix: premature use of emoji fontset in <=28.1
317cea5 assumed Emacs 28, but Doom still tries to support 27.
Attempting to use the undefined emoji script on 27 results in an error.
Prior to 28, emoji are part of the symbol script, which the following
`set-fontset-font` call already handles.

Amend: 317cea5eef
Ref: #7448
Fix: #7505
2023-11-23 18:17:52 -05:00
Liam Hupfer
986398504d refactor: defvar -> defcustom
Ref: 8c442d84b9
2023-10-07 02:33:45 +02:00
Liam Hupfer
b42882c545 refactor: make fallback font families constant
These are undocumented internal variables for basic platform-specific
fallbacks. Now that doom-symbol-font and doom-emoji-font exist, make
them constant.
2023-10-07 02:33:45 +02:00
Liam Hupfer
7abed4dbf1 fix: fall back to emoji font for symbols
Symbols fonts vary widely in their coverage of Unicode symbols blocks.
Emoji fonts are generally guaranteed to cover the small subset of
symbols code points that have assigned emoji representations, so fall
back to them when symbols fonts are lacking.

Ref: https://en.wikipedia.org/w/index.php?title=Variant_form_(Unicode)&oldid=1175107681#Blocks_with_standardized_variation_sequences
2023-10-07 02:33:45 +02:00
Liam Hupfer
37affa5cff feat: add doom-emoji-font
This parallels doom-symbol-font for emoji. In the process, refactor
symbol and emoji font setup to take advantage of these parallels.
2023-10-07 02:33:45 +02:00
Liam Hupfer
4499ce7b0a refactor: doom-unicode-font -> doom-symbol-font
No font supports all of Unicode or anywhere near it. It’s not even
really possible with current font formats. Therefore, rename
`doom-unicode-font` to `doom-symbol-font`. Only set it as a fallback for
characters in the `symbol` and `mathematical` scripts.
2023-10-07 02:33:45 +02:00
Liam Hupfer
1cc7b04059 docs: clarify doom-unicode-font default
d4dec35658 removed Apple Color Emoji, and it wasn’t clear how Symbola
was set if this variable was nil.
2023-10-07 02:33:45 +02:00
Liam Hupfer
317cea5eef fix: assign emoji fallbacks directly to emoji script
Ref: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=12d2fb58c416b557924174f57bfb1c9b9e7cf999
2023-10-07 02:33:45 +02:00
Liam Hupfer
5e6430e9e6 fix: assign Nerd Fonts directly to Unicode PUAs
Nerd Fonts assign icons to code points in these Unicode Private Use
Areas. `doom-unicode-font` is now available again as a user-defined
fallback of last resort for non-PUA Unicode code points.

Ref: f12c615e4d (overview)
2023-10-07 02:33:45 +02:00
StrawberryTea
f5be3ec1e5 fix: use ansi-color-compilation-filter on emacs28+
I'm using Emacs30 and on my version,
doom-apply-ansi-color-to-compilation-buffer-h does not colorize all the
escape sequences. Using ansi-color-compilation-filter instead fixes this
for me.
2023-10-05 17:44:08 +02:00
Ellis Kenyő
9787022b83
refactor!: replace all-the-icons with nerd-icons
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.

This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.

Fix: #7368
Close: #6675
Close: #7364
2023-09-14 01:03:55 +02:00
Henrik Lissner
f427c8a30e
tweak: scroll-conservatively = 10
Forces the window to recenter if the cursor moves >=10 lines off-screen.
This makes some of our manual recentering elsewhere unnecessary.
2023-09-11 23:53:36 +02:00
Henrik Lissner
a2b02942f8
fix: void-function set-fontset-font error
Due to some packages and modules using this in some (non-GUI) builds of
Emacs. display-graphic-p isn't enough here, so rather than police all
the possible offenders, I've defined it to no-op in those cases,
instead.

Close: #6876
2022-10-29 01:57:42 +02:00
Henrik Lissner
ffad2bc49e
perf: move doom-init-ui-h to window-setup-hook
This has little effect on startup time now, but seems to buy 100-200ms
with some 3.0 optimizations that will come soon.
2022-09-24 22:10:02 +02:00
Henrik Lissner
c5de95f722
perf: defer init for frame's buffer-predicate
Ensures that it doesn't pull in the buffer library so early in the
startup process, or gets called prematurely.
2022-09-20 02:29:14 +02:00
Henrik Lissner
195359cf99
fix: properly disable tooltip-mode
In 4a25375, it seemed that only setting the variables to nil early
enough would be sufficient, but this turned out not to be the case.
There's no avoiding calling the mode to disable it.

Ref: 58c0de6841
Amend: 4a253757cb
2022-09-18 10:36:00 +02:00
Henrik Lissner
41051f4761
fix: disable UI elements earlier
Moves this from doom-ui to doom-start, since there is more savings to be
had if this is done early.

Also moves the menu-bar fix for macos out of the :os macos module into
doom-start, because it is a fix (and for a Doom optimization) and not a
feature, so it shouldn't be behind a module.
2022-09-16 01:14:23 +02:00
Henrik Lissner
4a253757cb
refactor: how UI elements are disabled at startup
The default-frame-alist properties are only necessary for the scrollbar.
The variables are enough for the rest. Also, no need to set
x-gtk-use-symtem-tooltips if we're turning off tooltips anyway.

Also moves the UI config that snuck its way into doom-start back to
doom-ui.
2022-09-16 01:14:23 +02:00
Henrik Lissner
0d7c3eaf24
feat: add doom-{before,after}-init-hook
doom-before-init-hook runs before $DOOMDIR/init.el is loaded.

doom-after-init-hook runs at the *very* end of the Emacs startup
process (after window-setup-hook).
2022-09-16 01:14:23 +02:00
Henrik Lissner
6ddaed5cdd
nit: comment revision and formatting
For clarity, to enforce conventions, and explain the unexplained.
2022-09-16 01:14:22 +02:00
Ivan
44ff627e35
nit: remove unused base-specs arg in doom--make-font-specs 2022-09-10 23:48:56 +02:00
Henrik Lissner
a5c80fcb4b
refactor: deprecate doom-private-dir for doom-user-dir
- Deprecates the doom-private-dir variable in favor of doom-user-dir.
- Renames the pseudo category for the user's module: :private -> :user.
- Renames the doom-private-error error type to doom-user-error.

Emacs uses the term "user" to refer to the "things" in user space (e.g.
user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs,
package-user-dir, etc), and I'd like to be consistent with that. It also
has the nice side-effect of being slightly shorter. I also hope
'doom-user-error' will be less obtuse to beginners than
'doom-private-error'.
2022-08-14 20:43:35 +02:00
Henrik Lissner
0407621aff
refactor: deprecate EMACS2[89]+, NATIVECOMP, MODULES
To reduce redundancy, remove the maintenance hassle that version
constants would impose later on, and rely on built-in
facilities (featurep) more over global variables or doomisms, these
global constants have been deprecated in favor of Emacs "features":

- EMACS28+   -- replace with (> emacs-major-version 27)
- EMACS29+   -- replace with (> emacs-major-version 28)
- NATIVECOMP -- replace with (featurep 'native-compile)
- MODULES    -- replace with (featurep 'dynamic-modules)

(These constants will be formally removed when v3 is released. The IS-*
constants are likely next, but I haven't decided on their substitutes
yet)

I also decided to follow native-compile's example and provide features
for Emacs' system features (since system-configuration-features' docs
outs itself as a poor method to detect features):

- dynamic-modules
- jansson
- native-compile -- this one already exists, but will instead be removed
  if it's non-functional; i.e. (native-comp-available-p) returns nil.

These are now detectable using featurep, which is fast and built-in.
2022-08-14 20:43:35 +02:00
Henrik Lissner
b9933e6637
refactor!: restructure Doom core
BREAKING CHANGE: This restructures the project in preparation for Doom
to be split into two repos. Users that have reconfigured Doom's CLI
stand a good chance of seeing breakage, especially if they've referred
to any core-* feature, e.g.

  (after! core-cli-ci ...)

To fix it, simply s/core-/doom-/, i.e.

  (after! doom-cli-ci ...)

What this commit specifically changes is:
- Renames all core features from core-* to doom-*
- Moves core/core-* -> lisp/doom-*
- Moves core/autoloads/* -> lisp/lib/*
- Moves core/templates -> templates/

Ref: #4273
2022-07-30 22:41:13 +02:00
Renamed from core/core-ui.el (Browse further)