In
https://www.emacswiki.org/emacs/AutoModeAlist
one needs to use this command in order to add .py for python-mode (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
Why do we need the .
between '"\\.py\\'"
and the python-mode
?
Thanks.
This is lisp syntax for a dotted pair:
(cons 'a 'b) -> (a . b)
Here's a link.
Briefly, dotted pairs are the fundamental building blocks for lists: lists are special dotted pairs, defined recursively. Most of the time, you work with lists so the dotted pairs are hidden in the background, but once in a while (as in this case), they poke through.