Define `acdw/reindent-buffer' and hook into elisp
Hopefully this will put a halt to all of my whitespace commits. Of course, this commit also includes whitespace-only diffs.
This commit is contained in:
parent
8bedff5f57
commit
9af70cbf60
3
init.el
3
init.el
|
@ -733,7 +733,8 @@ if ripgrep is installed, otherwise `consult-grep'."
|
|||
(setup emacs-lisp-mode
|
||||
(:option eval-expression-print-length nil
|
||||
eval-expression-print-level nil
|
||||
lisp-indent-function #'lisp-indent-function))
|
||||
lisp-indent-function #'lisp-indent-function)
|
||||
(:local-hook before-save-hook acdw/reindent-buffer))
|
||||
|
||||
(setup (:straight macrostep)
|
||||
(define-key emacs-lisp-mode-map (kbd "C-c e") #'macrostep-expand))
|
||||
|
|
|
@ -58,6 +58,13 @@ Ready for use with `after-focus-change-function'."
|
|||
(run-at-time sunset-time (* 60 60 24) sunset-command)
|
||||
(run-at-time "12:00am" (* 60 60 24) sunset-command)))
|
||||
|
||||
;;;; Re-indent a buffer
|
||||
(defun acdw/reindent-buffer ()
|
||||
"Call `indent-region' on the whole buffer."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(indent-region (point-min) (point-max))))
|
||||
|
||||
;;; Garbage collection hacks
|
||||
|
||||
(defconst acdw/gc-cons-threshold-basis (* 800 1024)
|
||||
|
|
Loading…
Reference in New Issue