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

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

[nongnu] elpa/helm 552b0d8aff 1/7: Be safe if theme file has not been fo


From: ELPA Syncer
Subject: [nongnu] elpa/helm 552b0d8aff 1/7: Be safe if theme file has not been found
Date: Thu, 24 Aug 2023 00:59:40 -0400 (EDT)

branch: elpa/helm
commit 552b0d8aff9c27ea453f9a38683e9d5505a74517
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Be safe if theme file has not been found
---
 helm-mode.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index 30597d34fb..f78b5151cc 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1169,14 +1169,15 @@ is used."
         (warning-suppress-types '((initialization)))
         doc)
     ;; Avoid loading theme as much as possible.
-    (with-temp-buffer
-      (insert-file-contents fn)
-      (helm-awhile (let ((read-circle nil))
-                    (condition-case nil
-                        (read (current-buffer))
-                      (end-of-file nil)))
-        (when (eq (car-safe it) 'deftheme)
-          (cl-return (setq doc (car (split-string (nth 2 it) "\n")))))))
+    (when fn
+      (with-temp-buffer
+        (insert-file-contents fn)
+        (helm-awhile (let ((read-circle nil))
+                      (condition-case nil
+                          (read (current-buffer))
+                        (end-of-file nil)))
+          (when (eq (car-safe it) 'deftheme)
+            (cl-return (setq doc (car (split-string (nth 2 it) "\n"))))))))
     ;; If deftheme not found in file (in modus themes deftheme is nested in
     ;; eval-when-compile) load the theme without enabling it.
     (if doc



reply via email to

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