Skip to content

Commit

Permalink
fix: only enable shx-mode when derived-mode doesn't rebind RET (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
riscy committed Nov 21, 2020
1 parent ee5a283 commit d485b3a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions shx.el
Original file line number Diff line number Diff line change
Expand Up @@ -1085,9 +1085,8 @@ comint-mode in general. Use `shx-global-mode' to enable
"Call the function `shx-mode' if appropriate for the buffer."
(when (and
(derived-mode-p 'comint-mode)
;; these modes are incompatible due to needing <return> (#25)
(not (eq major-mode 'inferior-emacs-lisp-mode))
(not (eq major-mode 'sly-mode)))
;; modes requiring RET are currently incompatible (#25)
(eq (local-key-binding (kbd "RET")) 'comint-send-input))
(shx-mode +1)))

;;;###autoload
Expand Down

0 comments on commit d485b3a

Please sign in to comment.