* Navigating function arguments in C-styled Languages @ 2009-10-07 19:23 Nordlöw 2009-10-07 22:07 ` Alan Mackenzie 0 siblings, 1 reply; 4+ messages in thread From: Nordlöw @ 2009-10-07 19:23 UTC (permalink / raw To: help-gnu-emacs 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? /Nordlöw ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Navigating function arguments in C-styled Languages 2009-10-07 19:23 Navigating function arguments in C-styled Languages Nordlöw @ 2009-10-07 22:07 ` Alan Mackenzie 2009-10-08 7:36 ` Nordlöw 0 siblings, 1 reply; 4+ messages in thread From: Alan Mackenzie @ 2009-10-07 22:07 UTC (permalink / raw To: help-gnu-emacs Nordlow <per.nordlow@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). ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Navigating function arguments in C-styled Languages 2009-10-07 22:07 ` Alan Mackenzie @ 2009-10-08 7:36 ` Nordlöw 2009-10-10 17:15 ` Francis Moreau 0 siblings, 1 reply; 4+ messages in thread From: Nordlöw @ 2009-10-08 7:36 UTC (permalink / raw To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Navigating function arguments in C-styled Languages 2009-10-08 7:36 ` Nordlöw @ 2009-10-10 17:15 ` Francis Moreau 0 siblings, 0 replies; 4+ messages in thread From: Francis Moreau @ 2009-10-10 17:15 UTC (permalink / raw To: help-gnu-emacs On Oct 8, 9:36 am, Nordlöw <per.nord...@gmail.com> wrote: > 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 ",". > "C-s ," ? ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-10 17:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-07 19:23 Navigating function arguments in C-styled Languages Nordlöw 2009-10-07 22:07 ` Alan Mackenzie 2009-10-08 7:36 ` Nordlöw 2009-10-10 17:15 ` Francis Moreau
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.