From 4910531457686c12bbae062732d2d43f744e2b4f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 Feb 2017 00:47:34 -0500 Subject: [PATCH] General cleanup & minor refactoring --- core/core-editor.el | 4 +--- core/core-packages.el | 5 +++-- modules/feature/evil/config.el | 7 ++++--- modules/ui/doom-dashboard/config.el | 6 ++---- modules/ui/doom-modeline/config.el | 2 ++ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 42e98de05..a90a7cbdf 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -1,7 +1,6 @@ ;;; core-editor.el --- filling the editor shaped hole in the Emacs OS (setq-default - shift-select-mode t ; activate mark on shift-click ;; Save clipboard contents into kill-ring before replacing them save-interprogram-paste-before-kill t ;; Bookmarks @@ -38,8 +37,7 @@ ;; Save point across sessions (require 'saveplace) (setq save-place-file (concat doom-cache-dir "saveplace")) -(when (>= emacs-major-version 25) - (save-place-mode +1)) +(save-place-mode +1) ;; Save history across sessions (require 'savehist) diff --git a/core/core-packages.el b/core/core-packages.el index fa65bb1ad..91b0ee7e3 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -106,6 +106,8 @@ are installed. If you byte-compile core/core.el, this function will be avoided to speed up startup." ;; Called early during initialization; only use native functions! (unless (or doom-init-p force-p) + (message "Doom initialized") + (setq load-path doom--base-load-path package-activated-list nil) @@ -123,7 +125,7 @@ to speed up startup." ;; Also, in some edge cases involving package initialization during a ;; non-interactive session, `package-initialize' fails to fill `load-path'. ;; If we want something done right, do it ourselves! - (setq load-path (append load-path (directory-files package-user-dir t "^[a-zA-Z0-9]" t))) + (setq load-path (append load-path (directory-files package-user-dir t "^\\w" t))) ;; Ensure core packages are installed (let ((core-packages (cl-remove-if 'package-installed-p doom-protected-packages))) @@ -170,7 +172,6 @@ files." (append (reverse (file-expand-wildcards (concat doom-core-dir "core*.el"))) (file-expand-wildcards (concat doom-core-dir "autoload/*.el")) (doom--module-paths "config.el"))))) - (when (or force-p (not doom-packages)) (setq doom-packages nil) (funcall load-fn (expand-file-name "packages.el" doom-core-dir)) diff --git a/modules/feature/evil/config.el b/modules/feature/evil/config.el index 905144c05..7885d96c4 100644 --- a/modules/feature/evil/config.el +++ b/modules/feature/evil/config.el @@ -35,7 +35,10 @@ evil-ex-search-vim-style-regexp t evil-ex-substitute-global t evil-ex-visual-char-range t ; column range for ex commands - evil-insert-skip-empty-lines t) + evil-insert-skip-empty-lines t + + ;; don't activate mark on shift-click + shift-select-mode nil) :config (evil-mode +1) @@ -58,8 +61,6 @@ (add-hook 'evil-operator-state-entry-hook 'show-paren-mode) (add-hook 'evil-operator-state-exit-hook '+evil|show-paren-mode-off) (add-hook 'evil-normal-state-entry-hook '+evil|show-paren-mode-off) - ;; Disable highlights on insert-mode - ;; (add-hook 'evil-insert-state-entry-hook 'evil-ex-nohighlight) (@set :popup '("*evil-registers*" :size 0.3) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 28d15a959..e22f18b58 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -39,9 +39,7 @@ ;; -(setq initial-major-mode '+doom-dashboard-mode - initial-scratch-message "\n Loading..." - doom-fallback-buffer +doom-dashboard-name) +(setq doom-fallback-buffer +doom-dashboard-name) (add-hook 'emacs-startup-hook '+doom-dashboard/open) (@add-hook 'kill-buffer-query-functions @@ -62,7 +60,7 @@ ;; (defun +doom-dashboard/open () - "" + "Open the dashboard buffer." (interactive) (+doom-dashboard-reload) (switch-to-buffer (doom-fallback-buffer))) diff --git a/modules/ui/doom-modeline/config.el b/modules/ui/doom-modeline/config.el index fee1837f0..155e2e423 100644 --- a/modules/ui/doom-modeline/config.el +++ b/modules/ui/doom-modeline/config.el @@ -1,5 +1,7 @@ ;;; ui/doom-modeline/config.el +(line-number-mode -1) + ;; all-the-icons doesn't work in the terminal, so we "disable" it. (unless (display-graphic-p) (defalias 'all-the-icons-octicon 'ignore)