[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-humanities] electric-pair and non-breakable spaces
From: |
Ruijie Yu |
Subject: |
Re: [emacs-humanities] electric-pair and non-breakable spaces |
Date: |
Sun, 28 May 2023 16:29:04 +0800 |
User-agent: |
mu4e 1.9.22; emacs 30.0.50 |
Ruijie Yu via Emacs-humanities <emacs-humanities@gnu.org> writes:
> So, this sounds like the goal is more than just "add space between
> French quotes". Maybe someone can make a package whose name may be
> electric-french.el or the like, which exposes a minor mode to insert
> nbsp's for French punctuations. I don't necessarily have the time, so I
> won't make any promises here. :)
Alright, got some free time to spend, so here you go:
https://git.sr.ht/~ruijieyu/electric-french
This should work fine together with `electric-pair-mode', but it only
works with characters bound to `self-insert-command' (or commands
wrapping it), not characters inserted via
C-x 8 RET ... RET
, because in this case, the character is inserted via `insert',
therefore the hooks which the minor mode places in
`post-self-insert-hook' are not run at all.
Two caveats though:
1. I have only tested it on master build, so I am not 100% certain about
the minimum supported version listed there.
2. I have not tried to `package-vc-install' it. Let me know if doing so
shows any errors.
--
Best,
RY
Re: [emacs-humanities] electric-pair and non-breakable spaces, Juan Manuel Macías, 2023/05/28