Try "C-x h" (mark-whole-buffer) to select the whole buffer. To indent the
selected region, try "M-C-\" (indent-region)
the lisp will look like (untest):
(defun my-indent ()
(interactive)
(save-excursion
(mark-whole-buffer)
(indent-region)))
a fenintsoa writes:
a> Hi everybody, I would like to make the indent-buffer function like
a> this:
a> (defun indent-buffer() (beginning-of-file) <function to go to the end
a> of file while selecting> (ctrl-shift-end) (indent-region)
a> (exchange-point-and-mark) ) Being a non-lisp expert programmer (yet), I
a> would like any help to correct and to complete the above function,
a> please. Thanks, --
a> [@666[]]::::::::::::::::::::::::::::::::::>
a> andriamasinoro fenintsoa (mr) iremia-university of la reunion
a> (france) email : [EMAIL PROTECTED] t�l : (+262) 816 863
a> (portable) / (+262) 938 324 (office) fax : (+262) 938 260
a> ================
a> "most people don't plan to fail, they simply fail to plan."
a> ----------------------------
--
Danny Dick-Fung Siu mailto:[EMAIL PROTECTED]
Acrobat Engineering @ Adobe Systems Incorporated