Subject: defrule regression compare to version 5.29.1
From: Robert Dodier
Date: Fri, 10 May 2013 04:39:53 +0000 (UTC)
On 2013-05-08, Valery Pipin <pip at iszf.irk.ru> wrote:
> The error is induced by interference with format package which I called
> in my program:
OK, it appears that share/contrib/format/format.lisp clobbers the FORMAT
property which is now used by src/nforma.lisp (since commit 4260be98).
I guess property name collisions are probable when there is widespread
use of properties and more are invented ....
Anyway I think the patch below solves the problem, until someone else
uses the same property name SHARE-FORMATTER. Can you try it?
best,
Robert Dodier
PS.
diff --git a/share/contrib/format/format.lisp
b/share/contrib/format/format.lisp
index 64b667c..792fe8e 100644
--- a/share/contrib/format/format.lisp
+++ b/share/contrib/format/format.lisp
@@ -68,7 +68,7 @@
(defun parse-template (template)
(let (op name formatter)
(flet ((getform (symbol)
- (and (setq formatter (or ($get symbol '$formatter)(get symbol 'formatter)))
+ (and (setq formatter (or ($get symbol '$formatter)(get symbol 'share-formatter)))
(setq name symbol))))
(cond (($numberp template) nil)
((atom template) (values (getform template) formatter nil nil))
@@ -90,10 +90,10 @@
(let* ((names (if (listp names) names (list names)))
(fmtr (if (atom parms) parms
(make-symbol (concatenate 'string (string (car names))
- (symbol-name '#:-formatter))))))
+ (symbol-name '#:-share-formatter))))))
`(progn
,(unless (atom parms) `(defun ,fmtr ,parms , at body))
- ,@(mapcar #'(lambda (name) `(setf (get ',name 'formatter) ',fmtr)) names))))
+ ,@(mapcar #'(lambda (name) `(setf (get ',name 'share-formatter) ',fmtr)) names))))
;;;;******************************************************************************************
;;; Subtemplate aids.