EmacsLispAndLaTeX

If you write EmacsLisp in your LaTeX documents, you might want to have emacs-lisp-mode active when editing the Lisp, and latex-mode when editing the rest of the file. The solution is to use MultipleModes.

Here is a solution using two-mode-mode, by EdwardOConnor:

    (require 'two-mode-mode)
    (setq default-mode (list "LaTeX" latex-mode)
          second-modes (list (list "Emacs-Lisp" 
                                   "\\begin{elisp" "\\end{elisp" 
                                   'emacs-lisp-mode))
    (two-mode-mode)

See LiterateEmacsLisp for a complete example of how to do this.


CategoryTex CategoryCode