;; 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
(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
;; 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)
(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)
(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.
(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))