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

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

[elpa] externals/show-font b1a9d8a5cc 07/54: Remove needless 'let' befor


From: ELPA Syncer
Subject: [elpa] externals/show-font b1a9d8a5cc 07/54: Remove needless 'let' before the 'when-let'
Date: Tue, 10 Sep 2024 03:58:56 -0400 (EDT)

branch: externals/show-font
commit b1a9d8a5cc17e4c178e87d8de8b68cf53ed5ac8e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Remove needless 'let' before the 'when-let'
---
 show-font.el | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/show-font.el b/show-font.el
index 8e395aea83..e181f0e18a 100644
--- a/show-font.el
+++ b/show-font.el
@@ -154,15 +154,14 @@ ATTRIBUTE is a string, such as \"family\" or 
\"fullname\", which is
 matched against the output of the `fc-scan' executable."
   (unless (executable-find "fc-scan")
     (error "Cannot find `fc-scan' executable; will not render font"))
-  (let ((f (or file buffer-file-name)))
-    (when-let ((_ f)
-               (_ (string-match-p show-font-extensions-regexp f))
-               (output (shell-command-to-string (format "fc-scan %s" f)))
-               (match (string-match (format "%s: \"\\(.*\\)\"" attribute) 
output))
-               (found (match-string 1 output)))
-      (if (string-match-p "\"(s)" found)
-          (car (split-string found "\"(s)" :omit-nulls))
-        found))))
+  (when-let ((f (or file buffer-file-name))
+             (_ (string-match-p show-font-extensions-regexp f))
+             (output (shell-command-to-string (format "fc-scan %s" f)))
+             (match (string-match (format "%s: \"\\(.*\\)\"" attribute) 
output))
+             (found (match-string 1 output)))
+    (if (string-match-p "\"(s)" found)
+        (car (split-string found "\"(s)" :omit-nulls))
+      found)))
 
 (defun show-font--get-pangram ()
   "Return `show-font-pangram' or fallback string."



reply via email to

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