Skip to content

Commit

Permalink
it's necessary to require subr-x! also use mapc instead of mapcar
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuccianti committed Sep 25, 2020
1 parent de62756 commit 6843d5b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions monroe.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

(require 'comint)
(require 'cl-macs)
(require 'subr-x)

(defgroup monroe nil
"Interaction with the nREPL Server."
Expand Down Expand Up @@ -319,10 +320,11 @@ monroe-repl-buffer."
;;
;; This 'ignore-errors' is a hard hack here since 'accept-process-output' will call filter
;; which will be this function causing Emacs to hit max stack size limit.
(when (eq ?e (aref string (- (length string) 1)))
(unless (accept-process-output process 0.01)
(while (> (buffer-size) 1)
(mapcar #'monroe-dispatch (monroe-net-decode)))))))
(ignore-errors
(when (eq ?e (aref string (- (length string) 1)))
(unless (accept-process-output process 0.01)
(while (> (buffer-size) 1)
(mapc #'monroe-dispatch (monroe-net-decode))))))))

(defun monroe-new-session-handler (process)
"Returns callback that is called when new connection is established."
Expand Down

0 comments on commit 6843d5b

Please sign in to comment.