emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-modern 664f57ae12 10/65: Add option org-modern-hide


From: ELPA Syncer
Subject: [elpa] externals/org-modern 664f57ae12 10/65: Add option org-modern-hide-stars
Date: Mon, 7 Mar 2022 12:57:44 -0500 (EST)

branch: externals/org-modern
commit 664f57ae120b5d5fa6a6190de13fc07bc85e7648
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add option org-modern-hide-stars
---
 org-modern.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index 91b39bf06b..3838df907b 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -48,6 +48,10 @@
 Set to nil to disable styling the headlines."
   :type '(choice (const nil) (vector string)))
 
+(defcustom org-modern-hide-stars 'leading
+  "Make the leading stars invisible."
+  :type '(choice boolean (const leading)))
+
 (defcustom org-modern-timestamp t
   "Prettify time stamps, e.g. <2022-03-01>.
 Set to nil to disable styling the time stamps."
@@ -395,8 +399,11 @@ Set to nil to disable the progress bar."
       (when org-modern-checkbox
         '(("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(\\[[ X-]\\]\\)[ \t]"
            (0 (org-modern--checkbox)))))
-      (when org-modern-star
-        '(("^\\(\\**\\)\\(\\*\\) " (0 (org-modern--star)))))
+      (when (or org-modern-star org-modern-hide-stars)
+        `(("^\\(\\**\\)\\(\\*\\) "
+           ,@(and (not (eq org-modern-hide-stars t)) org-modern-star '((0 
(org-modern--star))))
+           ,@(and (eq org-modern-hide-stars 'leading) '((1 '(face nil 
invisible t))))
+           ,@(and (eq org-modern-hide-stars t) '((0 '(face nil invisible 
t)))))))
       (when org-modern-horizontal-rule
         '(("^-\\{5,\\}$" 0 '(face org-modern-horizontal-rule display (space 
:width text)))))
       (when org-modern-table



reply via email to

[Prev in Thread] Current Thread [Next in Thread]