>>>> Stephen J. Turnbull wrote:
Katsumi Yamaoka writes:
> Maybe what is bad is that Egg and Canna replace
`self-insert-command'
> in `global-map', but it seems quite hard to improve those traditional
> tools. Instead, there are three possible solutions:
Thank you very much for your diagnosis and analysis.
I agree with your analysis, but I suggest the solution should
combine
1 and 2. Namely, `suppress-keymap' should suppress commmand symbols
with a property (eg, 'self-insert-command) set on them, and modes that
define a self-insert-command should set that property on their
self-insert commands.
Another possibility would be to modify `self-insert-command' to
call-if-nonnil a `self-insert-function', and modify Egg and Canna to
provide the `self-insert-function' rather than the
`self-insert-command'. Perhaps this is cleanest.
Some functions (e.g. `newline') use `self-insert-command', so it
is necessary to let `self-insert-command' behave like the original
one in such cases even if `self-insert-function' is set. I mean,
if `self-insert-function' is set to `egg-self-insert' for instance,
it will perform something for entering non-ASCII text if some flags
indicate that it should do so, instead of inserting only a newline.
Maybe the proper way to prevent it from doing so is to check whether
`self-insert-command' is called interactively or not.
Anyway, that's a good idea. I was successful in emulating the
`self-insert-function' way with Egg (the Lisp program to load is
attached below.)
Let me know what you think -- I suppose you may have thought of
these
ideas too, and they're not workable for some reason -- and then
we should also check with emacs-devel.
No, I never have thought such ideas. I only thought that it is not
worth improving it neatly since Egg and Canna are very old and there
aren't many users. In addition, there seems to be no program that
replaces `self-insert-command' with `FOO-self-insert-command' in
`global-map' nowadays (as long as I could survey). For instance,
Tamago (aka, Egg) v4 [1] that is a successor to v3 (the egg-its
XEmacs package) does not do so either.
This is an unusual problem and
ISTR that Egg and Canna integrated at the C level have been banned
from Emacs so maybe it's not a problem for GNU?
I think so. AFAIK, GNU Emacs has never supported Egg and Canna
officially.
FYI:
Tamago v4 provides Egg and Canna that should work with the recent
GNU Emacs. It consists of Lisp programs, requires no C level code.
Though I don't use it for years.
There is another solution named Emcws (Emacs-Canna-Wnn-Sj3)[2]
that needs to modify Emacs at the C level, but it will end when
Emacs integrates Unicode-2.
I use the Sj3 part of Egg v3 [3] for GNU Emacs. It consists of
only Lisp programs, and works with Unicode-2.
But Emacs is infinite
(^^;; somebody will find a reason to replace `self-insert-command'
again, so I'd like to know what RMS and Stefan think about this.
(Among others, but definitely the 'king' and 'crown prince' should be
consulted. :-)
I also don't like using defadvice in distributed packages.
I quite agree with you. But the benefit of the use of defadvice is
that it is easy to implement. Actually I used it in [2] and [3]. ;)
Regards,
[1]
http://cvs.m17n.org/viewcvs/tamago/tamago.tar.gz
[2]
http://www.jpl.org/ftp/pub/misc/emcws-22.1-20080115.gz
[3]
http://www.jpl.org/ftp/pub/elisp/sj3-egg-0.6.tar.gz
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches