[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/show-font bd9b392cf8 10/54: Simplify show-font--get-att
From: |
ELPA Syncer |
Subject: |
[elpa] externals/show-font bd9b392cf8 10/54: Simplify show-font--get-attribute |
Date: |
Tue, 10 Sep 2024 03:58:56 -0400 (EDT) |
branch: externals/show-font
commit bd9b392cf8b74c3d101e83809c6e588be041989c
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Simplify show-font--get-attribute
---
show-font.el | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/show-font.el b/show-font.el
index dfa4d35c9d..2a9969a245 100644
--- a/show-font.el
+++ b/show-font.el
@@ -157,12 +157,8 @@ matched against the output of the `fc-scan' executable."
(error "Cannot find `fc-scan' executable; will not render font"))
(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)))
+ (output (shell-command-to-string (format "fc-scan -f \"%%{%s}\"
%s" attribute f))))
+ output))
(defun show-font--get-pangram ()
"Return `show-font-pangram' or fallback string."
- [elpa] branch externals/show-font created (now 6e10b12b5d), ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 2f55db5bad 02/54: Fix rendering of title and subtitle in the given font, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font bd9b392cf8 10/54: Simplify show-font--get-attribute,
ELPA Syncer <=
- [elpa] externals/show-font abb3e13345 17/54: Add TODO to refine show-font--get-pangram, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 6f878f50bc 18/54: Simplify the file name handler, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font f8e4484bcd 20/54: Clarity show-font-pangram-p doc string, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font f90e03c5e8 22/54: Refine how the title faces are produced, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font c10b077657 25/54: Add TODO about how best to support multiple languages, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font b572bacf0c 26/54: Make the major mode disable line numbers locally, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 5cf734e21a 35/54: Define a button and use it to help the user install current file, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font c5d7fd6e34 01/54: Add initial version of show-font, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 460da112ed 08/54: Add TODO about other operating systems, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font a1ffe8afdf 05/54: Autoload show-font-extensions-regexp to make the package install correctly, ELPA Syncer, 2024/09/10