* matching #ifdefs...
@ 2003-01-31 18:46 Javier Oviedo
2003-01-31 19:55 ` Peter Lee
0 siblings, 1 reply; 3+ messages in thread
From: Javier Oviedo @ 2003-01-31 18:46 UTC (permalink / raw)
Hello all.
Currently I use the following function to jump back and forth between
matching parens:
(defun 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)))))
Is there somthing similar to this that will let me jump between #if
statements? Thanks in advance!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: matching #ifdefs...
2003-01-31 18:46 matching #ifdefs Javier Oviedo
@ 2003-01-31 19:55 ` Peter Lee
2003-01-31 21:01 ` Javier Oviedo
0 siblings, 1 reply; 3+ messages in thread
From: Peter Lee @ 2003-01-31 19:55 UTC (permalink / raw)
"Javier Oviedo" <email_joviedo@yahoo.com> writes:
> Is there somthing similar to this that will let me jump between #if
> statements? Thanks in advance!
c-backward-conditional <menu-bar> <C++> <Backward Conditional>, C-c C-p
Command: Move back across a preprocessor conditional, leaving mark behind.
c-down-conditional M-x c-down-conditional RET
Command: Move forward into the next preprocessor conditional, leaving mark behind.
c-down-conditional-with-else M-x c-down-conditional-with-else RET
Command: Move forward into the next preprocessor conditional, including `#else'.
c-forward-conditional <menu-bar> <C++> <Forward Conditional>, C-c C-n
Command: Move forward across a preprocessor conditional, leaving mark behind.
c-up-conditional <menu-bar> <C++> <Up Conditional>, C-c C-u
Command: Move back to the containing preprocessor conditional, leaving mark behind.
c-up-conditional-with-else M-x c-up-conditional-with-else RET
Command: Move back to the containing preprocessor conditional, including `#else'.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: matching #ifdefs...
2003-01-31 19:55 ` Peter Lee
@ 2003-01-31 21:01 ` Javier Oviedo
0 siblings, 0 replies; 3+ messages in thread
From: Javier Oviedo @ 2003-01-31 21:01 UTC (permalink / raw)
Thanks! This does the trick.
"Peter Lee" <spam@nospam.org> wrote in message
news:uu1fp5c1k.fsf@nospam.org...
> "Javier Oviedo" <email_joviedo@yahoo.com> writes:
>
> > Is there somthing similar to this that will let me jump between #if
> > statements? Thanks in advance!
>
> c-backward-conditional <menu-bar> <C++> <Backward Conditional>, C-c
C-p
> Command: Move back across a preprocessor conditional, leaving mark
behind.
> c-down-conditional M-x c-down-conditional RET
> Command: Move forward into the next preprocessor conditional, leaving
mark behind.
> c-down-conditional-with-else M-x c-down-conditional-with-else RET
> Command: Move forward into the next preprocessor conditional, including
`#else'.
> c-forward-conditional <menu-bar> <C++> <Forward Conditional>, C-c
C-n
> Command: Move forward across a preprocessor conditional, leaving mark
behind.
> c-up-conditional <menu-bar> <C++> <Up Conditional>, C-c C-u
> Command: Move back to the containing preprocessor conditional, leaving
mark behind.
> c-up-conditional-with-else M-x c-up-conditional-with-else RET
> Command: Move back to the containing preprocessor conditional, including
`#else'.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-31 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-31 18:46 matching #ifdefs Javier Oviedo
2003-01-31 19:55 ` Peter Lee
2003-01-31 21:01 ` Javier Oviedo
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).