|
From: | jfbu |
Subject: | Re: [AUCTeX] \verb like macro allowing input on more than one line |
Date: | Thu, 16 Oct 2014 17:11:41 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Le 16/10/2014 16:58, Tassilo Horn a écrit :
jfbu <address@hidden> writes:I only have now to find why doctex-mode does not react, only latex-mode, (if I open my .dtx, it defaults to DocTeX mode, where for some reason the hook above is not executed, I have to do M-x latex-mode. If I open in a buffer a .tex file, no problem)Hm, in theory doctex-mode (overridden by AUCTeX with TeX-doctex-mode) is derived from TeX-latex-mode and should also run its hooks... It that really doesn't work, try adding (add-hook 'docTeX-mode-hook #'fjbu/LaTeX-activate-font-lock-for-multiline-verb-macros) in addition to just LaTeX-mode-hook. Bye, Tassilo
Hi Tassilo, the hook is indeed run as I can see from checking variable font-latex-syntactic-keywords after opening in a buffer a test.dtx file font-latex-syntactic-keywords is a variable defined in `font-latex.el'. Its value is shown below. Automatically becomes buffer-local when set. Documentation: Syntactic keywords used by `font-latex'. Value: (("\\\\\\(?:\\(?:everb\\|verb\\*?\\)\\)\\(address@hidden)\\(?:\n\\|.\\)*?\\(\\\\*\\)\\(\\1\\)" (1 "\"") (2 ".") (3 "\"")) ("^[ ]*\\(\\\\\\)end *{\\(?:\\(?:everbatim\\*?\\|verbatim\\*?\\)\\)}" (1 "|" t)) ("^[ ]*\\\\begin *{\\(?:\\(?:everbatim\\*?\\|verbatim\\*?\\)\\)}.*\\(\n\\)" (1 "|" t))) Local in buffer test.dtx; global value is nil but for some reason the font-locking does not work (hmm, by the way I added verb and verb* to jfbu/LaTeX-verbatim-macros-with-delims-local and removed them from LaTeX-verbatim-macros-with-delims which explains the Value above In latex-mode this does the expected thing, in docTeX-mode the value is the same but font-locking does not work best Jean-François
[Prev in Thread] | Current Thread | [Next in Thread] |