From 36a8e028570ed40e5eb7f82df84b53369155931d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 1 Jun 2019 20:20:11 -0400 Subject: [PATCH] Fix +vc/git-browse-region-or-line git-link-use-commit = t breaks +vc/git-browse-region-or-line. --- modules/emacs/vc/autoload/vc.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index e2efb9bdc..b767b4d6d 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -12,16 +12,18 @@ (error "Remote `%s' is unknown or contains an unsupported URL" remote)))) (defvar git-link-open-in-browser) +(defvar git-link-use-commit) ;;;###autoload (defun +vc/git-browse-region-or-line (&optional arg) "Open the website for the current version controlled file. Fallback to repository root." (interactive "P") (require 'git-link) - (cl-destructuring-bind (beg end) - (if buffer-file-name (git-link--get-region)) - (let ((git-link-open-in-browser (not arg))) - (git-link (git-link--select-remote) beg end)))) + (let (git-link-use-commit) + (cl-destructuring-bind (beg end) + (if buffer-file-name (git-link--get-region)) + (let ((git-link-open-in-browser (not arg))) + (git-link (git-link--select-remote) beg end))))) ;;;###autoload (defun +vc*update-header-line (revision)