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?
相关问题
- Library to convert latex to png in Java
- Error: missing \begin{document} in LaTeX [closed]
- emacs bind key to the insertion of another
- Emacs - set mark on edit location
- MATLAB figures don't have the same size when i
相关文章
- Does learning one Lisp help in learning the other?
- How to permanently enable the hs-minor-mode in ema
- Markdown: How to reference an item in a numbered l
- How do I control emacs from a terminal?
- how to align kable and ggplot in one row (side by
- Advice for “kill-ring-save”
- Custom shells started automatically from .emacs
- How can the backticks (`) printed around these tab
See this tutorial on writing syntax highlighting support for new modes (wayback machine link to material orriginally found at http://two-wugs.net/emacs/mode-tutorial.html and attibuted to Scott Andrew Borton), then dig into what the latex mode you are using (tex-mode? auctex? something else?) is doing and fix it.
Which only leaves the question: Why?!?
You need to use the
font-lock-add-keyword
function; give it a major mode to add keywords too, and a association list of regex / face:More details here on emacswiki: http://www.emacswiki.org/emacs/AddKeywords
Note this answer was copied over from the previous version of this question
Something like the following might work: