Skip to content

Commit c30f90e

Browse files
dpsuttonbbatsov
authored andcommitted
Ensure comint-truncate-buffer call is from the repl buffer
1 parent 787400f commit c30f90e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

inf-clojure.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,11 @@ to continue it."
598598
(defun inf-clojure-clear-repl-buffer ()
599599
"Clear the REPL buffer."
600600
(interactive)
601-
(let ((comint-buffer-maximum-size 0))
602-
(comint-truncate-buffer)))
601+
(with-current-buffer (if (derived-mode-p 'inf-clojure-mode)
602+
(current-buffer)
603+
inf-clojure-buffer)
604+
(let ((comint-buffer-maximum-size 0))
605+
(comint-truncate-buffer))))
603606

604607
(defun inf-clojure-switch-to-repl (eob-p)
605608
"Switch to the inferior Clojure process buffer.

0 commit comments

Comments
 (0)