@@ -102,18 +102,7 @@ focused. Otherwise the buffer is displayed and focused."
102
102
:type 'boolean
103
103
:group 'cider-repl )
104
104
105
- (defcustom cider-repl-scroll-on-output t
106
- " Controls whether the REPL buffer auto-scrolls on new output.
107
-
108
- When set to t (the default), if the REPL buffer contains more lines than the
109
- size of the window, the buffer is automatically re-centered upon completion
110
- of evaluating an expression, so that the bottom line of output is on the
111
- bottom line of the window.
112
-
113
- If this is set to nil, no re-centering takes place."
114
- :type 'boolean
115
- :group 'cider-repl
116
- :package-version '(cider . " 0.11.0" ))
105
+ (make-obsolete-variable 'cider-repl-scroll-on-output 'scroll-conservatively " 0.21" )
117
106
118
107
(defcustom cider-repl-use-pretty-printing t
119
108
" Control whether results in the REPL are pretty-printed or not.
@@ -512,15 +501,6 @@ If given a negative value of ARG, move to the beginning of defun."
512
501
This will not work on non-current prompts."
513
502
(= (point ) cider-repl-input-start-mark))
514
503
515
- (defun cider-repl--show-maximum-output ()
516
- " Put the end of the buffer at the bottom of the window."
517
- (when (and cider-repl-scroll-on-output (eobp ))
518
- (let ((win (get-buffer-window (current-buffer ) t )))
519
- (when win
520
- (with-selected-window win
521
- (set-window-point win (point-max ))
522
- (recenter -1 ))))))
523
-
524
504
(defmacro cider-save-marker (marker &rest body )
525
505
" Save MARKER and execute BODY."
526
506
(declare (debug t ))
@@ -681,8 +661,7 @@ If BOL is non-nil insert at the beginning of line. Run
681
661
(when (and (= (point ) cider-repl-prompt-start-mark)
682
662
(not (bolp )))
683
663
(insert-before-markers " \n " )
684
- (set-marker cider-repl-output-end (1- (point )))))))
685
- (cider-repl--show-maximum-output)))
664
+ (set-marker cider-repl-output-end (1- (point )))))))))
686
665
687
666
(defun cider-repl--emit-interactive-output (string face )
688
667
" Emit STRING as interactive output using FACE."
@@ -718,8 +697,7 @@ If BOL is non-nil, emit at the beginning of the line."
718
697
(save-excursion
719
698
(cider-save-marker cider-repl-output-start
720
699
(cider-save-marker cider-repl-output-end
721
- (cider-repl--insert-prompt cider-buffer-ns))))
722
- (cider-repl--show-maximum-output)))
700
+ (cider-repl--insert-prompt cider-buffer-ns))))))
723
701
724
702
(defun cider-repl-emit-result (buffer string show-prefix &optional bol )
725
703
" Emit into BUFFER the result STRING and mark it as an evaluation result.
@@ -738,8 +716,7 @@ of the line. If BOL is non-nil insert at the beginning of the line."
738
716
(insert-before-markers (cider-font-lock-as-clojure string))
739
717
(cider-propertize-region
740
718
'(font-lock-face cider-repl-result-face rear-nonsticky (font-lock-face))
741
- (insert-before-markers string))))))
742
- (cider-repl--show-maximum-output)))
719
+ (insert-before-markers string))))))))
743
720
744
721
(defun cider-repl-newline-and-indent ()
745
722
" Insert a newline, then indent the next line.
@@ -810,8 +787,7 @@ SHOW-PREFIX and BOL."
810
787
(when (boundp 'image-map )
811
788
`(keymap , image-map )))))
812
789
(insert-before-markers " " )
813
- (add-text-properties start (point ) props)))))
814
- (cider-repl--show-maximum-output))
790
+ (add-text-properties start (point ) props))))))
815
791
t )
816
792
817
793
(defcustom cider-repl-image-margin 10
@@ -919,8 +895,7 @@ If NEWLINE is true then add a newline at the end of the input."
919
895
(let ((end (point ))) ; end of input, without the newline
920
896
(cider-repl--add-to-input-history input)
921
897
(when newline
922
- (insert " \n " )
923
- (cider-repl--show-maximum-output))
898
+ (insert " \n " ))
924
899
(let ((inhibit-modification-hooks t ))
925
900
(add-text-properties cider-repl-input-start-mark
926
901
(point )
@@ -956,21 +931,13 @@ are not balanced."
956
931
(cider-repl--send-input))
957
932
((and (get-text-property (point ) 'cider-old-input )
958
933
(< (point ) cider-repl-input-start-mark))
959
- (cider-repl--grab-old-input end-of-input)
960
- (cider-repl--recenter-if-needed))
934
+ (cider-repl--grab-old-input end-of-input))
961
935
((cider-repl--input-complete-p cider-repl-input-start-mark (point-max ))
962
936
(cider-repl--send-input t ))
963
937
(t
964
938
(cider-repl-newline-and-indent)
965
939
(message " [input not complete] " ))))
966
940
967
- (defun cider-repl--recenter-if-needed ()
968
- " Make sure that the point is visible."
969
- (unless (pos-visible-in-window-p (point-max ))
970
- (save-excursion
971
- (goto-char (point-max ))
972
- (recenter -1 ))))
973
-
974
941
(defun cider-repl--grab-old-input (replace )
975
942
" Resend the old REPL input at point.
976
943
If REPLACE is non-nil the current input is replaced with the old
0 commit comments