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

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

Re: left brackets insert both


From: rgb
Subject: Re: left brackets insert both
Date: 25 Mar 2005 11:53:12 -0800
User-agent: G2/0.2

> (defmacro my-bothbraces-if-double (new-txt)
>   "If the last key is the same as this key, insert new-txt and go
back
> a char"
>   `(lambda (cnt)
>      (interactive "p")
>      (if (equal (preceding-char) last-command-char)
>          (progn
>            (insert ,new-txt)
>            (backward-char))
>        (self-insert-command cnt))))

I'm reminded that I've long thought I should make this change:

(if (and (equal (preceding-char) last-command-char)
         (= cnt 1))

I just never got around to it.
Vary rarely does it make any difference.



reply via email to

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