   (save-excursion
     (beginning-of-line)
     (re-search-forward factor--regex-constructor (line-end-position) t)))
+
+(defsubst factor--increased-indentation (&optional i)
+  (+ (or i (current-indentation)) factor-indent-width))
+(defsubst factor--decreased-indentation (&optional i)
+  (- (or i (current-indentation)) factor-indent-width))
 
 (defun factor--indent-in-brackets ()
   (save-excursion

  (= (- (point) (line-beginning-position)) (current-indentation)))

(defconst factor--regex-single-liner
  (format "^%s" (regexp-opt '("DEFER:" "GENERIC:" "IN:" "PRIVATE>" "<PRIVATE" "USE:"))))

(defsubst factor--at-begin-of-def ()
  (looking-at "\\([^ ]\\|^\\)+:"))

(defun factor--indent-setter-line ()
  (when (factor--at-setter-line)
    (save-excursion
      (let ((indent (and (factor--at-constructor-line) (current-indentation))))
        (while (not (or indent
                        (bobp)
                        (factor--at-begin-of-def)
                        (factor--at-end-of-def)))
          (if (factor--at-constructor-line)
              (setq indent (factor--increased-indentation))
            (forward-line -1)))
        indent))))

(defun factor--indent-continuation ()
  (save-excursion
    (forward-line -1)
    (while (and (not (bobp)) (factor--looking-at-emptiness))
      (forward-line -1))
    (if (or (factor--at-end-of-def) (factor--at-setter-line))
        (factor--decreased-indentation)
      (if (factor--at-begin-of-def)
          (factor--increased-indentation)
        (current-indentation)))))

(defun factor--calculate-indentation ()
  "Calculate Factor indentation for line at point."
