[Plexippus-xpath-devel] Bug in xpath, when use with *print-case* set to :downcase.
Michał Psota
michal at lisp.pl
Wed Jun 4 10:07:56 UTC 2014
Hello,
I've noticed that xpath doesn't compile correctly when you use
print-case set to :downcase.
It is because of define-default-method macro in protocol.lisp.
Simplified testcase:
(setf *print-case* :upcase)
(find-symbol (format nil "~a~a" 'foo :-using-navigator) (find-package
'cl-user)) → t
(setf *print-case* :downcase)
(find-symbol (format nil "~a~a" 'foo :-using-navigator) (find-package
'cl-user))→ nil
After fix:
(setf *print-case* :upcase)
(find-symbol (format nil "~:@(~a~a~)" 'foo :-using-navigator)
(find-package 'cl-user)) → t
(setf *print-case* :downcase)
(find-symbol (format nil "~:@(~a~a~)" 'foo :-using-navigator)
(find-package 'cl-user)) → t
Patch attached.
Best regards,
Michał Psota
-------------- next part --------------
--- /tmp/plexippus-xpath-2008-12-07/protocol.lisp 2008-12-07 11:30:13.000000000 +0100
+++ /tmp/xpath/protocol.lisp 2014-05-28 09:35:37.024922887 +0200
@@ -38,7 +38,7 @@
(macrolet ((defprotocol (name &rest extra-args)
(let ((navi-name
(find-symbol
- (format nil "~A~A" name :-using-navigator)
+ (format nil "~:@(~A~A~)" name :-using-navigator)
(symbol-package name))))
`(progn
(defgeneric ,navi-name (navigator node , at extra-args))
@@ -72,7 +72,7 @@
(defmacro define-default-method (name (&rest args) &body body)
(let ((navi-name
(find-symbol
- (format nil "~A~A" name :-using-navigator)
+ (format nil "~:@(~A~A~)" name :-using-navigator)
(symbol-package name))))
`(defmethod ,navi-name ((navigator (eql :default-navigator)) , at args)
, at body)))
More information about the plexippus-xpath-devel
mailing list