branch: externals/realgud
commit b4ff2c37bf75b05837fa254fd88f49acc80f16d1
Author: Andrey Kolomoets <[email protected]>
Commit: GitHub <[email protected]>
Check major mode with derived-mode-p
Solves https://github.com/realgud/realgud/issues/216
---
realgud/common/utils.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/realgud/common/utils.el b/realgud/common/utils.el
index 9a6d8d3..ff6106d 100644
--- a/realgud/common/utils.el
+++ b/realgud/common/utils.el
@@ -46,10 +46,10 @@
- 'comint if the major comint-mode or shell-mode
Or raise an error if neither."
- (cond ((eq major-mode 'eshell-mode)
- 'eshell)
- ((or (eq major-mode 'comint-mode) (eq major-mode 'shell-mode))
- 'comint)
+ (cond ((derived-mode-p 'eshell-mode)
+ 'eshell)
+ ((derived-mode-p 'comint-mode)
+ 'comint)
('t (error "We can only handle comint, shell, or eshell buffers"))
))