diff --git a/init.el b/init.el index 82cdfefe85d914634aece36a0c29f08e0553dd98..65e1ee42dc47905e169b6840272d9cac41b60d00 100644 --- a/init.el +++ b/init.el @@ -55,6 +55,9 @@ user/userconfig-file)) (load user/userconfig-file) +;; Config before init +(user/config-before-init) + ;; load `custom-file' (setq custom-file user/custom-file) (when (file-exists-p custom-file) @@ -114,6 +117,8 @@ (require 'init-org) (require 'apps) +;; Configurations after init +(user/config-after-init) (provide 'init) ;;; init.el ends here diff --git a/lisp/configs.el b/lisp/configs.el index 61f62cc88ef7f5048a8086f758ed19b059fa6b65..c52dd49bd87bfe1a45376ef85753f9c7bd6a1eba 100644 --- a/lisp/configs.el +++ b/lisp/configs.el @@ -20,11 +20,6 @@ :weight normal :width normal)) -(defvar user/org-default-font '("Noto Sans CJK SC" - :height 140 - :weight normal - :width normal)) - (defvar user/cache-directory (expand-file-name ".cache/" user-emacs-directory)) diff --git a/lisp/init-org.el b/lisp/init-org.el index 6f37fa51f7f23b06d47d306d4f308105b1a6f713..a6eb3882b4e4a083b5e1acebfa4a3ee570f34847 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -37,24 +37,6 @@ :commands (orgtbl-mode) :init (defvar org-face-font nil) - (when (find-font (font-spec :name (car user/org-default-font))) - (let* ((font (car user/org-default-font)) - (props (cdr user/org-default-font)) - (fontspec (apply 'font-spec :name font props))) - (setq org-face-font fontspec))) - - (when (fontp org-face-font) - (with-eval-after-load 'org - (add-hook 'org-mode-hook - (lambda () - (make-face 'width-font-face) - (set-face-attribute 'width-font-face nil - :family (font-get org-face-font :family) - :height (font-get org-face-font :height) - :width (font-get org-face-font :width)) ;; 13, 14, 16绛変細鍑虹幇涓嶇瓑瀹� - (setq buffer-face-mode-face 'width-font-face) - (buffer-face-mode))))) - :config (require 'org-tempo) diff --git a/lisp/templates/userconfig.template b/lisp/templates/userconfig.template index b7d06fd65cc77cd367f721d357212fdc865ab6f3..1657296a891b22cc14efa5365ef50d6ffbd5794b 100644 --- a/lisp/templates/userconfig.template +++ b/lisp/templates/userconfig.template @@ -19,3 +19,18 @@ ;; :width normal) ) +;;; Custom configures +(defun user/config-after-init () + (with-eval-after-load 'org + (add-hook 'org-mode-hook + #'(lambda () + (make-face 'width-font-face) + (set-face-attribute 'width-font-face nil :font "Noto Sans Mono CJK SC 14") + (setq buffer-face-mode-face 'width-font-face) + (buffer-face-mode)))) + ;; + ) + + +(defun user/config-before-init () + )