Changeset 71 for lang/elisp/pdicv-mode/trunk/pdicv-search.el
- Timestamp:
- 01/30/09 23:52:02 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/elisp/pdicv-mode/trunk/pdicv-search.el
r67 r71 1 1 ;;; pdicv-search.el --- upper layer 2 2 ;; 3 ;; Copyright (C) 2005 Naoya TOZUKA. All Rights Reserved. 4 ;; 5 ;; Author: Naoya TOZUKA <pdicviewer@gmail.com> 6 ;; Maintainer: Naoya TOZUKA <pdicviewer@gmail.com> 7 ;; Primary distribution site: http://pdicviewer.naochan.com/el/ 3 ;; Copyright (C) 2005-2009 naoya_t. All Rights Reserved. 4 ;; 5 ;; Author: naoya_t <naoya.t@aqua.plala.or.jp> 6 ;; Maintainer: naoya_t <naoya.t@aqua.plala.or.jp> 7 ;; Primary distribution site: 8 ;; http://lambdarepos.svnrepository.com/svn/share/lang/elisp/pdicv-mode/trunk 8 9 ;; 9 10 ;; Created: 06 Feb 2005 10 11 ;; Last modified: 23 Dec 2005 11 ;; Version: 0.9. 112 ;; Version: 0.9.2 12 13 ;; Keywords: read-from-file 13 14 … … 73 74 "" 74 75 ; (pdicv-search dicname nil regexp-to-search t field-to-search) 75 (pdicv-search dicname regexp-to-search nil t field-to-search) 76 ) 76 (pdicv-search dicname regexp-to-search nil t field-to-search)) 77 77 78 78 (defun pdicv-search-just (dicname word-to-search &optional field-to-search) 79 79 "" 80 (pdicv-search dicname word-to-search t nil field-to-search) 81 ) 80 (pdicv-search dicname word-to-search t nil field-to-search)) 82 81 83 82 (defun pdicv-search (dicname word-to-search &optional just-p regexp-p field-to-search) … … 89 88 (catch 'pdicv-search 90 89 (let ((candidates 91 (if just-p (cons (downcase word-to-search) (nt:english-guess-original-form word-to-search)))) 90 (if just-p (cons (downcase word-to-search) (nt:english-guess-original-form word-to-search)) 91 (list word-to-search) 92 )) 92 93 (candidate word-to-search) 93 94 (first-round-p t) 94 95 (dicinfo (assoc dicname pdicv-dictionary-list))) 95 96 ;;(debug candidates);(nt:english-guess-original-form word-to-search)) 96 97 (if (null dicinfo) (throw 'pdicv-search 'dictionary-not-found)) 97 98 … … 106 107 (while dicname-list 107 108 (pdicv-search (car dicname-list) candidate just-p regexp-p field-to-search) 108 (setq dicname-list (cdr dicname-list)) 109 ) 110 ) 111 ;else... 109 (setq dicname-list (cdr dicname-list)))) 110 ;;else... 112 111 (let* ((encoding-list (nth 2 dicinfo)) 113 112 (word-encoding (if (listp encoding-list) (car encoding-list) encoding-list)) … … 154 153 );let* 155 154 ; (insert (format "%s" criteria)) 156 157 155 (pdicv-core-search dicinfo criteria simple-mode-p (not first-round-p)) ; clear only at the first time 158 156 );let* … … 163 161 );caught 164 162 ) 163 ;;debug 165 164 166 165 (defun pdicv-search-interactive ()