refactor: refine Windows support and convert use-package :if to conditionals

This commit is contained in:
2026-06-13 08:25:44 +08:00
parent 5c7391dcf8
commit e3dda7fd65
8 changed files with 95 additions and 95 deletions

View File

@@ -42,20 +42,19 @@
(server-mode 1)))))
;; recentf最近打开的文件
(use-package recentf
:if
(or (display-graphic-p) *is-android*)
:hook
(after-init . recentf-mode)
:init
(setq recentf-max-saved-items 30)
:config
(if *is-android*
(add-to-list 'recentf-exclude "~/storage/shared/my-org-note/journal/.*\\.org\\'")
(add-to-list 'recentf-exclude "~/org/my-org-note/journal/.*\\.org\\'")
(add-to-list 'recentf-exclude "~/org/my-org-note/20260509T232442==agenda--all-my-todos__org\\.org"))
(add-to-list 'recentf-exclude "~/.emacs.d/emms/history")
(add-to-list 'recentf-exclude "~/.emacs.d/bookmarks"))
(if (or (display-graphic-p) *is-android*)
(use-package recentf
:hook
(after-init . recentf-mode)
:init
(setq recentf-max-saved-items 30)
:config
(if *is-android*
(add-to-list 'recentf-exclude "~/storage/shared/my-org-note/journal/.*\\.org\\'")
(add-to-list 'recentf-exclude "~/org/my-org-note/journal/.*\\.org\\'")
(add-to-list 'recentf-exclude "~/org/my-org-note/20260509T232442==agenda--all-my-todos__org\\.org"))
(add-to-list 'recentf-exclude "~/.emacs.d/emms/history")
(add-to-list 'recentf-exclude "~/.emacs.d/bookmarks")))
;; savehist保存命令顺序
(use-package savehist
@@ -81,14 +80,13 @@
(use-package restart-emacs)
;; async
(if *is-android*
(use-package async
:if
(not *is-android*)
:hook
(after-init . dired-async-mode)
(after-init . async-bytecomp-package-mode)
:init
(setq async-bytecomp-allowed-packages '(all)))
(setq async-bytecomp-allowed-packages '(all))))
;; autorevert buffer
(use-package autorevert