Commit Graph

433 Commits

Author SHA1 Message Date
445ba1a46d Minor refactors & comment revision across the board 2019-12-31 19:18:02 -05:00
f8ed1894e7 Strip text properties from recentf entries
Causing tremendous bloat in recentf lists included with TRAMP paths.
2019-12-30 17:07:39 -05:00
bfce00d0b4 Don't use so-long if it's been disabled 2019-12-30 05:27:25 -05:00
7cc8a90c11 Disable save-place in large/long files 2019-12-26 01:41:45 -05:00
606d53cc47 Fix wrong-type-argument when opening file that doesn't exist yet 2019-12-25 14:02:43 -05:00
fd66b2321e Trigger so-long even in modes with no comment syntax
Refactoring of #2183
2019-12-25 02:17:01 -05:00
aa3cb1e7dc Inhibit saveplace in "large" files 2019-12-25 02:15:48 -05:00
44fcbb52dc Change format of doom-large-file-size-alist
Instead of mapping major modes to file size thresholds, it maps file
regexps (like auto-mode-alist) since the major mode cannot be known
before set-auto-mode is called (in after-find-file).
2019-12-25 02:13:53 -05:00
f49913fc9e define-key! -> global-set-key
In case general hasn't been installed yet.
2019-12-24 00:00:40 -05:00
b53703d527 General comment revision & reformatting 2019-12-21 15:01:05 -05:00
7033b589cb Start server after brief idle delay 2019-12-20 23:00:54 -05:00
322bca710a General refactors & reformatting 2019-12-20 00:59:52 -05:00
c0116d1447 Fix #2183: suppress so-long when no comment syntax
Hopefully a better solution can be found.
2019-12-13 14:56:25 -05:00
019e6e530b Add text-mode to so-long-target-modes 2019-12-09 18:14:29 -05:00
f251eb5ba9 Remove recentf-exclude setting
We don't need to be so judicious about what files are included in the
MRU list. If you open a file, any file, it'll be considered a recently
opened file.
2019-12-08 20:14:11 -05:00
bc89de4228 Move vc-follow-symlinks to core-editor
And remove vc-make-backup-files setting. nil is already its default
2019-12-08 16:10:31 -05:00
41e2fb3f76 Replace doom-large-file-size w/ doom-large-file-size-alist
Now you can have major-mode-specific large-filesize thresholds, since
not all major modes are created equal.
2019-12-02 20:22:00 -05:00
c7420a4bd7 Speed up indent guessing
Guessing the indentation can be awfully slow because it scans the whole
buffer. This PR overrides the guessing mechanism to scan at most 10000
points.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2019-11-20 11:27:26 +07:00
2bf74158fd Minor refactors across the board 2019-11-04 03:37:54 -05:00
2519d12ae3 Don't trigger so-long in noninteractive sessions 2019-11-03 13:06:44 -05:00
9fbfc44f73 Fix doom-create-missing-directories-h
Hanging variable reference caused a void-variable error.
2019-11-02 14:01:19 -04:00
e1d62f5d12 Don't trigger create-missing-directories on remotes
Also: minor refactor of the hook.
2019-11-02 13:25:43 -04:00
af69cd0840 Fix auto-revert occasionally prompting for confirmation 2019-10-28 23:23:13 -04:00
f34c33aa07 Fix clipboard in tty Emacs
xclip has support for a number of clipboard programs (xclip, xsel,
pb{copy,paste}, wl-copy, termux-clipboard and getclip).
2019-10-23 05:05:45 -04:00
e1622142ed Minor, general refactors 2019-10-23 03:57:48 -04:00
6e6672b135 Disable read-only-mode in so-long-minor-mode 2019-10-22 12:36:43 -04:00
5b9b029bbf Comment & further optimize so-long-mode 2019-10-20 10:58:53 -04:00
634b4b2bc7 Associate *.log files with text-mode 2019-10-20 10:58:53 -04:00
70e6c17de5 Don't autorevert if minibuffer is active
Some ivy/helm commands allow you to preview buffers, which is not an
appropriate time to (invisibly) revert them. The message could be missed
and expensive machinary could be triggered (e.g. updating git-gutter),
which could appear slow. Best to defer reverting until the user has
deliberately landed on the target, and is more likely to notice a revert
notification in the minibuffer.

Suggested by @flatwhatson
2019-10-20 10:58:53 -04:00
63c41fefcb doom-guess-mode-h: affect interactively saved files
A half revert of 9b003e051.
2019-10-19 14:18:14 -04:00
9b003e0516 Fix doom-guess-mode-h being too aggressive
It would trigger set-auto-mode whenever files are written to (e.g. when
persp-mode writes its workspace/session files, which have unsafe local
variables, so the user is inundated with prompts to accept them).

Now, doom-guess-mode-h will only work on files with shebang lines.
2019-10-19 13:50:42 -04:00
ee5cdd13dd Guess major-mode when saving a fundamental-mode file 2019-10-18 21:10:55 -04:00
323e0adf45 Minor refactors & reformatting across the board 2019-10-17 01:47:58 -04:00
88af741597 Stop auto-revert prompting for confirmation
I misunderstood revert-without-query.
2019-10-14 18:43:40 -04:00
51973dca9b Move auto-fill-mode to text-mode-hook 2019-10-14 18:25:02 -04:00
94406c0f36 Set a jump point when using imenu 2019-10-10 13:43:47 +10:00
dc24237800 Perform large-file checks after major-mode is decided
Fixes an issue where pdfs (in pdf-view-mode) weren't been converted
correctly because the file was declared large while it was being read in
fundamental-mode.
2019-10-08 21:10:42 -04:00
cb495aabe6 Have so-long-minor-mode disable more expensive minor modes
And not disable font-lock-mode or display-line-numbers-mode, so we can
have basic highlighting.
2019-10-08 21:09:52 -04:00
0426b9d514 Create a jump point before kill-current-buffer
So you can easily "undo" killing it.
2019-10-07 23:56:47 -04:00
95258c55d6 Remove xclip-mode & osx-clipboard-mode
Due to the varied approaches to terminal environments, I leave it up to
the user to handle restoration of the clipboard.
2019-10-07 18:06:13 -04:00
6ee96d15aa Merge pull request #1842 from flatwhatson/undo-tree
Experimental fixes for undo-tree
2019-10-07 16:24:25 -04:00
774ca43e32 dtrt-indent-max-lines = 2000
Reduced from default of 5000 for slightly faster analysis
2019-10-07 16:07:38 -04:00
616dec5b93 Optimize opening large files #1834
Fixes an issue where dtrt-indent and/or nav-flash would hang Emacs when
opening large files, and disables all mode hooks for large
files (without using fundamental-mode so you can at least get syntax
highlighting).
2019-10-07 16:02:23 -04:00
bb5ff21203 Remove redundant bookmark-save-flag setting
Its default value is `t`
2019-10-05 20:20:30 -04:00
ed96d60e2c Add comments for undo-tree advice
Describes why we try to compress undo-tree history data. I'm aware that
undo-tree-auto-save-history is disabled, but that may change in the near
future.
2019-10-03 12:04:54 -04:00
aa087e3af2 Experimental fixes for undo-tree
Increase `undo-limit`, `undo-strong-limit` and `undo-outer-limit` by a
factor of ten, which should prevent emacs from prematurely truncating
the undo history and corrupting the tree.

Restore `undo-tree-auto-save-history` which was disabled to avoid
exacerbating the undo history truncation.

Change the `undo-tree` recipe to grab the latest version from the
maintainer's repostiory instead of the outdated ELPA version.

Restore `undo-tree-enable-undo-in-region` which should be fixed in the
latest version of `undo-tree`.
2019-10-01 22:37:18 +10:00
c080ae8c9f Only disable smartparens in replace mode if it is enabled
Prevents an issue where smartparens would re-enable itself, even when it
has been disabled by the user.
2019-09-30 14:58:34 -04:00
67617254bc Optimize save-place caching
By reducing its limit from 200 to 100 (its default is 400) and by *not*
prettifying its cache file (pp is much more expensive than prin1).
2019-09-28 12:47:20 -04:00
1aaf229473 Silence byte-compiler warning from better-jumper
At least until gilbertw1/better-jumper#2 is merged.
2019-09-20 17:18:16 -04:00
3b7711420f General comment revision & cleanup 2019-09-06 00:25:35 -04:00