all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* a bit help with elisp bit
@ 2006-01-23 11:18 Eli Segal
  2006-01-23 15:45 ` Ehud Karni
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Segal @ 2006-01-23 11:18 UTC (permalink / raw)


hey all, 
I found this really great tip, 
where the cursor on a paren, you press "%" and it goes to 
the matching one.
but I want to change it, that when my point is one place
after the closing bracket % will work
how do I change it ?
still trying to grasp this lisp 

thanx 

------ the code --------------
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
  "Go to the matching paren if on a paren; 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)))))

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-23 15:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-23 11:18 a bit help with elisp bit Eli Segal
2006-01-23 15:45 ` Ehud Karni

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.