another autoload try inspired from doom-themes

This commit is contained in:
Yann Esposito (Yogsototh) 2021-11-08 14:22:48 +01:00
parent d9c3dc1fed
commit d379185947
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -36,12 +36,13 @@
(require 'hl-sentence) (require 'hl-sentence)
(defvar doom-theme) (defvar doom-theme)
;;;###autoload
(when (and (boundp 'custom-theme-load-path) load-file-name )
;; load the local themes (let* ((base (file-name-directory load-file-name))
(dir (expand-file-name "themes/" base)))
(let ((dir (file-name-directory (or load-file-name buffer-file-name)))) (add-to-list 'custom-theme-load-path
(add-to-list 'custom-theme-load-path (concat dir "/themes"))) (or (and (file-directory-p dir) dir)
base))))
;; configuration ;; configuration
(defvar zen-writer-light-theme 'doom-zen-writer (defvar zen-writer-light-theme 'doom-zen-writer