Skip to content

Commit a1b0f13

Browse files
committed
Don't use magit-submode variable
Magit has no the `magit-submode` variable any more [1], [2]. That raises messages about missing magit-submode variable. [1] a436f376b94654c3b8b420ea9de07e1fc0c49709 [2] magit/magit@a436f37 Signed-off-by: Mykola Nikishov <[email protected]>
1 parent aa958fd commit a1b0f13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

magithub.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,15 +1140,15 @@ See `magithub-try-enabling-minor-mode'."
11401140
"Enable `magithub-minor-mode' in buffers that are now in a Magit repo.
11411141
If the new `magit-mode' buffer is a status buffer, try enabling
11421142
`magithub-minor-mode' in all buffers."
1143-
(when (eq magit-submode 'status)
1143+
(when (derived-mode-p 'magit-status-mode)
11441144
(magithub-try-enabling-minor-mode-everywhere)))
11451145
(add-hook 'magit-mode-hook 'magithub-magit-mode-hook)
11461146

11471147
(defun magithub-kill-buffer-hook ()
11481148
"Clean up `magithub-minor-mode'.
11491149
That is, if the buffer being killed is a Magit status buffer,
11501150
deactivate `magithub-minor-mode' on all buffers in its repository."
1151-
(when (and (eq major-mode 'magit-mode) (eq magit-submode 'status))
1151+
(when (and (eq major-mode 'magit-mode) (derived-mode-p 'magit-status-mode))
11521152
(magithub-try-disabling-minor-mode-everywhere)))
11531153
(add-hook 'kill-buffer-hook 'magithub-kill-buffer-hook)
11541154

0 commit comments

Comments
 (0)