Skip to content

Commit

Permalink
refactor: move more customization to me-builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jul 14, 2023
1 parent 279f58e commit 24e6d3b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
21 changes: 21 additions & 0 deletions core/me-builtin.el
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,27 @@
(when (cl-some #'derived-mode-p +whitespace-auto-cleanup-modes)
(whitespace-cleanup))))

(use-package autorevert
:straight (:type built-in)
;; Auto load files changed on disk
:hook (minemacs-after-startup . global-auto-revert-mode)
:custom
;; Revert non-file buffers like dired
(global-auto-revert-non-file-buffers t))

(use-package savehist
:straight (:type built-in)
:hook (minemacs-after-startup . savehist-mode)
:custom
(savehist-file (concat minemacs-local-dir "savehist.el")))

(use-package saveplace
:straight (:type built-in)
;; Save place in files
:hook (minemacs-after-startup . save-place-mode)
:custom
(save-place-file (concat minemacs-local-dir "save-place.el")))


(provide 'me-builtin)

Expand Down
13 changes: 0 additions & 13 deletions core/me-defaults.el
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
rcirc-log-directory (+directory-ensure minemacs-local-dir "rcirc/log/")
remember-data-directory (+directory-ensure minemacs-local-dir "remember/data/")
remember-data-file (concat minemacs-local-dir "remember/data.el")
save-place-file (concat minemacs-local-dir "save-place.el")
savehist-file (concat minemacs-local-dir "savehist.el")
semanticdb-default-system-save-directory (concat minemacs-local-dir "semantic/")
shadow-info-file (concat minemacs-local-dir "shadow/info.el")
shadow-todo-file (concat minemacs-local-dir "shadow/todo.el")
Expand Down Expand Up @@ -112,8 +110,6 @@
enable-recursive-minibuffers t
;; Kill the shell buffer after exit
shell-kill-buffer-on-exit t
;; Revert non-file buffers like dired
global-auto-revert-non-file-buffers t
;; Don't prompt for confirmation when we create a new file or buffer
confirm-nonexistent-file-or-buffer nil
;; More intuitive buffer naming style
Expand Down Expand Up @@ -359,15 +355,6 @@ or file path may exist now."
;; Show recursion depth in minibuffer (see `enable-recursive-minibuffers')
(minibuffer-depth-indicate-mode 1)

;; Save place in files
(save-place-mode 1)

;; Enable saving minibuffer history
(savehist-mode 1)

;; Auto load files changed on disk
(global-auto-revert-mode 1)

;; Show line number in mode-line
(line-number-mode 1)

Expand Down

0 comments on commit 24e6d3b

Please sign in to comment.