From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: announcing thaiword.el?
Date: Sat, 26 Mar 2005 10:21:44 -0500 [thread overview]
Message-ID: <m1zmwqsaea.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200503260106.KAA20718@etlken.m17n.org> (Kenichi Handa's message of "Sat, 26 Mar 2005 10:06:17 +0900 (JST)")
>> As a compromise I suggest that M-f and M-b are mapped to
>> thai-forward-word and thai-backward-word, respectively, as soon as we
>> enter the Thai environment. This should be a two-liner or so for the
>> experienced Emacs Lisp hacker (which I'm not, unfortunately).
> We can do that by setup-function and exit-function of a
> language environment.
> setup-function value is a function to call to switch to this
> language environment.
> exit-function value is a function to call to leave this
> language environment.
> But, I'm not an expert of key-binding.
> Could someone tell me what is the right way to rebind all
> keys that are currently bound to forward-word to
> thai-forward-word, and bind them back to the orignal later?
Something like
(defvar thaiword-mode-map
(let ((map (make-sparse-keymap)))
(define-key [remap forward-word] 'thai-forward-word)
(define-key [remap backward-word] 'thai-backward-word)
map))
(define-minor-mode thaiword-mode
"Minor mode to make word-movement aware of thai words."
:global t)
Then add (lambda () (thaiword-mode 1)) to setup-function
and (lambda () (thaiword-mode -1)) to exit-function
Stefan
next prev parent reply other threads:[~2005-03-26 15:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-24 7:29 announcing thaiword.el? Werner LEMBERG
2005-03-24 19:41 ` Eli Zaretskii
2005-03-24 21:11 ` Werner LEMBERG
2005-03-30 7:16 ` Werner LEMBERG
2005-03-30 11:34 ` Kenichi Handa
2005-03-25 6:42 ` Richard Stallman
2005-03-25 7:18 ` Werner LEMBERG
2005-03-25 14:44 ` Stefan Monnier
2005-03-25 22:26 ` Werner LEMBERG
2005-03-26 1:06 ` Kenichi Handa
2005-03-26 15:21 ` Stefan Monnier [this message]
2005-03-29 8:10 ` Kenichi Handa
2005-03-27 3:53 ` Richard Stallman
2005-03-28 0:47 ` Kenichi Handa
2005-03-28 22:53 ` Richard Stallman
2005-03-29 7:25 ` Kim F. Storm
2005-03-29 11:35 ` Kenichi Handa
2005-03-29 5:44 ` Juri Linkov
2005-03-29 8:35 ` Miles Bader
2005-03-29 9:02 ` Kenichi Handa
2005-03-29 10:14 ` Miles Bader
2005-03-29 11:29 ` Kenichi Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1zmwqsaea.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).