          (errors (if merlin-report-warnings errors
                    (delete-if (lambda (e) (merlin-error-warning-p (cdr (assoc 'message e))))
                               errors))))
-    (if (not errors)
-        (when view-errors-p (message "ok"))
+    (if (not errors) (when view-errors-p (message "ok"))
       (progn
         (merlin-error-display-in-margin errors)
-        (when (and view-errors-p errors)
+        (when view-errors-p
           (message "(%d pending errors, use %s to jump)"
                    (length errors)
                    (substitute-command-keys "\\[merlin-error-next]")))))))

  (when merlin-mode
    (merlin-process-remove-user)))

(add-hook 'merlin-mode-hook
          (lambda ()
            (add-hook 'kill-buffer-hook 'merlin-kill-buffer-hook nil 'make-it-local)
            (add-hook 'after-save-hook 'merlin-to-end nil 'make-it-local)
            (add-hook 'pre-command-hook
                      'merlin-show-current-error nil 'make-it-local)
            (add-hook 'post-command-hook

(defcustom merlin-margin-warning-string "?"
  "String to put in the margin of a line containing a warning."
  :group 'merlin :type 'string)

(defcustom merlin-error-after-save t
  "If non-nil, check for errors after saving"
  :group 'merlin :type 'boolean)

(defcustom merlin-error-in-margin t
  "If non-nil, display errors in margin"
  :group 'merlin :type 'boolean)

(defcustom merlin-display-lock-zone nil
  "How to display the locked zone.
