Can i use variables for the keys of the KEY-CLAUSES?

Example:

This is a case with two keys 1 and 2 which works very well:

,----
| (case (tree-node->type node)
|   (1
|    (nth 2 (tree-node->data node)))
|   (2
|    (ignore-errors (semantic-tag-class (tree-node->data node))))
|   (otherwise nil))
`----


My question: I would prefer to define some constants, so e.g.

,----
| (defconst my-bucket-node-type 1)
| (defconst my-tag-node-type 2)
`----

And then i want to use these two constants as keys in this case
instead of this hard-coded numbers 1 and 2, so for example something
like:

,----
| (case (tree-node->type node)
|   (my-bucket-node-type
|    (nth 2 (tree-node->data node)))
|   (my-tag-node-type
|    (ignore-errors (semantic-tag-class (tree-node->data node))))
|   (otherwise nil))
`----

whereas my-bucket-node-type and my-tag-node-type should be evaluated to
the const values...

Of course the notation above can not work but my question is: What is right
notation?

Thanks a lot in advance!
Klaus

-- 
Klaus Berndl                    mailto: [EMAIL PROTECTED]
sd&m AG                         http://www.sdm.de
software design & management    
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to