bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18730: [PATCH] tildify.el: Add `auto-tildify' and `auto-tildify-mode


From: Stefan Monnier
Subject: bug#18730: [PATCH] tildify.el: Add `auto-tildify' and `auto-tildify-mode'.
Date: Thu, 16 Oct 2014 10:03:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>> Could it use the existing tildify-pattern-alist?
> In the current implementation those two have to be a separate alists.
> tildify-pattern-alist assumes that the whole text is available so the
> patterns may check text before and after the soft space.  Patterns in
> auto-tildify-pattern-alist can only look back before the space
> character.

Is there a particular reason we can't use tildify-pattern-alist anyway
(and look both before *and* after)?

Or recognize the entries of tildify-pattern-alist which can't be used
(e.g. make sure that the char modified is the one right before point)?

> The implementation could be changed to use tildify-pattern-alist but:
> * It will be slower because it would have to match pattern after every
>   inserted character (whereas currently the pattern is matched only if
>   character at point is space and character before it is a word
>   character).

Why?  Can't we just check (eq last-command-event ?\s)?

> * Furthermore, it might be hard/impossible to manually replace hard
>   space with a soft space if user desires to do so.

That's a very important consideration, indeed.

> Would this be better:
> ** `tildify-mode' automatically hardens spaces as one types the text.
> Breaking line after a single-character words is forbidden by Czech and Polish
> typography.  `auto-tildify-mode' makes creating a typographically-correct 
> markup
> in formats such as HTML, LaTeX, Markdown, etc.

Oh, yes, now that's more clear.  There's an "easier" missing in the last
sentence, tho.  You can add it as "... makes it easier to create ...".
And there's an "auto-" that needs to be removed.


        Stefan





reply via email to

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