Re: [spr30706] character name question
"Charles A. Cox" <[email protected]> Tue, 4 Oct 2005 17:27:35 -0700
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <[email protected]> |
> In MCL, they have additional character names: #\UpArrow, #\DownArrow, > #\ForwardArrow, #\BackArrow, etc. Is there an easy way to add > additional character names in Allegro CL? As you may know, characters in Allegro CL are represented internally using Unicode, and the names are from Unicode. There are already some "arrow" characters, e.g., #\up_arrowhead, but they correspond to Unicode Graphemes which is likely not what your MCL code was expecting. It seems likely that these characters represent keyboard events that may not be directly portable from MCL. In other words, you may be better off just commenting them out of the code you're porting. If, however, you know the character codes for these characters, one hack that you can try is to add them to Allegro's internal name-to-char-table: [Adding #\UpArrow as an alias to arbitrarily picked #\x] cl-user(46): (setf (gethash "uparrow" excl::*name-to-char-table*) #\x) #\x cl-user(47): #\UpArrow #\x Please note that this uses internal undocumented functionality, is officially unsupported, and may change in a future release. Charley --- Charles A. Cox, Franz Inc. 555 12th Street, Suite 1450 Internet: [email protected] Oakland, CA 94607 WWW: http://www.franz.com/ Phone: (510) 452-2000; FAX: (510) 452-0182