emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/marginalia 26f2bd9ee7: marginalia--library-doc: Use gzi


From: ELPA Syncer
Subject: [elpa] externals/marginalia 26f2bd9ee7: marginalia--library-doc: Use gzip instead of zcat (See #132)
Date: Tue, 26 Apr 2022 00:57:55 -0400 (EDT)

branch: externals/marginalia
commit 26f2bd9ee7b63bcad6604108e2f565b34bc6083b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]