Emacs: how to use native mode for custom file extension

I would like to use R major mode for another file extension in emacs (for an unsupported language with syntax like R).

How to make emacs change the main mode for the buffer that I am editing? How do I change my .emacs to permanently associate native mode with a specific extension?

+3
source share
1 answer

This should work:

(add-to-list 'auto-mode-alist '("\\.rr" . R-mode))
+6
source

All Articles