mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Packages that need to be loaded on emacs startup, should just be loaded through use-package in a non-deferred manner. It makes no real difference to startup, loading the packages either slows down emacs before "startup" is complete, or right after it completes. End result is that Emacs is unresponsive for basically the same amount of time regardless.
40 lines
988 B
EmacsLisp
40 lines
988 B
EmacsLisp
;;; siren-undo-tree.el --- jimeh's Emacs Siren: undo-tree configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for undo-tree.
|
|
|
|
;;; Code:
|
|
|
|
(use-package undo-tree
|
|
:demand
|
|
:bind
|
|
(:map undo-tree-map
|
|
("C-x u" . undo-tree-visualize)
|
|
("M--" . undo-tree-undo)
|
|
("M-_" . undo-tree-redo)
|
|
("s-z" . undo-tree-undo)
|
|
("s-Z" . undo-tree-redo))
|
|
|
|
:diminish
|
|
undo-tree-mode
|
|
|
|
:custom
|
|
(undo-tree-history-directory-alist
|
|
`((".*" . ,(expand-file-name "undo-tree-history" siren-cache-dir))))
|
|
;; Use undohist package to persist history to disk, it seems more reliable
|
|
;; than undo-tree's auto-save feature which randomly fails to restore history
|
|
;; for no obvious reason.
|
|
(undo-tree-auto-save-history nil)
|
|
|
|
:config
|
|
(global-undo-tree-mode)
|
|
|
|
;; Unbind keys that I don't use.
|
|
(unbind-key "C-/" undo-tree-map)
|
|
(unbind-key "C-?" undo-tree-map)
|
|
(unbind-key "C-_" undo-tree-map))
|
|
|
|
(provide 'siren-undo-tree)
|
|
;;; siren-undo-tree.el ends here
|