[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

V.2.2 Moverse por defuns

Estos comandos mueven el punto o define la región según las definiciones principales de nivel superior, también llamadas defuns.

C-M-a

Va al comienzo de la defun actual o precedente (beginning-of-defun).

C-M-e

Va al final de la defun actual o siguiente (end-of-defun).

C-M-h

Pone la región alrededor de la defun entera actual o siguiente (mark-defun).

Los comandos para ir al comienzo y al final de la defun actual son C-M-a (beginning-of-defun) y C-M-e (end-of-defun). Si repite uno de estos comandos, o utiliza un argumento numérico positivo, cada repetición va a la siguiente defun en la dirección del movimiento.

C-M-a con un argumento negativo -n avanza n veces al siguiente comienzo de una defun. This is not exactly the same place that C-M-e with argument n would move to; the end of this defun is not usually exactly the same place as the beginning of the following defun. (Whitespace, comments, and perhaps declarations can separate them.) Likewise, C-M-e with a negative argument moves back to an end of a defun, which is not quite the same as C-M-a with a positive argument.

To operate on the current defun, use C-M-h (mark-defun) which puts point at the beginning and mark at the end of the current defun. This is the easiest way to get ready to kill the defun in order to move it to a different place in the file. If you use the command while point is between defuns, it uses the following defun.

In C mode, C-M-h runs the function c-mark-function, which is almost the same as mark-defun; the difference is that it backs up over the argument declarations, function name and returned data type so that the entire C function is inside the region. This is an example of how major modes adjust the standard key bindings so that they do their standard jobs in a way better fitting a particular language. Other major modes may replace any or all of these key bindings for that purpose.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Roberto on enero, 3 2007 using texi2html 1.76.