From c9bfb58369429babcacef2a266caaf119598df36 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 5 Jun 2018 11:22:20 +0200 Subject: [PATCH] Minor, general refactor Remove redundant keybinds, unused letvars, and fix doom-module-load-path's docstring referencing its former signature. --- core/core-packages.el | 9 +++------ modules/config/default/+bindings.el | 6 ++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index ef8afec25..344464b8f 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -469,8 +469,7 @@ This doesn't require modules to be enabled. For enabled modules us (intern submodule)))))))) (defun doom-module-load-path () - "Returns a list of absolute file paths to activated modules, with APPEND-FILE -added, if the file exists." + "Returns a list of absolute file paths to activated modules." (append (cl-loop for plist being the hash-values of doom-modules collect (plist-get plist :path)) (list doom-private-dir))) @@ -667,8 +666,7 @@ If NOERROR is non-nil, don't throw an error if the file doesn't exist." (setq path (or (and (bound-and-true-p byte-compile-current-file) (file-name-directory byte-compile-current-file)) (and load-file-name (file-name-directory load-file-name)) - (and buffer-file-name - (file-name-directory buffer-file-name)) + (and buffer-file-name (file-name-directory buffer-file-name)) (error "Could not detect path to look for '%s' in" filename)))) `(load ,(if path `(expand-file-name ,filename ,path) @@ -677,8 +675,7 @@ If NOERROR is non-nil, don't throw an error if the file doesn't exist." (defmacro require! (category module &rest plist) "Loads the module specified by CATEGORY (a keyword) and MODULE (a symbol)." - (let ((enabled-p (doom-module-p category module)) - (doom-modules (copy-hash-table doom-modules))) + (let ((doom-modules (copy-hash-table doom-modules))) (apply #'doom-module-set category module (mapcar #'eval plist)) (let ((module-path (doom-module-locate-path category module))) diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index 26866a294..c936cd02e 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -133,9 +133,7 @@ "C-s" #'company-filter-candidates "C-S-s" #'company-search-candidates "C-SPC" #'company-complete-common - "TAB" #'company-complete-common-or-cycle [tab] #'company-complete-common-or-cycle - "S-TAB" #'company-select-previous [backtab] #'company-select-previous) ;; Automatically applies to `company-filter-map' (:map company-search-map @@ -418,8 +416,8 @@ [backspace] #'+snippets/delete-backward-char [delete] #'+snippets/delete-forward-char-or-field) (:map yas-minor-mode-map - :ig [(tab)] yas-maybe-expand - :v [(tab)] #'yas-insert-snippet + :ig [tab] yas-maybe-expand + :v [tab] #'yas-insert-snippet :ig "TAB" yas-maybe-expand :v "TAB" #'yas-insert-snippet))