chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f115001
)
el/dot-emacs.el (mdw-misc-mode-config): Check for derived modes.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 5 Aug 2017 23:50:26 +0000
(
00:50
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 5 Aug 2017 23:50:26 +0000
(
00:50
+0100)
When inspecting modes to decide what to do (e.g., overriding
keybindings), use `derived-mode-p' to check for derived modes as well as
just the exact modes of interest.
el/dot-emacs.el
patch
|
blob
|
blame
|
history
diff --git
a/el/dot-emacs.el
b/el/dot-emacs.el
index e48faa1f6fced4cfa5b4ee5af232346b4485f567..5d645015afe39be6eca0b54b035c5d6ad785742d 100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-1094,8
+1094,7
@@
(defun mdw-misc-mode-config ()
(and mdw-auto-indent
(cond ((eq major-mode 'lisp-mode)
(local-set-key "\C-m" 'mdw-indent-newline-and-indent))
- ((or (eq major-mode 'slime-repl-mode)
- (eq major-mode 'asm-mode))
+ ((derived-mode-p 'slime-repl-mode 'asm-mode)
nil)
(t
(local-set-key "\C-m" 'newline-and-indent))))