mirror of
https://github.com/vale981/boon
synced 2025-03-04 17:11:40 -05:00
better handling of input methods
This commit is contained in:
parent
64f9c51e1b
commit
48c4ec9457
1 changed files with 3 additions and 4 deletions
|
@ -114,14 +114,13 @@ input-method is reset to nil.)")
|
||||||
|
|
||||||
(defun boon-set-state (state)
|
(defun boon-set-state (state)
|
||||||
"Set the boon state (as STATE) for this buffer."
|
"Set the boon state (as STATE) for this buffer."
|
||||||
(when boon-insert-state
|
(when boon-insert-state (setq-local boon-input-method current-input-method))
|
||||||
(setq-local boon-input-method current-input-method)
|
|
||||||
(set-input-method nil))
|
|
||||||
(setq boon-command-state nil)
|
(setq boon-command-state nil)
|
||||||
(setq boon-insert-state nil)
|
(setq boon-insert-state nil)
|
||||||
(setq boon-special-state nil)
|
(setq boon-special-state nil)
|
||||||
(set state t)
|
(set state t)
|
||||||
(cond (boon-command-state
|
(cond (boon-command-state
|
||||||
|
(setq current-input-method nil)
|
||||||
(when (and boon/insert-command boon/insert-command-history)
|
(when (and boon/insert-command boon/insert-command-history)
|
||||||
(push `(,@boon/insert-command
|
(push `(,@boon/insert-command
|
||||||
(quote ,@(list (nreverse boon/insert-command-history))))
|
(quote ,@(list (nreverse boon/insert-command-history))))
|
||||||
|
@ -131,7 +130,7 @@ input-method is reset to nil.)")
|
||||||
(setq cursor-type boon-command-cursor-type))
|
(setq cursor-type boon-command-cursor-type))
|
||||||
(boon-special-state)
|
(boon-special-state)
|
||||||
(boon-insert-state
|
(boon-insert-state
|
||||||
(set-input-method boon-input-method)
|
(setq current-input-method boon-input-method)
|
||||||
(deactivate-mark)
|
(deactivate-mark)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(when (not (bolp))
|
(when (not (bolp))
|
||||||
|
|
Loading…
Add table
Reference in a new issue