1

I know that describe-mode will describe the current major mode. Is it possible to describe a mode, and I will input the mode name?

3

Use describe-function by typing C-h f and, when asked for the function, type the name of the mode which is itself a function.

| improve this answer | |
  • That will describe the function which will load the mode, not the mode. – Muihlinn Apr 26 at 17:09
  • try it! @Muihlinn – Aidan Schofield Apr 26 at 17:26
  • 1
    Yes. The value of variable major-mode is the symbol bound to the function that turns a major mode on - so describe-function for that function describes the major mode. The value of variable mode-name is the string naming the mode, which you see in the mode-line. – Drew Apr 26 at 18:11
  • It doesn't describe nothing more than the function itself in my setup, at least with the modes I tried before posting first comment, as they came to mind. Those could be extremely quiet in their ouptut, but definately not what I get when I ask C-h m from a buffer. – Muihlinn Apr 26 at 18:33
  • I get a description of what the mode is for followed by a complete list of key bindings – Aidan Schofield Apr 26 at 19:09
1

You can call describe-minor-mode to get help on any minor mode. It prompts you to enter either a symbol or an indicator from your mode line, and gives you the help for that mode. I don't think that there's anying similar for major modes.

| improve this answer | |
  • This generally calls describe-function. In cases where the minor mode is just a variable (being acted on without a mode function being involved), then it will call describe-variable instead. Major modes always have a function, so there is no need for anything more than describe-function. – phils Apr 27 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.