1 ;;; dui-registry.el --- Registry of dui dictionary methods
3 ;; Copyright (C) 1998 Free Software Foundation
5 ;; Author: Stephen J. Turnbull <stephen@xemacs.org>
6 ;; Keywords: mule, dictionary
9 ;; This file is part of XEmacs.
11 ;; XEmacs is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your
14 ;; option) any later version.
16 ;; XEmacs is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; if not, write to the Free Software Foundation,
23 ;; Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 ;; 1998-04-08 Stephen Turnbull <stephen@xemacs.org>
32 ;; (created): broken out from edict.el
42 "Invokes ispell on the word at point.
44 Heaven only knows what will happen if it's Japanese.")
46 (defun edict-search-english-wrapper ()
47 "Interface `edict-search-english' to `dui-invoke-method'."
48 (edict-search-english nil))
50 ;; Probably could do without the wrapper:
51 ; (dui-register-method
52 ; "EDICT search english"
54 ; 'edict-search-english
55 ; "Attempts to translate the english word we are looking at. Picks the word
56 ; in the same way as ispell, ie backs up from whitespace, and then expands.
58 ; Result is presented in a window that is not selected."
62 "EDICT search English"
64 'edict-search-english-wrapper
65 "Attempts to translate the english word we are looking at. Picks the word
66 in the same way as ispell, ie backs up from whitespace, and then expands.
68 Result is presented in a window that is not selected.")
70 (defun edict-search-kanji-wrapper ()
71 "Interface `edict-search-kanji' to `dui-invoke-method'."
76 (error "Please set the region around the Japanese phrase to look up."))
77 ((< m p) (edict-search-kanji nil m p))
78 (t (edict-search-kanji nil p m)))))
81 "EDICT search Japanese"
83 'edict-search-kanji-wrapper
84 "Attempts to translate the Japanese `word' between mark and point.
86 Verbs and adjectives will be deinflected, common auxiliaries and suffixes
87 removed, and all resulting candidates looked up.
89 Result is presented in a window that is not selected.")
92 (or (featurep 'dui-registry)
93 (setq dui-method-history
94 (cons "EDICT search Japanese" dui-method-history)))
96 (defun edict-add-kanji-wrapper ()
97 "Interface `edict-add-kanji' to `dui-invoke-method'."
102 (error "Please mark the Japanese word to add to your private dictionary."))
103 ((< m p) (edict-add-kanji m p))
104 (t (edict-add-kanji p m)))))
107 "EDICT add Japanese to private dictionary"
109 'edict-add-kanji-wrapper
110 "Adds the Japanese `word' between mark and point to the private dictionary.
112 The entry is formatted for EDICT, and edict-edit-mode is entered.")
115 "EDICT add English to private dictionary"
117 'edict-add-kanji-wrapper
118 "Adds the English word near point to the private dictionary.
120 The entry is formatted for EDICT, and edict-edit-mode is entered.")
124 (provide 'dui-registry)
126 ;;; dui-registry.el ends here