unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Eli Segal" <eli_seg@bezeqint.net>
Subject: a bit help with elisp bit
Date: Mon, 23 Jan 2006 13:18:15 +0200	[thread overview]
Message-ID: <001a01c6200e$b48bf560$1400000a@home> (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)))))

             reply	other threads:[~2006-01-23 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-23 11:18 Eli Segal [this message]
2006-01-23 15:45 ` a bit help with elisp bit Ehud Karni

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='001a01c6200e$b48bf560$1400000a@home' \
    --to=eli_seg@bezeqint.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).