Commit Graph

601 Commits

Author SHA1 Message Date
Henrik Lissner
0f0a8a5744
Rewrite custom-set-face!, add custom-theme-set-face!
custom-set-faces! and custom-theme-set-faces! are now drop-in
replacements for custom-set-faces and custom-theme-set-faces with one
major distinction: the latter will wait for the theme to be loaded
before applying the changes, this allows you to use theme-specific APIs
in your face definitions (like doom-color from doom-themes).

You no longer have to think about load order when using these macros.
2019-07-06 23:22:27 +02:00
Henrik Lissner
2762a08a76
highlight non-default indent despite whitespace-mode
Before, a custom whitespace-style (or global-whitespace-mode) would
disable doom|highlight-non-default-indentation (because they were
incompatible). Now it injects itself into the current style, if one
exists.
2019-06-30 14:28:21 +02:00
Henrik Lissner
92676bfe39
uniquify-buffer-name-style = 'forward #1506 2019-06-28 17:28:53 +02:00
Henrik Lissner
2aa9252725
Move doom|disable-show-paren-mode to autoload/ui 2019-06-27 13:26:03 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
f3d8053933
Add internal doom-customize-theme-hook
Ensures custom-set-faces! take effect before any load-theme hooks.
2019-06-12 22:42:32 +02:00
Siddharth Shekar
aa64cf9426 Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
Henrik Lissner
2643d7e5ba
Prefer vertical splits 2019-05-29 23:46:45 -04:00
Henrik Lissner
6c69bf5313
Fix emoji font initialization 2019-05-28 23:47:52 -04:00
Henrik Lissner
f7fb729269
Enable show-trailing-whitespace selectively
Instead of enabling it globally and disabling it in particular modes, we
do the opposite. There are fewer edge cases this way.
2019-05-19 02:17:58 -04:00
Henrik Lissner
ba92adf7b3
Reformat core-ui, add outline headers to core-editor 2019-05-17 01:58:39 -04:00
Henrik Lissner
20720cda61
Remove visual-fill-column package from Doom core
It is not essential enough to keep in Doom core. I'm working on a new
module (or a rewrite for app/write) to replace it.
2019-05-17 01:58:27 -04:00
Henrik Lissner
67b6c44939
Enable show-trailing-whitespace globally
The variable is buffer-local and must be set with setq-default instead.

Also adds doom|{enable,disable}-show-trailing-whitespace hooks.
2019-05-17 01:58:08 -04:00
Henrik Lissner
5d2610fc31
Fix window issues due to switch-buffer hooks
- Fixes the issue that 45873615 was trying to address with frameworks
  like ivy, helm and hydra (where they would manipulate the wrong
  windows),
- Fixes an issue where notmuch couldn't find its buffers ("no buffer
  named *notmuch-X*" errors),
2019-05-16 11:42:30 -04:00
Henrik Lissner
4587361579
Prevent switch hooks while minibuffer is active
Fixes an issue where lv (used by hydra) would manipulate the wrong
window when invoked from, say, ivy.
2019-05-16 03:27:52 -04:00
Henrik Lissner
a4fb4070ea
Rework how unicode fonts are set and loaded 2019-05-15 20:24:52 -04:00
Henrik Lissner
962f6a1032
Fix switch-buffer hooks running from wrong buffer
The destination buffer should be current while the switch-buffer hooks
run.
2019-05-15 15:22:08 -04:00
Henrik Lissner
7443669b1e
Minor refactors & comment revision 2019-05-13 14:37:00 -04:00
Henrik Lissner
0f0fdbc00c
Add doom/{increase,decrease,reset}-font commands
Borrows the idea from zoom-frm (see #1389).
2019-05-12 21:56:52 -04:00
Henrik Lissner
ef4106dae8
Remove echo-keystrokes fix in isearch
It isn't necessary anymore.
2019-05-12 17:06:56 -04:00
Henrik Lissner
e088a21335
Fix theme not loading in daemon sessions #1397 2019-05-09 23:15:13 -04:00
Henrik Lissner
17e337a434
Remove reload-theme-on-new-display-device feature
The intention for this feature was to ensure the theme always looks as
expected even if you were to open a new frame on a different display
device (e.g. open a GUI frame, start the server, then open a tty frame
from it).

It turned out to be buggier than anticipated. The underlying issue is
that solaire-mode is fundamentally incompatible with tty Emacs.
Terminals uses will need to disable it, as there's no good way to
predict what kind of frames a user will open.

TL;DR Avoid opening a TTY frame from a GUI session. If you must, and you
see odd colors, disable solaire-mode.
2019-05-09 21:45:42 -04:00
Henrik Lissner
72e8178e42
show-trailing-whitespace = t
A sensible default.
2019-05-04 19:13:26 -04:00
Henrik Lissner
47f0f77d91
Fix #1384
Redundant with show-trailing-whitespace
2019-05-04 19:13:26 -04:00
Henrik Lissner
3bebf3ac9b
Extend switch-buffer hook coverage
To cover switch-to-{next,prev}-buffer commands, which are used in quite
a few places, but don't implicitly trigger switch-buffer hooks.

Also removes switch-{window,buffer,frame} logging. Adds too much noise,
which isn't very helpful.

Also fixes VC state not being refreshed when switching to stale buffers
in certain ways.
2019-05-02 23:10:09 -04:00
Henrik Lissner
4aa65aa019
Move avy, ace-link & ace-window out of core
They don't belong there, and ace-window is no longer a core dependency
anyhow.
2019-05-01 21:02:28 -04:00
Henrik Lissner
3a3017004c
Fix whitespace-style for non-default-indentation hl
And remove lines-tail. This is outside the purview of this hook.
2019-04-30 14:37:29 -04:00
Henrik Lissner
9735f034e1
General refactors & optimizations 2019-04-29 18:54:46 -04:00
Henrik Lissner
7c5fb8ed9c
Remove highlight-escape-sequences
Payoff < performance cost, and is too opinionated.
2019-04-29 18:17:23 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Henrik Lissner
337c16cb68
Dear byte-compiler, you drive me to drink,
About Emacs Lisp that I have to rethink.
The world could end,
And humanity transcend,
But you'd still be here raising a stink.
2019-04-05 23:52:29 -04:00
Henrik Lissner
45c9fb982d
Add docstring to switch-{buffer,window,frame} hooks 2019-04-05 22:50:09 -04:00
Henrik Lissner
259590d54e
Remove doom|protect-visible-buffer
This behavior is now isolated to kill-this-buffer.
2019-03-16 23:59:50 -04:00
Henrik Lissner
bd6233518b
Fix doom|run-switch-window-hooks
Using the wrong variable.
2019-03-13 20:15:23 -04:00
Henrik Lissner
d868f5fd10
Use new ;;;###package cookie
This will later be used for doom/describe-packages to list all locations
where a package is being configured (along with def-package! and after!
blocks).
2019-03-13 01:55:50 -04:00
Henrik Lissner
fe28c40371
Fix void-variable frame error w/ whitespace-mode
Fixes #1242
2019-03-11 19:11:10 -04:00
Henrik Lissner
4055f667fb
Defer doom|disable-whitespace-mode-in-childframes 2019-03-08 02:37:34 -05:00
Henrik Lissner
8e32f0da18
Rethink theme/font initialization order
+ Don't use set-frame-font. Causes issues for daemon users and is
  slower.
+ Revice init function docstrings
+ Load fonts a little earlier than themes

May resolve an issue where fonts in daemon Emacs are too small on
startup.

Addresses #1223
2019-03-08 02:37:33 -05:00
Henrik Lissner
a05b1877be
Rewrite switch-{buffer,window} hooks
+ 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.
2019-03-08 02:37:33 -05:00
Henrik Lissner
8c701ef7d4
Fix void-variable error from ediff config 2019-03-08 02:34:26 -05:00
Henrik Lissner
1ec9f5b2e9
Move hl-line-range-function fix to ui/doom
Remapping the hl-line face is what causes the bug that this fix
addresses.
2019-03-05 03:01:59 -05:00
Henrik Lissner
fbcb4e6973
Minor refactor across the board 2019-03-04 20:47:26 -05:00
Henrik Lissner
f18e1c0ea1
Refactor switch {buffer,window} hooks 2019-03-04 20:47:26 -05:00
Henrik Lissner
05303c0fdb
💥 Rethink core hook order & naming
- doom-post-init-hook was renamed doom-init-modules-hook
- doom-init-hook was renamed doom-before-init-modules-hook
- doom-init-modules-hook now runs before the user's config.el is run
- Moved doom-init-ui-hook to run later (on window-setup-hook rather than
  emacs-startup-hook).

Yield a modest improvement in startup times.
2019-03-04 20:47:26 -05:00
Henrik Lissner
d46bb287ae
General refactor of Doom core
- Code reduction and refactor across the board (cull unneeded minor
  advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
  augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
2019-03-02 01:34:19 -05:00
Henrik Lissner
21e01189b9
Properly keep cursor out of minibuffer prompt
The prompt in the minibuffer is read-only. You are able to move the
cursor into it before this fix.

This also more effectively silences echo-area output when deleting text
in the minibuffer. No more "Text is read-only" blocking what you're
typing.
2019-03-02 01:34:14 -05:00
Henrik Lissner
15dd5870ea
Fix uniquify+persp-mode compatibility
Uniquify would rename buffers across workspaces, causing "sticky"
buffers when switch between workspaces with buffers that have the same
base name.
2019-02-26 12:19:35 -05:00
Henrik Lissner
6f32ac371b
Highlight non-standard whitespace in file buffers
Prevents whitespace-mode from being enabled in special buffers (like
circe).
2019-02-20 01:28:19 -05:00
Henrik Lissner
c82faf7f10
General reformatting & minor refactors 2019-02-19 15:53:26 -05:00
Henrik Lissner
cee851f55b
Only activate whitespace-mode in editable buffers
Otherwise whitespace-mode will disrupt fontification in special buffers,
like helm and elfeed buffers.

Indirectly addresses #1179
2019-02-18 15:39:08 -05:00