anchor.diff:  
   (defmethod (setf cursor) (new-position (mode repl-mode))
     (pflet ((selection-start (position)
  -           (setf (ps:chain (nyxt/ps:qs document "#input-buffer") selection-start)
  -                 (setf (ps:chain (nyxt/ps:qs document "#input-buffer") selection-end)
  +           (setf (ps:@ document active-element selection-start)
  +                 (setf (ps:@ document active-element selection-end)
                          (ps:lisp position)))))
       (with-current-buffer (buffer mode)
         (selection-start new-position))))
   
  -(define-command return-input (&optional (repl (find-submode 'repl-mode)))
  -  "Return inputted text."
  -  (let ((input (input repl)))
  -    (add-object-to-evaluation-history repl
  -                                      (list (package-short-name *package*)
  -                                            input
  -                                            (nyxt::evaluate input)))
  +(defmethod current-cell-id ((mode repl-mode))
  +  (pflet ((get-id ()
  +           (ps:chain document active-element (get-attribute "data-repl-id"))))
  +    (with-current-buffer (buffer mode)
  +      (ignore-errors (parse-integer (get-id))))))
  +
  +(define-command evaluate-cell (&optional (repl (find-submode 'repl-mode)))
  +  "Evaluate the currently focused input cell."
  +  (let* ((input (input repl))
  +         (id (current-cell-id repl))
  +         (evaluation (make-instance 'evaluation
  +                                    :input input
  +                                    :results (nyxt::evaluate input))))
  +    (if id
  +        (setf (elt (evaluations repl) id) evaluation)
  +        (setf (evaluations repl) (append (evaluations repl) (list evaluation))))
       ;; Reset history counter, as it doesn't make sense with new input.
  -    (setf (current-evaluation-history-element repl) nil)
       (reload-buffers (list (buffer repl)))))
   
  -(defmethod add-object-to-evaluation-history ((repl repl-mode) item)
  -  (push item (evaluation-history repl)))
  +(define-parenscript focus (selector)
  +  (ps:chain (nyxt/ps:qs document (ps:lisp selector)) (focus))
  +  (when (functionp (ps:chain (nyxt/ps:qs document (ps:lisp selector)) select))
  +    (ps:chain (nyxt/ps:qs document (ps:lisp selector)) (select))))
  +
  +(define-command previous-cell (&optional (repl (find-submode 'repl-mode)))
  +  "Move to the previous input cell."
  +  (let ((id (current-cell-id repl))
  +        (len (length (evaluations repl))))
  +    (cond
  +      ((zerop len)
  +       (focus ".input-buffer[data-repl-id=\"\"]"))
  +      ((or (null id) (zerop id))
  +       (focus ".input-buffer[data-repl-id=\"0\"]"))
  +      (t (focus (format nil ".input-buffer[data-repl-id=\"~a\"]" (1- id)))))))
  +
  +(define-command next-cell (&optional (repl (find-submode 'repl-mode)))
  +  "Move to the next input cell."
  +  (let ((id (current-cell-id repl))
  +        (len (length (evaluations repl))))
  +    (cond
  +      ((or (zerop len)
  +           (null id)
  +           (= id (1- len)))
  +       (focus ".input-buffer[data-repl-id=\"\"]"))
  +      (t (focus (format nil ".input-buffer[data-repl-id=\"~a\"]" (1+ id)))))))
   
   (define-command paren (&optional (repl (find-submode 'repl-mode)))
     ;; FIXME: Not an intuitive behavior? What does Emacs do?
  
positive.code:     (define-scheme "repl"
        scheme:cua
        (list
         "return" 'return-input
         "(" 'paren
         ")" 'closing-paren
         "tab" 'tab-complete-symbol
         "up" 'evaluation-history-previous
         "down" 'evaluation-history-next)
        scheme:emacs
        (list
         "C-f" 'nyxt/input-edit-mode:cursor-forwards
  
negative.code: (nyxt:define-package :nyxt/repl-mode
      (:documentation "Mode for programming in Common Lisp."))
  (in-package :nyxt/repl-mode)
  
  (define-class evaluation ()
    ((input
      nil
      :type (maybe string)
      :documentation "User input.")
     (eval-package
      *package*
      :type package
      :documentation "The package that the evaluation happens in.")
     (results
      nil
      :documentation "The results (as a list) of `input' evaluation.")
     (raised-condition
      nil
      :type (maybe condition)
      :documentation "The condition that was raised during the `input' execution."))
    (:export-class-name-p t)
    (:export-accessor-names-p t)
    (:accessor-name-transformer (class*:make-name-transformer name)))
  
  (define-mode repl-mode ()
    "Mode for interacting with the REPL."
  