[Top][All Lists]

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

Re: Adding ispell-multi.el and friends to Emacs

From: Agustin Martin
Subject: Re: Adding ispell-multi.el and friends to Emacs
Date: Mon, 18 Jun 2007 11:55:06 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, Jun 18, 2007 at 12:11:59AM +0100, Peter Heslin wrote:
> I don't use ispell on its own, so I did not look previously into what it
> would take to add this feature to ispell-buffer and friends. I have
> taken a quick look now at ispell.el and it seems that ispell-buffer
> sends the text of the buffer to the ispell process one line at a time.
> This design makes it impossible to switch language in mid-line.
> Perhaps it would be a simple change to modify ispell-process-line so
> that it loops over the words in a line and sends each one to ispell
> individually, switching processes if the language has changed.  Or it
> might be hairy to change that function -- I don't know the code well
> enough to guess what the complications might be.

I think I have read somewhere that current ispell.el
ispell-process-line use was made for efficiency, looping over
individual words was far slower. Something similar to flyspell-region over
large regions.

A mixed approach would be to first parse line and loop over words if a
language change is detected or active and send lines otherwise. I only
looked once at the line handling code to try doing something like that in
case of misalignments (doing line per words in case a misalignment is
found), but I had no success at all.


reply via email to

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