[Misc] Protect some calls to ‘require’

This commit is contained in:
Daniel - 2018-09-07 17:46:22 +02:00
parent a4e5f0616f
commit c48a75048b
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 19 additions and 16 deletions

35
init.el
View File

@ -630,17 +630,18 @@ _h_ _l_ _o_k _y_ank
magit-popup-use-prefix-argument 'default magit-popup-use-prefix-argument 'default
magit-completing-read-function 'ivy-completing-read) magit-completing-read-function 'ivy-completing-read)
(eval-when-compile (with-demoted-errors "Non-Fatal Error: %s"
(require 'projectile)) (eval-when-compile
(setq magit-repository-directories (require 'projectile))
(mapcar (setq magit-repository-directories
(lambda (dir) (mapcar
(cons (substring dir 0 -1) 0)) (lambda (dir)
(cl-remove-if-not (cons (substring dir 0 -1) 0))
(lambda (project) (cl-remove-if-not
(unless (file-remote-p project) (lambda (project)
(file-exists-p (concat project "/.git")))) (unless (file-remote-p project)
projectile-known-projects))))) (file-exists-p (concat project "/.git"))))
projectile-known-projects))))))
(use-package projectile (use-package projectile
:commands (projectile-mode) :commands (projectile-mode)
@ -769,8 +770,9 @@ are assumed to be of the form *.crt."
dired-local-variables-file nil) dired-local-variables-file nil)
(require 'dired-x) (require 'dired-x)
(require 'dired+) (with-demoted-errors "Non-Fatal Error: %s"
(require 'dired-open) (require 'dired+)
(require 'dired-open))
;; Gnus support in dired ;; Gnus support in dired
(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode) (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
@ -1325,9 +1327,10 @@ are assumed to be of the form *.crt."
company-backends)))) company-backends))))
(add-hook 'haskell-mode-hook 'flycheck-mode) (add-hook 'haskell-mode-hook 'flycheck-mode)
(require 'haskell-indentation) (with-demoted-errors "Non-Fatal Error: %s"
(add-hook 'haskell-mode-hook (require 'haskell-indentation)
'haskell-indentation-mode) (add-hook 'haskell-mode-hook
'haskell-indentation-mode))
(add-hook 'haskell-mode-hook (add-hook 'haskell-mode-hook
'interactive-haskell-mode))) 'interactive-haskell-mode)))