Add some eldoc and fix warnings
This commit is contained in:
parent
119fda8cc0
commit
d111244c82
|
@ -199,10 +199,10 @@
|
||||||
;; Otherwise, auto-guess based on position of point, e.g., based on
|
;; Otherwise, auto-guess based on position of point, e.g., based on
|
||||||
;; if we are in the Staged or Unstaged section.
|
;; if we are in the Staged or Unstaged section.
|
||||||
(pcase (magit-diff--dwim)
|
(pcase (magit-diff--dwim)
|
||||||
('unmerged (error "unmerged is not yet implemented"))
|
('unmerged (error "Unmerged is not yet implemented"))
|
||||||
('unstaged nil)
|
('unstaged nil)
|
||||||
('staged "--cached")
|
('staged "--cached")
|
||||||
(`(stash . ,value) (error "stash is not yet implemented"))
|
(`(stash . ,value) (error "Stash is not yet implemented"))
|
||||||
(`(commit . ,value) (format "%s^..%s" value value))
|
(`(commit . ,value) (format "%s^..%s" value value))
|
||||||
((and range (pred stringp)) range)
|
((and range (pred stringp)) range)
|
||||||
(_ (magit-diff-read-range-or-commit "Range/Commit"))))))
|
(_ (magit-diff-read-range-or-commit "Range/Commit"))))))
|
||||||
|
@ -307,10 +307,14 @@
|
||||||
(use-package git-link
|
(use-package git-link
|
||||||
:config
|
:config
|
||||||
(defun git-link-on-branch ()
|
(defun git-link-on-branch ()
|
||||||
|
"Like `git-link', but force linking to the branch rather than a commit."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((git-link-use-commit nil))
|
(let ((git-link-use-commit nil))
|
||||||
(call-interactively 'git-link)))
|
(call-interactively 'git-link)))
|
||||||
(defun git-link-branch ()
|
(defun git-link-branch ()
|
||||||
|
"Create a URL representing the current buffer's branch in its
|
||||||
|
GitHub/Bitbucket/GitLab/... The URL will be added to the kill ring. If
|
||||||
|
`git-link-open-in-browser' is non-nil also call `browse-url'."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((remote-info (git-link--parse-remote (git-link--remote-url (git-link--select-remote))))
|
(let* ((remote-info (git-link--parse-remote (git-link--remote-url (git-link--select-remote))))
|
||||||
(branch (git-link--branch)))
|
(branch (git-link--branch)))
|
||||||
|
|
Loading…
Reference in New Issue