Browse files

#2: symbol-case issues in dist.lisp.

This patch fixes two problems that stand in the way of working installations in
lower-case lisps (modern mode ACL and possibly lisps with :invert readtable 

1. Correct :Documentation to :documentation.
2. Use a symbol-case function that returns the upcased symbol when dist.lisp is 
   compiled in an :upcase readtable, and the original symbol otherwise.
  • Loading branch information...
1 parent 996fec5 commit a48ed2b35f5a05d80f14d778ec8c09eaf689d5c2 @antifuchs committed Oct 10, 2010
Showing with 8 additions and 3 deletions.
  1. +8 −3 dist.lisp
11 dist.lisp
@@ -39,7 +39,7 @@
NAME, sorted by preference."))
(defgeneric find-releases-named (name)
- (:Documentation
+ (:documentation
"Return a list of all releases in all enabled dists with the given
NAME, sorted by preference."))
@@ -265,14 +265,19 @@
(eql (char line 0) #\#))))
(ignorable line)))
+(defun symbol-case (string)
+ (if (upper-case-p (char (string '#:foo) 0))
+ (string-upcase string)
+ string))
(defun config-file-initargs (file)
(let ((initargs '()))
(for-each-line (line file)
(unless (ignorable-line line)
(destructure-line (initarg value)
- (let ((keyword (intern (string-upcase (string-right-trim '(#\:)
- initarg))
+ (let ((keyword (intern (symbol-case (string-right-trim '(#\:)
+ initarg))
(push value initargs)
(push keyword initargs)))))

0 comments on commit a48ed2b

Please sign in to comment.