From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Martin Slouf Newsgroups: gmane.emacs.help Subject: Re: matching parenthesis Date: Mon, 25 Jul 2005 22:57:06 +0200 Message-ID: <20050725205706.GA9300@barbucha.martin.net> References: <1122282552.326737.301880@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122325353 19521 80.91.229.2 (25 Jul 2005 21:02:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Jul 2005 21:02:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 25 23:02:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DxA5L-0001mv-B7 for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jul 2005 23:02:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxA7e-0002tC-G2 for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jul 2005 17:04:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DxA6e-0002Pk-5H for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 17:03:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DxA6a-0002Ov-Kq for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 17:03:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxA6a-0002Ly-4g for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 17:03:20 -0400 Original-Received: from [84.242.95.145] (helo=barbucha.martin.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DxABC-0000ad-Bx for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 17:08:06 -0400 Original-Received: from martin by barbucha.martin.net with local (Exim 3.36 #1 (Debian)) id 1DxA0Y-0002Ww-00 for ; Mon, 25 Jul 2005 22:57:06 +0200 Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <1122282552.326737.301880@z14g2000cwz.googlegroups.com> User-Agent: Mutt/1.5.9i 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 Xref: news.gmane.org gmane.emacs.help:28183 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28183 not exactly what you ask for, but i know this one: (show-paren-mode 1) ;; define function to match a parenthesis otherwise insert a '~' (defun goto-match-paren (arg) "Go to the matching parenthesis if on parenthesis otherwise insert '~'." (interactive "p") (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1)) ((looking-at "\\s\)") (forward-char 1) (backward-list 1)) (t (self-insert-command (or arg 1))))) (global-set-key (kbd "~") 'goto-match-paren) copy to your .emacs and pressing '~' will jump to matching parenthesis instead of inserting '~' if and only if your point is on the parenthesis this is not mine function, it was stolen from somenone else by me. (so i can thank him for it now :) m. On Mon, Jul 25, 2005 at 02:09:12AM -0700, Sergei wrote: > Klaus Berndl: > > On Fri, 22 Jul 2005, Johan Bockg?rd wrote: > > ... > > >> mic-paren.el > > > A tip from the author and maintainer ;-) > > > ;; This file can be obtained from "The EmacsWiki" and here from the > > ;; packages-site: http://www.emacswiki.org/elisp/index.html > > I do not know, if this is a known issue, but I had to comment out > ;(require 'mic-paren) (paren-activate) > from my .emacs, because it blocks calc, making it report on every > input: > > ,---- > | byte-code: Key sequence C-M-f uses invalid prefix characters > `---- > > That's a pity, as mic-paren.el is a great package :( >