[Top][All Lists]

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

Re: [AUCTeX-devel] Spell checking of macros

From: Arash Esbati
Subject: Re: [AUCTeX-devel] Spell checking of macros
Date: Fri, 08 Jul 2016 19:11:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95

Hi Mosè,

Mosè Giordano <address@hidden> writes:

> 2016-07-08 12:55 GMT+02:00 Arash Esbati <address@hidden>:
>> Following up myself, I think I have a working setup for an AUCTeX ispell
>> dictionary (diff attached).  I hope this way, it will be easy to add
>> more macro/env names.  I would appreciate any comments.  After that, I
>> will update the documentation and make it available.

Thanks for looking at this.

> Thanks for your work!  Some questions:
> * why all those `eval-when-compile'?

The final regexp which goes into byte-compiled file is built with:

--8<---------------cut here---------------start------------->8---
(defvar TeX-ispell-skip-cmds-one-arg-regexp
    (concat "\\\\"
            (regexp-opt (TeX-ispell-sort-skip-cmds-list 1) t)))
  "Regexp of LaTeX commands with one argument to be skipped.")
--8<---------------cut here---------------end--------------->8---

I needed the other `eval-when-compile' to make the compiler happy.
Byte-compile `tex-ispell.el' and have a look at the .elc file.

> * why you decided to add all elements of `TeX-ispell-skip-cmds-list'
> in `tex-ispell.tex', instead of adding the appropriate macros in each
> style file?  Performance?

I think on the long run with lots of macros, it will help.  I did it
mainly because I wanted to feed `regexp-opt' with all the macros and
have one regexp to do the work.  I started with the idea to have macros
in the respective style files, but the one-file-approach seems easier to
maintain.  Parsed elements can still be added by styles with

> * is is possible to skip the second
> argument of "\begin{}{}"?  For example. in the first example you
> showed us in this thread `ispell' still wants to check "llr".

Yes it is.  It works for me for tabularx & tabulary with (already in
the last diff):

      ("tabular[xy]" ispell-tex-arg-end 2)))

I see that I have missed \begin{tabular*} (since I never use it ;-),
should be easily fixed with:

      ("tabular[*xy]" ispell-tex-arg-end 2)))

Best, Arash

reply via email to

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