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

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

[elpa] externals/org-modern 2ab56bdf6d: org-modern-star/progress: Suppor


From: ELPA Syncer
Subject: [elpa] externals/org-modern 2ab56bdf6d: org-modern-star/progress: Support string value
Date: Sat, 24 Feb 2024 12:58:52 -0500 (EST)

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

    org-modern-star/progress: Support string value
---
 CHANGELOG.org |  4 ++++
 org-modern.el | 10 +++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index ee0b744ab2..3f2465e4f4 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,6 +2,10 @@
 #+author: Daniel Mendler
 #+language: en
 
+* Development
+
+- =org-modern-star=, =org-modern-progress=: Support string values.
+
 * Version 1.1 (2023-12-01)
 
 - Bugfix: Do not use zero line width for box face attribute. Zero line widths
diff --git a/org-modern.el b/org-modern.el
index db99944862..fb5e1608f6 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -53,10 +53,10 @@ If set to `auto' the border width is computed based on the 
`line-spacing'.
 A value between 0.1 and 0.4 of `line-spacing' is recommended."
   :type '(choice (const nil) (const auto) integer))
 
-(defcustom org-modern-star '("◉" "○" "◈" "◇" "✳")
+(defcustom org-modern-star "◉○◈◇✳"
   "Replacement strings for headline stars for each level.
 Set to nil to disable styling the headlines."
-  :type '(repeat string))
+  :type '(choice string (repeat string)))
 
 (defcustom org-modern-hide-stars 'leading
   "Changes the displays of the stars.
@@ -234,10 +234,10 @@ references."
   "Prettify todo statistics."
   :type 'boolean)
 
-(defcustom org-modern-progress '("○" "◔" "◑" "◕" "●")
+(defcustom org-modern-progress "○◔◑◕●"
   "Add a progress indicator to the todo statistics.
 Set to nil to disable the indicator."
-  :type '(repeat string))
+  :type '(choice string (repeat string)))
 
 (defgroup org-modern-faces nil
   "Faces used by `org-modern'."
@@ -639,7 +639,7 @@ the font.")
 
 (defun org-modern--symbol (str)
   "Add `org-modern-symbol' face to STR."
-  (setq str (copy-sequence str))
+  (setq str (if (stringp str) (copy-sequence str) (char-to-string str)))
   (add-face-text-property 0 (length str) 'org-modern-symbol 'append str)
   str)
 



reply via email to

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