[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: quail minibuffer highlight bug
From: |
Kenichi Handa |
Subject: |
Re: quail minibuffer highlight bug |
Date: |
Sat, 19 Jul 2003 10:31:28 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, "James H. Cloos Jr." <address@hidden> writes:
> Try C-u C-\ japanese
> then type go
> then hit the space bar until the options are shown in the minibuffer.
> At one point, the 3rd choice is '5'. IF you continue hitting the
> spacebar, when you hit the 5th choice, the first 5 in the line is
> highlighted, rather than the 5 that indicates the 5th choice. Cut-
> n-pasted from *Messages* it looks like:
Thank you for the report. I've just installed the attached
fix in HEAD. It also changes the way of higlighting; use
`highlight' face instead of surrounding an index number by
'<' and '>'.
---
Ken'ichi HANDA
address@hidden
2003-07-19 Kenichi Handa <address@hidden>
* international/kkc.el (kkc-show-conversion-list-update):
Highlight the correct candidate in the message.
Index: kkc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/kkc.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -c -r1.28 -r1.29
cvs server: conflicting specifications of output style
*** kkc.el 4 Feb 2003 13:09:38 -0000 1.28
--- kkc.el 19 Jul 2003 01:23:50 -0000 1.29
***************
*** 549,561 ****
;; The currently selected conversion is after the list shown
;; previously. We start calculation of message width from
;; the conversion next of TO.
! (setq this-idx next-idx msg nil)
! ;; The current conversion is in MSG. Just clear brackets
! ;; around index number.
! (if (string-match "<.>" msg)
! (progn
! (aset msg (match-beginning 0) ?\ )
! (aset msg (1- (match-end 0)) ?\ )))))
(if (not msg)
(let ((len (length kkc-current-conversions))
(max-width (window-width (minibuffer-window)))
--- 549,555 ----
;; The currently selected conversion is after the list shown
;; previously. We start calculation of message width from
;; the conversion next of TO.
! (setq this-idx next-idx msg nil)))
(if (not msg)
(let ((len (length kkc-current-conversions))
(max-width (window-width (minibuffer-window)))
***************
*** 587,593 ****
(setq l (nthcdr this-idx kkc-current-conversions))
(setq msg (format " %c %s"
(aref kkc-show-conversion-list-index-chars 0)
! (car l))
idx (1+ this-idx)
l (cdr l))
(while (< idx next-idx)
--- 581,588 ----
(setq l (nthcdr this-idx kkc-current-conversions))
(setq msg (format " %c %s"
(aref kkc-show-conversion-list-index-chars 0)
! (propertize (car l)
! 'kkc-conversion-index this-idx))
idx (1+ this-idx)
l (cdr l))
(while (< idx next-idx)
***************
*** 595,614 ****
msg
(aref kkc-show-conversion-list-index-chars
(- idx this-idx))
! (car l)))
! (setq idx (1+ idx)
l (cdr l)))
(aset first-slot 2 msg)))
(if (> current-idx 0)
! (progn
! ;; Highlight the current conversion by brackets.
! (string-match (format " \\(%c\\) "
! (aref kkc-show-conversion-list-index-chars
! (- current-idx this-idx)))
! msg)
! (aset msg (match-beginning 0) ?<)
! (aset msg (1- (match-end 0)) ?>)))
! (message "%s" msg)))
;; Update the conversion area with the latest conversion selected.
;; ALL if non nil means to update the whole area, else update only
--- 590,615 ----
msg
(aref kkc-show-conversion-list-index-chars
(- idx this-idx))
! (propertize (car l)
! 'kkc-conversion-index idx))
! idx (1+ idx)
l (cdr l)))
(aset first-slot 2 msg)))
+
+ ;; Highlight the current conversion.
(if (> current-idx 0)
! (let ((pos 3)
! (limit (length msg)))
! (remove-text-properties 0 (length msg) '(face nil) msg)
! (while (not (eq (get-text-property pos 'kkc-conversion-index msg)
! current-idx))
! (setq pos (next-single-property-change pos 'kkc-conversion-index
! msg limit)))
! (put-text-property pos (next-single-property-change
! pos 'kkc-conversion-index msg limit)
! 'face 'highlight msg)))
! (let ((message-log-max nil))
! (message "%s" msg))))
;; Update the conversion area with the latest conversion selected.
;; ALL if non nil means to update the whole area, else update only