[climacs-devel] Unicode support in Climacs
Robert Strandh
strandh at labri.fr
Thu Jan 12 02:28:22 UTC 2006
> > The fix involved removing parts of the gesture (for example
> > "(:dead--tilde :shift)") and replacing the (placeholder?) character
> > with the true Unicode character.=20
>
> I just found another way to do it. Apparently, once the special
> characters have been enabled in CLX, they can be added as keystrokes
> for Climacs' `com-self-insert'-command:
>
> (loop for code in '(230 198 248 216 229 197) do ;; ...
> (esa::set-key `(climacs-gui::com-self-insert ,clim::*numeric-argument-marker*)
> 'climacs-gui::self-insert-table
> (list (list (code-char code)))))
>
> gui.lisp contains a loop that loops across all ASCII characters and
> register them as keystrokes to `com-self-insert', but country-specific
> characters are left out.
>
> This approach is probably cleaner than mucking around in
> unicode-commands.lisp, at least until an official solution has been
> developed.
Right. Your second approach is valid when what comes from X is a
real Unicode character, for instance, if you already have a keyboard
that generates those characters. The first one is valid when you use
a keyboard with dead keys. The two approaches are complementary and
can be used simultaneously.
In fact, it would be better if Climacs would systematically test for
real Unicode characters as opposed to having them entered explicitly.
The problem is, I am not sure how to test that. Perhaps everything
above 127 with only a Shift modifier is such a real Unicode
character?
--
Robert Strandh
---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
More information about the climacs-devel
mailing list