branch: externals/marginalia commit 26f2bd9ee7b63bcad6604108e2f565b34bc6083b Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
marginalia--library-doc: Use gzip instead of zcat (See #132) --- marginalia.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/marginalia.el b/marginalia.el index 2187aea2fc..e71ccc367f 100644 --- a/marginalia.el +++ b/marginalia.el @@ -988,7 +988,10 @@ These annotations are skipped for remote paths." ;; since it decompresses the whole file, which is slower. (setq doc (or (ignore-errors (shell-command-to-string - (format "zcat -f %s | head -n1" (shell-quote-argument file)))) + (format (if (string-suffix-p ".gz" file) + "gzip -c -q -d %s | head -n1" + "head -n1 %s") + (shell-quote-argument file)))) "")) (cond ((string-match "\\`(define-package\\s-+\"\\([^\"]+\\)\"" doc)