Here is some doco I'm creating but...
I'm not sure what the dot '.' between the extension and the mode is for though in the following:
File Associations
Example: Associate *.mmd
with markdown-mode
:
(setq auto-mode-alist (cons '("\\.mmd$" . markdown-mode) auto-mode-alist))
basically there is an alist (associative list / hashtable) called
auto-mode-alist
. That points extension -> to mode. Extension looks
like it's a regular expression.
cons
is a function that pre-pends an element to a list
setq
means set quoted (which quotes auto-mode-list for you), otherwise
instead of assigning to the symbol auto-mode-alist, you will assign to
the results of evaluating that symbol...not what you want ;)