       (back-to-indentation))
     ))
 
-(defun zomp-indent-current ()
-  (interactive)
-  (save-excursion
-    (zomp-mark-current)
-    (indent-region (region-beginning) (region-end))))
+(defun zomp-point-is-in-comment (pt)
+  (interactive "d")
+  (let ((prop (get-char-property pt 'face)))
+    (or (equal prop 'font-lock-comment-face)
+        (equal prop 'font-lock-doc-face))))
+
+(defun zomp-indent-current-or-fill ()
+  (interactive)
+  (if (zomp-point-is-in-comment (point))
+      (fill-paragraph nil)
+    (save-excursion
+      (zomp-mark-current)
+      (indent-region (region-beginning) (region-end)))))
 
 (defun zomp-indent-buffer ()
   (interactive)

  (zomp-add-action zomp-tl-help [(control c)(control h)] "Show toplevel help")

  (zomp-add-seperator zomp-sep4)
  (zomp-add-action zomp-indent-current [(meta q)] "Indent current")
  (zomp-add-action zomp-indent-buffer [(shift meta q)] "Indent buffer")

  (zomp-add-seperator zomp-sep-2)

  (search-forward-regexp zomp-tl-expr-regexp)
  (backward-char)
  (when (looking-at "end")
    (next-line)
    (search-forward-regexp zomp-tl-expr-regexp)
    (backward-char)))
