 (defvar merlin-lock-zone-highlight-overlay nil
   "Overlay used for the lock zone highlighting.")
 (make-variable-buffer-local 'merlin-lock-zone-highlight-overlay)
+
 (defvar merlin-lock-zone-margin-overlay nil
   "Overlay used for the margin indicator of the lock zone.")
 (make-variable-buffer-local 'merlin-lock-zone-margin-overlay)

  "Set up a buffer for use with merlin."
  (interactive)
  (set (make-local-variable 'merlin-lock-point) (point-min))
  ; if there is not yet a buffer for the current buffer, create one
  (when (not (merlin-process-started-p))
    (merlin-start-process merlin-current-flags))
  (set (make-local-variable 'merlin-local-process)
       (merlin-get-process-variable 'merlin-local-process))
  (merlin-process-add-user)
  (when (and (fboundp 'auto-complete-mode)
             merlin-use-auto-complete-mode)
    (auto-complete-mode 1)

(defun merlin-debug (s)
  "Output S if the variable `merlin-debug' is non-nil on the process buffer
associated to the current buffer."
  (with-current-buffer merlin-buffer-name
    (goto-char (point-max))
    (insert s)))

