[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-superstar 772719da34 074/162: Streamlined headline pre
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/org-superstar 772719da34 074/162: Streamlined headline predicates. |
Date: |
Fri, 31 Dec 2021 19:35:27 -0500 (EST) |
branch: elpa/org-superstar
commit 772719da34dfc7f1ab16737092d0cb14f3d61c76
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>
Streamlined headline predicates.
Since leading stars *must* be escaped, it makes no sense to use
a heavyweight org-element call.
The new implementation has been suggested by ngz from the #org-mode
IRC channel.
---
org-superstar.el | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/org-superstar.el b/org-superstar.el
index e8f99584b8..daf6cdf551 100644
--- a/org-superstar.el
+++ b/org-superstar.el
@@ -5,7 +5,7 @@
;; Author: D. Williams <d.williams@posteo.net>
;; Maintainer: D. Williams <d.williams@posteo.net>
;; Keywords: faces, outlines
-;; Version: 1.0.0
+;; Version: 1.0.1
;; Homepage: https://github.com/integral-dw/org-superstar-mode
;; Package-Requires: ((org "9.1.9") (emacs "26.2"))
@@ -434,25 +434,20 @@ replaced by their corresponding entry in
‘org-superstar-item-bullet-alist’."
(defun org-superstar-headline-or-inlinetask-p ()
"Return t if the current match is a proper headline or inlinetask."
(save-match-data
- (when (org-element-lineage (org-element-at-point)
- '(headline inlinetask) t)
- t)))
+ (and (org-at-heading-p) t)))
(defun org-superstar-headline-p ()
"Return t if the current match is a proper headline."
(interactive)
(save-match-data
- (when (org-element-lineage (org-element-at-point)
- '(headline) t)
- t)))
+ (org-with-limited-levels
+ (and (org-at-heading-p) t))))
(defun org-superstar-inlinetask-p ()
"Return t if the current match is a proper inlinetask."
(and (featurep 'org-inlinetask)
- (save-match-data
- (when (org-element-lineage (org-element-at-point)
- '(inlinetask) t)
- t))))
+ (org-superstar-headline-or-inlinetask-p)
+ (not (org-superstar-headline-p))))
(defun org-superstar-graphic-p ()
"Return t if the current display supports proper composing."
- [nongnu] elpa/org-superstar 086ab28506 075/162: Updating Roadmap, (continued)
- [nongnu] elpa/org-superstar 086ab28506 075/162: Updating Roadmap, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 4965e70c75 036/162: added reference for default headline fontification, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar c58d1e2689 046/162: force org-superstar to clean up --font-lock-keywords, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar a7d6b37ea2 062/162: Removing references to org-hide-leading-stars-before-indent-mode., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 6ef00c4eaf 034/162: renamed sample-titles to sample-headlines, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar bd99047cb3 048/162: updating README, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar b7c660aa32 038/162: adding further faceup files, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 4c2015072c 024/162: updated roadmap, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 845aa85b78 080/162: fixed typo in docstring, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar fc62da2f85 077/162: fixed README conflict, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 772719da34 074/162: Streamlined headline predicates.,
Stefan Kangas <=
- [nongnu] elpa/org-superstar ceb3be1018 088/162: Implement circumvention for plain list syntax checking, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar b366a40451 091/162: Allow for item bullets other than "*" to lack leading spaces., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 7b576a0f23 083/162: Fix org-superstar-restart docstring, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar addff4c813 086/162: Moved NEWS section to the bottom of the README., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 10735de9e9 093/162: Updating README (news), Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 9551ab129d 094/162: Merging updates from master branch., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 17481852c1 110/162: Merge pull request #17 from progfolio/fix/16, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 746d7afa3e 101/162: Updating README to reflect version bump., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 0a2dedc91f 107/162: Fix typo in org-superstar-plain-list-p causing it to always return t., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 3db4ab5d4d 096/162: Merge branch 'master' into volatile, Stefan Kangas, 2021/12/31