Commit graph

537 commits

Author SHA1 Message Date
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
Henrik Lissner
14b2395424
refactor: remove unused core variables
doom-debug-p and doom-interactive-p have always been intentionally
redundant, because changing the variables they replaced had other
side-effects, which made writing tests for them difficult. Since our
new (yet unpublished) tests lean heavily toward integration testing more
than unit testing, this becomes an implementation detail.

And doom-init-p's only use was refactor out at some point in the past,
so it's no longer used.

Also done to reduce Doom's footprint, in general.
2022-06-29 18:14:20 +02:00
Henrik Lissner
bea3cc161c
fix: find-function-search-for-symbol moving cursor
For symbols defined in the current buffer, for Emacs 29+ users.
2022-06-04 15:02:06 +02:00
Henrik Lissner
f96c666460
tweak: add $XDG_RUNTIME_DIR to recentf-exclude
Ref: eb170a7a38
2022-06-04 15:02:06 +02:00
Henrik Lissner
eb170a7a38
tweak: add /run to recentf-exclude 2022-05-27 00:35:37 +02:00
Henrik Lissner
b57d4c8d71
bump: :core
Fuco1/smartparens@f59a40d54f -> Fuco1/smartparens@37f77bf2e2
Wilfred/helpful@f865f17ad0 -> Wilfred/helpful@67cdd1030b
bbatsov/projectile@4e6f66c329 -> bbatsov/projectile@0243ad7dc9
emacs-straight/project@5347dfc5f3 -> emacs-straight/project@125a1a8d15
justbur/emacs-which-key@9f64733e4a -> justbur/emacs-which-key@1217db8c63
raxod502/straight.el@3b0f1a1d21 -> raxod502/straight.el@653b04a64f

- Wilfred/helpful@67cdd1030b fixed the wrong-number-of-args error from
  help-fns--autoloaded-p on Emacs 29 (see #6097). Our temporary fix is
  no longer needed.
- Wilfred/helpful#36 fixed the void-variable: read-symbol-positions-list
  error on Emacs 29 (see #6063). Our temporary fix is no longer needed.

Ref: Wilfred/helpful@67cdd1030b
Ref: Wilfred/helpful#36
Fix: #6063
Fix: #6097
Fix: #6127
2022-02-23 15:23:14 +01:00
Henrik Lissner
df5cb2051c
tweak: update so-long config for Emacs 28+
Emacs 28 introduced the much faster native function
buffer-line-statistics, which makes so-long's job significantly less
expensive, so we can afford a larger threshold there.

Still, we gimp it a little if native-comp isn't present.
2022-02-19 01:08:08 +01:00
Henrik Lissner
2a7eee556f fix: wrong-number-of-args error w/helpful on Emacs 29
help-fns--autoloaded-p's signature changed in 29, which helpful hasn't
adapted to yet. This temporary fix works around it while we wait.
2022-02-10 21:07:20 +01:00
Henrik Lissner
00b7e390d3 refactor!(lib): change condition for doom-set-jump-maybe-a
BREAKING CHANGE: doom-set-jump-maybe-a would formerly set a jump point
if FN returns non-nil. That condition was changed to: if the current
buffer or cursor position have changed after FN.
2022-02-10 21:07:20 +01:00
Henrik Lissner
c6d3ceef7e fix: void-variable read-symbol-positions-list w/ helpful
Only affects users on Emacs HEAD (29+), where read-symbol-positions-list
has been removed. This is a temporary solution until the reference is
addressed upstream, in the elisp-ref package.

Ref: Wilfred/elisp-refs#35
Fix: #6063
2022-02-02 01:55:56 +01:00
Henrik Lissner
725c5c53a6 tweak: wrap lines in helpful buffers 2021-11-25 01:22:58 +01:00
Clément Guidi
3e5f9a1ba1 fix: remap xref-go-* to better-jumper
Emacs 29.x introduces xref-go-{back,forward}. xref-pop-marker-stack is
now obsolete.

Fix: #5813
Signed-off-by: Clément Guidi <clementguidi@gmail.com>
2021-11-23 02:31:00 +01:00
Daanturo
b4cc1c84d8
fix: wrong-number-of-args error on dtrt-indent-mode
doom--fix-broken-smie-modes-a forces dtrt-indent-mode to expect exactly
one argument so an error will be raised when the latter is turned on
without args programmatically in lisp.
2021-11-07 01:53:17 +01:00
Henrik Lissner
3bcee249d3 fix: side-effects unset backup-directory-alist 2021-10-10 18:36:46 +02:00
Henrik Lissner
6541ae5135 fix: revert x-select-request-type to default
Its default value is acceptable in 28+ and handles clipboard integration
in PGTK Emacs, so we don't have to.

Thanks to @sei40kr for revealing this fix to me (in #5219).

Fix #5219
2021-09-13 17:26:33 +02:00
Henrik Lissner
0b5243c12c perf: optimize tramp + projectile integration
Reduce how much projectile hits the server in TRAMP buffers by:

- Not looking for fd/fdfind (just use the VCS-specific commands
  projectile provides and assume they're present on the remote).
- Not walking up the directory tree to display the project name in the
  mode line.
- Reducing TRAMP file-cache misses.
- Reducing how chatty tramp is about its connections.

Fix #5360
2021-08-10 17:10:42 -04:00
Henrik Lissner
045ea7460d nit: revise and reformat code comments 2021-08-04 01:53:12 -04:00
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
12732be155 feat: don't delay when opening auto-saved files
If a file has auto-saved data (see auto-save-default), after-find-file
will stop the world for 1 second to tell you about it. Very annoying.
Just log it to *Messages* and open the file immediately.
2021-08-04 01:53:12 -04:00
Henrik Lissner
f604ce6d01 Minor refactors & reformatting 2021-05-25 10:35:21 -04:00
Henrik Lissner
7c273ad173 Remove hard dependency on sp-point-in-* predicates 2021-05-16 21:22:06 -04:00
Henrik Lissner
69beabe287 Fix #5060: don't hash relative backup file paths
Also refactors undo-fu-session's make-hashed-file-path advise to use
make-backup-file-name-1.
2021-05-16 14:02:34 -04:00
Henrik Lissner
7332a6f798 Refactor doom--recentf-file-truename-fn 2021-05-09 00:20:52 -04:00
Henrik Lissner
e2a11d24fd core: minor refactors and comment revisions 2021-05-06 18:36:32 -04:00
Henrik Lissner
3b9aee6868 Strip /sudo:...@ from recent file paths
Also:
+ Refactors recentf config in general, revises/expands its code
  comments, and uses :custom to set file variable (a new convention I'm
  trying out).
+ recentf-auto-cleanup = 300 in daemon sessions, since the old strategy
  of "cleanup on kill-emacs-hook" isn't so great for daemon users.
2021-05-06 18:36:32 -04:00
Henrik Lissner
9831642a02 Fix #4993: shorten long file names for caches
Emacs generates long file names for auto-save and backup files.
undo-fu-session and tramp are two more big offenders. This fix SHA1s
their file names so they never exceed 40 characters.

Will also affect any package that uses make-backup-file-name-1
directly (like undo-tree).
2021-05-06 18:36:32 -04:00
Henrik Lissner
f4382b45fd Remove redundant mode from so-long-minor-modes
Already in its default value.
2021-05-06 04:27:32 -04:00
Jan Felix Langenbach
3c00ddcebd Fix smartparens pairing ' and ` in the minibuffer 2021-04-28 21:50:19 +02:00
Henrik Lissner
ce65645fb8 Minor refactors & comment revision 2021-03-27 18:27:19 -04:00
Henrik Lissner
6cb5c381b8 Disable dtrt-indent in pascal-mode
Throws wrong-type-argument number-or-marker-p errors otherwise, because
dtrt-indent--for-each-indentation calls
dtrt-indent--skip-to-end-of-match with four nil arguments (presumably
because there is no pascal entry in dtrt-indent-language-syntax-table)
and there is no fall back to its default entry.
2021-02-25 18:34:31 -05:00
Henrik Lissner
d52abd37f7 Fix #4691: half revert 7e9911f642
Seems this was not fixed upstream.
2021-02-24 18:06:30 -05:00
Henrik Lissner
79f2f42b95 Persist Emacs registers across sessions
Has the side effect of persisting evil macros between
sessions (equivalent to vim's "set viminfo")
2021-02-21 14:44:59 -05:00
Henrik Lissner
7e9911f642 Bump :core
domtronn/all-the-icons.el@5fa7283 -> domtronn/all-the-icons.el@2f5ea72
jscheid/dtrt-indent@854b9a1 -> jscheid/dtrt-indent@4a30d8e
jwiegley/use-package@317137b -> jwiegley/use-package@a7422fb
raxod502/straight.el@f2cb888 -> raxod502/straight.el@0f9b828

Remove dtrt-indent+smie fix (was fixed upstream)
2021-02-11 17:35:48 -05:00
Henrik Lissner
510bc7b5b4 Revert "Don't auto-create directory when opening files"
This reverts commit 4d7640b4c2.
2021-02-11 17:35:48 -05:00
Henrik Lissner
3a4f182a3c Revise core docstrings & comments 2021-01-27 03:36:53 -05:00
Henrik Lissner
4d7640b4c2 Don't auto-create directory when opening files
It'll ask when you want to save, so this is redundant and imposing.
2021-01-27 03:30:19 -05:00
Henrik Lissner
3967d6001b
Comment/docstring revision 2020-12-18 16:10:06 -05:00
Henrik Lissner
0f2bb647eb
Rewrite "large file" detection
Adds a doom-inhibit-large-file-detection letvar for disabling it in
some contexts.
2020-12-18 16:08:22 -05:00
Henrik Lissner
aba28824a0
Fail gracefully on files with no large-file-size-alist entry 2020-12-15 17:03:40 -05:00
Henrik Lissner
5aaaf3d99c
Remove text-mode from so-long-target-modes
This is too buggy as a general rule. Too many false positive bug
reports from plugins writing text files that are too large/long.

Fixes #4419
2020-12-15 16:58:43 -05:00
Henrik Lissner
9490d42cd3
Comment revision 2020-12-14 15:48:29 -05:00
Henrik Lissner
d69d245778
Remove sp-escape-quotes-after-insert hack
Was fixed upstream at some point.
2020-12-13 19:48:43 -05:00
Henrik Lissner
084defb165
Reset sp-pair-overlay-keymap for evil users
Smartparens creates a conditional keybind on C-g when its overlays are
present (whether or not they're visible). This causes confusion when
evil users are forced to press C-g twice to exit insert mode.
2020-12-13 19:41:08 -05:00
Nikita Bloshchanevich
61135f5374 Enable smartparens' for evil-ex'
febf960 introduced a regression, in that it caused `smartparens-mode' to
no longer be enabled for `evil-ex'. This is because the latter doesn't
call `read--expression', but calls the minibuffer directly instead.

Return `doom-init-smartparens-in-minibuffer-maybe-h', enabling
`smartparens' for `evil-ex'. The hook responsibly for enabling it in
`eval-expression-minibuffer-setup-hook' was renamed to
`doom-init-smartparens-in-eval-expression-h', since otherwise the naming
would have been awkward.

Also explicity enable `smartparens-mode' instead of toggling it.
2020-12-12 12:58:41 +01:00
Henrik Lissner
febf960c4e
Merge pull request #4401 from nbfalcon/bugfix/edebug-eval-expression-smartparens
Enable smartparens for `edebug-eval-expression'
2020-12-09 17:30:25 -05:00
Nikita Bloshchanevich
9e56927b5f Enable smartparens for `edebug-eval-expression'
`doom-init-smartparens-in-minibuffer-maybe-h' is responsible for enabling
`smartparens' in the minibuffer, which it does by checking `this-command'.
However, the list of commands doesn't include `edebug-eval-expression',
preventing the mode from being enabled for it.

Fix this by enabling `smartparens' in `eval-expression-minibuffer-setup-hook',
unconditionally, which means that anything using `interactive' "x" or
`read--expression' will work correctly.
2020-12-09 21:55:21 +01:00
Henrik Lissner
4652511440
Fix #4384: save server auth files to EMACSDIR
It's where the daemon looks for them. It's too much hassle to move it
elsewhere.
2020-12-08 21:40:10 -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
Henrik Lissner
8ffc9ba429
Disable so-long if visual-line-mode is enabled
Long lines are very common in text modes where visual-line-mode is
enabled.
2020-11-16 19:29:32 -05:00