Reputation: 457
I want to write a function that invokes one of 2 functions, depending on whether the current major mode is a prog-mode. How do I detect if the current major mode is a prog-mode?
Upvotes: 6
Views: 1087
Reputation: 73246
(if (derived-mode-p 'prog-mode) ...)
Upvotes: 9