On Wed, Nov 8, 2017, 7:27 AM Kaushal Modi <kaushal.m...@gmail.com> wrote:

> On Wed, Nov 8, 2017, 7:16 AM Bastien <b...@gnu.org> wrote:
>> is there a simple mechanism in Emacs core to restore the same
>> functionnality?
> +1

To clarify, I am not suggesting to blindly restore the old easy template
system, and then have 2 sets of code doing similar things.

I am suggesting to have a minor mode that simply binds "<" to do the
template insertion (only when that is typed at BOL with optional leading
whitespace, or if a region is selected). If they want to literally type "<"
in those cases, they can either type "<<" or the old "C-q <".

That minor mode will reuse the code that Eric added, so that typing "<s"
will insert the BEGIN_SRC block, etc.

I can work on getting a patch ready if people are fine with this idea (I
effectively do the same in my config, but with the old template system. So
while the heuristics work great, I'll need to adjust that code to fit the
easy template replacement.)

> --

Kaushal Modi

Reply via email to