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
1 changed files with 7 additions and 6 deletions

View File

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