Initial Commit
[packages] / mule-packages / lookup / packages / oxford.el
1 ;;; oxford.el --- supplement package for "Oxford Dictionary/Thesaurus"
2 ;; Copyright (C) 1999 Lookup Development Team <lookup@ring.gr.jp>
3
4 ;; Author: Keisuke Nishida <kei@psn.net>
5 ;; Target: ndtp 1.0, ndeb 1.0
6 ;; Format: 1.1
7 ;; Version: 0.2
8
9 ;; This program is free software; you can redistribute it and/or
10 ;; modify it under the terms of the GNU General Public License
11 ;; as published by the Free Software Foundation; either version 2
12 ;; of the License, or (at your option) any later version.
13
14 ;; This program is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 ;; GNU General Public License for more details.
18
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with this program; if not, write to the Free Software Foundation,
21 ;; Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
23 ;;; Code:
24
25 (require 'lookup-package)
26
27 (defvar oxford-dictionary-arranges
28   '(oxford-arrange-structure
29     lookup-arrange-references
30     lookup-arrange-gaijis
31     lookup-arrange-default-headings
32     lookup-arrange-fill-lines))
33
34 (defvar oxford-dictionary-options
35   (list (cons ':title "Oxford Dictionary")
36         (cons ':stemmer 'stem-english)
37         (cons ':arranges oxford-dictionary-arranges)))
38
39 (defun oxford-arrange-structure (entry)
40   (while (re-search-forward "\\( \\([nv]\\|adj\\)\\.\\)\\|\\[[0-9]\\]" nil t)
41     (save-excursion
42       (goto-char (match-beginning 0))
43       (newline))))
44
45 ;;;
46 ;;; Package Options
47 ;;;
48
49 (setq lookup-package-agent-options
50       '((:title . "Oxford Dictionary/Thesaurus")
51         (:enable . ("OXFORD"))
52         (:coding . iso-8859-1)
53         (:stop-code . "0x1f090000")))
54
55 (setq lookup-package-dictionary-options-alist
56       (list (cons (cond ((eq lookup-package-agent 'ndtp) "OXFORD/OXFORD")
57                         ((eq lookup-package-agent 'ndeb) "OXFORD"))
58                   oxford-dictionary-options)))
59
60 ;;; oxford.el ends here