diff options
Diffstat (limited to 'lisp/+emacs.el')
-rw-r--r-- | lisp/+emacs.el | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index 6f40cf0..8817c19 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el | |||
@@ -229,7 +229,7 @@ Do this only if the buffer is not visiting a file." | |||
229 | (< (- (time-convert nil 'integer) +save-some-buffers-debounce-time) | 229 | (< (- (time-convert nil 'integer) +save-some-buffers-debounce-time) |
230 | +save-some-buffers-debounce-timeout)) | 230 | +save-some-buffers-debounce-timeout)) |
231 | (save-some-buffers t) | 231 | (save-some-buffers t) |
232 | (setq +save-some-buffers-debounce-time (time-convert nil 'integer)))) | 232 | (setf +save-some-buffers-debounce-time (time-convert nil 'integer)))) |
233 | 233 | ||
234 | 234 | ||
235 | ;;; Better-default functions ... | 235 | ;;; Better-default functions ... |
@@ -304,6 +304,11 @@ ARG is passed to `backward-kill-word'." | |||
304 | ;; (advice-add #'yank :after #'+yank@indent) | 304 | ;; (advice-add #'yank :after #'+yank@indent) |
305 | ;; (advice-add #'yank-pop :after #'+yank@indent) | 305 | ;; (advice-add #'yank-pop :after #'+yank@indent) |
306 | 306 | ||
307 | ;; https://old.reddit.com/r/emacs/comments/y92y4b/tramp_users_slowness_got_you_down_check/it3a35r/ | ||
308 | (defun +vc-off-when-remote () | ||
309 | (when (file-remote-p (buffer-file-name)) | ||
310 | (setq-local vc-handled-backends nil))) | ||
311 | |||
307 | 312 | ||
308 | ;;; Extra functions | 313 | ;;; Extra functions |
309 | 314 | ||
@@ -317,7 +322,7 @@ It returns nil with remote files and those without attached files." | |||
317 | (defun +goto-matching-paren (&optional arg) | 322 | (defun +goto-matching-paren (&optional arg) |
318 | "Go to the matching paren, similar to vi's %." | 323 | "Go to the matching paren, similar to vi's %." |
319 | (interactive "p") | 324 | (interactive "p") |
320 | (or arg (setq arg 1)) | 325 | (or arg (setf arg 1)) |
321 | (cond | 326 | (cond |
322 | ;; Check for "outside of bracket" positions | 327 | ;; Check for "outside of bracket" positions |
323 | ((looking-at "[\[\(\{]") (forward-sexp arg)) | 328 | ((looking-at "[\[\(\{]") (forward-sexp arg)) |
@@ -338,6 +343,15 @@ If the current window is the only window, bury the buffer." | |||
338 | 343 | ||
339 | ;;; Required libraries | 344 | ;;; Required libraries |
340 | 345 | ||
346 | (when (require 'abbrev nil :noerror) | ||
347 | (setq-default abbrev-file-name (sync/ "abbrev.el") | ||
348 | save-abbrevs 'silent)) | ||
349 | |||
350 | (when (require 'autorevert nil :noerror) | ||
351 | (setq-default global-auto-revert-non-file-buffers t | ||
352 | auto-revert-verbose nil) | ||
353 | (global-auto-revert-mode +1)) | ||
354 | |||
341 | (when (require 'uniquify nil :noerror) | 355 | (when (require 'uniquify nil :noerror) |
342 | (setq-default uniquify-buffer-name-style 'forward | 356 | (setq-default uniquify-buffer-name-style 'forward |
343 | uniquify-separator path-separator | 357 | uniquify-separator path-separator |