Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!WHEATIES.AI.MIT.EDU!ptltd!plato!todd From: ptltd!plato!todd@WHEATIES.AI.MIT.EDU (Todd Cooper) Newsgroups: gnu.emacs Subject: Parenthesis matching when positioned over curser Message-ID: <8903131342.AA02000@plato.phoenix.uucp> Date: 13 Mar 89 13:42:47 GMT References: <11782@shamash.cdc.com> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 17 > Has anyone tried to create a lisp mode where the cursor temporarily > blinks over the matching parenthesis when POSITIONED over a paren? I I have globally set the "%" key so that it will do a match otherwise insert the paren asked for. This is like vi mode, except the "%" key is very overloaded. (defun vi-type-paren-match (arg) "Go to the matching parenthesis if on parenthesis otherwise insert %." (interactive "p") (cond ((looking-at "[([{]") (forward-sexp 1) (backward-char)) ((looking-at "[])}]") (forward-char) (backward-sexp 1)) (t (self-insert-command (or arg 1))))) --------- Todd Cooper (...!buita!ptltd!todd) Phoenix Technologies Ltd. (617 551 4107)