>>>>> Michael Smith <[EMAIL PROTECTED]>:

>> Does anybody know if Emacs/PSGML using flyspell/ispell can
>> recognize and avoid XML markup when spell checking? If so, how do
>> you accomplish it?

> I think you can just put this in your .emacs:

>   (setq ispell-skip-sgml t)

I'm doing it this way:

(defun my-sgml-set-local-variables ()
  "Set buffer-local variables when loading an XML/SGML file."
  (set (make-local-variable 'ispell-skip-sgml) t)
  (set (make-local-variable 'ispell-skip-html) t))

(add-hook 'sgml-mode-hook my-sgml-set-local-variables)

I don't remember why I did it this way.  Presumably because I didn't
wish to have these ispell settings outside of the buffers were it was
relevant. 

The reason I'm setting both ispell-skip-sgml and ispell-skip-html, is
that different emacsen used different variables here.

Reply via email to