annotate lisp/packages/webster-ucb.el @ 80:1ce6082ce73f r20-0b90

Import from CVS: tag r20-0b90
author cvs
date Mon, 13 Aug 2007 09:06:37 +0200
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; -*- Mode:Emacs-Lisp -*-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;;; Synched up with: Not in FSF.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;; Yet Another Webster Protocol.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;;; This one is for talking to the kind of Webster server of which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;; pasteur.Berkeley.EDU port 1964 is an instance (the "edjames" protocol).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;;; The interface and much of the process-handling code in this file were
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;; lifted from the Webster client by Jason Glasgow that talks to the kind
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;;; of Webster server of which mintaka.lcs.mit.edu port 103 is an instance.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;; 13 nov 90 Jamie Zawinski <jwz@lucid.com> created
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;; 14 sep 91 Jamie Zawinski <jwz@lucid.com> hacked on some more
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;; 19 feb 91 Jamie Zawinski <jwz@lucid.com> added Lucid Emacs font support
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;; 15 apr 92 Jamie Zawinski <jwz@lucid.com> added mouse support
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;;; 29 aug 92 Jamie Zawinski <jwz@lucid.com> added 8-bit output
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;; 6 nov 92 Jamie Zawinski <jwz@lucid.com> hack hack
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;; 31 dec 92 Jamie Zawinski <jwz@lucid.com> made it guess the root word
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;; 17 mar 93 Jamie Zawinski <jwz@lucid.com> more hacking, more gnashing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;;; 31 jul 93 Jamie Zawinski <jwz@lucid.com> variable height fonts in 19.8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;; TODO:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;; vinculum has a "3 character overbar" code. Really need to figure out
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;; some way to hack overbars... Background pixmap? Need to know line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;; height in pixels to do that.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;; I don't event know what half of these special characters are supposed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;; to look like. Like the "s," in the Turkish root of "chouse"...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;; We could fake some of these chars (like upside-down-e) by including bitmaps
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;; in this file, and using extent-begin-glpyhs. Except that right now glyphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;; have to come from files, not from '(w h "string") form, so that'll have to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;; be fixed first. We could also just create an X font...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;; note that googol says "10100" instead of "10(\bI100)\bI
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (defvar webster-host "westerhost" "*The host with the webster server")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (defvar webster-port "webster" "*The port on which the webster server listens")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (defvar webster-running nil "Used to determine when connection is established")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (defvar webster-state "closed" "for the modeline")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (defvar webster-process nil "The current webster process")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (defvar webster-process-name "webster" "The current webster process")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (defvar webster-buffer nil "The current webster process")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (defvar webster-start-mark nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (defvar webster-fontify (string-match "XEmacs" emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 "*Set to t to use the XEmacs/Lucid Emacs font-change mechanism.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (defvar webster-iso8859/1 (string-match "XEmacs" emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 "*Set to t to print certain special characters using ISO-8859/1 codes.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (defconst webster-completion-table (make-vector 511 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (cond ((fboundp 'make-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (or (find-face 'webster)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (face-differs-from-default-p (make-face 'webster))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 (copy-face 'default 'webster))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 (or (find-face 'webster-bold)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (face-differs-from-default-p (make-face 'webster-bold))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (copy-face 'webster 'webster-bold)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 (make-face-bold 'webster-bold)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (or (find-face 'webster-italic)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (face-differs-from-default-p (make-face 'webster-italic))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (copy-face 'webster 'webster-italic)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (make-face-italic 'webster-italic)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (or (find-face 'webster-bold-italic)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (face-differs-from-default-p (make-face 'webster-bold-italic))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 (copy-face 'webster 'webster-bold-italic)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (make-face-bold-italic 'webster-bold-italic)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (or (find-face 'webster-underline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (face-differs-from-default-p (make-face 'webster-underline))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (copy-face 'webster 'webster-underline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (set-face-underline-p 'webster-underline t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (or (find-face 'webster-small)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (face-differs-from-default-p (make-face 'webster-small))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 (copy-face 'webster-bold 'webster-small)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (and (fboundp 'make-face-smaller) ; XEmacs 19.8+
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (make-face-smaller 'webster-small))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (or (find-face 'webster-subscript)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (face-differs-from-default-p (make-face 'webster-subscript))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 (copy-face 'webster-italic 'webster-subscript)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (if (fboundp 'make-face-smaller) ; XEmacs 19.8+
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 (and (make-face-smaller 'webster-subscript)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (make-face-smaller 'webster-subscript))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (set-face-underline-p 'webster-subscript t))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (or (find-face 'webster-superscript)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (face-differs-from-default-p (make-face 'webster-superscript))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 ;; #### need some way to raise baseline...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (copy-face 'webster-subscript 'webster-superscript))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (defun webster-fontify (start end face &optional highlight)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (let ((os start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (count 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 e)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 ;; this mess is so we don't fontify the spaces between the words, so that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 ;; when the lines are wrapped, the stuff at the beginning of the line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 ;; doesn't go in the font of the split word. Kludge kludge.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (while (prog1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (/= (point) end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 (skip-chars-forward " \t")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (setq start (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 (re-search-forward "[ \t]" (1+ end) 'go)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (forward-char -1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (setq e (make-extent start (point) (current-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 (set-extent-face e face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (setq count (1+ count))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (if highlight
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (set-extent-property
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 ;; use the same extent if we didn't have to split it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (if (= count 1) e (make-extent os end (current-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 'highlight t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (defconst webster-umlauts
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 '((?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326) (?U . ?\334)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 (?a . ?\344) (?e . ?\353) (?i . ?\357) (?o . ?\366) (?u . ?\374)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (?y . ?\377)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (defconst webster-graves
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 '((?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (defconst webster-acutes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 '((?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (?Y . ?\335) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (?u . ?\372) (?y . ?\375)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 ;;; Initial filter for ignoring information until successfully connected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (defun webster-initial-filter (proc string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (let ((this-buffer (current-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 ;; don't use save-excursion so that point moves in webster-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (set-buffer webster-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 (setq webster-state "closed")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (cond ((not (eq (process-status webster-process) 'run))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (setq webster-running t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 (message "Webster died"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 ((string-match "No such host" string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 (setq webster-running t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 (kill-buffer (process-buffer proc))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (error "No such host."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 ((string-match "]" string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (setq webster-running t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (setq webster-state "opening")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 (set-process-filter proc 'webster-filter)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (set-buffer this-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (defun webster-filter (proc string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (let ((this-buffer (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (endp nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (set-buffer webster-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (cond ((not (eq (process-status webster-process) 'run))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (setq webster-state (format "%s" (process-status webster-process)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (set-marker webster-start-mark (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (message "Webster died"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 ((string-match "Connection closed" string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (message "Closing webster connection...")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (kill-process proc)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (setq webster-state "closed")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (replace-regexp "Process webster killed" "" nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (set-marker webster-start-mark (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (message "Closing webster connection...Done."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 ((let ((end-def-message (string-match "\n\\.\r?\n" string)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (if end-def-message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (webster-filter
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 proc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (concat (substring string 0 (- end-def-message 1)) "\n\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 (setq endp t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 (setq webster-state "ready")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 t))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (setq webster-state "working")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (if (string-match "^[45][0-9][0-9]" string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 (setq webster-state "ready"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 endp t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 (let ((now (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (insert string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (goto-char now)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (while (search-forward "\r" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 (delete-char -1))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 (if (process-mark proc)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (set-marker (process-mark proc) (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (narrow-to-region (point-min) webster-start-mark)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (if endp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 ;; if the *webster* window is visible, move the last line to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 ;; bottom of that window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 (let ((webster-window (get-buffer-window webster-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 (window (selected-window))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 error p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 (set-buffer webster-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 (narrow-to-region webster-start-mark (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 (let ((buffer-undo-list t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 (if (looking-at "WORD \"\\([^\"\n]*\\)\"\\(\n403 [^\n]+\\)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (downcase-word 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 (setq error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 (buffer-substring (match-beginning 1) (match-end 1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 (goto-char (match-beginning 2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 (delete-region (match-beginning 2) (match-end 2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 (insert " not found")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (setq error (webster-guess-root error))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 (if error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 (insert "; trying \"" error "\"...")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (insert "."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 (webster-convert)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 (setq p (marker-position webster-start-mark))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (or (bobp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 (save-excursion (forward-line -1) (looking-at "-"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 (insert "\n--------------------\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 (set-marker webster-start-mark (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 (goto-char p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 (if webster-window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 (select-window webster-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 (goto-char p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 (recenter 3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 (select-window window)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 (if error (webster error))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 (defun webster-guess-root (word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 (let ((case-fold-search t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 (cond ((null word) nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 ((string-match "[ \t\n]" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 ((string-match "[^aeiou]ing\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 (concat (substring word 0 (+ 1 (match-beginning 0))) "e"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 ((string-match "[a-z]ing\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 (substring word 0 (+ 1 (match-beginning 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 ((string-match "ies\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 (concat (substring word 0 (match-beginning 0)) "y"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 ((string-match "ied\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 (concat (substring word 0 (match-beginning 0)) "y"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 ((and (string-match "[^aeiouy][^aeiouy]ed\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 (= (aref word (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 (aref word (1+ (match-beginning 0)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 (substring word 0 (+ 1 (match-beginning 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 ((string-match "[a-z]ed\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 (substring word 0 (+ 2 (match-beginning 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 ((string-match "[aeiouy]lly\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 (substring word 0 (+ 2 (match-beginning 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 ((string-match "[^l]ly\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 (substring word 0 (+ 1 (match-beginning 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 ; ((string-match "es\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 ; (substring word 0 (match-beginning 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 ; ((string-match "[^e]s\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 ; (substring word 0 (+ 1 (match-beginning 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 ((string-match "s\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 (substring word 0 (match-beginning 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 ((string-match "...ed\\'" word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 (substring word (1- (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 (t nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 ;;;###don't autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 (defun webster (arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 "Look up a word in the Webster's dictionary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 Open a network login connection to a webster host if necessary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 Communication with host is recorded in a buffer *webster*."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 (interactive (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 (let ((prompt (concat "Look up word in webster ("
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 (current-word) "): "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 (completion-ignore-case t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 (downcase
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 (completing-read prompt webster-completion-table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 nil nil)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 (if (equal "" arg) (setq arg (current-word)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 (message "looking up %s..." (upcase arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 (webster-send-request "WORD" (prin1-to-string arg)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 ;;;###don't autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 (defun webster-endings (arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 "Look up endings for a word in the Webster's dictionary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 Open a network login connection to a webster host if necessary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 Communication with host is recorded in a buffer *webster*."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 (interactive (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 (read-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 (concat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 "Find endings for word in webster (" (current-word) "): "))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 (if (equal "" arg) (setq arg (current-word)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 (webster-send-request "PREFIX" arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 (webster-send-request "LIST" ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 ;;;###don't autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 (defun webster-spell (arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 "Look spelling for a word in the Webster's dictionary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 Open a network login connection to a webster host if necessary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 Communication with host is recorded in a buffer *webster*."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 (interactive (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 (read-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 (concat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 "Try to spell word in webster (" (current-word) "): "))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 (if (equal "" arg) (setq arg (current-word)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 (webster-send-request "EXACT" arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 (webster-send-request "LIST" arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 (defun webster-send-request (kind word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 (require 'shell)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 (let ((webster-command (concat "open " webster-host " " webster-port "\n")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 (if (or (not webster-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 (not (buffer-name webster-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 (not webster-process)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 (not (eq (process-status webster-process) 'run)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 (message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 (concat "Attempting to connect to server " webster-host "..."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 (setq webster-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 (if (not (fboundp 'make-shell)) ;emacs19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 (make-comint webster-process-name "telnet")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 (make-shell webster-process-name "telnet")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 (set-buffer webster-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 (webster-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 (setq webster-process (get-process webster-process-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342 (process-kill-without-query webster-process)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 (set-process-filter webster-process 'webster-initial-filter)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 (process-send-string webster-process webster-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 (setq webster-running nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 (while (not webster-running) ; wait for feedback
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 (accept-process-output webster-process))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 (message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 (concat "Attempting to connect to server " webster-host
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 "... Connected."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 (display-buffer webster-buffer nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 (process-send-string webster-process (concat kind " " word "\n"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 (defun webster-quit ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 "Close connection and quit webster-mode. Buffer is not deleted."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 (message "Closing connection to %s..." webster-host)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 (kill-process webster-process)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 (message "Closing connection to %s...done" webster-host)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 (setq webster-state "closed")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 (if (eq (current-buffer) webster-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 (bury-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 (defun webster-xref-data (event &optional selection-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 (let* ((buffer (event-buffer event))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 (extent (if buffer (extent-at (event-point event) buffer 'highlight)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 (cond ((and extent (not selection-only))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 (setq text (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 (set-buffer buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 (buffer-substring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 (extent-start-position extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 (extent-end-position extent)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 ((x-selection-owner-p) ; the selection is in this emacs process.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 (setq text (x-get-selection))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 (if (string-match "[\n\r]" text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 (setq text nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 (if (null text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 (while (string-match "\\." text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 (setq text (concat (substring text 0 (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 (substring text (match-end 0)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 (webster-unISO text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 text)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 (defun webster-xref-word (event)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 "Define the highlighted word under the mouse.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 Words which are known to have definitions are highlighted when the mouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 moves over them. You may define any word by selecting it with the left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 mouse button and then clicking middle."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 (interactive "e")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 (webster (or (webster-xref-data event)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 (error "click on a highlighted word to define"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 (defvar webster-menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 '("Webster"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 ["Define Word..." webster t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 ["List Words Beginning With..." webster-endings t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 ["Check Spelling Of..." webster-spell t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 "----"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 ["Quit Webster" webster-quit t]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 (defun webster-menu (event)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 (interactive "e")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 (let ((text1 (webster-xref-data event nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 (text2 (webster-xref-data event t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 (if (equal text1 text2) (setq text2 nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 (let ((popup-menu-titles t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 (popup-menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 (nconc (list (car webster-menu))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 (if text1 (list (vector (format "Define %s" (upcase text1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 (list 'webster text1) t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 (if text2 (list (vector (format "Define %s" (upcase text2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 (list 'webster text2) t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 (cdr webster-menu))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 (defvar webster-mode-map nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 (if webster-mode-map
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 (setq webster-mode-map (make-sparse-keymap))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 (define-key webster-mode-map "?" 'describe-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 (define-key webster-mode-map "d" 'webster)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 (define-key webster-mode-map "e" 'webster-endings)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 (define-key webster-mode-map "q" 'webster-quit)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 (define-key webster-mode-map "s" 'webster-spell)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 (cond ((string-match "XEmacs" emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 (define-key webster-mode-map 'button2 'webster-xref-word)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 (define-key webster-mode-map 'button3 'webster-menu)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 (defun webster-mode ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 "Major mode for interacting with on-line Webster's dictionary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 \\{webster-mode-map}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 Use webster-mode-hook for customization."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 (kill-all-local-variables)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 (setq major-mode 'webster-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 (setq mode-name "Webster")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 (use-local-map webster-mode-map)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 (setq mode-line-process '(" " webster-state))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 (make-local-variable 'kill-buffer-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446 (if (not (string= (buffer-name (current-buffer)) "*webster*"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 (setq kill-buffer-hook '(lambda ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 (if (get-buffer "*webster*")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 (kill-buffer "*webster*")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 (set (make-local-variable 'webster-start-mark)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 (set-marker (make-marker) (point-max)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 (set (make-local-variable 'page-delimiter) "^-")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 (if webster-iso8859/1 (setq ctl-arrow 'iso-8859/1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 (run-hooks 'webster-mode-hook))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 ;; now in simple.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 ;(defun current-word ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 ; "Word cursor is over, as a string."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 ; (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 ; (let (beg end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 ; (re-search-backward "\\w" nil 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 ; (re-search-backward "\\b" nil 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 ; (setq beg (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 ; (re-search-forward "\\w*\\b" nil 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 ; (setq end (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 ; (buffer-substring beg end))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 (defun webster-intern (string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 (intern (webster-strip-crud (webster-unISO (downcase string)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 webster-completion-table))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 (defun webster-unISO (text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 ;; turn the ISO chars into the closest ASCII equiv (how they are indexed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 (while (string-match "\347" text) (aset text (match-beginning 0) ?c))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 (while (string-match "\307" text) (aset text (match-beginning 0) ?C))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 (while (string-match "\335" text) (aset text (match-beginning 0) ?Y))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477 (while (string-match "[\375\377]" text) (aset text (match-beginning 0) ?y))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 (while (string-match "[\300-\305]" text) (aset text (match-beginning 0) ?A))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 (while (string-match "[\310-\313]" text) (aset text (match-beginning 0) ?E))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 (while (string-match "[\314-\317]" text) (aset text (match-beginning 0) ?I))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 (while (string-match "[\322-\326]" text) (aset text (match-beginning 0) ?O))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 (while (string-match "[\331-\334]" text) (aset text (match-beginning 0) ?U))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 (while (string-match "[\340-\345]" text) (aset text (match-beginning 0) ?a))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 (while (string-match "[\350-\353]" text) (aset text (match-beginning 0) ?e))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 (while (string-match "[\354-\357]" text) (aset text (match-beginning 0) ?i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 (while (string-match "[\362-\366]" text) (aset text (match-beginning 0) ?o))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 (while (string-match "[\371-\374]" text) (aset text (match-beginning 0) ?u))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 (defun webster-strip-crud (text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 (while (string-match ".\b" text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 (setq text (concat (substring text 0 (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 (substring text (match-end 0)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 (defun webster-textify-region (start end &optional nointern)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 (goto-char (1- end))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 (if (looking-at "[^\n]\n") (setq end (1+ end)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 (let ((case-fold-search nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 (narrow-to-region start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 ;; translate silly "special character" codes into something we can use.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 ;; we need to do this before nuking the recursive backspace codes.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 ;; Note that mostly these are used as modifiers, like "h(\bQsub-dot)\bQ"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 ;; meaning h with a dot under it. We don't handle any of that...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 (while (re-search-forward "(\bQ[-a-z0-9*$ ]+)\bQ" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 (goto-char (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 (let ((s (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 (e (match-end 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 (forward-char 3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 (if (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 ((looking-at "circumflex") (insert ?^) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 ((looking-at "brace") (insert ?\{) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 ((looking-at "tilda") (insert ?\~) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 ((looking-at "prime") (insert ?\') t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 ((looking-at "accent grave") (insert ?\`) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 ((looking-at "accent acute") (insert ?\264) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 ((looking-at "sub-diaeresis") (insert ?\250) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 ((looking-at "macron") (insert ?\257) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 ((looking-at "a-e") (insert ?\346) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 ((looking-at "curly-N") (insert ?\361) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 ((looking-at "sub-macron") (insert ?\367) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 ((looking-at "slash-o") (insert ?\370) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 ((looking-at "cidilla") (insert ?\371) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 ((looking-at "sup-circle") (insert ?\372) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531 ((looking-at "macron-tilda") (insert ?\373) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 ((looking-at "hachek") (insert ?\374) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 ((looking-at "sub-breve") (insert ?\375) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 ((looking-at "breve") (insert ?\376) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 ((looking-at "sub-dot") (insert ?\377) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 ((looking-at "double-bar-\\$") (insert ?$) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 ;; talk about your special-purpose characters...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 ((looking-at "10\\*10\\*100")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 (delete-region s e)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 (insert "10^10^100")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 ((looking-at "plus squareroot -1")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 (delete-region s e)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 (insert "sqrt(-1)")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 ;; We don't handle these yet:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 ;; aleph ayin beth breve c-bar check daleth double-arrows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548 ;; double-half-arrows double-hyphen edh fermata-up fermata-down
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 ;; fist flat-sign g-sub-macron gimel hachek he heth kaph lamed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 ;; mem natural-sign nun parallel pe presa prime qoph radical
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 ;; radical-sign resh sadhe samekh shin sin slur-down spade
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 ;; stacked-commas tau teth thorn triple-bond waw yod yogh
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 ;; zayin "* * *" sadhe(final) "3 character overbar"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 (t nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 (delete-region s (+ s 3))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557 (delete-region (+ s 1) (- e 2))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 ;; nuke silly recursive backspace codes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 (while (search-forward "|\bB" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 (while (search-forward "|\bB" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 (delete-char -3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 (insert "\b"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 ;; convert @ to ~
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 (while (search-forward "@" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 (delete-char -1) (insert "~")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 (webster-fontify (- (point) 1) (point) 'webster-bold-italic)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 ;; now convert lots of other magic codes...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575 (while (search-forward "\b" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 (delete-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 (forward-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 ((looking-at "([MXYAIJ]")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 ;; start smallcaps/italic/bold/super/sub/subitalic
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 (looking-at "([MXYAIJ]\\([^\)]*\\))")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 (let ((start (match-beginning 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 (end (match-end 1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585 (and (not nointern) (looking-at "(M")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 (webster-intern (buffer-substring start end)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 (let ((c (char-after (1- start))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589 (webster-fontify start end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 (cond ((= ?M c) 'webster-small)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591 ((= ?X c) 'webster-italic)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592 ((= ?Y c) 'webster-bold)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593 ((= ?A c) 'webster-superscript)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594 ((= ?I c) 'webster-subscript)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 ((= ?J c) 'webster-subscript)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597 (= ?M c))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
599 ;; #### dubious
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600 ((looking-at "([BGR]") ; start greek/APL/symbol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
601 (and webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
602 (looking-at "(\\(.\\)[^\)]*)\^H\\1")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603 (let ((c (char-after (1- (match-beginning 1)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 (webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 (match-beginning 0) (match-end 0) 'webster-small))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 ((looking-at ")[ABGIJMRXY]") ; end font-shift
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
608 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
609
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
610 ((looking-at "<(\\|(<")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
611 (insert (if webster-iso8859/1 ?\253 "<<"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
612 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
613 (let ((p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
614 (e (and (save-excursion (search-forward ")\b>" nil t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
615 (match-beginning 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
616 (if e
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
617 (webster-fontify p e 'webster-italic)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
618
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
619 ((looking-at ")>\\|>)")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
620 (insert (if webster-iso8859/1 ?\273 ">>")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
621
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
622 ;; #### dubious
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
623 ((looking-at "[a-z\346][-._]") ; lineover,dotover/under,over/underbar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
624 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
625 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
626 (webster-fontify (- (point) 1) (point) 'webster-underline)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
627
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
628 ((looking-at "[a-zA-Z]:") ; umlaut
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
629 (let (c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
630 (if (and webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
631 (setq c (cdr (assq (following-char) webster-umlauts))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
632 (insert c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
633 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
634 (insert (if webster-iso8859/1 ?\250 ?:)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
635
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
636 ((looking-at "[\"~][a-zA-Z]") ; umlaut
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
637 (let (c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
638 (delete-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
639 (if (and webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
640 (setq c (cdr (assq (following-char) webster-umlauts))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
641 (insert c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
642 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
643 (insert (if webster-iso8859/1 ?\250 ?:)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
644 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
645 (forward-char -1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
646
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
647 ((looking-at "[a-zA-Z]\)") ; grave
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
648 (let (c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
649 (if (and webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
650 (setq c (cdr (assq (following-char) webster-graves))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
651 (insert c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
652 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
653 (insert "`"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
654
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655 ((looking-at ">[a-zA-Z]") ; grave
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656 (let (c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 (delete-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658 (if (and webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659 (setq c (cdr (assq (following-char) webster-graves))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 (insert c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
661 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
662 (insert "`"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
664 (forward-char -1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
666 ((looking-at "[a-zES]\(") ; acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667 (let (c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
668 (if (and webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
669 (setq c (cdr (assq (following-char) webster-acutes))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670 (insert c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
671 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
672 (insert (if webster-iso8859/1 ?\264 ?\')))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
673
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
674 ((looking-at "<[a-zA-Z]") ; acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
675 (let (c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676 (delete-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 (if (and webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 (setq c (cdr (assq (following-char) webster-acutes))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 (insert c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
681 (insert (if webster-iso8859/1 ?\264 ?\')))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683 (forward-char -1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
685 ((looking-at ";[Cc]") ; ccedilla
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
686 (delete-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
687 (if webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
688 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689 (insert (if (= (following-char) ?C) ?\307 ?\347))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
690 (insert ? ) (forward-char -1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
691 (forward-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
692 (insert ?\,)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
693
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
694 ((looking-at "|S") ; section
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
695 (insert (if webster-iso8859/1 ?\247 "SS")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
696
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
697 ((looking-at "|q") ; paragraph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
698 (insert (if webster-iso8859/1 ?\266 "PP")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
699
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
700 ((looking-at "*o") ; centerdot
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
701 (insert (if webster-iso8859/1 ?\267 ?\*)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
702
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
703 ((looking-at "+=") ; plusminus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
704 (insert (if webster-iso8859/1 ?\261 "+/-")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
705
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
706 ((looking-at "-:") ; division
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
707 (insert (if webster-iso8859/1 ?\367 "+/-")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
708
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
709 ((looking-at "-[xX]") ; multiplication
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
710 (insert (if webster-iso8859/1 ?\327 "+/-")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
711
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712 ((looking-at "-m") (insert "--"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 ((looking-at "-n") (insert "-"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
714 ((looking-at "-/") (insert "\\"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715 ((looking-at ")|") (insert ?\[))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
716 ((looking-at "|)") (insert ?\]))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
717 ((looking-at "-3") (insert "..."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
718 ((looking-at "=\\\\") (insert "$"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
719
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
720 ((looking-at "'o") ; degree
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
721 (insert (if webster-iso8859/1 ?\260 ?\*)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
722
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
723 ((or (looking-at "nj") ; nj symbol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
724 (looking-at "|-") ; dagger
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
725 (looking-at "|=") ; doubledagger
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
726 (looking-at "|o") ; lowerphi
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
727 (looking-at "'b") ; stroke
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
728 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
729 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
730 (webster-fontify (point) (+ (point) 2) 'webster-bold))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
731 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
732 (forward-char -2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
733
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
734 ((looking-at "[cC]\371") ; (\bQcidilla)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
735 (if webster-iso8859/1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
736 (insert (if (= (following-char) ?C) ?\307 ?\347))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
737 (forward-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
738 (insert ?\,)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
739
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
740 ; ((or (looking-at "[a-zA-Z]\250") ; (\bQsub-diaeresis)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
741 ; (looking-at "[a-zA-Z]\346") ; (\bQa-e)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
742 ; (looking-at "[a-zA-Z]\361") ; (\bQcurly-N)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
743 ; (looking-at "[a-zA-Z]\367") ; (\bQsub-macron)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
744 ; (looking-at "[a-zA-Z]\370") ; (\bQslash-o)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
745 ; (looking-at "[a-zA-Z]\371") ; (\bQcidilla)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
746 ; (looking-at "[a-zA-Z]\372") ; (\bQsup-circle)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
747 ; (looking-at "[a-zA-Z]\373") ; (\bQmacron-tilda)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
748 ; (looking-at "[a-zA-Z]\374") ; (\bQhachek)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
749 ; (looking-at "[a-zA-Z]\375") ; (\bQsub-breve)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
750 ; (looking-at "[a-zA-Z]\376") ; (\bQbreve)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
751 ; (looking-at "[a-zA-Z]\377") ; (\bQsub-dot)\bQ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
752 ; )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
753 ; (forward-char 1) (insert " ") (forward-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
754 ; (webster-fontify (1- (point)) (point) 'webster-underline))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
755
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
756 ((looking-at "/[a-zA-Z]") ; greek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
757 (forward-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758 (insert " <")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
759 (forward-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 (insert ?\>)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761 (forward-char -5))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
762
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
763 ;; overstrike
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
764 ((looking-at (format "[%c][%c]" (following-char) (following-char)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
765 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
766 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
767 (webster-fontify (- (point) 1) (point) 'webster-bold)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
768
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
769 (t ; ## debug
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
770 (insert (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
771 (insert "\b")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
772 (insert (buffer-substring (+ 1 (point)) (+ 2 (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
774 (delete-char 2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
777 (setq start (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778 end (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
779 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
780 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
781 (narrow-to-region (point) end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
782 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
783 ;; (fill-region-as-paragraph (point-min) (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
784 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785 (setq start (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
786 (skip-chars-forward "^ \n\t")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787 (if (>= (current-column) fill-column)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
790 (delete-horizontal-space)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791 (insert "\n" (or fill-prefix "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792 (skip-chars-forward " \n\t")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793 ))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
794
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796 (defun webster-pos (start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
799 (cond ((and (= start (1- end)) (looking-at "n")) "noun")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
800 ((or (not webster-fontify) (/= start (- end 2)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
801 (buffer-substring start end))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
802 ((looking-at "ac") "adjective combinational form")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
803 ((looking-at "aj") "adjective")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
804 ((looking-at "as") "adjective suffix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
805 ((looking-at "av") "adverb")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806 ((looking-at "ca") "adjective combinational form")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
807 ((looking-at "cf") "combinational form")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
808 ((looking-at "cj") "conjunction")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 ((looking-at "da") "definite article")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810 ((looking-at "ia") "indefinite article")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
811 ((looking-at "ij") "interjection")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
812 ((looking-at "is") "interjection suffix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 ((looking-at "js") "adjective suffix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814 ((looking-at "nc") "noun combinational form")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815 ((looking-at "np") "noun plural suffix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816 ((looking-at "ns") "noun suffix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817 ((looking-at "pf") "prefix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 ((looking-at "pn") "pronoun")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
819 ((looking-at "pp") "preposition")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820 ((looking-at "sf") "verb suffix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 ((looking-at "tm") "trademark")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822 ((looking-at "va") "verbal auxilliary")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
823 ((looking-at "vb") "verb")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
824 ((looking-at "vc") "verb combinational form")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
825 ((looking-at "vi") "verb intransitive")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826 ((looking-at "vm") "verb impersonal")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827 ((looking-at "vp") "verb imperfect")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828 ((looking-at "vs") "verb suffix")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
829 ((looking-at "vt") "verb transitive")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
830 (t (buffer-substring start end)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
831
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
832
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
833 (defun webster-convert ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
834 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
835 ;; nuke the continuation lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
836 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
837 (while (re-search-forward "^C:" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
838 (forward-char -2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
839 (while (looking-at "^C:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
840 (forward-line 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
841 (forward-line -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
842 (while (looking-at "^C:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
843 (forward-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
844 (let ((n (- (point) (save-excursion (beginning-of-line) (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
845 (delete-char 3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
846 ;; What a stupid format! (example: "fat")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
847 (if (= n 79) (insert " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
848 (beginning-of-line)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
849 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
850 (let ((last-type nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
851 (this-type nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
852 (last-part nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
853 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
854 (setq this-type (following-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
855 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
856 ((looking-at "^WORD ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
857 (let ((p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
858 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
859 (delete-region p (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
860
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861 ((looking-at "^21[12] ") ; reply to a LIST command; one line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
862 (delete-char 4))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
863 ((looking-at "^220 ") ; reply to a LIST command; intern the results.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
864 (let ((p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
865 (if (eq (preceding-char) ?\n) (setq p (1- p)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
866 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
867 (delete-region p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868 (insert "\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 (while (not (or (eobp) (looking-at "\n\n")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870 (forward-line 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872 (let (s e)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873 (while (looking-at "[^\n;]+;")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
874 (webster-intern (buffer-substring (setq s (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
875 (setq e (1- (match-end 0)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
876 (goto-char (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
877 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
878 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
879 (webster-fontify s e 'webster-bold t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
880 (if (looking-at "\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
881 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
882 (webster-intern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
883 (buffer-substring (setq s (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
884 (progn (end-of-line) (setq e (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
885 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
886 (webster-fontify s e 'webster-bold t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
887 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
888
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
889 ((looking-at "^\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
890 (delete-char 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
892 ((looking-at "^\\(200\\|221\\|PREFIX\\|LIST\\|EXACT\\)[- ]")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
893 ;; just toss these.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
894 (let ((p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
895 (if (eq (preceding-char) ?\n) (setq p (1- p)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
896 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897 (delete-region p (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899 ((looking-at "^F:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900 ;; First record: F:entname;homono;prefsuf;dots;accents;pos;posjoin;pos2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901 (delete-char 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 (let ((p (1- (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 homonym prefix dots pos posj pos2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906 (setq homonym (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
908 (if (looking-at "[^;]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
909 (setq prefix (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
910 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
912 (setq dots (append (buffer-substring (point) (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
913 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
914 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
915 ;; ignore accents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
916 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
917 (if (looking-at "[a-z]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
918 (setq pos (webster-pos (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
919 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
920 (if (looking-at "[a-z]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
921 (setq posj (webster-pos (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
922 (if (looking-at "[a-z]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
923 (setq pos2 (webster-pos (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
924 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
925 (delete-region p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
926 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
927 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
928 (let ((e (save-excursion (end-of-line) (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
929 (webster-intern (buffer-substring (point) e))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
930 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
931 (webster-fontify (point) e 'webster-bold t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
932 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
933 (if (not homonym)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
934 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
935 (let ((p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
936 (insert homonym)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
937 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
938 (webster-fontify p (point) 'webster-bold-italic))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
939 (forward-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
940 (while dots
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
941 (forward-char (- (car dots) ?0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
942 (insert ".")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
943 (setq dots (cdr dots)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
944 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
945 (let ((p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
946 (if pos (insert " " pos))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
947 (if posj (insert " " posj))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
948 (if pos2 (insert " " pos2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
949 (if (and webster-fontify (or pos posj pos2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
950 (webster-fontify p (point) 'webster-italic)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
951 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
952 ;; prefix/suffix is "p" or "s"; I don't know what it's for.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
953 (setq last-part pos)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
954
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
955 ((looking-at "^P:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
956 ;; Pronunciation: P:text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
957 (delete-char 2) (delete-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
958 (insert " \\")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
959 (let ((p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
960 (fill-prefix " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
961 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
962 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
963 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
964 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
965 (webster-fontify (1- p) (1- (point)) 'webster-italic)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
966 (forward-char -1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
967 (webster-textify-region p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
968 (insert "\\")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
969
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
970 ((looking-at "E:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
971 ;; Etymology: E:text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
972 (delete-char 2) (insert " [")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
973 (let ((fill-prefix " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
974 (webster-textify-region (point) (progn (end-of-line) (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
975 (insert "]"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
976
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
977 ((looking-at "S:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
978 ;; Synonym: S:text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
979 (delete-char 2) (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
980 (let ((fill-prefix " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
981 (webster-textify-region (point) (progn (end-of-line) (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
982
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
983 ((looking-at "X:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
984 ;; Cross Reference: X:word;wrdsuper;wrdsubs;type;word2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
985 (setq last-part nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
986 (let (p word super sub type word2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
987 (delete-char 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
988 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
989 (if (looking-at "[^;]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
990 (setq word (upcase (buffer-substring (point) (match-end 0)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
991 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
992 (if (looking-at "[^;]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
993 (setq super (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
994 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
995 (if (looking-at "[^;]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
996 (setq sub (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
997 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
998 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
999 (setq type (string-to-int
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1000 (buffer-substring (point) (match-end 0)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1001 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1002 (if (looking-at "[^;]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1003 (setq word2 (upcase (buffer-substring (point) (match-end 0)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1004 (delete-region p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1005 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1006 (cond ((eq type 0) (insert "see (\bM" word ")\bM"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1007 ((eq type 1) (insert "see (\bM" word ")\bM table"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1008 ((eq type 2) (insert "### ILLEGAL XREF CODE 2"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1009 ((eq type 3) (insert "see (\bM" word2 ")\bM at (\bM" word
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1010 ")\bM table"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1011 ((eq type 4) (insert "compare (\bM" word ")\bM"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1012 ((eq type 5) (insert "compare (\bM" word ")\bM table"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1013 ((eq type 6) (insert "called also (\bM" word ")\bM"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1014 ((eq type 7) (insert "### ILLEGAL XREF CODE 7"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1015 ((eq type 8) (insert "(\bYsyn)\bY see in addition (\bM" word
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1016 ")\bM"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1017 ((eq type 9) (insert "(\bYsyn)\bY see (\bM" word ")\bM"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1018 (t (insert "#### ILLEGAL XREF CODE " (or type "nil"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1019 (let ((fill-prefix " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1020 (webster-textify-region p (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1021
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1022 ((looking-at "D:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1023 ;; Definition: D:snsnumber;snsletter;snssubno;pos;text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1024 (let (p n sub1 sub2 part)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1025 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1026 (forward-char 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1027 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1028 (setq n (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1029 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1030 (if (looking-at "[a-z]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1031 (setq sub1 (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1032 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1033 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1034 (setq sub2 (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1035 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1036 (if (looking-at "[a-z]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1037 (setq part (webster-pos (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1038 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1039 (delete-region p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1040 (if (and sub2 (not (equal sub2 "1")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1041 (setq sub1 " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1042 (if (and sub1 (not (equal sub1 "a")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1043 (setq n " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1044 ;; If a Definition appears after a Label, don't print numbers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1045 ;; as the label has done that already.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1046 (if (eq last-type ?L)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1047 (setq n (and n " ") sub1 (and sub1 " ") sub2 (and sub2 " ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1048 (if (and part (not (equal part last-part)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1049 (let ((p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1050 (insert " " part "\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1051 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1052 (webster-fontify p (1- (point)) 'webster-italic))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1053 (setq last-part part)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1054 (indent-to (- 6 (length n)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1055 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1056 (if (and n (not (equal n "0")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1057 (insert n " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1058 (if sub1 (insert " " sub1 " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1059 (if sub2 (insert " (" sub2 ") "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1060 (insert ": ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1061 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1062 (webster-fontify p (point) 'webster-bold-italic))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1063 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1064 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1065 (let ((fill-prefix (make-string (if sub2 17 (if sub1 12 9)) ? )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1066 (webster-textify-region p (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1067
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1068 ((looking-at "R:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1069 ;; Run-on: R:name;dots;accents;pos1;posjoin;pos2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1070 (delete-char 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1071 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1072 (search-forward ";") (delete-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1073 (let ((beg (save-excursion (beginning-of-line) (+ (point) 2))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1074 (webster-intern (buffer-substring beg (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1075 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1076 (webster-fontify beg (point) 'webster-bold t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1077 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1078 (let* ((dots (append (buffer-substring (point) (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1079 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1080 (delete-region (point) (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1081 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1082 (forward-char 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1083 (while dots
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1084 (forward-char (- (car dots) ?0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1085 (insert ".")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1086 (setq dots (cdr dots)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1087 (search-forward ";") (delete-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1088 ;; throw away the accents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1089 (let ((p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1090 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1091 (delete-region p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1092 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1093 (if (looking-at "[a-z][a-z]?;")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1094 (let* ((start (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1095 (end (1- (match-end 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1096 (pos (webster-pos start end)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1097 (delete-region start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1098 (insert pos)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1099 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1100 (webster-fontify start (point) 'webster-italic))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1101 (cond ((search-forward ";" nil t) (delete-char -1) (insert " ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1102 (cond ((search-forward ";" nil t) (delete-char -1) (insert " "))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1104 ((looking-at "L:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1105 ;; Label: L:snsnumber;snsletter;snssubno;text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1106 (let (p n sub1 sub2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1107 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1108 (forward-char 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1109 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1110 (setq n (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1111 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1112 (if (looking-at "[a-z]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1113 (setq sub1 (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1114 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1115 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1116 (setq sub2 (buffer-substring (point) (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1117 (search-forward ";")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1118 (delete-region p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1119 (if (and sub2 (not (equal sub2 "1")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1120 (setq sub1 " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1121 (if (and sub1 (not (equal sub1 "a")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1122 (setq n " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1123 (indent-to (- 6 (length n)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1124 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1125 (if (not (equal n "0"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1126 (insert (or n " ") " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1127 (if sub1 (insert " " sub1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1128 (if sub2 (insert " (" sub2 ")"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1129 (insert " ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1130 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1131 (webster-fontify p (point) 'webster-bold-italic))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1132 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1133 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1134 (let ((fill-prefix (make-string (if sub2 17 (if sub1 12 9)) ? )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1135 (webster-textify-region p (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1136
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1137 ((looking-at "V:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1138 ;; Variant: V:name;dots;accents;level1()level2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1139 (delete-char 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1140 (let ((p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1141 beg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1142 (search-forward ";") (delete-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1143 (webster-intern (buffer-substring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1144 (save-excursion (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1145 (setq beg (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1146 (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1147 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1148 (webster-fontify beg (point) 'webster-bold t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1149 (if (looking-at "[0-9]+")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1150 (let* ((dots (append (buffer-substring (point) (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1151 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1152 (delete-region (point) (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1153 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1154 (while dots
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1155 (forward-char (- (car dots) ?0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1156 (insert ".")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1157 (setq dots (cdr dots)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1158 (search-forward ";") ; skip accents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1159 (delete-region (1- (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1160 (save-excursion (end-of-line) (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1161 (let ((fill-prefix " "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1162 (webster-textify-region p (point) t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1163 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1164 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1165 (cond ((eq last-type ?F) (delete-char -1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1166 ((eq last-type ?V) (delete-char -1) (insert "; "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1167 (t (insert " ")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1169 ((looking-at ".\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1170 (delete-char 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1171 ((looking-at "22[0-9] ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1172 (delete-region (point) (save-excursion (end-of-line) (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1173 ((looking-at "\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1174 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1175 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1176 (insert "* ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1177 (setq last-type this-type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1178 (forward-line 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1179 (while (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1180 (and (not (bobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1181 (progn (forward-line -1) (looking-at "\n"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1182 (delete-char -1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1183 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1184 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1185 (cond ((search-forward "\^H" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1186 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1187 (insert
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1188 "\n****\tThis definition contains unrecognized font-change codes."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1189 "\n****\tPlease tell jwz.\n\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1190 (goto-char (point-min))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1191
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1192 ;; lay down the default font; don't put it over the spaces and tabs on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1193 ;; the beginning of the line so that those space as if it was a fixed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1194 ;; width font. There must be a better way than
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1195 (if webster-fontify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1196 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1197 (let (e)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1198 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1199 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1200 (skip-chars-forward " \t")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1201 ;; avoid extent overlaps; should be able to use extent priorities
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1202 ;; to obviate this, but it's late.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1203 (while (setq e (extent-at (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1204 (goto-char (1+ (extent-end-position e))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1205 (setq e (make-extent (point) (progn (forward-line 1) (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1206 (set-extent-face e 'webster)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1207 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1208
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1209
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1210 ;; Codes:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1211 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1212 ;; (A start superscript catalan
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1213 ;; (B start unknown mixed number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1214 ;; (G start greek alpha
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1215 ;; (I start subscript alcohol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1216 ;; (J start subitalic mixed number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1217 ;; (M start small mitten
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1218 ;; (Q start special mitzvah
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1219 ;; (R start APL mixed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1220 ;; (X start italic everywhere...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1221 ;; (Y start bold everywhere...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1222 ;; )A end superscript catalan
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1223 ;; )B end unknown mixed number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1224 ;; )G end greek alpha
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1225 ;; )I end subscript alcohol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1226 ;; )J end subitalic mixed number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1227 ;; )M end small mitten
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1228 ;; )Q end special mitzvah
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1229 ;; )R end APL mixed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1230 ;; )X end italic everywhere...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1231 ;; )Y end bold everywhere...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1232 ;; "a a-umlaut acetoacetic acid
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1233 ;; "e e-umlaut agio
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1234 ;; "i i-umlaut alcaic
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1235 ;; "o o-umlaut ale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1236 ;; "u u-umlaut alpenglow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1237 ;; a: a-umlaut aardvark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1238 ;; n: n-umlaut pogy
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1239 ;; o: o-umlaut coccyx
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1240 ;; s: s-umlaut centrifugation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1241 ;; u: u-umlaut accouter
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1242 ;; w: w-umlaut bourgeois
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1243 ;; I: I-umlaut natural
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1244 ;; ~a a-umlaut alcove
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1245 ;; ~e e-umlaut Boxer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1246 ;; ~i i-umlaut Cistercian
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1247 ;; ~o o-umlaut alcove
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1248 ;; ~u u-umlaut Boxer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1249 ;; ~E E-umlaut arris
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1250 ;; ~O O-umlaut prix fixe
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1251 ;; >e e-grave arriere-pensee
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1252 ;; >a a-grave pompano
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1253 ;; >u u-grave coca
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1254 ;; >E E-grave
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1255 ;; u) u-grave
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1256 ;; o) o-grave
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1257 ;; i) i-grave
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1258 ;; s) s-grave
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1259 ;; ;C C-cedilla compendia
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1260 ;; ;c c-cedilla babassu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1261 ;; <E E-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1262 ;; <a a-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1263 ;; <e e-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1264 ;; S( S-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1265 ;; c( c-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1266 ;; i( i-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1267 ;; o( o-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1268 ;; r( r-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1269 ;; s( s-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1270 ;; y( y-acute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1271 ;; )> guillemotright everywhere...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1272 ;; <( guillemotleft everywhere...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1273 ;; (< guillemotleft (?) come
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1274 ;; -m longdash pi
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1275 ;; n_ nj babbling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1276 ;; 'o degree
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1277 ;; |) ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1278 ;; |- dagger
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1279 ;; |= doubledagger
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1280 ;; |S section
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1281 ;; |o lower-phi
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1282 ;; |q paragraph paragraph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1283 ;; =\ "$"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1284 ;; (< "<"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1285 ;; (| "["
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1286 ;; 'b stroke
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1287 ;; *o centerdot
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1288 ;; += plusminus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1289 ;; -/ \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1290 ;; -3 "..."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1291 ;; -: division
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1292 ;; -X multiplication
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1293 ;; -n "-"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1294 ;; -x multiplication
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1295 ;; '' ' overstrike
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1296 ;; :: : overstrike
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1297 ;; ;; ; overstrike
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1298 ;; MM M overstrike
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1299 ;; a- a-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1300 ;; e- e-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1301 ;; i- i-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1302 ;; o- o-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1303 ;; u- u-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1304 ;; y- y-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1305 ;; A- A-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1306 ;; E- E-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1307 ;; I- I-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1308 ;; O- O-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1309 ;; U- U-lineover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1310 ;; Q- Q-lineover2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1311 ;; a. a-dotover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1312 ;; e. e-dotover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1313 ;; m. m-dotover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1314 ;; n. n-dotover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1315 ;; o. o-dotover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1316 ;; r. r-dotover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1317 ;; u. u-dotover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1318 ;; e_ e-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1319 ;; h_ h-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1320 ;; k_ k-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1321 ;; r- r-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1322 ;; r_ r-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1323 ;; t_ t-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1324 ;; u_ u-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1325 ;; k- k-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1326
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1327 ;; t(\bQsub-dot)\bQ t-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1328 ;; s(\bQsub-dot)\bQ s-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1329 ;; h(\bQsub-dot)\bQ h-dotunder aceldama
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1330 ;; n(\bQsub-dot)\bQ n-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1331 ;; r(\bQsub-dot)\bQ r-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1332 ;; d(\bQsub-dot)\bQ d-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1333 ;; z(\bQsub-dot)\bQ z-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1334 ;; l(\bQsub-dot)\bQ l-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1335 ;; S(\bQsub-dot)\bQ S-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1336 ;; H(\bQsub-dot)\bQ H-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1337 ;; o(\bQsub-dot)\bQ o-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1338 ;; a(\bQsub-dot)\bQ a-dotunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1339 ;; e(\bQbreve)\bQ e-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1340 ;; u(\bQbreve)\bQ u-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1341 ;; i(\bQbreve)\bQ i-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1342 ;; a(\bQbreve)\bQ a-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1343 ;; A(\bQbreve)\bQ A-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1344 ;; s(\bQbreve)\bQ s-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1345 ;; n(\bQbreve)\bQ n-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1346 ;; E(\bQbreve)\bQ E-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1347 ;; y(\bQbreve)\bQ y-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1348 ;; o(\bQbreve)\bQ o-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1349 ;; h(\bQsub-breve)\bQ h-breve
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1350 ;; e(\bQhachek)\bQ e-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1351 ;; s(\bQhachek)\bQ s-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1352 ;; z(\bQhachek)\bQ z-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1353 ;; c(\bQhachek)\bQ c-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1354 ;; j(\bQhachek)\bQ j-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1355 ;; i(\bQhachek)\bQ i-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1356 ;; u(\bQhachek)\bQ u-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1357 ;; g(\bQhachek)\bQ g-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1358 ;; r(\bQhachek)\bQ r-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1359 ;; a(\bQhachek)\bQ a-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1360 ;; C(\bQhachek)\bQ C-hachek
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1361 ;; a(\bQmacron-tilda)\bQ a-macrontilda
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1362 ;; i(\bQmacron-tilda)\bQ i-macrontilda
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1363 ;; e(\bQmacron-tilda)\bQ e-macrontilda
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1364 ;; a(\bQsup-circle)\bQ a-circleover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1365 ;; A(\bQsup-circle)\bQ A-circleover
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1366 ;; e(\bQcidilla)\bQ e-cedilla
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1367 ;; o(\bQcidilla)\bQ o-cedilla
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1368 ;; a(\bQcidilla)\bQ a-cedilla
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1369 ;; z(\bQsub-diaeresis)\bQ z-umlautunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1370 ;; r(\bQsub-diaeresis)\bQ r-umlautunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1371 ;; t(\bQsub-macron)\bQ t-lineunder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1372 ;; B(\bQ3 character overbar)\bQ B-lineover3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1373
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1374 ;; (\bQa-e)\bQ- ae-overbar (?) herring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1375
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1376 ;; "U unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1377 ;; '- unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1378 ;; 'a unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1379 ;; (j unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1380 ;; )o unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1381 ;; - unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1382 ;; -0 unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1383 ;; -> unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1384 ;; -M unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1385 ;; -N unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1386 ;; -O unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1387 ;; -s unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1388 ;; ;( unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1389 ;; <' unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1390 ;; <A unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1391 ;; =S unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1392 ;; >' unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1393 ;; B unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1394 ;; G< unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1395 ;; G> unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1396 ;; I' unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1397 ;; O' unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1398 ;; S unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1399 ;; c| unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1400 ;; e@ unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1401 ;; eg unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1402 ;; en unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1403 ;; er unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1404 ;; et unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1405 ;; i" unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1406 ;; l- unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1407 ;; m- unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1408 ;; n, unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1409 ;; nB unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1410 ;; o@ unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1411 ;; os unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1412 ;; ot unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1413 ;; s, unknown chouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1414 ;; u@ unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1415 ;; | unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1416
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1417 ;; /a unknown alpha
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1418 ;; /b unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1419 ;; /c unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1420 ;; /d unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1421 ;; /e unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1422 ;; /g unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1423 ;; /h unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1424 ;; /i unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1425 ;; /k unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1426 ;; /l unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1427 ;; /m unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1428 ;; /n unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1429 ;; /p unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1430 ;; /r unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1431 ;; /s unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1432 ;; /t unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1433 ;; /u unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1434 ;; /v unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1435 ;; /w unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1436 ;; /x unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1437 ;; /z unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1438
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1439 ;; /C unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1440 ;; /D unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1441 ;; /F unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1442 ;; /G unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1443 ;; /I unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1444 ;; /L unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1445 ;; /N unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1446 ;; /O unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1447 ;; /P unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1448 ;; /S unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1449 ;; /U unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1450 ;; /V unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1451 ;; /W unknown
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1452 ;; /X unknown