From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: left brackets insert both Date: 25 Mar 2005 12:05:27 -0800 Organization: http://groups.google.com Message-ID: <1111781127.783436.91790@z14g2000cwz.googlegroups.com> References: <1111765040.509327.116280@g14g2000cwa.googlegroups.com> <87ll8b2022.fsf@robotron.ath.cx> <1111769127.619222.303620@z14g2000cwz.googlegroups.com> <1111772988.425339.47700@g14g2000cwa.googlegroups.com> <1111775012.703198.185290@o13g2000cwo.googlegroups.com> <1111780392.575165.138760@l41g2000cwc.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1111781460 24068 80.91.229.2 (25 Mar 2005 20:11:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2005 20:11:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 25 21:10:59 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DEv7j-0001RO-Dd for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Mar 2005 21:09:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEvNH-0000GU-7g for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Mar 2005 15:25:43 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!newsfeed.media.kyoto-u.ac.jp!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: 198.74.20.73 Original-X-Trace: posting.google.com 1111781132 24091 127.0.0.1 (25 Mar 2005 20:05:32 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 25 Mar 2005 20:05:32 +0000 (UTC) In-Reply-To: <1111780392.575165.138760@l41g2000cwc.googlegroups.com> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=198.74.20.73; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:129605 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:25156 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25156 > 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. And now I remember why I didn't make it earlier. It's really a bit more compilcated than that. But not much. (defmacro my-insert-if-double (new-txt) "If last key same as this key, replace both with new-txt." `(lambda (cnt raw) (interactive "p\nP") (if (and (equal (preceding-char) last-command-char) (not raw)) (progn (backward-delete-char 1) (insert ,new-txt)) (self-insert-command cnt))))