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

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

[nongnu] elpa/org-superstar 6cdb79e5fa 148/162: Bugfix: Stop interpretin


From: Stefan Kangas
Subject: [nongnu] elpa/org-superstar 6cdb79e5fa 148/162: Bugfix: Stop interpreting normal headings as TODO items.
Date: Fri, 31 Dec 2021 19:35:39 -0500 (EST)

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

    Bugfix: Stop interpreting normal headings as TODO items.
---
 org-superstar.el | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/org-superstar.el b/org-superstar.el
index 9e681675ab..37781df67e 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.4.1
+;; Version: 1.4.2
 ;; Homepage: https://github.com/integral-dw/org-superstar-mode
 ;; Package-Requires: ((org "9.1.9") (emacs "26.1"))
 
@@ -520,20 +520,19 @@ symbol ‘default’, return it instead.  Otherwise, return 
nil."
   "Return the desired TODO item bullet, if defined.
 If no entry can be found in ‘org-superstar-todo-bullet-alist’ for
 the current keyword, return nil."
-  (let* ((todo-kw
-          (org-superstar--get-todo (match-beginning 0)))
-         (todo-bullet (org-superstar--todo-assoc todo-kw))
-         (todo-bullet (cdr todo-bullet))
-         (todo-fallback nil))
-      (cond
-       ((characterp todo-bullet)
-        todo-bullet)
-       ((listp todo-bullet)
-        (setq todo-fallback (cadr todo-bullet))
-        (setq todo-bullet (car todo-bullet))
+  (when-let* ((todo-kw
+               (org-superstar--get-todo (match-beginning 0)))
+              (todo-bullet
+               (cdr (org-superstar--todo-assoc todo-kw))))
+    (cond
+     ((characterp todo-bullet)
+      todo-bullet)
+     ((listp todo-bullet)
+      (let ((todo-fallback (cadr todo-bullet))
+            (todo-bullet (car todo-bullet)))
         (if (org-superstar-graphic-p)
             todo-bullet
-          todo-fallback)))))
+          todo-fallback))))))
 
 (defun org-superstar--hbullets-length ()
   "Return the length of ‘org-superstar-headline-bullets-list’."



reply via email to

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