[Top][All Lists]

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

Re: [AUCTeX-devel] Spell checking of macros

From: Mosè Giordano
Subject: Re: [AUCTeX-devel] Spell checking of macros
Date: Sat, 9 Jul 2016 15:57:50 +0200

Hi Arash,

2016-07-08 19:11 GMT+02:00 Arash Esbati <address@hidden>:
> 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
>   (eval-when-compile
>     (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---

Ok, then why this regexp is built with `eval-when-compile'?

> 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
> `TeX-ispell-skip-set(car|cdr)'.

Fine, thanks.

>> * 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):
>   (TeX-ispell-skip-setcdr
>     '(...
>       ("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:
>   (TeX-ispell-skip-setcdr
>     '(...
>       ("tabular[*xy]" ispell-tex-arg-end 2)))

Maybe the regexp should be "tabular[*xy]?", right?


reply via email to

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