我最近开始使用优秀的包xargs
,其中提供了\newcommandx
。它与默认的\newcommand
具有类似的语法。我希望font-lock
能够反映这一点。我已经尝试过
(custom-set-variables
'(font-latex-user-keyword-classes
(quote (("cx" ("newcommandx" "*|{\\[[{")
(:family "font-lock-type-face") command)))))
但是这只是字体化了命令本身,而不是它的主体(
\newcommand
用 'font-lock-function-name-face
来使主体字体化,而在我的情况下是粗体)。我想让 \newcommandx
用 'font-lock-function-name-face
来使其主体字体化。
总结一下问题:如何使 \newcommandx
的字体化与 \newcommand
完全相同(即在我的情况下为粗体)?
\newcommandx{cmd}[args]{def}
现在的行为类似于\newcommand{cmd}[args]{def}
。请参见auctex--11.86
内的font-latex.el
第301行。 - lawlist