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

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

[nongnu] elpa/org-superstar 29dbbc48ac: Add feature to use Superstar for


From: ELPA Syncer
Subject: [nongnu] elpa/org-superstar 29dbbc48ac: Add feature to use Superstar for item bullets only.
Date: Mon, 16 Jan 2023 09:59:52 -0500 (EST)

branch: elpa/org-superstar
commit 29dbbc48ac925f36cc1636b36b4a3ccb3588e17f
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>

    Add feature to use Superstar for item bullets only.
    
    See Issue #36.
---
 README.org       |  3 ++-
 org-superstar.el | 36 +++++++++++++++++++++---------------
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/README.org b/README.org
index 82ff047883..161aa95f0d 100644
--- a/README.org
+++ b/README.org
@@ -217,7 +217,8 @@ used, allowing the user to inherit the level-dependent 
default look.
 
 *** ~org-superstar-prettify-item-bullets~
     Exactly as it says on the tin.  Set this variable to ~nil~ to stop
-    ~org-superstar-mode~ from prettifying lists.
+    ~org-superstar-mode~ from prettifying lists.  If set to the symbol
+    ~only~, this disables prettifying Org headings entirely.
 
 *** Fast Plain List Items
     The default syntax-checking done to ensure only actual plain list
diff --git a/org-superstar.el b/org-superstar.el
index fe0f8a70a2..a48292c53d 100644
--- a/org-superstar.el
+++ b/org-superstar.el
@@ -362,11 +362,15 @@ raise an error."
 Each type of plain list bullet is associated with a
 corresponding UTF8 character in ‘org-superstar-item-bullet-alist’.
 
+If set to the symbol ‘only’, disable fontifying headlines entirely.
+This takes precedence over all other customizations.
+
 You should call ‘org-superstar-restart’ after changing this
 variable for your changes to take effect."
   :group 'org-superstar
   :type '(choice (const :tag "Enable item bullet fontification" t)
-                 (const :tag "Disable item bullet fontification" nil)))
+                 (const :tag "Disable item bullet fontification" nil)
+                 (const :tag "Exclusively fontify item bullets" only)))
 
 (defcustom org-superstar-special-todo-items nil
   "Non-nil means use special bullets for TODO items.
@@ -833,21 +837,23 @@ cleanup routines."
         `(,@(when org-superstar-prettify-item-bullets
               '(("^[ \t]*?\\(?:\\(?1:[-+]\\)\\|[ \t]\\(?1:\\*\\)\\) "
                  (1 (org-superstar--prettify-ibullets)))))
-          ("^\\(?3:\\**?\\)\\(?2:\\*?\\)\\(?1:\\*\\) "
-           (1 (org-superstar--prettify-main-hbullet) prepend)
-           ,@(unless (or org-hide-leading-stars
-                         org-superstar-remove-leading-stars)
-               '((3 (org-superstar--prettify-leading-hbullets)
-                    t)
-                 (2 (org-superstar--prettify-other-lbullet)
-                    t)))
-           ,@(when org-superstar-remove-leading-stars
-               '((3 (org-superstar--make-invisible 3))
-                 (2 (org-superstar--make-invisible 2))))
-           ,@(when (featurep 'org-inlinetask)
-               '((2 (org-superstar--prettify-other-hbullet)
-                    prepend))))
+          ,@(unless (eq org-superstar-prettify-item-bullets 'only)
+              `(("^\\(?3:\\**?\\)\\(?2:\\*?\\)\\(?1:\\*\\) "
+                 (1 (org-superstar--prettify-main-hbullet) prepend)
+                 ,@(unless (or org-hide-leading-stars
+                               org-superstar-remove-leading-stars)
+                     '((3 (org-superstar--prettify-leading-hbullets)
+                          t)
+                       (2 (org-superstar--prettify-other-lbullet)
+                          t)))
+                 ,@(when org-superstar-remove-leading-stars
+                     '((3 (org-superstar--make-invisible 3))
+                       (2 (org-superstar--make-invisible 2))))
+                 ,@(when (featurep 'org-inlinetask)
+                     '((2 (org-superstar--prettify-other-hbullet)
+                          prepend))))))
           ,@(when (and (featurep 'org-inlinetask)
+                       (not (eq org-superstar-prettify-item-bullets 'only))
                        org-inlinetask-show-first-star
                        (not org-superstar-remove-leading-stars))
               '(("^\\(?4:\\*\\)\\(?:\\*\\{2,\\}\\) "



reply via email to

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