diff options
Diffstat (limited to 'doc/emacs/programs.texi')
-rw-r--r-- | doc/emacs/programs.texi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 954f4c892e2..3812c2aa281 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -420,6 +420,9 @@ large chunks of code: @table @kbd @item C-M-q Reindent all the lines within one parenthetical grouping. +@item M-q +Fill a single paragraph in a defun, or reindent all the lines within +that defun. @item C-u @key{TAB} Shift an entire parenthetical grouping rigidly sideways so that its first line is properly indented. @@ -440,6 +443,21 @@ indentation of the line where the grouping starts). The function that etc. To correct the overall indentation as well, type @kbd{@key{TAB}} first. +@kindex M-q +@findex prog-fill-reindent-defun +@vindex beginning-of-defun-function +@vindex end-of-defun-function +@vindex fill-paragraph-function + To reindent the entire defun around point, type @kbd{M-q} +(@code{prog-fill-reindent-defun}). If point is in a comment or a +string, this command fills and indents the comment or string instead. +What exactly constitutes a comment, a string, or a defun depends on +the major mode: the bounds of a defun are decided by the variables +@code{beginning-of-defun-function} and @code{end-of-defun-function} +(@pxref{List Motion,,, elisp, The Emacs Lisp Reference Manual}), +and the filling mechanism is decided by @code{fill-paragraph-function} +(@pxref{Filling,,, elisp, The Emacs Lisp Reference Manual}). + @kindex C-u TAB If you like the relative indentation within a grouping but not the indentation of its first line, move point to that first line and type |