/[emacs]/emacs/lisp/international/kkc.el
ViewVC logotype

Diff of /emacs/lisp/international/kkc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27.8.1 by miles, Fri Apr 4 06:20:22 2003 UTC revision 1.27.8.2 by miles, Tue Oct 14 23:39:23 2003 UTC
# Line 549  and change the current conversion to the Line 549  and change the current conversion to the
549            ;; The currently selected conversion is after the list shown            ;; The currently selected conversion is after the list shown
550            ;; previously.  We start calculation of message width from            ;; previously.  We start calculation of message width from
551            ;; the conversion next of TO.            ;; the conversion next of TO.
552            (setq this-idx next-idx msg nil)            (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)) ?\ )))))  
553      (if (not msg)      (if (not msg)
554          (let ((len (length kkc-current-conversions))          (let ((len (length kkc-current-conversions))
555                (max-width (window-width (minibuffer-window)))                (max-width (window-width (minibuffer-window)))
# Line 587  and change the current conversion to the Line 581  and change the current conversion to the
581            (setq l (nthcdr this-idx kkc-current-conversions))            (setq l (nthcdr this-idx kkc-current-conversions))
582            (setq msg (format " %c %s"            (setq msg (format " %c %s"
583                              (aref kkc-show-conversion-list-index-chars 0)                              (aref kkc-show-conversion-list-index-chars 0)
584                              (car l))                              (propertize (car l)
585                                            'kkc-conversion-index this-idx))
586                  idx (1+ this-idx)                  idx (1+ this-idx)
587                  l (cdr l))                  l (cdr l))
588            (while (< idx next-idx)            (while (< idx next-idx)
# Line 595  and change the current conversion to the Line 590  and change the current conversion to the
590                                msg                                msg
591                                (aref kkc-show-conversion-list-index-chars                                (aref kkc-show-conversion-list-index-chars
592                                      (- idx this-idx))                                      (- idx this-idx))
593                                (car l)))                                (propertize (car l)
594              (setq idx (1+ idx)                                            'kkc-conversion-index idx))
595                      idx (1+ idx)
596                    l (cdr l)))                    l (cdr l)))
597            (aset first-slot 2 msg)))            (aset first-slot 2 msg)))
598    
599        ;; Highlight the current conversion.
600      (if (> current-idx 0)      (if (> current-idx 0)
601          (progn          (let ((pos 3)
602            ;; Highlight the current conversion by brackets.                (limit (length msg)))
603            (string-match (format " \\(%c\\) "            (remove-text-properties 0 (length msg) '(face nil) msg)
604                                  (aref kkc-show-conversion-list-index-chars            (while (not (eq (get-text-property pos 'kkc-conversion-index msg)
605                                        (- current-idx this-idx)))                            current-idx))
606                          msg)              (setq pos (next-single-property-change pos 'kkc-conversion-index
607            (aset msg (match-beginning 0) ?<)                                                     msg limit)))
608            (aset msg (1- (match-end 0)) ?>)))            (put-text-property pos (next-single-property-change
609      (message "%s" msg)))                                    pos 'kkc-conversion-index msg limit)
610                                 'face 'highlight msg)))
611        (let ((message-log-max nil))
612          (message "%s" msg))))
613    
614  ;; Update the conversion area with the latest conversion selected.  ;; Update the conversion area with the latest conversion selected.
615  ;; ALL if non nil means to update the whole area, else update only  ;; ALL if non nil means to update the whole area, else update only
# Line 655  and change the current conversion to the Line 656  and change the current conversion to the
656  ;;  ;;
657  (provide 'kkc)  (provide 'kkc)
658    
659    ;;; arch-tag: 3cbfd56e-74e6-4f60-bb46-ba7c2d366fbf
660  ;;; kkc.el ends here  ;;; kkc.el ends here

Legend:
Removed from v.1.27.8.1  
changed lines
  Added in v.1.27.8.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26