From 296cfaebf706e9eedb4106f1e3d0e0d810e0043c Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 23 May 2021 17:46:22 -0400 Subject: piem-gunzip-buffer: Absorb caching of gunzip check Now that piem-gunzip-buffer handles the check for the gunzip executable, there's not much point in having a dedicated function. Message-Id: <20210523214623.31331-5-kyle@kyleam.com> --- piem.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'piem.el') diff --git a/piem.el b/piem.el index 1d10739..b4304d1 100644 --- a/piem.el +++ b/piem.el @@ -529,14 +529,10 @@ is used as the value of `browse-url-browser-function'." ;;;; Download helpers (defvar piem--has-gunzip) -(defun piem-check-gunzip () - "Return non-nil if gunzip is available." - (unless (boundp 'piem--has-gunzip) - (setq piem--has-gunzip (executable-find "gunzip"))) - piem--has-gunzip) - (defun piem-gunzip-buffer () - (unless (piem-check-gunzip) + (unless (if (boundp 'piem--has-gunzip) + piem--has-gunzip + (setq piem--has-gunzip (executable-find "gunzip"))) (user-error "gunzip executable not found")) (goto-char (point-min)) (unless (= 0 (call-process-region nil nil "gunzip" nil t)) -- cgit v1.2.3