aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKenichi Handa1997-07-07 00:53:02 +0000
committerKenichi Handa1997-07-07 00:53:02 +0000
commit93303c998df0354042a47f896b7f87def309b584 (patch)
treee1dcee70283d814ce74ded6a52b223ca130e6690 /lisp
parent22bdf5d145134b0d31bcc46cc815204f1804404b (diff)
downloademacs-93303c998df0354042a47f896b7f87def309b584.tar.gz
emacs-93303c998df0354042a47f896b7f87def309b584.zip
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/international/kkc.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el
index 959666498e3..5c329c6380e 100644
--- a/lisp/international/kkc.el
+++ b/lisp/international/kkc.el
@@ -167,7 +167,7 @@ Commands:
167;; LEN. If no conversion is found in the dictionary, don't change 167;; LEN. If no conversion is found in the dictionary, don't change
168;; kkc-current-conversions and return nil. 168;; kkc-current-conversions and return nil.
169;; Postfixes are handled only if POSTFIX is non-nil. 169;; Postfixes are handled only if POSTFIX is non-nil.
170(defun kkc-lookup-key (len &optional postfix) 170(defun kkc-lookup-key (len &optional postfix prefer-noun)
171 ;; At first, prepare cache data if any. 171 ;; At first, prepare cache data if any.
172 (if (not kkc-init-file-flag) 172 (if (not kkc-init-file-flag)
173 (progn 173 (progn
@@ -183,7 +183,7 @@ Commands:
183 (setq kkc-length-converted len 183 (setq kkc-length-converted len
184 kkc-current-conversions-width nil 184 kkc-current-conversions-width nil
185 kkc-current-conversions (car entry)) 185 kkc-current-conversions (car entry))
186 (setq entry (skkdic-lookup-key kkc-current-key len postfix)) 186 (setq entry (skkdic-lookup-key kkc-current-key len postfix prefer-noun))
187 (if entry 187 (if entry
188 (progn 188 (progn
189 (setq kkc-length-converted len 189 (setq kkc-length-converted len
@@ -222,7 +222,7 @@ put in KKC major mode to select a desirable conversion."
222 222
223 ;; After updating the conversion region with the first candidate of 223 ;; After updating the conversion region with the first candidate of
224 ;; conversion, jump into a recursive editing environment with KKC 224 ;; conversion, jump into a recursive editing environment with KKC
225 ;; mode . 225 ;; mode.
226 (let ((overriding-local-map nil) 226 (let ((overriding-local-map nil)
227 (previous-local-map (current-local-map)) 227 (previous-local-map (current-local-map))
228 (minor-mode-alist nil) 228 (minor-mode-alist nil)
@@ -230,12 +230,14 @@ put in KKC major mode to select a desirable conversion."
230 (current-input-method-title kkc-input-method-title) 230 (current-input-method-title kkc-input-method-title)
231 major-mode mode-name) 231 major-mode mode-name)
232 (unwind-protect 232 (unwind-protect
233 (progn 233 (let (len)
234 (setq kkc-canceled nil) 234 (setq kkc-canceled nil)
235 (setq kkc-current-key (string-to-vector kkc-original-kana)) 235 (setq kkc-current-key (string-to-vector kkc-original-kana))
236 (setq kkc-length-head (length kkc-current-key)) 236 (setq kkc-length-head (length kkc-current-key))
237 (setq len kkc-length-head)
237 (setq kkc-length-converted 0) 238 (setq kkc-length-converted 0)
238 (while (not (kkc-lookup-key kkc-length-head)) 239 (while (not (kkc-lookup-key kkc-length-head nil
240 (< kkc-length-head len)))
239 (setq kkc-length-head (1- kkc-length-head))) 241 (setq kkc-length-head (1- kkc-length-head)))
240 (goto-char to) 242 (goto-char to)
241 (kkc-update-conversion 'all) 243 (kkc-update-conversion 'all)
@@ -400,6 +402,7 @@ After that, handle the event which invoked this command."
400 (kkc-terminate) 402 (kkc-terminate)
401 (let ((newkey (make-vector kkc-length-head 0)) 403 (let ((newkey (make-vector kkc-length-head 0))
402 (idx (- (length kkc-current-key) kkc-length-head)) 404 (idx (- (length kkc-current-key) kkc-length-head))
405 (len kkc-length-head)
403 (i 0)) 406 (i 0))
404 ;; For the moment, (setq kkc-original-kana (concat newkey)) 407 ;; For the moment, (setq kkc-original-kana (concat newkey))
405 ;; doesn't work. 408 ;; doesn't work.
@@ -411,7 +414,8 @@ After that, handle the event which invoked this command."
411 (setq i (1+ i))) 414 (setq i (1+ i)))
412 (setq kkc-current-key newkey) 415 (setq kkc-current-key newkey)
413 (setq kkc-length-converted 0) 416 (setq kkc-length-converted 0)
414 (while (and (not (kkc-lookup-key kkc-length-head)) 417 (while (and (not (kkc-lookup-key kkc-length-head nil
418 (< kkc-length-head len)))
415 (> kkc-length-head 1)) 419 (> kkc-length-head 1))
416 (setq kkc-length-head (1- kkc-length-head))) 420 (setq kkc-length-head (1- kkc-length-head)))
417 (let ((pos (point)) 421 (let ((pos (point))