>> 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
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel