Subject: Re: ANSI spec brain damaged wrt case in dispatch macro char
From: Erik Naggum <>
Date: 05 Dec 2000 01:31:36 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Richard Fateman <>
| If you want to look at the XDOC specification, I can direct you to a copy.

  Not really.

| This is true, and a nice solution for this particular application when
| I can gather up all the pieces for #\Z and #\z.  Thanks.

  You're welcome.

| However, it does not allow me to separately set the dispatch character
| separately for each character:  it forces me to do this in pairs.  If
| I wanted to agregate characters I could write a single dispatch
| function for all the characters of interest.

  I was looking into a solution to this.  I found it hard to access the
  shared code of the closure, which I would have been able to compare
  with the newly created closure, and it seemed very wrong to try to
  call a function I did not know was a function that was prepared to
  accept different types or numbers of arguments.  I could have relied
  on the arglist or the function-lambda-expression, but these are not
  reliable in a production system.  I could register the functions in a
  hash table of some sort and compare with the stored value and believe
  I could call the function to find out.  The latter _could_ work.  The
  function would then be able to return the upper- or lowercase function
  it would call with an additional argument it would be known to accept,
  such as a keyword argument, like :retrieve, and char being :upper or
  :lower or the actual character.

| And if I wanted to change the meaning of #\z without also knowing the
| meanings of #\Z it would be worrisome.  I could extract the old
| meaning via get-dispatch-macro-character and embed it in the new one,
| I suppose.

  You're welcome to extend the functionality to do that, but I found it
  too much work to finalize for a freebie.

  "When you are having a bad day and it seems like everybody is trying
   to piss you off, remember that it takes 42 muscles to produce a
   frown, but only 4 muscles to work the trigger of a good sniper rifle."
								-- Unknown