help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Navigating function arguments in C-styled Languages


From: Nordlöw
Subject: Re: Navigating function arguments in C-styled Languages
Date: Thu, 8 Oct 2009 00:36:40 -0700 (PDT)
User-agent: G2/1.0

On Oct 8, 12:07 am, Alan Mackenzie <a...@muc.de> wrote:
> Nordlow <per.nord...@gmail.com> wrote:
> > Can we somehow navigate, reorder (transpose) or iterate the function
> > arguments of a function decl/def in C-styled languages like we can
> > with lisp sexps?
>
> Yes.  Use C-M-f, C-M-b (`forward/backward-sexp') to move through them,
> C-M-t (`transpose-sexps') to transpose them (use a numerical prefix
> argument if you're adventurous ;-), C-M-k (`kill-sexp') to murder one.
>
> "Iterate a function argument"?  Not sure what you mean by this.  In
> English, you can only iterate an action, not a thing.
>
> --
> Alan Mackenzie (Nuremberg, Germany).

No, forward/backward-sexp does not work the way you describe in cc-
mode.

Try for example:

float add(float * x, float * y)

When I stand anywhere on the expression "float * x", preferrably at
the "f", I want a function, say c-forward-argument, that places the
cursor after the comma ",".

I think I could write this function on my own but first I ask others
so I don't reinvent the wheel.

/Nordlöw


reply via email to

[Prev in Thread] Current Thread [Next in Thread]