@@ 499,32 499,14 @@ use the ~logos-focus-mode-hook~ instead.
Here is a snippet that relies on the ~logos-focus-mode-hook~ to extend
the functionality of ~logos-focus-mode~ ([[#h:a2540f2f-1159-4e5c-a486-e1f2cb63fee8][Leverage logos-focus-mode-hook]]).
-#+begin_src emacs-lisp
-(defvar my-logos-org-indent nil
- "When t, disable `org-indent-mode' during `logos-focus-mode'.")
-
-(defun my-logos-org-indent ()
- "Set `my-logos-org-indent' in `logos-focus-mode'."
- (when my-logos-org-indent
- ;; Disable `org-indent-mode' when `logos-focus-mode' is enabled and
- ;; restore it when `logos-focus-mode' is disabled. The
- ;; `logos-set-mode-arg' function takes care of the technicalities.
- (logos-set-mode-arg 'org-indent-mode -1)))
-
-(add-hook 'logos-focus-mode-hook #'my-logos-org-indent)
-#+end_src
-
-The ~my-logos-org-indent~ variable lets the user opt in and out of this
-feature, by setting it to t or nil, respectively. If such a toggle is
-not needed, the following will suffice:
+It disables ~org-indent-mode~ when ~logos-focus-mode~ is enabled and
+restores it when ~logos-focus-mode~ is disabled. The
+~logos-set-mode-arg~ function takes care of the technicalities.
#+begin_src emacs-lisp
(defun my-logos-org-indent ()
- "Set `my-logos-org-indent' in `logos-focus-mode'."
- ;; Disable `org-indent-mode' when `logos-focus-mode' is enabled and
- ;; restore it when `logos-focus-mode' is disabled. The
- ;; `logos-set-mode-arg' function takes care of the technicalities.
- (logos-set-mode-arg 'org-indent-mode -1))
+ (when logos-focus-mode
+ (logos-set-mode-arg 'org-indent-mode -1)))
(add-hook 'logos-focus-mode-hook #'my-logos-org-indent)
#+end_src