[Misc] Almost exclusively use ‘with-eval-after-load’

instead of ‘eval-after-load’.
This commit is contained in:
Daniel - 2018-08-15 21:12:42 +02:00
parent e8a8781a78
commit 6ab52f11ed
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
3 changed files with 23 additions and 26 deletions

25
init.el
View File

@ -255,10 +255,10 @@
;; Fixes ;; Fixes
(eval-after-load "enriched" (with-eval-after-load 'enriched
'(defun enriched-decode-display-prop (start end &optional params) (defun enriched-decode-display-prop (start end &optional params)
(ignore params) (ignore params)
(list start end))) (list start end)))
;; Start Server when not running already ;; Start Server when not running already
@ -1206,9 +1206,9 @@ are assumed to be of the form *.crt."
(cmucl ("cmucl") :coding-system utf-8-unix) (cmucl ("cmucl") :coding-system utf-8-unix)
(ccl ("ccl") :coding-system utf-8-unix))) (ccl ("ccl") :coding-system utf-8-unix)))
(eval-after-load 'slime-repl (with-eval-after-load 'slime-repl
'(setq slime-repl-history-remove-duplicates t (setq slime-repl-history-remove-duplicates t
slime-repl-history-trim-whitespaces t)))) slime-repl-history-trim-whitespaces t))))
(use-package hy-mode (use-package hy-mode
:commands (hy-mode) :commands (hy-mode)
@ -1223,14 +1223,13 @@ are assumed to be of the form *.crt."
:commands (turn-on-reftex) :commands (turn-on-reftex)
:init (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode :init (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
:config (progn :config (progn
(eval-after-load 'helm-mode (with-eval-after-load 'helm-mode
'(add-to-list (add-to-list 'helm-completing-read-handlers-alist
'helm-completing-read-handlers-alist '(reftex-citation . nil)))
'(reftex-citation . nil)))
(setq reftex-plug-into-AUCTeX t))) (setq reftex-plug-into-AUCTeX t)))
(eval-after-load 'tex-mode (with-eval-after-load 'tex-mode
'(use-package db-latex)) (use-package db-latex))
(use-package ebib (use-package ebib
:commands (ebib)) :commands (ebib))

View File

@ -67,11 +67,10 @@
'(output-pdf "Evince")) '(output-pdf "Evince"))
;; use pdf-tools when loaded ;; use pdf-tools when loaded
(eval-after-load 'pdf-tools (with-eval-after-load 'pdf-tools
`(progn (add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools"))
(add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools")) (add-to-list 'TeX-after-compilation-finished-functions
(add-to-list 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))
#'TeX-revert-document-buffer)))

View File

@ -612,18 +612,17 @@ _y_: ?y? year _q_: quit _L__l__c_: ?l?
(org-agenda-redo))) (org-agenda-redo)))
("q" (message "Abort") :exit t)) ("q" (message "Abort") :exit t))
(eval-after-load 'org-agenda (with-eval-after-load 'org-agenda
'(bind-key "v" #'hydra-org-agenda-view/body org-agenda-mode-map)) (bind-key "v" #'hydra-org-agenda-view/body org-agenda-mode-map))
;;; Capturing ;;; Capturing
;; disable usage of helm for `org-capture' ;; disable usage of helm for `org-capture'
(eval-after-load 'helm-mode (with-eval-after-load 'helm-mode
'(progn (defvar helm-completing-read-handlers-alist) ; for the byte compiler
(defvar helm-completing-read-handlers-alist) ; for the byte compiler (add-to-list 'helm-completing-read-handlers-alist
(add-to-list 'helm-completing-read-handlers-alist '(org-capture . nil)))
'(org-capture . nil))))
(setq org-capture-use-agenda-date nil) (setq org-capture-use-agenda-date nil)
@ -837,7 +836,7 @@ This is done only if the value of this variable is not null."
(setq org-export-use-babel nil (setq org-export-use-babel nil
org-export-with-broken-links 'mark) org-export-with-broken-links 'mark)
(with-eval-after-load "ox-latex" (with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes (add-to-list 'org-latex-classes
`("scrartcl" `("scrartcl"
,(concat "\\documentclass{scrartcl}\n" ,(concat "\\documentclass{scrartcl}\n"