[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to format paragraph and not to lose spaces between 2 characters?
From: |
tomas |
Subject: |
Re: How to format paragraph and not to lose spaces between 2 characters? |
Date: |
Wed, 6 Oct 2021 15:00:28 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Oct 06, 2021 at 12:24:13PM +0200, Emanuel Berg via Users list for the
GNU Emacs text editor wrote:
> Jean Louis wrote:
>
> >> The ‘fill-nobreak-predicate’ hook lets you avoid line
> >> breaks at certain places. For example if you’re French, you
> >> might be used to typing a space in front of colons,
> >> question marks, exclamation marks, etc. This might lead to
> >> the following problem:
> >
> > If I have ❰ ❱ then what should I add to
> > `fill-nobreak-predicate' variable?
>
> If you have NO-BREAK SPACE it shouldn't brake anyway (that's
> the purpose) so then you can just fill as you
> would, transparently.
>
> If you want it to be 100% transparent so you can use normal
> spaces (but why?) I'd start at something like this
>
> (looking-at "\s\\{2,\\}")
^^
Alternatively you could say "\\s-..." instead, which would catch
everything with the syntax property "space", which non-breaking
spaces usually have (it'll depend on your current syntax table,
though, which can be seen as a plus or as a minus).
Cheers
- t
signature.asc
Description: Digital signature