# HG changeset patch # User Stephen J. Turnbull # Date 1356703892 -32400 # Node ID 5fd1b9a955314ad87ccbabea03405e081e5a8e88 # Parent 44b0b4ea5cae688779874a40c659eaef1940567c Improve description of `mark-defun'. diff -r 44b0b4ea5cae -r 5fd1b9a95531 man/ChangeLog --- a/man/ChangeLog Fri Dec 28 17:23:25 2012 +0900 +++ b/man/ChangeLog Fri Dec 28 23:11:32 2012 +0900 @@ -1,3 +1,8 @@ +2012-12-28 Stephen J. Turnbull + + * xemacs/programs.texi (Defuns): Improve description of `mark-defun'. + Thanks to Steven Mitchell for the suggestion. + 2012-12-28 Byrel Mitchell * lispref/menus.texi (Menu Format): diff -r 44b0b4ea5cae -r 5fd1b9a95531 man/xemacs/programs.texi --- a/man/xemacs/programs.texi Fri Dec 28 17:23:25 2012 +0900 +++ b/man/xemacs/programs.texi Fri Dec 28 23:11:32 2012 +0900 @@ -297,13 +297,18 @@ The commands to move to the beginning and end of the current defun are @kbd{C-M-a} (@code{beginning-of-defun}) and @kbd{C-M-e} (@code{end-of-defun}). - To operate on the current defun, use @kbd{C-M-h} (@code{mark-defun}) + To operate on the current defun, use @kbd{C-M-h} (@code{mark-defun}) which puts point at the beginning and the mark at the end of the current or next defun. This is the easiest way to prepare for moving the defun -to a different place. In C mode, @kbd{C-M-h} runs the function -@code{mark-c-function}, which is almost the same as @code{mark-defun}, -but which backs up over the argument declarations, function name, and -returned data type so that the entire C function is inside the region. +to a different place. In Lisp modes, a ``defun'' is merely any sexp +starting in column 1. In other modes, a defun is a syntactic unit +defining an entity, and these modes often bind @kbd{C-M-h} to a +different function. For example, in CC Mode's C mode, @kbd{C-M-h} runs +the function @code{c-mark-function}, which is almost the same as +@code{mark-defun}, but which backs up over the argument declarations, +function name, and returned data type so that the entire C function is +inside the region. It also knows about struct definitions, macro +definitions, and many other constructs. @findex compile-defun To compile and evaluate the current defun, use @kbd{M-x compile-defun}.