summaryrefslogtreecommitdiff
path: root/Lisp/name-conversion.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-01-26 10:51:29 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-01-26 10:51:29 +0100
commit771969e57e0cef63febbcd281ec2ed3e81685463 (patch)
treeb19eb1d22029dc418f26efa4a8c065ef3531fd02 /Lisp/name-conversion.lisp
parentf97fad55542df30ece4e076ed31043124a0c67f8 (diff)
Support case-sensitive selector designators.
darcs-hash:da29e9f38c99f5a9e558edd20afff7400fced2e4
Diffstat (limited to 'Lisp/name-conversion.lisp')
-rw-r--r--Lisp/name-conversion.lisp13
1 files changed, 9 insertions, 4 deletions
diff --git a/Lisp/name-conversion.lisp b/Lisp/name-conversion.lisp
index 767edaa..7a7f476 100644
--- a/Lisp/name-conversion.lisp
+++ b/Lisp/name-conversion.lisp
@@ -22,14 +22,19 @@
(defun message-component->string (symbol)
(let* ((components (split-sequence #\- (symbol-name symbol)
:remove-empty-subseqs t))
+ (downcasep (notany #'lower-case-p (symbol-name symbol)))
(acc-string
(reduce #'(lambda (x y) (concatenate 'string x y))
(mapcar #'(lambda (x)
- (concatenate 'string
- (string (char x 0))
- (string-downcase (subseq x 1))))
+ (if downcasep
+ (concatenate 'string
+ (string (char x 0))
+ (string-downcase (subseq x 1)))
+ x))
(subseq components 1))
- :initial-value (string-downcase (first components)))))
+ :initial-value (if downcasep
+ (string-downcase (first components))
+ (first components)))))
(if (eql (find-package '#:keyword)
(symbol-package symbol))
(concatenate 'string acc-string ":")