diff options
author | JSDurand <mmemmew@gmail.com> | 2021-01-19 15:07:57 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-01-19 15:07:57 +0800 |
commit | 4d28d444af32ddf4af5900786473fadacc43e4b1 (patch) | |
tree | 1b39232dcbda85cbdad85d64c3e0cb536da267a6 /rime-conf.el | |
parent | 82d3a1fcc5c36a48b2a404536f89e1d80c48d999 (diff) |
QoL changes.
* bongo.el: Use header-line now.
Try to improve the tick.
* dired-conf.el: Require dired-x.
* elisp.el: Hide Eldoc on the mode line.
* text-conf.el (assq): Hide auto-fill-mode on the mode line.
* modeline.el (modeline-format-left): Display minor modes information.
(modeline-minor-modes-name-len-max): Max length of displayed minor modes.
(modeline-format-minor-modes): Display minor modes information.
(durand-mouse-minor-mode-menu): Make the default minor mode menu work
with my custom mode line.
* rime-conf.el ("emacs-rime"): Bind a key to set the input method to
rime in the minibuffer, so that I can use this input method to search
the buffer, for example.
Diffstat (limited to 'rime-conf.el')
-rw-r--r-- | rime-conf.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rime-conf.el b/rime-conf.el index 8bb25fd..d3afae3 100644 --- a/rime-conf.el +++ b/rime-conf.el @@ -12,7 +12,8 @@ (use-package "dash.el" 'dash) (use-package "emacs-rime" 'rime - (define-key global-map (vector ?\s-i) #'toggle-input-method) + (define-key global-map (vector ?\s-i) #'durand-set-input-method) + (define-key minibuffer-local-map (vector ?\s-i) #'durand-set-input-method) (setq rime-librime-root "~/elisp_packages/librime/dist") (add-to-list 'rime-translate-keybindings "RET") (add-to-list 'rime-translate-keybindings "[") @@ -21,6 +22,14 @@ ;; rime-show-candidate 'posframe rime-user-data-dir (expand-file-name "rime" load-file-directory)) +;;;###autoload + (defun durand-set-input-method () + "Set the input method to \"rime\" or nil." + (interactive) + (cond + ((string= current-input-method "rime") (set-input-method nil)) + ((set-input-method "rime")))) + ;;; HACK: Fix a function (defun durand-rime-send-keybinding-a () "Fix a weird function." |