[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: announcing thaiword.el?
From: |
Stefan Monnier |
Subject: |
Re: announcing thaiword.el? |
Date: |
Sat, 26 Mar 2005 10:21:44 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
>> 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
- announcing thaiword.el?, Werner LEMBERG, 2005/03/24
- Re: announcing thaiword.el?, Richard Stallman, 2005/03/25
- Re: announcing thaiword.el?, Werner LEMBERG, 2005/03/25
- Re: announcing thaiword.el?, Richard Stallman, 2005/03/26
- Re: announcing thaiword.el?, Kenichi Handa, 2005/03/27
- Re: announcing thaiword.el?, Richard Stallman, 2005/03/28
- Re: announcing thaiword.el?, Kim F. Storm, 2005/03/29
- Re: announcing thaiword.el?, Kenichi Handa, 2005/03/29
- Re: announcing thaiword.el?, Juri Linkov, 2005/03/29
- Re: announcing thaiword.el?, Miles Bader, 2005/03/29
- Re: announcing thaiword.el?, Kenichi Handa, 2005/03/29
- Re: announcing thaiword.el?, Miles Bader, 2005/03/29