                 "Generic word contract"
                 "Inputs and outputs"
                 "Parent topics:"
+                "See also"
                 "Syntax"
                 "Vocabulary"
                 "Warning"

  (use-local-map factor-mode-map)
  (setq major-mode 'factor-mode)
  (setq mode-name "Factor")
  (set (make-local-variable 'comment-start) "! ")
  (set (make-local-variable 'font-lock-comment-face) 'factor-font-lock-comment)
  (set (make-local-variable 'font-lock-string-face) 'factor-font-lock-string)
  (set (make-local-variable 'font-lock-defaults)
       `(factor-font-lock-keywords
         nil nil nil nil
         (font-lock-syntactic-keywords . ,factor--font-lock-syntactic-keywords)))
  (set-syntax-table factor-mode-syntax-table)
  (set (make-local-variable 'indent-line-function) 'factor--indent-line)
  (setq factor-indent-width (factor--guess-indent-width))
  (setq indent-tabs-mode nil)
  (run-hooks 'factor-mode-hook))

(add-to-list 'auto-mode-alist '("\\.factor\\'" . factor-mode))

  (run-mode-hooks 'factor-help-mode-hook))

(defun factor--listener-help-buffer ()
  (with-current-buffer (get-buffer-create "*factor-help*")
    (let ((inhibit-read-only t))
      (delete-region (point-min) (point-max)))
    (factor-help-mode)
    (current-buffer)))

(defvar factor--help-history nil)

