[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/show-font 3be8056ae5 24/54: Stop using show-font-extens
From: |
ELPA Syncer |
Subject: |
[elpa] externals/show-font 3be8056ae5 24/54: Stop using show-font-extensions-regexp; define regexp directly |
Date: |
Tue, 10 Sep 2024 03:58:58 -0400 (EDT) |
branch: externals/show-font
commit 3be8056ae52079a278f2aa3b95f267e69dab0af7
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Stop using show-font-extensions-regexp; define regexp directly
We do not need to have an autoloaded symbol for these cases.
---
show-font.el | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/show-font.el b/show-font.el
index 65466403f7..5b660bdb4d 100644
--- a/show-font.el
+++ b/show-font.el
@@ -122,9 +122,6 @@ x×X .,·°;:¡!¿?`'‘’ ÄAÃÀ TODO
"Face for smaller font preview title."
:group 'show-font-faces)
-;;;###autoload
-(defconst show-font-extensions-regexp "\\.\\(ttf\\|otf\\)\\'"
- "Regular expression to match font file extensions.")
;;;; Helper functions
(defconst show-font-latin-alphabet
@@ -173,7 +170,7 @@ matched against the output of the `fc-scan' executable."
(unless (executable-find "fc-scan")
(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))
+ (_ (string-match-p "\\.\\(ttf\\|otf\\)\\'" f))
(output (shell-command-to-string (format "fc-scan -f \"%%{%s}\"
%s"
(shell-quote-argument
attribute)
(shell-quote-argument
f)))))
@@ -288,10 +285,10 @@ buffer."
;; somewhere else? It seems wrong like this.
;;;###autoload
-(add-to-list 'file-name-handler-alist (cons show-font-extensions-regexp
#'show-font-handler))
+(add-to-list 'file-name-handler-alist (cons "\\.\\(ttf\\|otf\\)\\'"
#'show-font-handler))
;;;###autoload
-(add-to-list 'auto-mode-alist (cons show-font-extensions-regexp
'show-font-mode))
+(add-to-list 'auto-mode-alist (cons "\\.\\(ttf\\|otf\\)\\'" 'show-font-mode))
(provide 'show-font)
;;; show-font.el ends here
- [elpa] externals/show-font e8bb71badc 45/54: Add .elpaignore file for GNU ELPA, (continued)
- [elpa] externals/show-font e8bb71badc 45/54: Add .elpaignore file for GNU ELPA, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 7dd09cd87e 48/54: Update the package Commentary, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 7d1cf73686 50/54: Update to show-font version 0.1.0, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 29c8fef4c6 33/54: Define functions to install a font file, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 69e2db52e5 34/54: Make show-font-install non-interactive, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 66bb076f77 47/54: Update the README.md and include links to the manual and changelog, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 6e10b12b5d 54/54: Fix a couple of typos, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 54508fc514 13/54: Fix regression in show-font--get-attribute (when output has many families), ELPA Syncer, 2024/09/10
- [elpa] externals/show-font ff995c626d 15/54: Incorporate suggestions from Philip Kaludercic, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 09ad971308 21/54: Update show-font-pangram doc string, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 3be8056ae5 24/54: Stop using show-font-extensions-regexp; define regexp directly,
ELPA Syncer <=
- [elpa] externals/show-font b1a9d8a5cc 07/54: Remove needless 'let' before the 'when-let', ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 2d04283d8e 31/54: Add revert-buffer-function for show-font-select-preview, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 7bd66d3105 39/54: Add FIXME to refine show-font-list output, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font ad30c77b06 42/54: Remove WIP notices, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 0f46562e42 51/54: Make sure to delete duplicates and sort fonts, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 683d5ab4d1 49/54: Mention links to the Info manual and web page in the defgroups, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font ff0251d565 19/54: Remove the function that shows the font from the major mode, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font c8f889d12a 11/54: Define helper functions to get installed fonts and check for one among them, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font a65e7a242a 27/54: Add more helpers to check for installed fonts, ELPA Syncer, 2024/09/10
- [elpa] externals/show-font 0d35840ce2 28/54: Rework show-font--prepare-text in light of commit 19a95c1, ELPA Syncer, 2024/09/10