added require? macro for requring optional libraries

master
John Turner 2 years ago
parent 55c287da2c
commit d13ff1f3a7
No known key found for this signature in database
GPG Key ID: 422FE10CC41A94A2

@ -29,8 +29,12 @@
(add-to-list 'load-path directory)) (add-to-list 'load-path directory))
directories)) directories))
(when (locate-library "site-gentoo") (defmacro require? (feature)
(require 'site-gentoo)) `(require ,feature nil t))
(require? 'site-gentoo)
(require? 'magit)
(require 'init-text-mode) (require 'init-text-mode)
(require 'init-conf-mode) (require 'init-conf-mode)
@ -54,16 +58,16 @@
(require 'init-savehist) (require 'init-savehist)
(require 'init-tramp) (require 'init-tramp)
(when (locate-library "company") (when (require? 'company)
(require 'init-company)) (require 'init-company))
(when (locate-library "eglot") (when (require? 'eglot)
(require 'init-eglot)) (require 'init-eglot))
(when (locate-library "flycheck") (when (require? 'flycheck)
(require 'init-flycheck)) (require 'init-flycheck))
(when (locate-library "lsp-mode") (when (require? 'lsp-mode)
(require 'init-lsp-mode)) (require 'init-lsp-mode))
(when (and (> emacs-major-version 28) (native-comp-available-p)) (when (and (> emacs-major-version 28) (native-comp-available-p))

Loading…
Cancel
Save