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 :(
>
_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs