Generalize thing-at-point & region functions
This commit is contained in:
parent
d426349f21
commit
27bf3c85b5
7 changed files with 80 additions and 58 deletions
|
@ -8,8 +8,7 @@
|
|||
If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
||||
the URL."
|
||||
(interactive)
|
||||
(if (or (use-region-p)
|
||||
(ignore-errors (evil-visual-state-p)))
|
||||
(if (doom-region-active-p)
|
||||
(browse-at-remote)
|
||||
(browse-url (browse-at-remote--file-url (buffer-file-name)))))
|
||||
|
||||
|
@ -20,8 +19,7 @@ If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
|||
the URL."
|
||||
(interactive)
|
||||
(let ((url
|
||||
(if (or (use-region-p)
|
||||
(evil-visual-state-p))
|
||||
(if (doom-region-active-p)
|
||||
(browse-at-remote-get-url)
|
||||
(browse-at-remote--file-url (buffer-file-name)))))
|
||||
(kill-new url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue