Commit graph

727 commits

Author SHA1 Message Date
Henrik Lissner
a98c2ece63 Fix #4992: set-fontset-font call when unavailable
Missed a guard on a set-fontset-font call in d4dec3565's refactors.
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
623127597f Disable minibuffer error silencer hack in Emacs 27+
In older versions of Emacs (26.3 and below), the minibuffer would
replace the whole minibuffer's contents just to display error messages.
This was very frustrating for mundane errors, like the "text is
read-only" error you get when you press backspace at BOL.

Later versions of Emacs now display errors at the end of the minibuffer,
so this hack will no longer be needed when we drop 26.x support later
this year.
2021-05-06 04:27:32 -04:00
Henrik Lissner
9ef11d0e31 Auto-truncate compilation buffers
To prevent memory issues in long lived processes.

Allows #4261 to be merged
Addresses (and mentioned in) asok/projectile-rails#148
2021-02-26 21:33:00 -05:00
Henrik Lissner
47925933df Fix "Can't set ASCII font to nil" error in daemon
Caused because the :ui unicode module sets doom-unicode-font to nil,
then doom-init-extra-fonts-h tries to use it.
2021-02-17 14:20:37 -05:00
Henrik Lissner
c3c001ad7d Bump core
domtronn/all-the-icons.el@c795d0f -> domtronn/all-the-icons.el@5fa7283
hlissner/emacs-so-long@ed666b0 -> emacs-straight/so-long@a5d445d
jwiegley/use-package@365c73d -> jwiegley/use-package@317137b
raxod502/straight.el@ac4df5c -> raxod502/straight.el@f2cb888

+ Complain if :no-byte-compile, :no-native-compile, or :no-build are
  used in package!. Straight replaced them with :build (and the old
  :build was renamed to :pre-build). See raxod502/straight.el@6a273d1
+ Update getting_started.org to mention :build
+ Switch to emacs-straight/so-long so I don't have to maintain my mirror
  anymore.
2021-02-04 07:32:26 -05:00
Henrik Lissner
3a4f182a3c Revise core docstrings & comments 2021-01-27 03:36:53 -05:00
Henrik Lissner
614dc93569 mouse-wheel-scroll-amount-horizontal = 2
Make hscrolling a little faster. Our windows and displays are large.
Scrolling one character at a time is too slow.
2021-01-27 02:50:39 -05:00
Henrik Lissner
454c4132d4 Slower mouse-wheel and re-enable acceleration
This improves the illusion of faster scrolling.
2021-01-27 02:50:36 -05:00
Henrik Lissner
6d2b9ff100 Enable hl-line-mode in org-agenda-mode
Closes #4567
2021-01-27 02:50:19 -05:00
Henrik Lissner
8cd7a1dbc6
Fix doom-unicode-font 2021-01-11 02:41:28 -05:00
Henrik Lissner
8c258c272d
Update comments 2021-01-11 02:41:14 -05:00
Henrik Lissner
5cb2395e08
Set custom-theme-directory in core-ui 2021-01-10 08:07:27 -05:00
Henrik Lissner
cfb8a866dc
Bump :core
Fuco1/smartparens@7f5825d -> Fuco1/smartparens@63695c6
bbatsov/projectile@d1cfad0 -> bbatsov/projectile@c31bd41
domtronn/all-the-icons.el@6917b08 -> domtronn/all-the-icons.el@9aa16ae
iqbalansari/restart-emacs@e570749 -> iqbalansari/restart-emacs@1607da2
jscheid/dtrt-indent@a7ade6d -> jscheid/dtrt-indent@854b9a1
justbur/emacs-which-key@ca268fd -> justbur/emacs-which-key@428aedf
jwiegley/use-package@caa92f1 -> jwiegley/use-package@365c73d
raxod502/straight.el@3277e1c -> raxod502/straight.el@a32c97c

+ Closes #4513
+ Fixes (wrong-number-of-arguments (3 . 4) 2) error for users on Emacs
  HEAD (see bbatsov/projectile#1635).
+ package! :build semantics have changed due to upstream changes. What
  was :build is now :pre-build. What was :no-build is now :build nil.
+ Now we must be careful not to auto-disable the "use-package" psuedo
  theme. It is used as a place to store :custom assignments without them
  being saved to custom.el.
2021-01-09 02:55:09 -05:00
Henrik Lissner
5da3641aad
Move init.el to early-init.el
Our first step toward dropping 26.x support. Allows our optimizations to
reach a little further into the startup.
2021-01-09 02:55:08 -05:00
Henrik Lissner
ae5cb5b957
Always prioritize custom-theme-directory
Over plugins/built-in themes.
2020-12-29 00:52:12 -05:00
Henrik Lissner
65416ff472
Fix #4427: ivy-read-action-format-function = ivy-read-action-format-columns
And remove max-mini-window-height, which interferes with ivy's own
minibuffer resizing logic, and isn't a terribly helpful default anyway.
2020-12-13 15:42:52 -05:00
Henrik Lissner
e1c9145a5d
Run after-setting-font-hook after fontset config
Helps #3298
2020-11-19 00:44:16 -05:00
Henrik Lissner
427d38008b
Overwrite yes-or-no-p instead of advise it
+ Some snippets libraries assume this instead of the advise, causing
  errors.
+ Advising a C function may have implications when its uses are
  natively compiled.
2020-11-16 19:29:41 -05:00
Henrik Lissner
8999719852
window-resize-pixelwise = nil
Causes crashes and freezing in some cases where window are resized too
quickly/rapidly.

May address #3868
2020-11-16 19:24:13 -05:00
Henrik Lissner
472ec52481
Use global-hl-line-mode instead of hl-line
It's easier for users to remove one hook than to remove four, and Emacs
users tend to expect global-hl-line-mode, but not hl-line-mode.
2020-11-14 13:57:00 -05:00
Henrik Lissner
03b0a834dd
Fix #4214: support setting doom-theme to 'default
People who like the default theme actually exist.
2020-11-04 19:49:35 -05:00
Henrik Lissner
9f261788b9
Fix #4206: hl-line reactivates on exiting visual mode 2020-11-03 16:14:24 -05:00
Henrik Lissner
a25ad3fa7c
Restore line numbers in artist-mode #2742
The issue was fixed upstream, but won't be available until Emacs 28.
2020-10-30 19:09:31 -04:00
Henrik Lissner
911c8f48b4
Fix #2742: cursor offset in artist-mode
Due to line numbers.
2020-10-05 16:04:13 -04:00
Henrik Lissner
518c97a2ac
Rename {if,when}! -> eval-{if,when}!
To better represent its purpose, as extensions to Emacs' eval-when*
API (for control flow at compile time).
2020-08-27 01:10:08 -04:00
Henrik Lissner
c74f8170b6
Remove mac-specific packages from core
Now that they're in :os macos
2020-08-20 03:33:35 -04:00
Henrik Lissner
157bc61d63
Fix kill-current-buffer prompting to save survivor buffers
This advice doesn't kill (real) buffers if they're visible in another
window, but would prompt you about unsaved buffers even if it wasn't
destined to be killed. Now it only prompts you if the buffer will be
killed.
2020-08-08 02:59:59 -04:00
Henrik Lissner
e54bbb7d1e
Remove redundant visible-cursor setting
This was moved to the os/tty module.
2020-08-08 02:59:39 -04:00
Henrik Lissner
673ab37dac
Make function column in profiler report wider
Default was 50 for cpu and 55 for memory; much too small for the stacks
we deal with.
2020-08-07 20:15:14 -04:00
Henrik Lissner
e2855db2a6
Refactor doom-highlight-non-default-indentation-h
And revise its docstring.
2020-08-02 22:55:15 -04:00
Henrik Lissner
1406a45750
Fix indentation highlights in built-in libraries
Doom highlights incorrect indentation (i.e. tabs if indent-tabs-mode =
nil, spaces if indent-tabs-mode = t). This used to be disabled in
read-only buffers (e.g. built-in libraries), making style conflicts hard
to see. No more! Now you can see the mess for yourself!
2020-08-02 22:48:35 -04:00
Compro-Prasad
d1c2a4446a
[UI] Set prompt to readonly in comint buffers
Comint buffers like *Python*, *shell*, etc. will benifit from this
change as the prompt wont be deletable.
2020-07-28 20:48:30 +05:30
Paul A. Patience
a282730ce9 Fix typos and reword docstrings 2020-07-23 07:35:31 -04:00
Leo Alekseyev
dbb48b7360 Changing add-hook in :config of use-package to :hook 2020-06-10 23:23:17 -07:00
Leo Alekseyev
9f5ae41037 This fixes https://github.com/hlissner/doom-emacs/issues/3348
I am not sure what the setting + removing hook code in use-package!
winner was trying to accomplish, but it was breaking winner-redo
functionality. This patch fixes the issue.
2020-06-10 20:38:39 -07:00
Henrik Lissner
6a8e990459
Fix wrong-number-of-args error on doom-init-theme-h
And silence byte-compiler warning for unused lexical argument.
2020-05-25 00:01:52 -04:00
Henrik Lissner
a262527a7f
Fix load-theme not disabling old themes in Emacs 26
In Emacs 26, the old themes must be disabled *before* the new one is
loaded, otherwise it will fail to do so. In 27+ this isn't necessary,
and it's preferred that we do it after the theme loads, so we can be
absolutely sure the theme was successfully enabled, before we disable
the others!
2020-05-21 04:33:39 -04:00
Henrik Lissner
dd0da922a3
{menu,tool,scroll}-bar-mode = nil
See comments.
2020-05-20 15:40:39 -04:00
Henrik Lissner
0e851ace9b
Backport bits of CLI rewrite
The rewrite for Doom's CLI is taking a while, so I've backported a few
important changes in order to ease the transition and fix a couple bugs
sooner.

Fixes #2802, #2737, #2386

The big highlights are:

- Fix #2802: We now update recipe repos *before* updating/installing any
  new packages. No more "Could not find package X in recipe repositories".

- Fix #2737: An edge case where straight couldn't reach a pinned
  commit (particularly with agda).

- Doom is now smarter about what option it recommends when straight
  prompts you to make a choice.

- Introduces a new init path for Doom. The old way:
  - Launch in "minimal" CLI mode in non-interactive sessions
  - Launch a "full" interactive mode otherwise.
  The new way
  - Launch in "minimal" CLI mode *only* for bin/doom
  - Launch is a simple mode for non-interactive sessions that still need
    access to your interactive config (like async org export/babel).
  - Launch a "full" interactive mode otherwise.

  This should fix compatibility issues with plugins that use the
  async.el library or spawn child Emacs processes to fake
  parallelization (like org's async export and babel functionality).

- Your private init.el is now loaded more reliably when running any
  bin/doom command. This gives you an opportunity to configure its
  settings.

- Added doom-first-{input,buffer,file}-hook hooks, which we use to queue
  deferred activation of a number of packages. Users can remove these
  modes from these hooks; altogether preventing them from loading,
  rather than waiting for them to load to then disable them,
  e.g. (after! smartparens (smartparens-global-mode -1)) -> (remove-hook
  'doom-first-buffer #'smartparens-global-mode)

  Hooks added to doom-first-*-hook variables will be removed once they
  run.

  This should also indirectly fix #2386, by preventing interactive modes
  from running in non-interactive session.

- Added `doom/bump-*` commands to make bumping modules and packages
  easier, and `doom/bumpify-*` commands for converting package!
  statements into user/repo@sha1hash format for bump commits.

- straight.el is now commit-pinned, like all other packages. We also
  more reliably install straight.el by cloning it ourselves, rather than
  relying on its bootstrap.el.

  This should prevent infinite "straight has diverged from master"
  prompts whenever we change branches (though, you might have to put up
  with it one more after this update -- see #2937 for workaround).

All the other minor changes:

- Moved core/autoload/cli.el to core/autoload/process.el
- The package manager will log attempts to check out pinned commits
- If package state is incomplete while rebuilding packages, emit a
  simpler error message instead of an obscure one!
- Added -u switch to 'doom sync' to make it run 'doom update' afterwards
- Added -p switch to 'doom sync' to make it run 'doom purge' afterwards
- Replace doom-modules function with doom-modules-list
- The `with-plist!` macro was removed, since `cl-destructuring-bind`
  already serves that purpose well enough.
- core/autoload/packages.el was moved into core-packages.el
- bin/doom will no longer die if DOOMDIR or DOOMLOCALDIR don't have a
  trailing slash
- Introduces doom-debug-variables; a list of variables to toggle on
  doom/toggle-debug-mode.
- The sandbox has been updated to reflect the above changes, also:
  1. Child instances will no longer inherit the process environment of
     the host instance,
  2. It will no longer produce an auto-save-list directory in ~/.emacs.d
2020-05-15 01:33:52 -04:00
Henrik Lissner
c25f88c874
Fix #2995: ligature & all-the-icons conflicts
See domtronn/all-the-icons.el#174
2020-04-30 17:02:24 -04:00
Henrik Lissner
eb995adada
Minor refactors & comment revision 2020-04-29 23:48:21 -04:00
Henrik Lissner
cb6dd300b4
Add comment wrt load-theme not disabling previous themes 2020-04-29 23:48:21 -04:00
Henrik Lissner
936124e546
Introduce if! & when! macros
The condition argument is evaluated at compile/expansion time, and its
body expanded directly.
2020-04-29 23:48:21 -04:00
Henrik Lissner
d12752324a
Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
Henrik Lissner
5bc86de760
Remove goto-addr
It's not essential and is redundant with `gf` and find-file-at-point,
which already understand URLs at point.
2020-04-29 03:47:20 -04:00
Henrik Lissner
c96bbf909c
Fix #2992: remove buffer-or-name check in switch-buffer executor 2020-04-29 00:33:54 -04:00
Henrik Lissner
6e8487e1d4
Fix #2992: wrong-type-arg stringp on switch-to-buffer
(switch-to-buffer nil) should switch to other-buffer, as per its
documentation, which was not respected by our switch-buffer hook
mechanism.
2020-04-28 15:10:59 -04:00
Henrik Lissner
993888cd2b
Enable hl-line-mode in special-mode buffers 2020-04-25 21:23:13 -04:00