Commit Graph

701 Commits

Author SHA1 Message Date
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
Henrik Lissner
06d5d5e6c0
General refactors, reformatting & comment revision 2020-04-23 23:56:17 -04:00
Henrik Lissner
0837c56430
Fix loading new themes from face-remapped buffers
E.g. If mixed-pitch-mode is enabled and you change themes, then open a
new frame, the theme is messed up.

Also refactor load-theme advice into one.
2020-04-23 03:33:08 -04:00
Henrik Lissner
6e4ec07ad5
Fix void-variable global-whitespace-mode
In case whitespace-mode hasn't been loaded yet.
2020-04-17 21:50:05 -04:00
Keating950
54041ad827 simplifying boolean expression 2020-04-17 21:33:45 -04:00
Keating950
1a07ee8269 simplified expression; fixed typo 2020-04-17 19:59:54 -04:00
Keating950
8535318cf4 Update docstring 2020-04-16 19:05:23 -04:00
Keating950
3be5692c77 Respect global whitespace mode config, if set 2020-04-16 19:00:23 -04:00
Henrik Lissner
7a4ad7d343
Disable blink-cursor-mode again #2903
New issues with blinking cursors surfaced (see comments), so I am
reverting the second half of be412c8630.
2020-04-15 14:20:00 -04:00
Henrik Lissner
e4110e01b9
confirm-nonexistent-file-or-buffer = nil 2020-04-15 00:17:16 -04:00
Henrik Lissner
ce333dd178
visible-cursor = nil
Half reverts be412c8630, now that I better understand what it was
for (and have, through some tinkering, managed to reproduce its effect).
2020-04-15 00:13:35 -04:00
Henrik Lissner
be412c8630
Restore blinking cursor default
Sure it's distracting, but it's also a good indicator that Emacs hasn't
frozen. Not that Emacs has every frozen on me, but my computer has,
so...

Plus, visible-cursor doesn't do anything on any of the systems,
terminals and shells I've tested, so I'll just leave it to its default.
2020-04-13 22:37:43 -04:00
Henrik Lissner
b78fc4eb76
Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00
Henrik Lissner
296cbff097
General, minor refactor & reformatting 2020-03-27 18:06:42 -04:00
Henrik Lissner
273c1e0861
Disable former themes only if new one loaded successfully 2020-03-27 02:49:05 -04:00
Henrik Lissner
53970b3a59
Deprecate prefer-byte-compiled theme optimization
This optimization was incorporated into load-theme in Emacs 27+.
2020-03-25 15:48:50 -04:00
Henrik Lissner
0e2c9e8cb0
Disable enabled themes when loading a new one
Prevents theme conflicts.
2020-03-25 15:32:32 -04:00
Henrik Lissner
eb69073578
Fix infinite redrawing/freezing with {centaur,awesome}-tabs
Caused by over-zealous doom-switch-window-hook.

For my own sanity (and if you're curious), I'll break it down here:

1. Doom has a `doom-switch-window-hook` hook. It triggers when window
   focus is changed.
2. We use `buffer-list-update-hook` to trigger
   `doom-switch-window-hook`. (That may sound weird, but this hook is
   reliably executed when window focus is changed -- there are
   safeguards to prevent this from triggering too often)
3. `buffer-list-update-hook` triggers whenever a buffer is created, but
   `doom-switch-window-hook` only triggers if the created buffer is in
   a new window.
4. The use of `with-temp-buffer` in `centaur-tabs-line-format` counts as
   "buffer creation" in a "new window".
5. `+vc-gutter-update-h` is in `doom-switch-window-hook`. This refreshes
   git-gutter, which initiates a redraw of Emacs.
6. When Emacs redraws, it recalculates its mode and header lines. which
   triggers `doom-switch-window-hook` once, which triggers
   `+vc-gutter-update-h`, which redraws the screen, then Emacs recalculates
   the header line, running `centaur-tabs-line-format`...

Infinite loop ensues

Hopefully fixes:
- hlissner/doom-emacs#2436
- ema2159/centaur-tabs#18
- ema2159/centaur-tabs#88
2020-02-27 21:47:32 -05:00
Henrik Lissner
900ec70ee3
Ensure menu/tool/scroll bars are disabled 2020-02-21 12:49:57 -05:00
Henrik Lissner
cd2f01e9ab
Set fixed-pitch font too 2020-02-21 01:05:18 -05:00
Henrik Lissner
f7445a10db
General refactor & reformatting across the board 2020-02-18 22:56:47 -05:00
Henrik Lissner
29e4719a7d
Disable GUI elements even if you use chemacs #2354 2020-02-02 02:07:13 -05:00
Henrik Lissner
fd41b1b552
Disable more customize* commands 2020-01-23 01:45:18 -05:00
Henrik Lissner
dc2b9781ab
Minor refactors & reformatting 2020-01-20 01:55:31 -05:00
Henrik Lissner
8c7aaa6468
scroll-conservatively = 101 #2217 2020-01-04 17:12:09 -05:00
Henrik Lissner
f78f71a74c
Minor refactors & comment revision 2020-01-01 23:52:02 -05:00
Henrik Lissner
6f951229ec
Add & revise comments
And move line number hooks to core/autoload/ui.el
2019-12-31 15:55:56 -05:00