From d297dc6934301a2b9597b03426b9f56bee09282e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 3 Oct 2019 23:33:59 -0400 Subject: [PATCH] Minor refactor & comment revision across the board --- core/cli/autoloads.el | 2 +- core/core-projects.el | 2 +- modules/editor/fold/autoload/hideshow.el | 2 +- modules/lang/cc/config.el | 2 +- modules/lang/common-lisp/config.el | 3 ++- modules/ui/doom/config.el | 6 +++--- modules/ui/workspaces/autoload/workspaces.el | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 155757330..7a048eff9 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -313,7 +313,7 @@ them,and remove unnecessary `provide' statements or blank links." (unless (member pkg doom-autoload-excluded-packages) (let ((file (straight--autoloads-file pkg))) (when (file-exists-p file) - (insert-file-contents-literally file) + (insert-file-contents file) (save-excursion (while (re-search-forward "\\(?:\\_" nil t) ;; `load-file-name' is meaningless in a concatenated diff --git a/core/core-projects.el b/core/core-projects.el index af03b3964..d9c69c407 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -94,7 +94,7 @@ c) are not valid projectile projects." (let ((default-directory "~")) (when (cl-find-if #'projectile-file-exists-p projectile-project-root-files-bottom-up) - (message "HOME appears to be a project. Disabling bottom-up root search.") + (doom-log "HOME appears to be a project. Disabling bottom-up root search.") (setq projectile-project-root-files (append projectile-project-root-files-bottom-up projectile-project-root-files) diff --git a/modules/editor/fold/autoload/hideshow.el b/modules/editor/fold/autoload/hideshow.el index 2a5071cba..a12450670 100644 --- a/modules/editor/fold/autoload/hideshow.el +++ b/modules/editor/fold/autoload/hideshow.el @@ -37,7 +37,7 @@ ;;; Indentation detection (defun +fold--hideshow-empty-line-p (_) - (string= "" (string-trim (thing-at-point 'line)))) + (string= "" (string-trim (thing-at-point 'line 'no-props)))) (defun +fold--hideshow-geq-or-empty-p (base-indent) (or (+fold--hideshow-empty-line-p base-indent) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 5652c8df1..379fdd5f3 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -30,7 +30,7 @@ This is ignored by ccls.") ;; -;; Packages +;;; Packages (use-package! cc-mode :commands (c-mode c++-mode objc-mode java-mode) diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index 2a41aec9e..00d32c9fd 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -24,7 +24,8 @@ (setq sly-mrepl-history-file-name (concat doom-cache-dir "sly-mrepl-history") sly-kill-without-query-p t sly-net-coding-system 'utf-8-unix - ;; Change this to `sly-flex-completions' for fuzzy completion + ;; Doom defaults to non-fuzzy search, because it is slower and less + ;; precise. Change this to `sly-flex-completions' for fuzzy completion sly-complete-symbol-function 'sly-simple-completions) (set-popup-rules! diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 48d4e0d3a..749757728 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -15,12 +15,12 @@ (doom-spacegrey) (doom-vibrant) (doom-tomorrow-night)) - "An alist of themes that support `solaire-mode'. If CDR is t, then use -`solaire-mode-swap-bg'.") + "An alist of themes that support `solaire-mode'. If CDR is t, then +`solaire-mode-swap-bg' will be used automatically, when the theme is loaded.") ;; -;; Packages +;;; Packages ;; (use-package! doom-themes diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 39fc7a786..6992a9751 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -251,7 +251,7 @@ workspace to delete." (user-error "Can't close workspace, it's visible in another frame")) ((not (equal (+workspace-current-name) name)) (+workspace-delete name)) - ((> (length workspaces) 1) + ((cdr workspaces) (+workspace-delete name) (+workspace-switch (if (+workspace-exists-p +workspace--last)