branch: externals/modus-themes
commit 561497cafa95d2ca69eac9fbb6325c4afc333f56
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make modus-themes--annotate-theme more robust
---
modus-themes.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modus-themes.el b/modus-themes.el
index 38d244d620..4f91422aa0 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -1322,7 +1322,9 @@ symbol, which is safe when used as a face attribute's
value."
(defun modus-themes--annotate-theme (theme)
"Return completion annotation for THEME."
- (format " -- %s" (car (split-string (get (intern theme)
'theme-documentation) "\\."))))
+ (when-let ((symbol (intern-soft theme))
+ (doc-string (get symbol 'theme-documentation)))
+ (format " -- %s" (car (split-string doc-string "\\.")))))
(defun modus-themes--select-prompt ()
"Minibuffer prompt to select a Modus theme."