branch: externals/sly
commit 5114fc2f27e2528361bf793cbbf7c3cce04067ed
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>

    Fix #346: Fix error when complex comint-preoutput-filter-functions
    
    * contrib/sly-mrepl.el (sly-mrepl--insert-output): Use
    run-hook-wrapped.
---
 contrib/sly-mrepl.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/contrib/sly-mrepl.el b/contrib/sly-mrepl.el
index 692b6b3..90c1397 100644
--- a/contrib/sly-mrepl.el
+++ b/contrib/sly-mrepl.el
@@ -386,9 +386,11 @@ In that case, moving a sexp backward does nothing."
                                'font-lock-face face))
              (setq sly-mrepl--pending-output nil)
              (unless nofilters
-               (mapc (lambda (fn)
-                       (setq string (funcall fn string)))
-                     sly-mrepl-output-filter-functions))
+               (run-hook-wrapped
+                'sly-mrepl-output-filter-functions
+                (lambda (fn)
+                  (setq string (funcall fn string))
+                  nil)))
              (insert-before-markers string)
              (cond ((and (not (zerop (current-column)))
                          (sly-mrepl--break-output-p (point)))

Reply via email to