help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Getting Emacs to play nice with Hunspell and apostrophes


From: Nikolai Weibull
Subject: Re: Getting Emacs to play nice with Hunspell and apostrophes
Date: Sat, 7 Jun 2014 21:59:47 +0200

On Sat, Jun 7, 2014 at 8:40 PM, Eli Zaretskii <address@hidden> wrote:
>> Date: Sat, 7 Jun 2014 20:28:08 +0200
>> From: Nikolai Weibull <address@hidden>
>>
>> On Sat, Jun 7, 2014 at 5:39 PM, Nikolai Weibull <address@hidden> wrote:
>>
>> > It’s beyond me how this isn’t working, but I’m sure I’m doing something 
>> > wrong.
>>
>> I should perhaps also note that the only word in the sentence above
>> that is seen as an error is “isn’t”, as “isn” isn’t a word.  I guess
>> either Emacs or hunspell is ignoring single-character words “s” and
>> “m” after each of the other instances of ‘’’ and “It” and “I” are of
>> course seen as correctly spelled words…

> Emacs just goes with whatever the .aff file of the dictionary you use
> says.  And it cannot do anything else, because the speller uses that
> dictionary, and decides by its rules what can and what cannot be in a
> word.

Yes, I realize that, but that raises the question of how ‘isn’t’ will
be parsed if I straight up add ’ to WORDCHARS, but I guess that only
matters for the curses interface that I don’t use.

> Look in the .aff file you use, and you will see that it knows about '
> and about n't and about 's, that's why these work.  There's no magic
> here.

OK, so having read hunspell(5), it seems that my .aff that comes from
OpenOffice doesn’t include “n't” as a possible SFX.

The .dic does list the word “isn't”, however, so I’m not sure what to
make of this.

The one from SCOWL, version 7.1.0, looks about the same as the OpenOffice one.

The one from Mozilla is also about the same.

> So I think you must get a hold of a Hunspell-compliant dictionary that
> knows about the ’ apostrophe.

Yes, I suppose so.

One solution that seems to work is to add ‘’’ (or ‘'’ to WORDCHARS and
then change ispell-dictionary-alist to include ‘’’ in the OTHERCHARS
element.  This works with hunspell 1.3.3 (which was released a couple
of days ago and still doesn’t include the patch for handling offsets
correctly).

Perhaps this should be handled automatically for OTHERCHARS in ispell.el?



reply via email to

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