I want to programmatically check whether the current buffer is in
org mode. I know that major modes should usually define the variable
org-mode should be a defined variable.
However, if I execute
describe-variable in an org buffer, I don't see any
org-mode. Now, I'm not sure whether
describe-variable works for buffer-local variables, so I typed
(message org-mode) into my org buffer and ran
eval-last-sexp. This gives me the error
(void-variable org-mode), so I guess that org mode does not define any
What is the correct way to check whether a buffer is in org mode?