diff options
author | Kyle Meyer <kyle@kyleam.com> | 2021-05-23 17:46:22 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2021-05-23 17:47:53 -0400 |
commit | 296cfaebf706e9eedb4106f1e3d0e0d810e0043c (patch) | |
tree | 0afbcaf81943e6edf57ac417d617c54b901e35c9 | |
parent | f62076dc33f562b085049f68df07cb140a35db20 (diff) | |
download | piem-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.el | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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)) |