mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-11 13:07:28 -05:00
General refactors & reformatting across the board
This commit is contained in:
@ -28,9 +28,8 @@
|
||||
(if IS-MAC
|
||||
(package! osx-dictionary :pin "1b79ff64c72485cb078db9ab7ee3256b11a99f4b")
|
||||
(package! define-word :pin "08c71b1ff4fd07bf0c78d1fcf77efeaafc8f7443")
|
||||
;; HACK Fix #2945: the main package is broken (see
|
||||
;; SavchenkoValeriy/emacs-powerthesaurus). We use this fork until it is
|
||||
;; merged.
|
||||
;; HACK Fix #2945: the main package is broken due to
|
||||
;; SavchenkoValeriy/emacs-powerthesaurus#11
|
||||
(package! powerthesaurus
|
||||
:recipe (:host github :repo "maxchaos/emacs-powerthesaurus" :branch "pt-api-change")
|
||||
:pin "4a834782a394f2dc70fc02d68b6962b44d87f0cf")
|
||||
|
@ -1,10 +1,22 @@
|
||||
;;; tools/magit/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; HACK Magit complains loudly when it can't determine its own version, which is
|
||||
;; the case when magit is built through straight. The warning is harmless,
|
||||
;; however, so we just need it to shut up.
|
||||
;; HACK Magit complains loudly (but harmlessly) when it can't determine its own
|
||||
;; version (in the case of a sparse clone).
|
||||
;;;###autoload
|
||||
(advice-add #'magit-version :override #'ignore)
|
||||
(defadvice! +magit--ignore-version-a (&optional print-dest)
|
||||
:override #'magit-version
|
||||
(when print-dest
|
||||
(defvar magit-git-debug)
|
||||
(princ (format "Magit (unknown), Git %s, Emacs %s, %s"
|
||||
(or (let ((magit-git-debug
|
||||
(lambda (err)
|
||||
(display-warning '(magit git) err :error))))
|
||||
(magit-git-version t))
|
||||
"(unknown)")
|
||||
emacs-version
|
||||
system-type)
|
||||
print-dest))
|
||||
nil)
|
||||
|
||||
;;;###autoload
|
||||
(defun +magit-display-buffer-fn (buffer)
|
||||
|
@ -65,29 +65,30 @@
|
||||
(setq-hook! 'pdf-view-mode-hook evil-normal-state-cursor (list nil))
|
||||
|
||||
;; Install epdfinfo binary if needed, blocking until it is finished
|
||||
(require 'pdf-tools)
|
||||
(unless (file-executable-p pdf-info-epdfinfo-program)
|
||||
(let ((wconf (current-window-configuration)))
|
||||
(pdf-tools-install)
|
||||
(message "Building epdfinfo, this will take a moment...")
|
||||
;; HACK We reset all `pdf-view-mode' buffers to fundamental mode so that
|
||||
;; `pdf-tools-install' has a chance to reinitialize them as
|
||||
;; `pdf-view-mode' buffers. This is necessary because
|
||||
;; `pdf-tools-install' won't do this to buffers that are already in
|
||||
;; pdf-view-mode.
|
||||
(dolist (buffer (doom-buffers-in-mode 'pdf-view-mode))
|
||||
(with-current-buffer buffer (fundamental-mode)))
|
||||
(while compilation-in-progress
|
||||
;; Block until `pdf-tools-install' is done
|
||||
(redisplay)
|
||||
(sleep-for 1))
|
||||
;; HACK If pdf-tools was loaded by you opening a pdf file, once
|
||||
;; `pdf-tools-install' completes, `pdf-view-mode' will throw an error
|
||||
;; because the compilation buffer is focused, not the pdf buffer.
|
||||
;; Therefore, it is imperative that the window config is restored.
|
||||
(when (file-executable-p pdf-info-epdfinfo-program)
|
||||
(set-window-configuration wconf))))
|
||||
(when doom-interactive-mode
|
||||
(require 'pdf-tools)
|
||||
(unless (file-executable-p pdf-info-epdfinfo-program)
|
||||
(let ((wconf (current-window-configuration)))
|
||||
(pdf-tools-install)
|
||||
(message "Building epdfinfo, this will take a moment...")
|
||||
;; HACK We reset all `pdf-view-mode' buffers to fundamental mode so that
|
||||
;; `pdf-tools-install' has a chance to reinitialize them as
|
||||
;; `pdf-view-mode' buffers. This is necessary because
|
||||
;; `pdf-tools-install' won't do this to buffers that are already in
|
||||
;; pdf-view-mode.
|
||||
(dolist (buffer (doom-buffers-in-mode 'pdf-view-mode))
|
||||
(with-current-buffer buffer (fundamental-mode)))
|
||||
(while compilation-in-progress
|
||||
;; Block until `pdf-tools-install' is done
|
||||
(redisplay)
|
||||
(sleep-for 1))
|
||||
;; HACK If pdf-tools was loaded by you opening a pdf file, once
|
||||
;; `pdf-tools-install' completes, `pdf-view-mode' will throw an error
|
||||
;; because the compilation buffer is focused, not the pdf buffer.
|
||||
;; Therefore, it is imperative that the window config is restored.
|
||||
(when (file-executable-p pdf-info-epdfinfo-program)
|
||||
(set-window-configuration wconf))))
|
||||
|
||||
;; Sets up `pdf-tools-enable-minor-modes', `pdf-occur-global-minor-mode' and
|
||||
;; `pdf-virtual-global-minor-mode'.
|
||||
(pdf-tools-install-noverify))
|
||||
;; Sets up `pdf-tools-enable-minor-modes', `pdf-occur-global-minor-mode' and
|
||||
;; `pdf-virtual-global-minor-mode'.
|
||||
(pdf-tools-install-noverify)))
|
||||
|
Reference in New Issue
Block a user