3

I write mostly my documentation in HTML using emacs as my main editor. Emacs let you interactively spell-check the current buffer with the command ispell-buffer. (I think the underlying program used for doing the spell-check is named aspell.)

When emacs is in HTML-mode, text is stripped for all HTML markup before the remaining text is being spell-checked.

However, soft-hyphen entities (­ or ­) are not stripped, so a word that is written as speci­fies in the HTML text is spell-checked as two separate words (speci and fies) which is not what is wanted.

Is there a way to make emacs ispell/aspell ignore shoft hyphens in HTML?

Or can anyone suggest an elisp function that will strip soft hyphens out of the HTML text before it being handed over to aspell for spell-checking?

Free Radical
  • 2,052
  • 1
  • 21
  • 35
  • It's not just `­` but in fact any HTML code in the middle of a word is trouble for `ispell-buffer`; looking at the code it's unable to "see" a single word broken up by a tag as such, instead seeing it as two words. Normally this is the behavior you want (e.g. if your HTML contains `foo—bar` you want "foo" and "bar" spell-checked separately) but sometimes it isn't as you have observed. I am no Elisp whiz, but I think it would require a significant rewrite of `ispell.el` to change this behavior. – dodgethesteamroller Jun 04 '13 at 22:42

0 Answers0