Saturday, June 1, 2013

Skip spelling in EMACS for the content of a user macro

Skip spelling in EMACS for the content of a user macro

In EMACS, in order to skip spelling for the arguments of a user macro, one appends an entry to the ispell-tex-skip-alists variable.
For example, to skip parsing the argument of \mycommad, one adds an entry like:
(\\\\mycommad    ispell-tex-arg-end)
The complete command, perhaps in the init file, should be:
(setq ispell-tex-skip-alists
   (list
    (append
     (car ispell-tex-skip-alists) ;tell ispell to ignore content of this:
     '((\\\\mycommad       ispell-tex-arg-end)))
(cadr ispell-tex-skip-alists)))
So the text inside \mycommad{blah blah} will be skipped.
But what if the command takes two arguments and I want to skip only the spelling of the second? That is:
`\mycommad{spell this}{skip this}`
Documentation for using ispell-tex-skip-alists is very limited. Particularly, ispell-tex-arg-end sometime takes a numeric argument, what is it?

No comments:

Post a Comment