emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/realgud b4ff2c3 092/140: Check major mode with derived-


From: Rocky Bernstein
Subject: [elpa] externals/realgud b4ff2c3 092/140: Check major mode with derived-mode-p
Date: Sat, 25 May 2019 19:35:40 -0400 (EDT)

branch: externals/realgud
commit b4ff2c37bf75b05837fa254fd88f49acc80f16d1
Author: Andrey Kolomoets <address@hidden>
Commit: GitHub <address@hidden>

    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"))
        ))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]