[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-superstar dcb6c56d50 027/162: fixed spurious compose-r
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/org-superstar dcb6c56d50 027/162: fixed spurious compose-region for empty regions (level 1 headers) |
Date: |
Fri, 31 Dec 2021 19:35:21 -0500 (EST) |
branch: elpa/org-superstar
commit dcb6c56d501eaeb30184c817763097200b2ab7c3
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>
fixed spurious compose-region for empty regions (level 1 headers)
---
org-superstar.el | 40 ++++++++++++++++++++++++----------------
1 file changed, 24 insertions(+), 16 deletions(-)
diff --git a/org-superstar.el b/org-superstar.el
index 288490add6..8d7769cf4f 100644
--- a/org-superstar.el
+++ b/org-superstar.el
@@ -324,6 +324,13 @@ function for your changes to take effect."
(setq org-hide-leading-stars t)
nil)
+(defun org-superstar-restart ()
+ "Re-enable ‘\\[org-bullets-mode]’, if the mode is enabled."
+ (interactive)
+ (when org-superstar-mode
+ (org-superstar-mode 0)
+ (org-superstar-mode 1)))
+
;;; Accessor Functions
@@ -424,22 +431,22 @@ block is formatted like the leading asterisks, see
This function uses ‘org-superstar-headline-or-inlinetask-p’ to avoid
prettifying bullets in (for example) source blocks."
- (when (org-superstar-headline-or-inlinetask-p)
- (let* ((level (- (match-end 0) (match-beginning 0) 1))
- (is-inline-task
- (and (boundp 'org-inlinetask-min-level)
- (>= level org-inlinetask-min-level)))
- (compose-star (or is-inline-task
- (and (not org-hide-leading-stars)
- org-superstar-prettify-leading-stars)))
- (bullet-char (if is-inline-task
- (org-superstar--hbullet level)
- (org-superstar-lbullet))))
- (when compose-star
- (compose-region (match-beginning 2) (match-end 2)
- bullet-char))
- (cond (is-inline-task 'org-superstar-header-bullet)
- (org-superstar-prettify-leading-stars 'org-superstar-leading)))))
+ (let ((level (- (match-end 0) (match-beginning 0) 1)))
+ (when (and (> level 1) (org-superstar-headline-or-inlinetask-p))
+ (let* ((is-inline-task
+ (and (boundp 'org-inlinetask-min-level)
+ (>= level org-inlinetask-min-level)))
+ (compose-star (or is-inline-task
+ (and (not org-hide-leading-stars)
+ org-superstar-prettify-leading-stars)))
+ (bullet-char (if is-inline-task
+ (org-superstar--hbullet level)
+ (org-superstar-lbullet))))
+ (when compose-star
+ (compose-region (match-beginning 2) (match-end 2)
+ bullet-char))
+ (cond (is-inline-task 'org-superstar-header-bullet)
+ (org-superstar-prettify-leading-stars
'org-superstar-leading))))))
(defun org-superstar--prettify-leading-hbullets ()
@@ -525,5 +532,6 @@ routines of ‘\\[org-superstar-mode]’."
(org-superstar--unprettify-hbullets)
(org-superstar--fontify-buffer))))
+
(provide 'org-superstar)
;;; org-superstar.el ends here
- [nongnu] elpa/org-superstar 2f9f9d6b21 070/162: version bump to 1.0.0, (continued)
- [nongnu] elpa/org-superstar 2f9f9d6b21 070/162: version bump to 1.0.0, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 61bf289b42 073/162: Removed no longer needed temporary testing file., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 31c8dc54a9 082/162: updating README to reflect addition to MELPA, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 7a33a131a2 095/162: Removed MWE file issue-10.org, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 4659cfc120 103/162: Adding a helpful trick to the README., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 9f86f5aa22 106/162: Add a new point to the FAQ discussing what remains of Issue #10., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar dd9e24efb2 116/162: Added a reference for bullet resources, addressing PR #18., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar bf6ea02aa1 139/162: Update issue templates, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar b13c994bca 144/162: Update README, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar bb560c6f7b 143/162: Add new feature: Conditionally hide TODO bullets., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar dcb6c56d50 027/162: fixed spurious compose-region for empty regions (level 1 headers),
Stefan Kangas <=
- [nongnu] elpa/org-superstar 1741f6eed8 053/162: Fixed custom interface of special-todo-items, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar d17d10c443 044/162: updated README, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar c6b8bd604f 023/162: marked update in roadmap, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar c0dacd8562 052/162: updated README to reflect new version, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar d94e141c36 069/162: Added a REVIEW marker., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 8a6215a10f 084/162: Merge pull request #6 from progfolio/fix-org-superstar-restart-docstring, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 092de74fb9 099/162: Fixed typo in README., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar f75220cd2d 089/162: Downgrade version requirements, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 3fbfc0a47e 092/162: Merge pull request #11 from integral-dw/issue-10, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar a995899117 115/162: Merge branch 'master' of github.com:integral-dw/org-superstar-mode, Stefan Kangas, 2021/12/31