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

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

[nongnu] elpa/why-this 006ea3864a 13/59: Fix Git backend 'supported-p co


From: ELPA Syncer
Subject: [nongnu] elpa/why-this 006ea3864a 13/59: Fix Git backend 'supported-p command
Date: Sun, 27 Nov 2022 16:02:49 -0500 (EST)

branch: elpa/why-this
commit 006ea3864a8a81b82253989c9c961186e77e8396
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Fix Git backend 'supported-p command
---
 why-this.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/why-this.el b/why-this.el
index 8dda02eff8..49c6b1852e 100644
--- a/why-this.el
+++ b/why-this.el
@@ -463,6 +463,10 @@ Actually the supported backend is returned."
         (cancel-timer why-this--idle-timer)
         (setq why-this--idle-timer nil)))))
 
+;;;###autoload
+(define-globalized-minor-mode global-why-this-mode why-this-mode
+  #'why-this-mode)
+
 (define-derived-mode why-this-annotate-mode
   special-mode "Why-This-Annotate"
   "Major mode for output buffer of `why-this-annotate'."
@@ -475,8 +479,9 @@ Actually the supported backend is returned."
 Do CMD with ARGS."
   (pcase cmd
     ('supported-p
-     (string= "true\n" (shell-command-to-string
-                        "git rev-parse --is-inside-work-tree")))
+     (and (buffer-file-name)
+          (string= "true\n" (shell-command-to-string
+                             "git rev-parse --is-inside-work-tree"))))
     ('line-data
      (when (> (- (nth 1 args) (nth 0 args)) 0)
        (let ((lines (butlast



reply via email to

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