Hi Arash,

>>>>> Arash Esbati <[email protected]> writes:
> What do others think, do we need such a general test?

It would be good to have tests considering that syntax propertization
affects syntax-aware functions.

> And if yes, which cases should be included?

How about adding these?
- verbatim environment
- equation environment
- \(\), \[\] pairs
- \emph{...}
- font specification such as \textbf{...} \mathrm{...} {\bfseries ...} 
{\ttfamily ...}

> +      (LaTeX-mode)
> +      (insert "\
> +\\documentclass{article}
> +\\begin{document}
> +Inline verbatim test: \\verb|x|
> +Inline math test: $x$
> +Marginpar test: \\marginpar{x}
> +\\end{document}
> +
> +%%% Local Variables:
> +%%% mode: latex
> +%%% TeX-master: t
> +%%% End:\n")

I think that `(LaTeX-mode)' should come after insertion of buffer
contents because otherwise Local Variables section isn't analysed and
would be confusing when debugging after other local variables are added.

> +      ;; Test for inline verb:
> +      (search-forward-regexp "\\\\verb|")

It would be enough to use `search-forward' since we know the literal
contents.

> +      (should (memq 'font-lock-constant-face
> +                    (get-text-property (match-end 0) 'face)))

Maybe `font-latex-faces-present-p' makes the code a bit simpler.

Regards,
Ikumi Keita

Reply via email to