From f604ce6d013b3519b5a3ce3aef4d8ef26adeef0e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 May 2021 10:35:08 -0400 Subject: [PATCH] Minor refactors & reformatting --- core/autoload/output.el | 1 - core/cli/doctor.el | 20 +++++++++++--------- core/core-editor.el | 4 ++-- modules/config/literate/README.org | 1 - modules/lang/markdown/config.el | 2 +- modules/tools/pdf/config.el | 6 +----- 6 files changed, 15 insertions(+), 19 deletions(-) diff --git a/core/autoload/output.el b/core/autoload/output.el index a7f93fb7b..7f298c052 100644 --- a/core/autoload/output.el +++ b/core/autoload/output.el @@ -39,7 +39,6 @@ and `format!' into colored output, where COLOR is any car of this list.") (class . doom--output-class) (indent . doom--output-indent) (autofill . doom--output-autofill) - (success . (lambda (str &rest args) (apply #'doom--output-color 'green (format "✓ %s" str) args))) (warn . (lambda (str &rest args) diff --git a/core/cli/doctor.el b/core/cli/doctor.el index 21fdc20f8..65c66538b 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -48,15 +48,17 @@ in." ;; REVIEW Refactor me (print! (start "Checking your Emacs version...")) - (cond - (EMACS28+ - (warn! (concat "Emacs %s detected. Doom support this version, but you are living on " - "edge! Be prepared for breakages in future versions of Emacs.") - emacs-version)) - ((= emacs-major-version 26) - (warn! (concat "Emacs %s detected. Doom is dropping Emacs 26.x support in June 2021. " - "Consider upgrading to Emacs 27.1 (or better: 27.2) soon!") - emacs-version))) + (print-group! + (cond + (EMACS28+ + (warn! "Emacs %s detected" emacs-version) + (explain! "Doom supports this version, but you are living on the edge! " + "Be prepared for breakages in future versions of Emacs.")) + ((= emacs-major-version 26) + (warn! "Emacs %s detected" emacs-version) + (explain! "Doom is dropping Emacs 26.x support in June 2021. Consider " + "upgrading to Emacs 27.1 (or better: 27.2) soon!" + emacs-version)))) (print! (start "Checking for Doom's prerequisites...")) (print-group! diff --git a/core/core-editor.el b/core/core-editor.el index b096c5c48..33f7f636d 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -305,11 +305,11 @@ or file path may exist now." ;; Resolve symlinks, strip out the /sudo:X@ prefix in local tramp paths, and ;; abbreviate $HOME -> ~ in filepaths (more portable, more readable, & saves ;; space) - (add-to-list 'recentf-filename-handlers 'doom--recentf-file-truename-fn) + (add-to-list 'recentf-filename-handlers #'doom--recentf-file-truename-fn) ;; Text properties inflate the size of recentf's files, and there is ;; no purpose in persisting them (Must be first in the list!) - (add-to-list 'recentf-filename-handlers 'substring-no-properties) + (add-to-list 'recentf-filename-handlers #'substring-no-properties) (add-hook! '(doom-switch-window-hook write-file-functions) (defun doom--recentf-touch-buffer-h () diff --git a/modules/config/literate/README.org b/modules/config/literate/README.org index 61d320d14..59421fb48 100644 --- a/modules/config/literate/README.org +++ b/modules/config/literate/README.org @@ -13,7 +13,6 @@ - [[#configuration][Configuration]] - [[#change-the-location-of-configorg][Change the location of config.org]] - [[#change-where-src-blocks-are-tangled-or-prevent-it-entirely][Change where src blocks are tangled or prevent it entirely]] - - [[#modularizing-your-literate-config-with-include-directives][Modularizing your literate config with ~#+INCLUDE~ directives]] - [[#troubleshooting][Troubleshooting]] - [[#how-to-tangle-to-doomdirinitel][How to tangle to =DOOMDIR/init.el=]] - [[#how-to-disable-tangle-on-save][How to disable tangle-on-save]] diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index 89a351349..6f40978f4 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -74,7 +74,7 @@ capture, the end position, and the output buffer.") ;; HACK Prevent mis-fontification of YAML metadata blocks in `markdown-mode' ;; which occurs when the first line contains a colon in it. See - ;; https://github.com/jrblevin/markdown-mode/issues/328. + ;; jrblevin/markdown-mode#328. (defadvice! +markdown-disable-front-matter-fontification-a (&rest _) :override #'markdown-match-generic-metadata (ignore (goto-char (point-max)))) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index 61b3c97d1..002aa7256 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -28,11 +28,7 @@ (fundamental-mode) (message "Viewing PDFs in Emacs requires epdfinfo. Use `M-x pdf-tools-install' to build it"))) - (when (memq 'pdf-occur-global-minor-mode pdf-tools-enabled-modes) - (pdf-occur-global-minor-mode 1)) - (when (memq 'pdf-virtual-global-minor-mode pdf-tools-enabled-modes) - (pdf-virtual-global-minor-mode 1)) - (add-hook 'pdf-view-mode-hook 'pdf-tools-enable-minor-modes) + (pdf-tools-install-noverify) ;; For consistency with other special modes (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer)