                                           hindent-process-path
                                           nil ; delete
                                           temp ; output
-                                          nil
-                                          "--style"
-                                          hindent-style)
+                                          nil)
                                     (when hindent-line-length
                                       (list "--line-length"
                                             (number-to-string
                                              hindent-line-length)))
+                                    (when hindent-tab-size
+                                      (list "--tab-size"
+                                            (number-to-string
+                                             hindent-tab-size)))
                                     (hindent-extra-arguments)))))
             (cond
              ((= ret 1)

;; Customization properties

(defcustom hindent-style
  "fundamental"
  "The style to use for formatting."
  :group 'haskell
  :type 'string
  :safe #'stringp)

  :safe #'stringp)

(defcustom hindent-line-length
  80
  "Optionally override the line length."
  :group 'haskell
  :type '(choice (const :tag "Default: 80" 80)
                 (integer :tag "Override" 120))
  :safe (lambda (val) (or (integerp val) (not val))))

(defcustom hindent-tab-size
  2
  "Optionally override the tab size."
  :group 'haskell
  :type '(choice (const :tag "Default: 2" 2)
                 (integer :tag "Override" 4))
  :safe (lambda (val) (or (integerp val) (not val))))

(defcustom hindent-reformat-buffer-on-save nil
  "Set to t to run `hindent-reformat-buffer' when a buffer in
`hindent-mode' is saved."
  :group 'haskell
  :safe #'booleanp)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Minor mode
