comparison man/xemacs/programs.texi @ 5707:5fd1b9a95531

Improve description of `mark-defun'.
author Stephen J. Turnbull <stephen@xemacs.org>
date Fri, 28 Dec 2012 23:11:32 +0900
parents 755ae5b97edb
children 9fae6227ede5
comparison
equal deleted inserted replaced
5706:44b0b4ea5cae 5707:5fd1b9a95531
295 @findex end-of-defun 295 @findex end-of-defun
296 @findex mark-defun 296 @findex mark-defun
297 The commands to move to the beginning and end of the current defun are 297 The commands to move to the beginning and end of the current defun are
298 @kbd{C-M-a} (@code{beginning-of-defun}) and @kbd{C-M-e} (@code{end-of-defun}). 298 @kbd{C-M-a} (@code{beginning-of-defun}) and @kbd{C-M-e} (@code{end-of-defun}).
299 299
300 To operate on the current defun, use @kbd{C-M-h} (@code{mark-defun}) 300 To operate on the current defun, use @kbd{C-M-h} (@code{mark-defun})
301 which puts point at the beginning and the mark at the end of the current 301 which puts point at the beginning and the mark at the end of the current
302 or next defun. This is the easiest way to prepare for moving the defun 302 or next defun. This is the easiest way to prepare for moving the defun
303 to a different place. In C mode, @kbd{C-M-h} runs the function 303 to a different place. In Lisp modes, a ``defun'' is merely any sexp
304 @code{mark-c-function}, which is almost the same as @code{mark-defun}, 304 starting in column 1. In other modes, a defun is a syntactic unit
305 but which backs up over the argument declarations, function name, and 305 defining an entity, and these modes often bind @kbd{C-M-h} to a
306 returned data type so that the entire C function is inside the region. 306 different function. For example, in CC Mode's C mode, @kbd{C-M-h} runs
307 the function @code{c-mark-function}, which is almost the same as
308 @code{mark-defun}, but which backs up over the argument declarations,
309 function name, and returned data type so that the entire C function is
310 inside the region. It also knows about struct definitions, macro
311 definitions, and many other constructs.
307 312
308 @findex compile-defun 313 @findex compile-defun
309 To compile and evaluate the current defun, use @kbd{M-x compile-defun}. 314 To compile and evaluate the current defun, use @kbd{M-x compile-defun}.
310 This function prints the results in the minibuffer. If you include an 315 This function prints the results in the minibuffer. If you include an
311 argument, it inserts the value in the current buffer after the defun. 316 argument, it inserts the value in the current buffer after the defun.