From rmuslimov/browse-at-remote@1a9392e rmuslimov/browse-at-remote#59 upstreamed some of our local changes.
This commit is contained in:
parent
5e0e0bd3b7
commit
e241fa347b
2 changed files with 2 additions and 15 deletions
|
@ -3,26 +3,13 @@
|
||||||
(autoload 'browse-at-remote-get-url "browse-at-remote")
|
(autoload 'browse-at-remote-get-url "browse-at-remote")
|
||||||
(autoload 'browse-at-remote--file-url "browse-at-remote")
|
(autoload 'browse-at-remote--file-url "browse-at-remote")
|
||||||
|
|
||||||
(defun +vc--remote-file-or-region-link ()
|
|
||||||
(if (or (doom-region-active-p) (not buffer-file-name))
|
|
||||||
(browse-at-remote-get-url)
|
|
||||||
(browse-at-remote--file-url (buffer-file-name))))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +vc/browse-at-remote-file-or-region ()
|
|
||||||
"Open the current file at remote in your browser.
|
|
||||||
If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
|
||||||
the URL."
|
|
||||||
(interactive)
|
|
||||||
(browse-url (+vc--remote-file-or-region-link)))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +vc/browse-at-remote-kill-file-or-region ()
|
(defun +vc/browse-at-remote-kill-file-or-region ()
|
||||||
"Copy the current file's remote URL to your clipboard.
|
"Copy the current file's remote URL to your clipboard.
|
||||||
If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
||||||
the URL."
|
the URL."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((url (+vc--remote-file-or-region-link)))
|
(let ((url (browse-at-remote-get-url)))
|
||||||
(kill-new url)
|
(kill-new url)
|
||||||
(message "Copied to clipboard: %S" url)))
|
(message "Copied to clipboard: %S" url)))
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
(package! vc-annotate :built-in t)
|
(package! vc-annotate :built-in t)
|
||||||
(package! smerge-mode :built-in t)
|
(package! smerge-mode :built-in t)
|
||||||
|
|
||||||
(package! browse-at-remote :pin "1a9392e9d1")
|
(package! browse-at-remote :pin "aeee6bf38f")
|
||||||
(package! git-timemachine :pin "391eb61050")
|
(package! git-timemachine :pin "391eb61050")
|
||||||
(package! gitconfig-mode :pin "55468314a5")
|
(package! gitconfig-mode :pin "55468314a5")
|
||||||
(package! gitignore-mode :pin "55468314a5")
|
(package! gitignore-mode :pin "55468314a5")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue