[Top][All Lists]

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

bug#20871: 25.0.50; fill-single-char-nobreak-p does not recognize a sing

From: Michal Nazarewicz
Subject: bug#20871: 25.0.50; fill-single-char-nobreak-p does not recognize a single-letter word when it is preceded by an open paren
Date: Fri, 02 Feb 2018 10:18:37 +0100

On Sun, Apr 17 2016, Eli Zaretskii wrote:
> Could you please elaborate on the bug itself?
> See, the function in question, fill-single-char-nobreak-p, is
> documented as a possible value to use in the fill hook, for a very
> specific purpose.  If you are saying that it doesn't fulfill that
> purpose well enough, please show a use case where it fails to do that.
> At least the situation you described, with " (a", doesn't seem to fit
> the use cases which this function is supposed to cover, since the
> parenthesis makes a 2-character sequence, whereas
> fill-single-char-nobreak-p aims to support isolated one-character
> words.

As person who wrote ‘fill-single-char-nobreak-p’ I can say that its
intention was to work for Polish and Czech typography.  In other words,
what Marcin reported is a genuine defect in the function.

In particular, function’s documentation mentions *one-letter* sequences,
not *one-character* sequences:

        Return non-nil if a one-letter word is before point.

(Admittedly, the name of the function is misleading).

As such, I would suggest applying the fix to
‘fill-single-char-nobreak-p’ rather than introducing a new function.

(And perhaps adding an alias and deprecating the old name if misleading
name is too big of a problem).

As another point of context, ideally, ‘tildify-mode’ and
‘fill-single-char-nobreak-p’ would use the exact same logic since they
both work to address the same underlying typographic conventions.

Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»

reply via email to

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