bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#72262: 31.0.50; [PATCH] Bug in `ispell-begin-tex-skip-regexp'


From: Arash Esbati
Subject: bug#72262: 31.0.50; [PATCH] Bug in `ispell-begin-tex-skip-regexp'
Date: Tue, 23 Jul 2024 22:55:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hi all,

please consider this .tex file which is valid LaTeX code:

--8<---------------cut here---------------start------------->8---
\documentclass{article}

\newenvironment{spacetest }{\itshape}{}
\newenvironment{spacetest}{\ttfamily}{}

\begin{document}

\begin{verbatim}
(setq ispell-tex-skip-alists
      '((("\\\\document\\(class\\|style\\)" . "\\\\begin[ \t\n]*{document}"))
        (("spacetest"    . "\\\\end[ \t]*{spacetest}")
         ("verbatim\\*?" . "\\\\end[ \t]*{verbatim\\*?}"))))
\end{verbatim}

\begin{spacetest }
Thiz iz nott to be ignorrd.
\end{spacetest }

\begin{spacetest}
  Thiz iz to be ignorrd.
\end{spacetest}

\end{document}
--8<---------------cut here---------------end--------------->8---

Eval the form in the verbatim environment and do 'M-x ispell RET'.  It
doesn't find any misspelled words at all and ignores both environments
'spacetest ' and 'spacetest' where it should only ignore the latter.

This is due to unnecessary matching of whitespaces in the function
`ispell-begin-tex-skip-regexp'.  The patch attached fixes the issue.
The patch is against the master branch, but should also apply to the
release branch.  I can update it once a number is assigned to the
report.

Best, Arash

Attachment: 0001-Delete-matching-of-whitespaces-in-LaTeX-env-names.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]