From 28ee896420b08bfab4df11aec5c4fb9a5187d3ad Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 26 Mar 2024 10:39:24 -0400 Subject: [PATCH] nit: minor comment reformatting & revision --- bin/doom | 6 +++--- modules/app/everywhere/config.el | 2 +- modules/lang/nix/config.el | 2 -- modules/ui/ligatures/config.el | 5 +++-- modules/ui/treemacs/config.el | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bin/doom b/bin/doom index 8104260a8..32504f224 100755 --- a/bin/doom +++ b/bin/doom @@ -89,9 +89,9 @@ (user-error (message "Error: %s" (cadr e)) (kill-emacs 2))) -;; UX: Abort if the user is using 'doom' as root, unless ~/.config/emacs is -;; owned by root, in which case we assume the user genuinely wants root to be -;; their primary user account for Emacs. +;; UX: Abort if the user is using 'doom' as root, unless $EMACSDIR is owned by +;; root, in which case we can safely assume the user genuinely wants root to +;; be their primary user account for this session. (when (equal 0 (user-real-uid)) (unless (equal 0 (file-attribute-user-id (file-attributes doom-emacs-dir))) (message diff --git a/modules/app/everywhere/config.el b/modules/app/everywhere/config.el index 9f5052784..4e235b7af 100644 --- a/modules/app/everywhere/config.el +++ b/modules/app/everywhere/config.el @@ -8,7 +8,7 @@ :config (set-yas-minor-mode! 'emacs-everywhere-mode) - ;; HACK Inhibit MAJOR-MODE-local-vars-hook in emacs-everywhere buffers, + ;; HACK: Inhibit MAJOR-MODE-local-vars-hook in emacs-everywhere buffers, ;; because Doom commonly starts servers and other extraneous services on ;; this hook, which will rarely work well in emacs-everywhere's temporary ;; buffers anyway. diff --git a/modules/lang/nix/config.el b/modules/lang/nix/config.el index 5e6677220..10bfb1731 100644 --- a/modules/lang/nix/config.el +++ b/modules/lang/nix/config.el @@ -11,8 +11,6 @@ :interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode) :mode "\\.nix\\'" :init - ;; Treat flake.lock files as json. Fall back to js-mode because it's faster - ;; than js2-mode, and its extra features aren't needed there. (add-to-list 'auto-mode-alist (cons "/flake\\.lock\\'" (if (modulep! :lang json) diff --git a/modules/ui/ligatures/config.el b/modules/ui/ligatures/config.el index 6312493ba..9578be7da 100644 --- a/modules/ui/ligatures/config.el +++ b/modules/ui/ligatures/config.el @@ -161,8 +161,9 @@ and cannot run in." (fboundp 'mac-auto-operator-composition-mode)) (add-hook 'doom-init-ui-hook #'mac-auto-operator-composition-mode 'append)) - ;; NOTE: the module does not support Emacs 27 and less, but if we still try to enable ligatures, - ;; it will end up in catastrophic work-loss errors, so we leave the check here for safety. + ;; This module does not support Emacs 27 and less, but if we still try to + ;; enable ligatures, it will end up in catastrophic work-loss errors, so we + ;; leave the check here for safety. ((and (> emacs-major-version 27) (or (featurep 'ns) (string-match-p "HARFBUZZ" system-configuration-features)) diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index d232ec1b0..62e3e6ddb 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -26,7 +26,7 @@ This must be set before `treemacs' has loaded.") treemacs-persist-file (concat doom-cache-dir "treemacs-persist") treemacs-last-error-persist-file (concat doom-cache-dir "treemacs-last-error-persist")) :config - ;; Don't follow the cursor + ;; Don't follow the cursor (it's more disruptive/jarring than helpful as a default) (treemacs-follow-mode -1) (set-popup-rule! "^ ?\\*Treemacs" :ignore t)