Emacs:如何为非标准文件扩展名使用主模式 [英] Emacs: How to use a major mode for non-standard file extension
本文介绍了Emacs:如何为非标准文件扩展名使用主模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将 R 主模式用于 emacs 中的另一个文件扩展名(对于语法类似于 R 的不受支持的语言).
I'd like to use R major mode for another file extension in emacs (for an unsupported language with syntax similar to R).
如何强制 emacs 更改我正在编辑的缓冲区的主要模式?如何更改我的 .emacs 以将主要模式与特定文件扩展名永久关联?
How do I force emacs to change the major mode for a buffer I'm editing? How do I change my .emacs to permanently associate a major mode with a particular file extension?
推荐答案
这应该有效:
(add-to-list 'auto-mode-alist '("\.rr" . R-mode))
这篇关于Emacs:如何为非标准文件扩展名使用主模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文