summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))