From b857566239495241d711ced63a515464ce36cca4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 20 Oct 2020 16:52:39 -0400 Subject: [PATCH] Minor refactors --- early-init.el | 4 ++-- modules/lang/org/contrib/journal.el | 5 +++-- modules/tools/lsp/+lsp.el | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/early-init.el b/early-init.el index db3139da4..547a6b19f 100644 --- a/early-init.el +++ b/early-init.el @@ -10,7 +10,7 @@ ;; loaded, but after `early-init-file'. Doom handles package initialization, so ;; we must prevent Emacs from doing it early! (setq package-enable-at-startup nil) -(advice-add #'package--ensure-init-file :override #'ignore) +(fset #'package--ensure-init-file #'ignore) ;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early. (push '(menu-bar-lines . 0) default-frame-alist) @@ -25,7 +25,7 @@ ;; Ignore X resources; its settings would be redundant with the other settings ;; in this file and can conflict with later config (particularly where the ;; cursor color is concerned). -(advice-add #'x-apply-session-resources :override #'ignore) +(fset #'x-apply-session-resources #'ignore) ;; Prevent unwanted runtime builds in gccemacs (native-comp); packages are ;; compiled ahead-of-time when they are installed and site files are compiled diff --git a/modules/lang/org/contrib/journal.el b/modules/lang/org/contrib/journal.el index 761dcc1f0..6f93b05ca 100644 --- a/modules/lang/org/contrib/journal.el +++ b/modules/lang/org/contrib/journal.el @@ -38,10 +38,11 @@ ;; we wanted to keep visible. org-journal-find-file #'find-file) - ;; Setup carryover to include all configured TODO states. + ;; Setup carryover to include all configured TODO states. We cannot carry over + ;; [ ] keywords because `org-journal-carryover-items's syntax cannot correctly + ;; interpret it as anything other than a date. (setq org-journal-carryover-items "TODO=\"TODO\"|TODO=\"PROJ\"|TODO=\"STRT\"|TODO=\"WAIT\"|TODO=\"HOLD\"") - (set-popup-rule! "^\\*Org-journal search" :select t :quit t) (map! (:map org-journal-mode-map diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 965c85eef..0196866dc 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -98,8 +98,8 @@ server getting expensively restarted when reverting buffers." (run-at-time (if (numberp +lsp-defer-shutdown) +lsp-defer-shutdown 3) nil (lambda (workspace) - (let ((lsp--cur-workspace workspace)) - (unless (lsp--workspace-buffers lsp--cur-workspace) + (with-lsp-workspace workspace + (unless (lsp--workspace-buffers workspace) (let ((lsp-restart 'ignore)) (funcall orig-fn)) (+lsp-optimization-mode -1))))