[Top][All Lists]

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

[elpa] externals/hyperbole b8fd1e8 23/25: Merge branch 'master' of githu

From: Stefan Monnier
Subject: [elpa] externals/hyperbole b8fd1e8 23/25: Merge branch 'master' of github.com:rswgnu/hyperbole
Date: Tue, 22 Sep 2020 10:29:30 -0400 (EDT)

branch: externals/hyperbole
commit b8fd1e83cd46567e8d7661369df7f6b7c6f595ff
Merge: 008182b 21b2b1c
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    Merge branch 'master' of github.com:rswgnu/hyperbole
 hib-social.el | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/hib-social.el b/hib-social.el
index 92e1b5f..6760b1e 100644
--- a/hib-social.el
+++ b/hib-social.el
@@ -4,7 +4,7 @@
 ;; Orig-Date:    20-Jul-16 at 22:41:34
-;; Copyright (C) 2016-2017  Free Software Foundation, Inc.
+;; Copyright (C) 2016-2020  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;; This file is part of GNU Hyperbole.
@@ -198,6 +198,11 @@
   :type 'string
   :group 'hyperbole-button)
+(defcustom hibtypes-git-use-magit-status nil
+  "If magit is available then use git social button to display magit status 
+  :type 'boolean
+  :group 'hyperbole-button)
 (defcustom hibtypes-github-default-project nil
   "Default project name to associate with any Github commit link."
   :type 'string
@@ -803,8 +808,12 @@ PROJECT value is provided, it defaults to the value of
                                  (princ (format "Command: %s\n\n" cmd))
                                  (princ (shell-command-to-string cmd)))))
                          ;; Project-only reference, run dired on the project 
home directory
-                         (hpath:display-buffer (dired-noselect
-                                                (file-name-as-directory 
+                         (if (and hibtypes-git-use-magit-status (featurep 
+                             (hpath:display-buffer (save-window-excursion
+                                                     (magit-status-setup-buffer
+                                                      (file-name-as-directory 
+                           (hpath:display-buffer (dired-noselect
+                                                  (file-name-as-directory 
                       (t (if project-dir
                              (error "(git-reference): git project `%s' 
directory is unreadable or invalid: \"%s\""
                                     project project-dir)

reply via email to

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