From 45c2221316f366023e7b2188cd2e56ca6834486f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 15 Jan 2018 00:43:17 -0500 Subject: [PATCH] General update for docstrings and comments & minor refactor --- core/core-editor.el | 5 ++--- core/packages.el | 2 -- modules/completion/ivy/config.el | 7 ++++--- modules/feature/evil/config.el | 3 +-- modules/feature/syntax-checker/config.el | 4 ++-- modules/feature/workspaces/autoload/workspaces.el | 2 +- modules/tools/eshell/config.el | 3 ++- 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 644e36fc4..6f1bf5e9e 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -113,9 +113,8 @@ fundamental-mode) for performance sake." ;; Handles whitespace (tabs/spaces) settings externally. This way projects can ;; specify their own formatting rules. (def-package! editorconfig + :hook (doom-init . editorconfig-mode) :config - (add-hook 'doom-init-hook #'editorconfig-mode) - ;; editorconfig cannot procure the correct settings for extension-less files. ;; Executable scripts with a shebang line, for example. So why not use Emacs' ;; major mode to drop editorconfig a hint? This is accomplished by temporarily @@ -180,8 +179,8 @@ extension, try to guess one." ;; Branching undo (def-package! undo-tree + :hook (doom-init . global-undo-tree-mode) :config - (add-hook 'doom-init-hook #'global-undo-tree-mode) ;; persistent undo history is known to cause undo history corruption, which ;; can be very destructive! So disable it! (setq undo-tree-auto-save-history nil diff --git a/core/packages.el b/core/packages.el index 8a1518f3f..4b53245d1 100644 --- a/core/packages.el +++ b/core/packages.el @@ -2,8 +2,6 @@ ;;; core/packages.el ;; core-os.el -;; In case this config is shared across multiple computers (like mine is), let's -;; protect these from autoremoval. (package! exec-path-from-shell :ignore (not IS-MAC)) (package! osx-clipboard :ignore (not IS-MAC)) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 4281d0a10..59ee560e7 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -101,9 +101,10 @@ immediately runs it on the current candidate (ending the ivy session)." cmd '(("O" +ivy-git-grep-other-window-action "open in other window")))) - ;; 1. Remove character limit from `counsel-ag-function' - ;; 2. This may need to be updated frequently, to meet changes upstream - ;; 3. counsel-ag, counsel-rg and counsel-pt all use this function + ;; Removes character limit from `counsel-ag-function' + ;; + ;; This may need to be updated frequently, to meet changes upstream + ;; counsel-ag, counsel-rg and counsel-pt all use this function (advice-add #'counsel-ag-function :override #'+ivy*counsel-ag-function)) diff --git a/modules/feature/evil/config.el b/modules/feature/evil/config.el index 796c2cf55..117f586e9 100644 --- a/modules/feature/evil/config.el +++ b/modules/feature/evil/config.el @@ -21,7 +21,7 @@ (autoload 'goto-last-change-reverse "goto-chg") (def-package! evil - :init + :config (setq evil-want-C-u-scroll t evil-want-visual-char-semi-exclusive t evil-want-Y-yank-to-eol t @@ -39,7 +39,6 @@ ;; don't activate mark on shift-click shift-select-mode nil) - :config (add-hook 'doom-init-hook #'evil-mode) (evil-select-search-module 'evil-search-module 'evil-search) diff --git a/modules/feature/syntax-checker/config.el b/modules/feature/syntax-checker/config.el index d55cc42c9..109f82443 100644 --- a/modules/feature/syntax-checker/config.el +++ b/modules/feature/syntax-checker/config.el @@ -1,7 +1,7 @@ ;;; feature/syntax-checker/config.el -*- lexical-binding: t; -*- -;; pkg-info doesn't get autoloaded when `flycheck-version' needs it, so we do -;; it ourselves: +;; Since Doom doesn't use `package-initialize', pkg-info won't get autoloaded +;; when `flycheck-version' needs it, so we need this: (autoload 'pkg-info-version-info "pkg-info") (def-package! flycheck diff --git a/modules/feature/workspaces/autoload/workspaces.el b/modules/feature/workspaces/autoload/workspaces.el index 4b4f5e20b..7119a4a77 100644 --- a/modules/feature/workspaces/autoload/workspaces.el +++ b/modules/feature/workspaces/autoload/workspaces.el @@ -52,7 +52,7 @@ ;;;###autoload (defun +workspace-get (name &optional noerror) - "Returns a workspace (perspective hash table) named NAME." + "Returns a workspace (perspective struct) named NAME." (when-let* ((persp (persp-get-by-name name))) (cond ((+workspace-p persp) persp) ((not noerror) (error "'%s' is an invalid workspace" name))))) diff --git a/modules/tools/eshell/config.el b/modules/tools/eshell/config.el index cc7ea5d6c..8e34c8a50 100644 --- a/modules/tools/eshell/config.el +++ b/modules/tools/eshell/config.el @@ -5,7 +5,8 @@ ;; see: ;; + `+eshell/open': open in current buffer ;; + `+eshell/open-popup': open in a popup -;; + `+eshell/open-workspace': open in separate tab (requires :feature workspaces) +;; + `+eshell/open-workspace': open in separate tab (requires :feature +;; workspaces) (def-package! eshell ; built-in :commands eshell-mode