[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: |
Eli Zaretskii |
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: |
Sat, 17 Aug 2019 09:57:13 +0300 |
> From: Michał Nazarewicz <mina86@mina86.com>
> Date: Fri, 16 Aug 2019 16:30:55 +0100
> Cc: Mattias Engdegård <mattiase@acm.org>, mbork@mbork.pl,
> 20871@debbugs.gnu.org
>
> On Fri, 16 Aug 2019 at 13:53, Eli Zaretskii <eliz@gnu.org> wrote:
> > Michal says that the original fill-single-char-nobreak-p function
> > was supposed to handle the Polish case as well. If that's true,
> > perhaps we should deprecate fill-polish-nobreak-p.
>
> I’m in favour of deprecating one of the functions, yes.
OK, but see below.
> > However, I do wonder how can a general function handle these cases,
> > since in general there's no problem in breaking a line after
> > single-letter words.
>
> We could try and look at `tildify-mode’ for inspiration and especially
> ‘tildify-space-pattern’¹ which is:
>
> "[,:;(][ \t]*[a]\\|\\<[AIKOSUVWZikosuvwz]"
My problem is conceptual rather than practical. Since in , e.g.,
English it is okay to break a line after single-letter words, whereas
in Polish it is not, I wonder how can we have a single function
satisfy both requirements. We would need some option, and then we
would need to decide what is the trigger for changing the value of
that option -- it could be the user, or the language environment, or
maybe something else.
tildify.el explicitly says that its defaults are for a specific
language, so I don't think it solves the problem that bothers me, as
described above. This is why I originally suggested a separate
function -- having that is equivalent to having an option which
determines a behavior that depends on the language.
I'm also okay with extending tildify.el to support more than just
Czech rules, but that's a separate issue.
- 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,
Eli Zaretskii <=