   (format "^USING: \\|\\(%s\\)\\|\\(^%s .*\\)"
           factor-definition-start-regex
           factor-single-liner-regex))
+
+(defconst factor-definition-end-regex
+  (format "\\(^\\| +\\);\\( *%s\\)*\\($\\| +\\)"
+          factor-declaration-words-regex))
 
 (defconst factor-end-of-def-line-regex
   (format "^.*%s" factor-definition-end-regex))

  (format "^\\(%s:\\) " (regexp-opt (append factor-no-indent-def-starts
                                            factor-indent-def-starts))))

(defconst factor-definition-end-regex
  (format "\\(\\(^\\| +\\);\\( *%s\\)*\\($\\| +\\)\\)"
          factor-declaration-words-regex))

(defconst factor-single-liner-regex
  (regexp-opt '("ABOUT:"
                "ALIAS:"

    (when (factor-at-begin-of-def) 0)))

(defsubst factor-previous-non-empty ()
  "Move caret to the beginning of the last non-empty line."
  (forward-line -1)
  (while (and (not (bobp))
              (looking-at "^[ ]*$\\|$"))
    (forward-line -1)))

(defun factor-indent-setter-line ()
