Commit Graph

518 Commits

Author SHA1 Message Date
f604ce6d01 Minor refactors & reformatting 2021-05-25 10:35:21 -04:00
7c273ad173 Remove hard dependency on sp-point-in-* predicates 2021-05-16 21:22:06 -04:00
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
7332a6f798 Refactor doom--recentf-file-truename-fn 2021-05-09 00:20:52 -04:00
e2a11d24fd core: minor refactors and comment revisions 2021-05-06 18:36:32 -04:00
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
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
f4382b45fd Remove redundant mode from so-long-minor-modes
Already in its default value.
2021-05-06 04:27:32 -04:00
3c00ddcebd Fix smartparens pairing ' and ` in the minibuffer 2021-04-28 21:50:19 +02:00
ce65645fb8 Minor refactors & comment revision 2021-03-27 18:27:19 -04:00
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
d52abd37f7 Fix #4691: half revert 7e9911f642
Seems this was not fixed upstream.
2021-02-24 18:06:30 -05:00
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
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
510bc7b5b4 Revert "Don't auto-create directory when opening files"
This reverts commit 4d7640b4c2.
2021-02-11 17:35:48 -05:00
3a4f182a3c Revise core docstrings & comments 2021-01-27 03:36:53 -05:00
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
3967d6001b Comment/docstring revision 2020-12-18 16:10:06 -05:00
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
aba28824a0 Fail gracefully on files with no large-file-size-alist entry 2020-12-15 17:03:40 -05:00
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
9490d42cd3 Comment revision 2020-12-14 15:48:29 -05:00
d69d245778 Remove sp-escape-quotes-after-insert hack
Was fixed upstream at some point.
2020-12-13 19:48:43 -05:00
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
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
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
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
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
b5e948054c Refactor & reformat core.el
Backport a bit of core.el from our CLI rewrite.
2020-12-02 17:58:09 -05:00
affd076d53 Minor refactors & reformatting 2020-12-01 13:53:46 -05:00
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
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
8892be8372 Correct comments on auto-save #4096 2020-10-20 23:32:00 -04:00
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
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
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
c59ae5d172 Stop ws-butler from corrupting undo history #4071 2020-10-11 16:41:07 -04:00
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
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
995b45285c core: revise & clarify comments 2020-08-20 03:35:29 -04:00
9cab6a6fd9 Fix #3723: auto-revert on window/buffer switch 2020-08-13 22:49:35 -04:00
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
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
7638bd3968 Revert 439999cb6
I had incorrectly assumed tramp-own-remote-path would prepend the remote
system's PATH to tramp's exec-path, but it does not, it prepends your
local machine's PATH onto it. tramp-default-remote-path was what I was
looking for and it is already in tramp-remote-path by default.

If tramp can't find a program on the remote it's because either the
remote doesn't support getconf (which tramp uses to scrape the remote
PATH), or your PATH on the remote has been incorrectly configured.
2020-08-03 20:29:41 -04:00
439999cb66 Add tramp-own-remote-path to tramp-remote-path
Makes tramp consider the remote's PATH when searching for executables.
2020-08-03 15:01:11 -04:00
ccfaf3f464 Move auto-mode-alist fallbacks to bottom
So they don't override auto-mode-alist entries added by packages, like
direnv's .envrc entry.
2020-07-26 18:26:33 -04:00
bcc1b84e76 Increase so-long threshold for softwrapped text modes 2020-07-24 02:29:03 -04:00
c348b51e5f Fix typo regression from 8e83a8e84 2020-07-13 17:14:57 -04:00
8e83a8e842 Fix #3491: void-function doom-set-jump-h 2020-07-13 17:10:30 -04:00
3a38fc633c Change doom-{interactive,debug}-mode suffix to -p
Because these are not really modes.

Also makes `doom-debug-mode` an actual (global) minor mode.
2020-05-25 03:43:40 -04:00