Hi Amirouche,

Amirouche <[email protected]> skribis:

> I tried to fix the errors related to the mutation of immutables(patch
> attached).
> Ithink the correct solution is more complex than that.
>
> That said, it still fails to compile. make.log attached.

I think the right fix is to avoid mutation of pairs or to make fresh
pairs.  I’ve tried the latter, to no avail:

diff --git a/src/guile/skribilo/engine.scm b/src/guile/skribilo/engine.scm
index 25dfa86..b965e0f 100644
--- a/src/guile/skribilo/engine.scm
+++ b/src/guile/skribilo/engine.scm
@@ -1,7 +1,7 @@
 ;;; engine.scm	-- Skribilo engines.
 ;;; -*- coding: iso-8859-1 -*-
 ;;;
-;;; Copyright 2005, 2007, 2008, 2009, 2010  Ludovic Courtès <[email protected]>
+;;; Copyright 2005, 2007, 2008, 2009, 2010, 2017  Ludovic Courtès <[email protected]>
 ;;; Copyright 2003, 2004  Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
 ;;;
 ;;;
@@ -29,6 +29,7 @@
   :use-module (ice-9 optargs)
   :use-module (ice-9 format)
 
+  :use-module (srfi srfi-1)
   :autoload   (srfi srfi-34)  (raise guard)
   :use-module (srfi srfi-35)
   :autoload   (srfi srfi-39)  (make-parameter)
@@ -228,7 +229,7 @@
   (let ((e (make <engine> :ident ident :version version :format format
 			  :filter filter :delegate delegate
 			  :symbol-table symbol-table
-			  :custom custom :info info)))
+			  :custom (list-copy custom) :info info)))
     e))
 
 
@@ -352,9 +353,9 @@ otherwise the requested engine is returned."
 (define (engine-custom-set! e id val)
   (let* ((customs (slot-ref e 'customs))
 	 (c       (assq id customs)))
-    (if (pair? c)
-	(set-car! (cdr c) val)
-	(slot-set! e 'customs (cons (list id val) customs)))))
+    (slot-set! e 'customs
+               (cons (list id val)
+                     (alist-delete id customs eq?)))))
 
 (define (engine-custom-add! e id val)
    (let ((old (engine-custom e id)))
To be continued…

Ludo’.
_______________________________________________
Skribilo-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/skribilo-users

Reply via email to