                               "PRIVATE>" "<PRIVATE" "SYMBOL:" "USE:"))))
 
 (defsubst factor--at-begin-of-def ()
-  (looking-at factor--regexp-word-start))
+  (or (looking-at factor--regex-definition-start)
+      (looking-at factor--regex-single-liner)))
 
 (defsubst factor--looking-at-emptiness ()
   (looking-at "^[ \t]*$"))
 
-(defun factor--at-end-of-def ()
-  (or (looking-at ".*;[ \t]*$")
+(defsubst factor--at-end-of-def ()
+  (or (looking-at factor--regex-definition-end)
       (looking-at factor--regex-single-liner)))
 
 (defun factor--at-setter-line ()

(defsubst factor--ppss-brackets-start ()
  (nth 1 (syntax-ppss)))

(defsubst factor--indentation-at (pos)
  (save-excursion (goto-char pos) (current-indentation)))

(defconst factor--regex-closing-paren "[])}]")
(defsubst factor--at-closing-paren-p ()
  (looking-at factor--regex-closing-paren))

(defsubst factor--at-first-char-p ()
  (= (- (point) (line-beginning-position)) (current-indentation)))

(defun factor--indent-in-brackets ()
  (save-excursion
    (beginning-of-line)
    (when (> (factor--ppss-brackets-depth) 0)
      (let ((op (factor--ppss-brackets-start))
            (cl (factor--ppss-brackets-end))
            (ln (line-number-at-pos)))
        (when (> ln (line-number-at-pos op))
          (if (= ln (line-number-at-pos cl))
              (factor--indentation-at op)
            (factor--increased-indentation (factor--indentation-at op))))))))

