General refactor + cleanup

This commit is contained in:
Henrik Lissner 2017-06-05 00:47:56 +02:00
parent 1fd482fa51
commit 30402495fe
8 changed files with 56 additions and 52 deletions

View file

@ -222,14 +222,14 @@ files."
(defun doom-module-path (module submodule &optional file)
"Get the full path to a module: e.g. :lang emacs-lisp maps to
~/.emacs.d/modules/lang/emacs-lisp/ and will append FILE if non-nil."
(unless (keywordp module)
(error "Expected a keyword, got %s" module))
(unless (symbolp submodule)
(error "Expected a symbol, got %s" submodule))
(let ((module-name (substring (symbol-name module) 1))
(submodule-name (symbol-name submodule)))
(expand-file-name (concat module-name "/" submodule-name "/" file)
doom-modules-dir)))
(when (keywordp module)
(setq module (substring (symbol-name module) 1)))
(when (symbolp submodule)
(setq submodule (symbol-name submodule)))
(cl-assert (stringp module))
(cl-assert (stringp submodule))
(expand-file-name (concat module "/" submodule "/" file)
doom-modules-dir))
(defun doom-module-loaded-p (module submodule)
"Returns t if MODULE->SUBMODULE is present in `doom-modules'."

View file

@ -14,20 +14,21 @@
image-animate-loop t
indicate-buffer-boundaries nil
indicate-empty-lines nil
max-mini-window-height 0.3
mode-line-default-help-echo nil ; disable mode-line mouseovers
mouse-yank-at-point t ; middle-click paste at point, not at click
resize-mini-windows 'grow-only ; Minibuffer resizing
show-help-function nil ; hide :help-echo text
split-width-threshold nil ; favor horizontal splits
uniquify-buffer-name-style 'forward
use-dialog-box nil ; always avoid GUI
visible-cursor nil
x-stretch-cursor nil
;; defer jit font locking slightly to [try to] improve Emacs performance
jit-lock-defer-time nil
jit-lock-stealth-nice 0.1
jit-lock-stealth-time 0.2
jit-lock-stealth-verbose nil
max-mini-window-height 0.3
mode-line-default-help-echo nil ; disable mode-line mouseovers
mouse-yank-at-point t ; middle-click paste at point, not at click
resize-mini-windows 'grow-only ; Minibuffer resizing
show-help-function nil ; hide :help-echo text
split-width-threshold nil ; favor horizontal splits
uniquify-buffer-name-style 'forward
use-dialog-box nil ; always avoid GUI
visible-cursor nil
x-stretch-cursor nil
;; `pos-tip' defaults
pos-tip-internal-border-width 6
pos-tip-border-width 1
@ -197,11 +198,12 @@ file."
:init
(add-hook! (linum-mode nlinum-mode) #'hl-line-mode)
:config
;; stickiness doesn't play nice with emacs 25+
;; I don't need hl-line showing in other windows. This also offers a small
;; speed boost when buffer is displayed in multiple windows.
(setq hl-line-sticky-flag nil
global-hl-line-sticky-flag nil)
;; acts weird with evil visual mode, so disable it temporarily
;; Acts & looks weird with evil visual mode, so disable it temporarily
(defun doom|hl-line-off () (hl-line-mode -1))
(after! evil
(add-hook! 'hl-line-mode-hook