Emacs: How to use a major mode for non-standard file extension This should work: (add-to-list ‘auto-mode-alist ‘(“\\.rr” . R-mode))