branch: externals/caml
commit ac5d0075989559177bd77326eadcbd92d8dba1ae
Author: Didier Rémy <[email protected]>
Commit: Didier Rémy <[email protected]>
caml-indent-phrase
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4166
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml.el | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/caml.el b/caml.el
index 632271e..9f6499e 100644
--- a/caml.el
+++ b/caml.el
@@ -1612,18 +1612,19 @@ by |, insert one."
0)
abbrev-correct)))))))
-(defun caml-indent-phrase ()
- (interactive "*")
- (let ((bounds (caml-mark-phrase)))
- (indent-region (car bounds) (cdr bounds) nil)))
-
-; (defun caml-indent-phrase (arg)
-; (interactive "p")
-; (save-excursion
-; (let ((beg (caml-find-phrase)))
-; (while (progn (setq arg (- arg 1)) (> arg 0))
-; (caml-find-region))
-; (indent-region beg (point) nil))))
+; (defun caml-indent-phrase ()
+; (interactive "*")
+; (let ((bounds (caml-mark-phrase)))
+; (indent-region (car bounds) (cdr bounds) nil)))
+
+(defun caml-indent-phrase (arg)
+ "Indent current phrase
+with prefix arg, indent that many phrases starting with the current phrase."
+ (interactive "p")
+ (save-excursion
+ (let ((beg (caml-find-phrase)))
+ (while (progn (setq arg (- arg 1)) (> arg 0)) (caml-find-phrase))
+ (indent-region beg (point) nil))))
(defun caml-indent-buffer ()
(interactive)