From 4cf60c3fea16b60eb18c9a7d8403b75c89aeffef Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 21 Oct 2022 21:37:30 -0500 Subject: blhe --- lisp/+emacs.el | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'lisp/+emacs.el') 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." (< (- (time-convert nil 'integer) +save-some-buffers-debounce-time) +save-some-buffers-debounce-timeout)) (save-some-buffers t) - (setq +save-some-buffers-debounce-time (time-convert nil 'integer)))) + (setf +save-some-buffers-debounce-time (time-convert nil 'integer)))) ;;; Better-default functions ... @@ -304,6 +304,11 @@ ARG is passed to `backward-kill-word'." ;; (advice-add #'yank :after #'+yank@indent) ;; (advice-add #'yank-pop :after #'+yank@indent) +;; https://old.reddit.com/r/emacs/comments/y92y4b/tramp_users_slowness_got_you_down_check/it3a35r/ +(defun +vc-off-when-remote () + (when (file-remote-p (buffer-file-name)) + (setq-local vc-handled-backends nil))) + ;;; Extra functions @@ -317,7 +322,7 @@ It returns nil with remote files and those without attached files." (defun +goto-matching-paren (&optional arg) "Go to the matching paren, similar to vi's %." (interactive "p") - (or arg (setq arg 1)) + (or arg (setf arg 1)) (cond ;; Check for "outside of bracket" positions ((looking-at "[\[\(\{]") (forward-sexp arg)) @@ -338,6 +343,15 @@ If the current window is the only window, bury the buffer." ;;; Required libraries +(when (require 'abbrev nil :noerror) + (setq-default abbrev-file-name (sync/ "abbrev.el") + save-abbrevs 'silent)) + +(when (require 'autorevert nil :noerror) + (setq-default global-auto-revert-non-file-buffers t + auto-revert-verbose nil) + (global-auto-revert-mode +1)) + (when (require 'uniquify nil :noerror) (setq-default uniquify-buffer-name-style 'forward uniquify-separator path-separator -- cgit 1.4.1-21-gabe81