在Emacs中,如何更改Latex模式以处理<%...%>作为评论? [英] In Emacs, how do you change Latex mode to treat <% ... %> as a comment?

查看:97
本文介绍了在Emacs中,如何更改Latex模式以处理<%...%>作为评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Emacs中,您是否可以编写一些短代码(在.emacs,latex.el或其他文件中),以便Latex模式将<%...%>形式的代码视为注释? / p>

In Emacs, is there some short code that you can write (in .emacs, latex.el, or some other file) so that Latex mode treats code of form <% ... %> as a comment?

推荐答案

类似于下面的方法可能会起作用:

Something like the following might work:

(modify-syntax-entry ?< "_ 1n" latex-mode-syntax-table)
(modify-syntax-entry ?% "< 23" latex-mode-syntax-table)
(modify-syntax-entry ?> "_ 4n" latex-mode-syntax-table)

这篇关于在Emacs中,如何更改Latex模式以处理&lt;%...%&gt;作为评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆