all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Martin Slouf <mar@centrum.cz>
Subject: Re: matching parenthesis
Date: Mon, 25 Jul 2005 22:57:06 +0200	[thread overview]
Message-ID: <20050725205706.GA9300@barbucha.martin.net> (raw)
In-Reply-To: <1122282552.326737.301880@z14g2000cwz.googlegroups.com>

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 :(
> 

  reply	other threads:[~2005-07-25 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-22 12:30 matching parenthesis Jan Guido Donath
2005-07-22 14:12 ` Johan Bockgård
2005-07-22 19:58   ` Klaus Berndl
2005-07-25  9:09     ` Sergei
2005-07-25 20:57       ` Martin Slouf [this message]
2005-07-26  0:24       ` Johan Bockgård
2005-07-26  3:41         ` Sergei
     [not found]       ` <mailman.1684.1122325407.20277.help-gnu-emacs@gnu.org>
2005-07-26  8:36         ` Marc Tfardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050725205706.GA9300@barbucha.martin.net \
    --to=mar@centrum.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.