diff --git a/jupyter-base.el b/jupyter-base.el index 43e855b..a478446 100644 --- a/jupyter-base.el +++ b/jupyter-base.el @@ -175,7 +175,7 @@ returned." (declare (indent 3) (debug (symbolp symbolp form body))) `(let ((,beg (point-marker)) (,end (point-marker))) - (set-marker-insertion-type end t) + (set-marker-insertion-type ,end t) (unwind-protect (prog1 ,bodyform ,@afterforms) (set-marker ,beg nil) diff --git a/jupyter-mime.el b/jupyter-mime.el index 8a28605..280e98d 100644 --- a/jupyter-mime.el +++ b/jupyter-mime.el @@ -92,12 +92,14 @@ find the display in the REPL buffer. See "Handle control codes in any produced output generated by evaluating BODY. After BODY is evaluated, call `jupyter-handle-control-codes' on the region inserted by BODY." - `(jupyter-with-insertion-bounds - beg end (progn ,@body) - ;; Handle continuation from previous messages - (when (eq (char-before beg) ?\r) - (move-marker beg (1- beg))) - (jupyter-handle-control-codes beg end))) + (let ((beg (make-symbol "beg")) + (end (make-symbol "end"))) + `(jupyter-with-insertion-bounds + ,beg ,end (progn ,@body) + ;; Handle continuation from previous messages + (when (eq (char-before ,beg) ?\r) + (move-marker ,beg (1- ,beg))) + (jupyter-handle-control-codes ,beg ,end)))) ;;; Fontificiation routines