This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Emacs/PSGML/flyspell query


>>>>> Michael Smith <smith at xml-doc dot org>:

>> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]