www.delorie.com/gnu/docs/emacs/emacs_56.html   search  
 
Buy the book!


GNU Emacs Manual

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

H.4 Commands to Mark Textual Objects

Here are the commands for placing point and the mark around a textual object such as a word, list, paragraph or page.

M-@
Set mark after end of next word (mark-word). This command and the following one do not move point.
C-M-@
Set mark after end of following balanced expression (mark-sexp).
M-h
Put region around current paragraph (mark-paragraph).
C-M-h
Put region around current defun (mark-defun).
C-x h
Put region around the entire buffer (mark-whole-buffer).
C-x C-p
Put region around current page (mark-page).

M-@ (mark-word) puts the mark at the end of the next word, while C-M-@ (mark-sexp) puts it at the end of the next balanced expression (see section U.4.1 Expressions with Balanced Parentheses). These commands handle arguments just like M-f and C-M-f.

Other commands set both point and mark, to delimit an object in the buffer. For example, M-h (mark-paragraph) moves point to the beginning of the paragraph that surrounds or follows point, and puts the mark at the end of that paragraph (see section T.3 Paragraphs). It prepares the region so you can indent, case-convert, or kill a whole paragraph.

C-M-h (mark-defun) similarly puts point before, and the mark after, the current (or following) major top-level definition, or defun (see section U.2.2 Moving by Defuns). C-x C-p (mark-page) puts point before the current page, and mark at the end (see section T.4 Pages). The mark goes after the terminating page delimiter (to include it in the region), while point goes after the preceding page delimiter (to exclude it). A numeric argument specifies a later page (if positive) or an earlier page (if negative) instead of the current page.

Finally, C-x h (mark-whole-buffer) sets up the entire buffer as the region, by putting point at the beginning and the mark at the end.

In Transient Mark mode, all of these commands activate the mark.


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

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003