6

Possible Duplicate:
emacs lisp, how to get buffer major mode?

Is there a way for Emacs Lisp code to determine the current major mode?

Community
  • 1
  • 1
compman
  • 2,174
  • 2
  • 18
  • 26

1 Answers1

20

You can look at the value of the variable major-mode.

Lindydancer
  • 25,428
  • 4
  • 49
  • 68
  • +1. Thanks. I'll mark this as the accepted answer sometime when SO will let me accept it. – compman Jun 10 '11 at 21:24
  • For those other travelers who may come here like I did on day 3 of using emacs to do so you can either use C-h v or the command describe-variable to view the value of the var. – hpoe Jan 01 '20 at 15:29