core-editor: remove noninteractive check

If noninteractive, core-editor.el shouldn't be loaded at all anyway
This commit is contained in:
Henrik Lissner 2017-02-08 02:20:26 -05:00
parent 24c68d4254
commit 5d1013d317

View file

@ -38,54 +38,53 @@
select-enable-clipboard t select-enable-clipboard t
select-enable-primary t) select-enable-primary t)
(unless noninteractive ;; Save point across sessions
;; Save point across sessions (require 'saveplace)
(require 'saveplace) (setq save-place-file (concat doom-cache-dir "saveplace")
(setq save-place-file (concat doom-cache-dir "saveplace") save-place t)
save-place t) (when (>= emacs-major-version 25)
(when (>= emacs-major-version 25) (save-place-mode +1))
(save-place-mode +1))
;; Save history across sessions ;; Save history across sessions
(require 'savehist) (require 'savehist)
(setq savehist-file (concat doom-cache-dir "savehist") (setq savehist-file (concat doom-cache-dir "savehist")
savehist-save-minibuffer-history t savehist-save-minibuffer-history t
savehist-additional-variables '(kill-ring search-ring regexp-search-ring)) savehist-additional-variables '(kill-ring search-ring regexp-search-ring))
(savehist-mode 1) (savehist-mode 1)
;; Remove text-property cruft from history ;; Remove text-property cruft from history
(defun unpropertize-savehist () (defun unpropertize-savehist ()
(mapc (lambda (list) (mapc (lambda (list)
(when (boundp list) (when (boundp list)
(set list (mapcar 'substring-no-properties (eval list))))) (set list (mapcar 'substring-no-properties (eval list)))))
'(kill-ring minibuffer-history helm-grep-history helm-ff-history '(kill-ring minibuffer-history helm-grep-history helm-ff-history
file-name-history read-expression-history extended-command-history file-name-history read-expression-history extended-command-history
evil-ex-history))) evil-ex-history)))
(add-hook 'kill-emacs-hook 'unpropertize-savehist) (add-hook 'kill-emacs-hook 'unpropertize-savehist)
(add-hook 'savehist-save-hook 'unpropertize-savehist) (add-hook 'savehist-save-hook 'unpropertize-savehist)
;; Keep track of recently opened files ;; Keep track of recently opened files
(require 'recentf) (require 'recentf)
(setq recentf-save-file (concat doom-cache-dir "recentf") (setq recentf-save-file (concat doom-cache-dir "recentf")
recentf-exclude '("/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$" recentf-exclude '("/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$"
"emacs\\.d/private/cache/.+" "emacs\\.d/workgroups/.+$" "emacs\\.d/private/cache/.+" "emacs\\.d/workgroups/.+$"
"wg-default" "/company-statistics-cache.el$" "wg-default" "/company-statistics-cache.el$"
"^/var/folders/.+$" "^/tmp/.+") "^/var/folders/.+$" "^/tmp/.+")
recentf-max-menu-items 0 recentf-max-menu-items 0
recentf-max-saved-items 250 recentf-max-saved-items 250
recentf-auto-cleanup 600 recentf-auto-cleanup 600
recentf-filename-handlers '(abbreviate-file-name)) recentf-filename-handlers '(abbreviate-file-name))
(quiet! (recentf-mode 1)) (quiet! (recentf-mode 1))
;; Ediff ;; Ediff
(add-hook! ediff-load (add-hook! ediff-load
(setq ediff-diff-options "-w" (setq ediff-diff-options "-w"
ediff-split-window-function 'split-window-horizontally ediff-split-window-function 'split-window-horizontally
ediff-window-setup-function 'ediff-setup-windows-plain)) ; no extra frames ediff-window-setup-function 'ediff-setup-windows-plain)) ; no extra frames
;; revert buffers for changed files ;; revert buffers for changed files
(global-auto-revert-mode 1) (global-auto-revert-mode 1)
(setq auto-revert-verbose nil)) (setq auto-revert-verbose nil)
;; ;;