diff options
author | yoctocell <public@yoctocell.xyz> | 2021-01-08 17:05:36 +0100 |
---|---|---|
committer | yoctocell <public@yoctocell.xyz> | 2021-01-08 17:05:36 +0100 |
commit | 4622d8769895990d7ac5e03b0857658e3b165886 (patch) | |
tree | 3ae9e9c829036abd3eec5f746e7d2034eae70ea8 /git-email.el | |
parent | b32fc55cd4d3e071b21ce88d23e139fb720ed13f (diff) |
Check major mode when getting revision
An error will the thrown otherwise.
* git-email.el (git-email--log-get-revision):
Diffstat (limited to 'git-email.el')
-rw-r--r-- | git-email.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-email.el b/git-email.el index 470de40..f3b8aae 100644 --- a/git-email.el +++ b/git-email.el @@ -307,7 +307,8 @@ them into the message buffer." (defun git-email--log-get-revision () "Get the revision at point in `log-view-mode'." - (cadr (log-view-current-entry (point) t))) + (when (eq major-mode 'vc-git-log-view-mode) + (cadr (log-view-current-entry (point) t)))) ;;;###autoload (defun git-email-format-patch (&optional args) |