[Openmcl-devel] Smart quotes

Ron Garret ron at awun.net
Wed Jul 15 01:53:04 UTC 2009


Since CCL is unicode-enabled, I would like to hack Hemlock so that I  
can easily use directional quote characters like «this» and “this”.  I  
have a customized DefaultKeyBinding.dict that binds these characters  
to the (shift-)option-[ and (shift-)option-] key-events, which I know  
work because I used them to compose the previous sentence.  But if I  
do this:

(bind-key "self insert" #k"meta-[")

then option-[ gives me a square bracket, not a left-quote.  Looking  
through the code I don't see any straightforward way to bind a key to  
insert a character other than itself stripped of all modifiers.  I  
suppose I could do what I want by defining a custom command for each  
character, but that just seems horribly ugly.  Is there a better way  
to do this?  There would seem to be a lot of applications for this  
sort of thing in a unicode world, like maybe binding option-l to  
insert a greek lambda.

Thanks,
rg




More information about the Openmcl-devel mailing list