Minor refactors & reformatting

This commit is contained in:
Henrik Lissner 2021-05-25 10:35:08 -04:00
parent 7b5baf319b
commit f604ce6d01
6 changed files with 15 additions and 19 deletions

View file

@ -39,7 +39,6 @@ and `format!' into colored output, where COLOR is any car of this list.")
(class . doom--output-class) (class . doom--output-class)
(indent . doom--output-indent) (indent . doom--output-indent)
(autofill . doom--output-autofill) (autofill . doom--output-autofill)
(success . (lambda (str &rest args) (success . (lambda (str &rest args)
(apply #'doom--output-color 'green (format "✓ %s" str) args))) (apply #'doom--output-color 'green (format "✓ %s" str) args)))
(warn . (lambda (str &rest args) (warn . (lambda (str &rest args)

View file

@ -48,15 +48,17 @@ in."
;; REVIEW Refactor me ;; REVIEW Refactor me
(print! (start "Checking your Emacs version...")) (print! (start "Checking your Emacs version..."))
(print-group!
(cond (cond
(EMACS28+ (EMACS28+
(warn! (concat "Emacs %s detected. Doom support this version, but you are living on " (warn! "Emacs %s detected" emacs-version)
"edge! Be prepared for breakages in future versions of Emacs.") (explain! "Doom supports this version, but you are living on the edge! "
emacs-version)) "Be prepared for breakages in future versions of Emacs."))
((= emacs-major-version 26) ((= emacs-major-version 26)
(warn! (concat "Emacs %s detected. Doom is dropping Emacs 26.x support in June 2021. " (warn! "Emacs %s detected" emacs-version)
"Consider upgrading to Emacs 27.1 (or better: 27.2) soon!") (explain! "Doom is dropping Emacs 26.x support in June 2021. Consider "
emacs-version))) "upgrading to Emacs 27.1 (or better: 27.2) soon!"
emacs-version))))
(print! (start "Checking for Doom's prerequisites...")) (print! (start "Checking for Doom's prerequisites..."))
(print-group! (print-group!

View file

@ -305,11 +305,11 @@ or file path may exist now."
;; Resolve symlinks, strip out the /sudo:X@ prefix in local tramp paths, and ;; Resolve symlinks, strip out the /sudo:X@ prefix in local tramp paths, and
;; abbreviate $HOME -> ~ in filepaths (more portable, more readable, & saves ;; abbreviate $HOME -> ~ in filepaths (more portable, more readable, & saves
;; space) ;; 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 ;; Text properties inflate the size of recentf's files, and there is
;; no purpose in persisting them (Must be first in the list!) ;; 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) (add-hook! '(doom-switch-window-hook write-file-functions)
(defun doom--recentf-touch-buffer-h () (defun doom--recentf-touch-buffer-h ()

View file

@ -13,7 +13,6 @@
- [[#configuration][Configuration]] - [[#configuration][Configuration]]
- [[#change-the-location-of-configorg][Change the location of config.org]] - [[#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]] - [[#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]] - [[#troubleshooting][Troubleshooting]]
- [[#how-to-tangle-to-doomdirinitel][How to tangle to =DOOMDIR/init.el=]] - [[#how-to-tangle-to-doomdirinitel][How to tangle to =DOOMDIR/init.el=]]
- [[#how-to-disable-tangle-on-save][How to disable tangle-on-save]] - [[#how-to-disable-tangle-on-save][How to disable tangle-on-save]]

View file

@ -74,7 +74,7 @@ capture, the end position, and the output buffer.")
;; HACK Prevent mis-fontification of YAML metadata blocks in `markdown-mode' ;; HACK Prevent mis-fontification of YAML metadata blocks in `markdown-mode'
;; which occurs when the first line contains a colon in it. See ;; 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 _) (defadvice! +markdown-disable-front-matter-fontification-a (&rest _)
:override #'markdown-match-generic-metadata :override #'markdown-match-generic-metadata
(ignore (goto-char (point-max)))) (ignore (goto-char (point-max))))

View file

@ -28,11 +28,7 @@
(fundamental-mode) (fundamental-mode)
(message "Viewing PDFs in Emacs requires epdfinfo. Use `M-x pdf-tools-install' to build it"))) (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-tools-install-noverify)
(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)
;; For consistency with other special modes ;; For consistency with other special modes
(map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer) (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer)