Mercurial > emacs
changeset 18644:69c91eee7ba1
(kkc-region): Call skkdic-lookup-key with
t for arg PREFER-NOUN while looking up key sequences shorter than
what a user requested.
(kkc-next-phrace): Likewise.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 07 Jul 1997 00:53:02 +0000 |
parents | c9b94c6ab8f1 |
children | d290e793b965 |
files | lisp/international/kkc.el |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/kkc.el Mon Jul 07 00:53:02 1997 +0000 +++ b/lisp/international/kkc.el Mon Jul 07 00:53:02 1997 +0000 @@ -167,7 +167,7 @@ ;; LEN. If no conversion is found in the dictionary, don't change ;; kkc-current-conversions and return nil. ;; Postfixes are handled only if POSTFIX is non-nil. -(defun kkc-lookup-key (len &optional postfix) +(defun kkc-lookup-key (len &optional postfix prefer-noun) ;; At first, prepare cache data if any. (if (not kkc-init-file-flag) (progn @@ -183,7 +183,7 @@ (setq kkc-length-converted len kkc-current-conversions-width nil kkc-current-conversions (car entry)) - (setq entry (skkdic-lookup-key kkc-current-key len postfix)) + (setq entry (skkdic-lookup-key kkc-current-key len postfix prefer-noun)) (if entry (progn (setq kkc-length-converted len @@ -222,7 +222,7 @@ ;; After updating the conversion region with the first candidate of ;; conversion, jump into a recursive editing environment with KKC - ;; mode . + ;; mode. (let ((overriding-local-map nil) (previous-local-map (current-local-map)) (minor-mode-alist nil) @@ -230,12 +230,14 @@ (current-input-method-title kkc-input-method-title) major-mode mode-name) (unwind-protect - (progn + (let (len) (setq kkc-canceled nil) (setq kkc-current-key (string-to-vector kkc-original-kana)) (setq kkc-length-head (length kkc-current-key)) + (setq len kkc-length-head) (setq kkc-length-converted 0) - (while (not (kkc-lookup-key kkc-length-head)) + (while (not (kkc-lookup-key kkc-length-head nil + (< kkc-length-head len))) (setq kkc-length-head (1- kkc-length-head))) (goto-char to) (kkc-update-conversion 'all) @@ -400,6 +402,7 @@ (kkc-terminate) (let ((newkey (make-vector kkc-length-head 0)) (idx (- (length kkc-current-key) kkc-length-head)) + (len kkc-length-head) (i 0)) ;; For the moment, (setq kkc-original-kana (concat newkey)) ;; doesn't work. @@ -411,7 +414,8 @@ (setq i (1+ i))) (setq kkc-current-key newkey) (setq kkc-length-converted 0) - (while (and (not (kkc-lookup-key kkc-length-head)) + (while (and (not (kkc-lookup-key kkc-length-head nil + (< kkc-length-head len))) (> kkc-length-head 1)) (setq kkc-length-head (1- kkc-length-head))) (let ((pos (point))