Stephen J. Turnbull writes:
> grep mark-c-function /usr/src/ -r
> /usr/src/xemacs-21.5.32/man/xemacs/programs.texi:@code{mark-c-function},
> which is almost the same as @code{mark-defun},
> /usr/src/xemacs-21.5.32/info/xemacs.info-2:`mark-c-function', which is
> almost the same as `mark-defun', but which
I guess these references can be removed. Patches welcome!
It turns out that in CC Mode's C mode, the function bound to C-M-h is
`c-mark-function', which knows about structs and macros, too. So I
fixed up the description of `mark-defun', using CC Mode as an example
of the kinds of additional processing (beyond marking a sexp starting
in column 1) modes might do for the "mark defun" functionality.
# HG changeset patch
# Parent 44b0b4ea5cae688779874a40c659eaef1940567c
Improve description of `mark-defun'.
diff -r 44b0b4ea5cae 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 <stephen(a)xemacs.org>
+
+ * xemacs/programs.texi (Defuns): Improve description of `mark-defun'.
+ Thanks to Steven Mitchell for the suggestion.
+
2012-12-28 Byrel Mitchell <byrel.mitchell(a)gmail.com>
* lispref/menus.texi (Menu Format):
diff -r 44b0b4ea5cae 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}.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta