Skip to content

Commit

Permalink
Minor refactors & reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hlissner committed May 25, 2021
1 parent 7b5baf3 commit f604ce6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
1 change: 0 additions & 1 deletion core/autoload/output.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 11 additions & 9 deletions core/cli/doctor.el
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
4 changes: 2 additions & 2 deletions core/core-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
1 change: 0 additions & 1 deletion modules/config/literate/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
2 changes: 1 addition & 1 deletion modules/lang/markdown/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down
6 changes: 1 addition & 5 deletions modules/tools/pdf/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f604ce6

Please sign in to comment.