From 518c4a3ab38b1c97d11b187bf01fbfd793351631 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 18 May 2022 20:38:37 +0200 Subject: [PATCH] Use derived-mode-p instead of checking buffer names --- dumb-jump.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dumb-jump.el b/dumb-jump.el index b65df13..76ff562 100644 --- a/dumb-jump.el +++ b/dumb-jump.el @@ -2112,8 +2112,7 @@ to keep looking for another root." (dumb-jump-git-grep-installed?) (dumb-jump-grep-installed?))) (dumb-jump-issue-result "nogrep")) - ((or (string= (buffer-name) "*shell*") - (string= (buffer-name) "*eshell*")) + ((derived-mode-p 'shell-mode 'eshell-mode) (dumb-jump-fetch-shell-results prompt)) ((and (not prompt) (not (region-active-p)) (not (thing-at-point 'symbol))) (dumb-jump-issue-result "nosymbol"))