Commit graph

525 commits

Author SHA1 Message Date
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
Henrik Lissner
9bbdacc79b
Prefix tramp auto-save files
Makes them easier to see and reduces the possibility of filename
conflicts with autosaves of local files.
2020-10-22 14:51:49 -04:00
Henrik Lissner
8892be8372
Correct comments on auto-save #4096 2020-10-20 23:32:00 -04:00
Henrik Lissner
b4e66bffeb
More sensible backup/auto-save defaults
More sensible defaults.

And save tramp backups locally, to prevent excessive remote writes.
2020-10-20 23:12:16 -04:00
Henrik Lissner
24cc09895d
Enable auto-save by default
Offers a backup in case of crashes or power loss.

Fixes #4096
2020-10-18 19:08:08 -04:00
Henrik Lissner
9cdb0b85d3
Optimize large-file detection
Two less file ops when opening new files. Particularly helpful for
remote files.
2020-10-18 19:08:07 -04:00
Henrik Lissner
c59ae5d172
Stop ws-butler from corrupting undo history #4071 2020-10-11 16:41:07 -04:00
Henrik Lissner
3935d431fc
tab-always-indent = nil
Seems like a more sensible default to reindent the line if cursor is at
BOL or in indentation, then insert literal indentation (tab or space *
tab-width) otherwise.
2020-09-01 01:41:39 -04:00
Henrik Lissner
801cfd63d4
Don't recenter window after better-jumper jump
On C-o or C-i; this can be more disorienting than helpful.
2020-08-21 15:49:39 -04:00
Henrik Lissner
995b45285c
core: revise & clarify comments 2020-08-20 03:35:29 -04:00
Henrik Lissner
9cab6a6fd9
Fix #3723: auto-revert on window/buffer switch 2020-08-13 22:49:35 -04:00
Henrik Lissner
0a4841b247
Add :os tty module
- Moves clipetty to its own, opt-in module (#2671, #3195, #3498)
- Fix cursor shape changing between evil states (#1994)
- Moves `xterm-mouse-mode` and `visible-cursor` config out of core.
2020-08-07 23:44:39 -04:00
Henrik Lissner
9a5175dd0e
Fix savehist compression & persist marks
+ Fixes: doom-unpropertize-kill-ring-h ran too late to affect the value
  of kill-ring that gets saved.
+ Adds: now persist mark-ring and global-mark-ring (doesn't affect evil
  users)
2020-08-05 16:21:40 -04:00