From b4ff2c37bf75b05837fa254fd88f49acc80f16d1 Mon Sep 17 00:00:00 2001 From: Andrey Kolomoets Date: Thu, 10 May 2018 22:11:42 +0300 Subject: [PATCH] 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 9a6d8d37..ff6106dd 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")) ))