Le 16/10/2014 16:58, Tassilo Horn a écrit :
jfbu <[email protected]> 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\\*?\\)\\)\\([^a-z@*\n\f{]\\)\\(?:\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
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex