Update mozc stuff

This commit is contained in:
2026-09-03 08:10:14 -07:00
parent 05061db8d0
commit 2e14fda568
2 changed files with 16 additions and 2 deletions
+3 -1
View File
@@ -47,7 +47,9 @@ CANDIDATES is the list of candidates."
pos (1+ pos) pos (1+ pos)
'display `(space :align-to (,(- width right-width)))))) 'display `(space :align-to (,(- width right-width))))))
(posframe-show (current-buffer) (posframe-show (current-buffer)
:position position)))) :position position
:border-width 1
:border-color (face-attribute 'default :foreground)))))
(add-to-list 'mozc-candidate-dispatch-table (add-to-list 'mozc-candidate-dispatch-table
'(posframe (clean-up . my/-mozc-cand-posframe-clean-up) '(posframe (clean-up . my/-mozc-cand-posframe-clean-up)
+13 -1
View File
@@ -693,8 +693,20 @@ directory. Otherwise, run `find-file' on that file."
(setq default-input-method "japanese-mozc") (setq default-input-method "japanese-mozc")
(with-eval-after-load 'mozc (with-eval-after-load 'mozc
(defvar mozc-candidate-style) (defvar mozc-candidate-style)
(defvar mozc-candidate-dispatch-table)
(require 'mozc-posframe) (require 'mozc-posframe)
(setq mozc-candidate-style 'posframe)) (setq mozc-candidate-style 'posframe)
(defun my/-mozc-candidate-dispatch-posframe-in-echo-area (method &rest args)
"Make `mozc-candidate-dispatch' use posframe from the echo area.
METHOD and ARGS are as to `mozc-candidate-dispatch'."
(let* ((method-table (cdr (assq mozc-candidate-style
mozc-candidate-dispatch-table)))
(func (cdr (assq method method-table))))
(if func
(apply func args)
(signal 'mozc-internal-error (list mozc-candidate-style method args)))))
(advice-add 'mozc-candidate-dispatch :override
#'my/-mozc-candidate-dispatch-posframe-in-echo-area))
(face-spec-set 'mozc-cand-overlay-focused-face (face-spec-set 'mozc-cand-overlay-focused-face
'((t :foreground unspecified :background unspecified '((t :foreground unspecified :background unspecified