[Top][All Lists]

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

Re: filling bug in text-mode

From: Juri Linkov
Subject: Re: filling bug in text-mode
Date: Sun, 09 Oct 2005 09:06:02 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>     One solution is to fix the regexp in `sentence-end' to match three
>     periods.
> I think that is the correct fix, because the sentence commands
> _should_ stop after three periods (when followed by two spaces
> or a newline).

Should the sentence commands stop also after three question marks???
And sentences can also end with three exclamation marks!!!

> It is a bug if they don't stop there.

This depends on the operational semantics of `sentence-end' rather
than its formal definition.  The current value of `sentence-end' allows
the sentence commands to process sentences with three periods correctly
except one place that caused this bug.  The use of `sentence-end' is
very questionable in this place.  Please, look at it again:

       (skip-chars-backward ". ")
       (and (looking-at "\\.")
            (not (looking-at (sentence-end)))))

Why only periods are skipped and matched by `looking-at' while
sentences can end also with `!' and `?' which are included in
`sentence-end' along with the period?

I'm inclined to fix this place rather than to change the default value
of `sentence-end'.  There are functions like `fill-delete-newlines'
that rely on its current default value, so changing the default value
of `sentence-end' will break such functions.

Juri Linkov

reply via email to

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