[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17183: can't insert a quote pair before another
From: |
João Távora |
Subject: |
bug#17183: can't insert a quote pair before another |
Date: |
Sun, 6 Apr 2014 16:01:44 +0100 |
That's precisely what I proposed in my last message
that didn't yet make it to you (gmane authorization).
Also, we should probably use electric-pair--syntax-ppss
so that the trick works inside comments, too.
On Sun, Apr 6, 2014 at 1:39 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> + (unwind-protect
>> + (progn
>> + (delete-char -1)
>> + (not (nth 3 (syntax-ppss))))
>> + (insert-char char)))
>
> Yuck! Why not (save-excursion (not (nth 3 (syntax-ppss (-1 (point))))))?
>
>
> Stefan
--
João Távora