summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-05-23 17:46:22 -0400
committerKyle Meyer <kyle@kyleam.com>2021-05-23 17:47:53 -0400
commit296cfaebf706e9eedb4106f1e3d0e0d810e0043c (patch)
tree0afbcaf81943e6edf57ac417d617c54b901e35c9
parentf62076dc33f562b085049f68df07cb140a35db20 (diff)
downloadpiem-296cfaebf706e9eedb4106f1e3d0e0d810e0043c.tar.gz
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>
-rw-r--r--piem.el10
1 files changed, 3 insertions, 7 deletions
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))