tweak(vc): add feedback on +vc/browse-at-remote-kill

Otherwise there's no indication that the command worked, when invoked
interactively.
This commit is contained in:
Henrik Lissner 2022-10-31 18:36:18 +01:00
parent 818efb263f
commit 4e3b94c602
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -21,17 +21,18 @@ If prefix ARG, negate the default value of `browse-at-remote-prefer-symbolic'."
(browse-at-remote))) (browse-at-remote)))
;;;###autoload ;;;###autoload
(defun +vc/browse-at-remote-kill (&optional arg) (defun +vc/browse-at-remote-kill (&optional arg interactive?)
"Copy URL to current file (and line if selection is active) to clipboard. "Copy URL to current file (and line if selection is active) to clipboard.
If prefix ARG, negate the default value of `browse-at-remote-prefer-symbolic'." If prefix ARG, negate the default value of `browse-at-remote-prefer-symbolic'."
(interactive "P") (interactive (list current-prefix-arg 'interactive))
(require 'browse-at-remote) (require 'browse-at-remote)
(let ((vc-ignore-dir-regexp locate-dominating-stop-dir-regexp) (let ((vc-ignore-dir-regexp locate-dominating-stop-dir-regexp)
(browse-at-remote-prefer-symbolic (browse-at-remote-prefer-symbolic
(if arg (if arg
(not browse-at-remote-prefer-symbolic) (not browse-at-remote-prefer-symbolic)
browse-at-remote-prefer-symbolic))) browse-at-remote-prefer-symbolic)))
(browse-at-remote-kill))) (browse-at-remote-kill)
(if interactive? (message "Copied to clipboard"))))
;;;###autoload ;;;###autoload
(defun +vc/browse-at-remote-homepage () (defun +vc/browse-at-remote-homepage ()