yatex

view yatex19.el @ 60:9e08ed569d80

yahtml: change keystroke of calling browser to [prefix] t p yahtml: don't count <a>tag contents as column in <pre> yahtml: support [prefix] c against src="", align="". and many many more
author yuuji
date Fri, 24 Jan 1997 09:04:06 +0000
parents 48ac97a6b6ce
children b9f753846b6b
line source
1 ;;; -*- Emacs-Lisp -*-
2 ;;; YaTeX facilities for Emacs 19
3 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
4 ;;; Last modified Fri Jan 24 18:00:49 1997 on supra
5 ;;; $Id$
7 ;;; とりあえず hilit19 を使っている時に色が付くようにして
8 ;;; メニューバーでごにょごにょできるようにしただけ。
9 ;;; いったい誰がメニューバー使ってLaTeXソース書くんだろうか?
10 ;;; まあいいや練習練習。後ろの方にちょっとコメントあり。
11 ;;; 真中辺にあるけど、hilit19.el 対応の方は結構本気。
13 (require 'yatex)
15 (defun YaTeX-19-define-sub-menu (map vec &rest bindings)
16 "Define sub-menu-item in MAP at vector VEC as BINDINGS.
17 BINDINGS is a form with optional length: (symbol title binding).
18 When you defined menu-bar keymap such like:
19 (define-key foo-map [menu-bar foo] (make-sparse-keymap \"foo menu\"))
20 and you want to define sub menu for `foo menu' as followings.
21 foo -> menu1 (calling function `func1')
22 menu2 (doing interactive call `(func2 ...)'
23 Call this function like this:
24 (YaTeX-19-define-sub-menu foo-map [menu-bar foo]
25 '(m1 \"Function 1\" func1)
26 '(m2 \"Function 2\" (lambda () (interactive) (func2 ...))))
27 where
28 `m1' and `m2' are the keymap symbol for sub-menu of `[menu-bar foo].
29 `Funtion 1' and `Function 2' are the title strings for sub-menu.
30 "
31 (let ((i 0) (vec2 (make-vector (1+ (length vec)) nil)))
32 (while (< i (length vec))
33 (aset vec2 i (aref vec i))
34 (setq i (1+ i)))
35 (setq bindings (reverse bindings))
36 (mapcar
37 (function
38 (lambda (bind)
39 (aset vec2 (1- (length vec2)) (car bind)) ;set menu-symbol
40 (define-key map vec2
41 (cons (car (cdr bind))
42 (car (cdr (cdr bind)))))))
43 bindings)))
45 ;; Menu for Typeset relating processes ----------------------------------------
46 (define-key YaTeX-mode-map [menu-bar yatex]
47 (cons "YaTeX" (make-sparse-keymap "YaTeX")))
48 (define-key YaTeX-mode-map [menu-bar yatex process]
49 (cons "Process" (make-sparse-keymap "Process")))
50 (YaTeX-19-define-sub-menu
51 YaTeX-mode-map [menu-bar yatex process]
52 '(buffer "LaTeX" (lambda () (interactive) (YaTeX-typeset-menu nil ?j)))
53 '(kill "Kill LaTeX" (lambda () (interactive) (YaTeX-typeset-menu nil ?k)))
54 '(bibtex "BibTeX" (lambda () (interactive) (YaTeX-typeset-menu nil ?b)))
55 '(makeindex "makeindex" (lambda () (interactive) (YaTeX-typeset-menu nil ?i)))
56 '(preview "Preview" (lambda () (interactive) (YaTeX-typeset-menu nil ?p)))
57 '(lpr "lpr" (lambda () (interactive) (YaTeX-typeset-menu nil ?l)))
58 '(lpq "lpq" (lambda () (interactive) (YaTeX-typeset-menu nil ?q)))
59 )
61 ;; Help for LaTeX ------------------------------------------------------------
62 (YaTeX-19-define-sub-menu
63 YaTeX-mode-map [menu-bar yatex]
64 '(sephelp "--")
65 '(help "Help on LaTeX commands" YaTeX-help)
66 '(apropos "Apropos on LaTeX commands" YaTeX-apropos))
68 ;; Switch modes --------------------------------------------------------------
69 (define-key YaTeX-mode-map [menu-bar yatex switch]
70 (cons "Switching YaTeX's modes" (make-sparse-keymap "modes")))
71 (or YaTeX-auto-math-mode
72 (define-key YaTeX-mode-map [menu-bar yatex switch math]
73 '("Toggle math mode" . (lambda () (interactive)
74 (YaTeX-switch-mode-menu nil ?t)))))
75 (define-key YaTeX-mode-map [menu-bar yatex switch mod]
76 '("Toggle modify mode" . (lambda () (interactive)
77 (YaTeX-switch-mode-menu nil ?m))))
79 ;; % menu --------------------------------------------------------------------
80 (define-key YaTeX-mode-map [menu-bar yatex percent]
81 (cons "Edit %# notation" (make-sparse-keymap "Edit %# notation")))
82 (YaTeX-19-define-sub-menu
83 YaTeX-mode-map [menu-bar yatex percent]
84 '(! "Change LaTeX typesetter(%#!)"
85 (lambda () (interactive) (YaTeX-%-menu nil nil ?!)))
86 '(begend "Set %#BEGIN-%#END on region"
87 (lambda () (interactive) (YaTeX-%-menu nil nil ?b)))
88 '(lpr "Change LPR format"
89 (lambda () (interactive) (YaTeX-%-menu nil nil ?l))))
91 ;; What position -------------------------------------------------------------
92 (YaTeX-19-define-sub-menu
93 YaTeX-mode-map [menu-bar yatex]
94 '(what "What column in tabular" YaTeX-what-column))
96 ;; Document hierarchy ------------------------------------------------------
97 (YaTeX-19-define-sub-menu
98 YaTeX-mode-map [menu-bar yatex]
99 '(hier "Display document hierarchy" YaTeX-display-hierarchy-directly))
101 ;; Jump cursor ---------------------------------------------------------------
102 (define-key YaTeX-mode-map [menu-bar yatex jump]
103 (cons "Jump cursor"
104 (make-sparse-keymap "Jump cursor")))
105 (YaTeX-19-define-sub-menu
106 YaTeX-mode-map [menu-bar yatex jump]
107 '(corres "Goto corersponding position" YaTeX-goto-corresponding-*)
108 '(main "Visit main source" (lambda () (interactive) (YaTeX-visit-main)))
109 '(main-other "Visit main source other window" YaTeX-visit-main-other-window)
110 )
112 ;; ===========================================================================
113 (define-key YaTeX-mode-map [menu-bar yatex sepcom]
114 '("---" . nil))
116 ;; Comment/Uncomment ---------------------------------------------------------
117 (YaTeX-19-define-sub-menu
118 YaTeX-mode-map [menu-bar yatex]
119 '(comment "Comment region or environment" YaTeX-comment-region)
120 '(uncomment "Unomment region or environment" YaTeX-uncomment-region)
121 '(commentp "Comment paragraph" YaTeX-comment-paragraph)
122 '(uncommentp "Uncomment paragraph" YaTeX-uncomment-paragraph)
123 '(sepcom "--" nil)
124 )
127 ;; ===========================================================================
128 ;; Change/Kill/Fill
129 (YaTeX-19-define-sub-menu
130 YaTeX-mode-map [menu-bar yatex]
131 '(change "Change macros" YaTeX-change-*)
132 '(kill "Kill macros" YaTeX-kill-*)
133 '(fillitem "Fill \\item" YaTeX-fill-item)
134 '(newline "Newline" YaTeX-intelligent-newline)
135 '(sepchg "--" nil)
136 )
138 ;; Menu for completions ------------------------------------------------------
141 ;;;(YaTeX-19-define-sub-menu
142 ;;; YaTeX-mode-map [menu-bar yatex]
143 ;;; '(secr "Section-type command on region" YaTeX-make-section-region)
144 ;;; '(sec "Section-type command" YaTeX-make-section))
146 (define-key YaTeX-mode-map [menu-bar yatex sectionr]
147 (cons "Section-type region(long name)"
148 (make-sparse-keymap "Enclose region with section-type macro")))
149 (define-key YaTeX-mode-map [menu-bar yatex section]
150 (cons "Section-type(long name)"
151 (make-sparse-keymap "Section-type macro")))
152 (let ((sorted-section
153 (sort
154 (delq nil
155 (mapcar (function (lambda (s)
156 (if (> (length (car s)) 5)
157 (car s))))
158 (append section-table user-section-table)))
159 'string<)))
160 (apply 'YaTeX-19-define-sub-menu
161 YaTeX-mode-map [menu-bar yatex section]
162 (mapcar (function (lambda (secname)
163 (list (intern secname) secname
164 (list 'lambda ()
165 (list 'interactive)
166 (list 'YaTeX-make-section
167 nil nil nil secname)))))
168 sorted-section))
169 (apply 'YaTeX-19-define-sub-menu
170 YaTeX-mode-map [menu-bar yatex sectionr]
171 (mapcar (function (lambda (secname)
172 (list (intern secname) secname
173 (list 'lambda ()
174 (list 'interactive)
175 (list 'YaTeX-make-section
176 nil
177 (list 'region-beginning)
178 (list 'region-end)
179 secname)))))
180 sorted-section)))
182 (define-key YaTeX-mode-map [menu-bar yatex envr]
183 (cons "Environment region" (make-sparse-keymap "Environment region")))
184 (define-key YaTeX-mode-map [menu-bar yatex env]
185 (cons "Environment" (make-sparse-keymap "Environment")))
186 (let (prev envname)
187 (mapcar
188 (function
189 (lambda (envalist)
190 (setq envname (car envalist))
191 (define-key-after
192 (lookup-key YaTeX-mode-map [menu-bar yatex env])
193 (vector (intern envname))
194 (cons envname
195 (list 'lambda () (list 'interactive)
196 (list 'YaTeX-insert-begin-end
197 envname nil)))
198 prev)
199 (define-key-after
200 (lookup-key YaTeX-mode-map [menu-bar yatex envr])
201 (vector (intern envname))
202 (cons envname
203 (list 'lambda () (list 'interactive)
204 (list 'YaTeX-insert-begin-end
205 envname t)))
206 prev)
207 (setq prev (intern envname))))
208 (sort (append env-table user-env-table)
209 '(lambda (x y) (string< (car x) (car y))))))
211 ;; Other key bindings for window-system
212 ;(YaTeX-define-key [?\C- ] 'YaTeX-do-completion)
213 (define-key YaTeX-mode-map [?\M-\C- ] 'YaTeX-mark-environment)
215 ;; Highlightening
216 ;; メニューに比べてこっちは結構本気でやってます。
217 ;; だって文書構造がとっても分かり易いんだもん。
218 ;; みんなも hilit19.el を使おう!
219 ;;
220 ;; さて、まずは対応する {} をピカピカ範囲とするような関数を作る。
221 ;; これは hilit-LaTeX.el を参考にした。でも、ちゃんと section 型コマンドの
222 ;; 引数を数えて正しい位置までピカピカさせるよ〜ん!
224 (defun YaTeX-19-region-section-type (pattern)
225 "Return list of starting and end point of section-type commands of PATTERN."
226 (if (re-search-forward pattern nil t)
227 (let ((m0 (match-beginning 0)) cmd (argc 1))
228 (setq cmd (substring (YaTeX-match-string 0) 1 -1)
229 argc (or (car (cdr (YaTeX-lookup-table cmd 'section))) argc))
230 (cons m0
231 (progn (skip-chars-backward "^{") (forward-char -2)
232 (while (> argc 0)
233 (skip-chars-forward "^{")
234 (forward-list 1)
235 (setq argc (1- argc)))
236 (point))))))
238 (defun YaTeX-19-region-large-type (pattern)
239 "Return list of large-type contents.
240 Assumes PATTERN begins with `{'."
241 (if (re-search-forward pattern nil t)
242 (let ((m0 (match-beginning 0)))
243 (goto-char m0)
244 (skip-chars-forward "^ \t\n")
245 (skip-chars-forward " \t\n")
246 (cons (point)
247 (progn (goto-char m0) (forward-list 1)
248 (1- (point)))))))
250 ;; 些細なことだが % の前の文字もピカリとさせてしまうようで… >hilit19
251 ;; ↓この関数は下の hilit-set-mode-patterns の "[^\\]\\(%\\).*$" に
252 ;; 依存している
253 (defun YaTeX-19-region-comment (pattern)
254 "Return list of comment start and end point."
255 (if (re-search-forward pattern nil t)
256 (cons (match-beginning 2) (match-end 0))))
258 ;;(make-face 'tt)
259 ;;(set-face-font 'tt "-schumacher-clean-medium-r-normal--*-*-*-*-*-*-*-*")
260 ;;(hilit-translate 'tt "white")
262 (defvar YaTeX-hilit-patterns-alist
263 '(
264 ;; comments
265 (YaTeX-19-region-comment "\\([^\\]\\|^\\)\\(%\\).*$" comment)
267 (YaTeX-19-region-section-type "\\\\footnote\\(mark\\|text\\)?{" keyword)
268 ("\\\\[a-z]+box" 0 keyword)
269 (YaTeX-19-region-section-type "\\\\\\(v\\|h\\)space\\(\*\\)?{" keyword)
271 ;; (re-)define new commands/environments/counters
272 (YaTeX-19-region-section-type
273 "\\\\\\(re\\)?new\\(environment\\|command\\|theorem\\|length\\|counter\\){"
274 defun)
275 (YaTeX-19-region-section-type
276 "\\\\textbf{" bold)
278 ;; various declarations/definitions
279 (YaTeX-19-region-section-type
280 "\\\\\\(set\\|setto\\|addto\\)\\(length\\|width\\|counter\\){"
281 define)
282 (YaTeX-19-region-section-type
283 "\\\\\\(title\\|author\\|date\\|thanks\\){" define)
285 ("\\\\document\\(style\\|class\\)\\(\\[.*\\]\\)?{" "}" decl)
286 ("\\\\\\(begin\\|end\\|nofiles\\|includeonly\\){" "}" decl)
287 ("\\\\\\(raggedright\\|makeindex\\|makeglossary\\|maketitle\\)\\b" 0 decl)
288 ("\\\\\\(pagestyle\\|thispagestyle\\|pagenumbering\\){" "}" decl)
289 ("\\\\\\(normalsize\\|small\\|footnotesize\\|scriptsize\\|tiny\\|large\\|Large\\|LARGE\\|huge\\|Huge\\)\\b" 0 decl)
290 ("\\\\\\(appendix\\|tableofcontents\\|listoffigures\\|listoftables\\)\\b"
291 0 decl)
292 ("\\\\\\(bf\\|em\\|it\\|rm\\|sf\\|sl\\|ss\\|tt\\)\\b" 0 decl)
294 ;; label-like things
295 ;;this should be customized by YaTeX-item-regexp
296 ("\\\\\\(sub\\)*item\\b\\(\\[[^]]*\\]\\)?" 0 label)
297 (YaTeX-19-region-section-type
298 "\\\\caption\\(\\[[^]]*\\]\\)?{" label)
300 ;; formulas
301 ("[^\\]\\\\(" "\\\\)" formula) ; \( \)
302 ("[^\\]\\\\\\[" "\\\\\\]" formula) ; \[ \]
303 ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\)"
304 "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\).*}"
305 formula)
306 ("[^\\$]\\($\\($[^$]*\\$\\|[^$]*\\)\\$\\)" 1 formula); '$...$' or '$$...$$'
308 ;; things that bring in external files
309 ("\\\\\\(include\\|input\\|bibliography\\){" "}" include)
311 ;; "wysiwyg" emphasis -- these don't work with nested expressions
312 (YaTeX-19-region-large-type "{\\\\\\(em\\|it\\|sl\\)" italic)
313 (YaTeX-19-region-large-type "{\\\\bf" bold)
314 ;;;(YaTeX-19-region-large-type "{\\\\tt" tt)
315 ;;;("\\\\begin{verbatim" "\\\\end{verbatim" tt)
317 ("``" "''" string)
319 ;; things that do some sort of cross-reference
320 (YaTeX-19-region-section-type
321 "\\\\\\(\\(no\\)?cite\\|\\(page\\)?ref\\|label\\|index\\|glossary\\){"
322 crossref))
323 "*Hiliting pattern alist for LaTeX text.")
325 ;;(defvar YaTeX-hilit-pattern-adjustment-default nil)
326 ;; ↑いらなくなった。
327 (defvar YaTeX-hilit-pattern-adjustment-private nil
328 "*Adjustment hilit-pattern-alist for default yatex-mode's pattern.")
329 (defvar YaTeX-hilit-sectioning-face
330 '(yellow/dodgerblue yellow/slateblue)
331 "*Hilightening face for sectioning unit. '(FaceForLight FaceForDark)")
332 (defvar YaTeX-hilit-sectioning-attenuation-rate
333 '(15 40)
334 "*Maximum attenuation rate of sectioning face. '(ForeRate BackRate)
335 Each rate specifies how much portion of RGB value should be attenuated
336 towards to lowest sectioning unit. Numbers should be written in percentage.")
337 (defvar YaTeX-sectioning-patterns-alist nil
338 "Hilightening patterns for sectioning units.")
339 (defvar YaTeX-hilit-singlecmd-face
340 '(slateblue2 aquamarine)
341 "*Hilightening face for maketitle type. '(FaceForLight FaceForDark)")
343 ;;; セクションコマンドを、構造レベルの高さに応じて色の濃度を変える
344 ;;; 背景が黒でないと何が嬉しいのか分からないに違いない.
345 ;;; もしかして白地の時は構造レベルに応じて色を明るくしたほうが良いのか?
346 ;(if (fboundp 'win32-color-values)
347 ; (fset 'x-color-values 'win32-color-values))
349 (cond
350 ((and (featurep 'hilit19) (fboundp 'x-color-values))
351 (let*((sectface
352 (car (if (eq hilit-background-mode 'dark)
353 (cdr YaTeX-hilit-sectioning-face)
354 YaTeX-hilit-sectioning-face)))
355 (sectcol (symbol-name sectface))
356 sect-pat-alist)
357 (if (string-match "/" sectcol)
358 (let ((fmin (nth 0 YaTeX-hilit-sectioning-attenuation-rate))
359 (bmin (nth 1 YaTeX-hilit-sectioning-attenuation-rate))
360 colorvalue fR fG fB bR bG bB pat fg bg level from face list lm)
361 (require 'yatexsec)
362 (setq fg (substring sectcol 0 (string-match "/" sectcol))
363 bg (substring sectcol (1+ (string-match "/" sectcol)))
364 colorvalue (x-color-values fg)
365 fR (/ (nth 0 colorvalue) 256)
366 fG (/ (nth 1 colorvalue) 256)
367 fB (/ (nth 2 colorvalue) 256)
368 colorvalue (x-color-values bg)
369 bR (/ (nth 0 colorvalue) 256)
370 bG (/ (nth 1 colorvalue) 256)
371 bB (/ (nth 2 colorvalue) 256)
372 lm YaTeX-sectioning-max-level
373 list YaTeX-sectioning-level)
374 (while list
375 (setq pat (concat YaTeX-ec-regexp (car (car list))
376 "\\*?\\(\\[[^]]*\\]\\)?{")
377 level (cdr (car list))
378 fg (format "hex-%02x%02x%02x"
379 (- fR (/ (* level fR fmin) lm 100))
380 (- fG (/ (* level fG fmin) lm 100))
381 (- fB (/ (* level fB fmin) lm 100)))
382 bg (format "hex-%02x%02x%02x"
383 (- bR (/ (* level bR bmin) lm 100))
384 (- bG (/ (* level bG bmin) lm 100))
385 (- bB (/ (* level bB bmin) lm 100)))
386 from (intern (format "sectioning-%d" level))
387 face (intern (concat fg "/" bg)))
388 (hilit-translate from face)
389 (setq sect-pat-alist
390 (cons;;(list pat "}" face)
391 (list 'YaTeX-19-region-section-type pat face)
392 sect-pat-alist))
393 (setq list (cdr list)))
394 (setq YaTeX-sectioning-patterns-alist sect-pat-alist))))))
396 ;; ローカルなマクロを読み込んだ後 redraw すると
397 ;; ローカルマクロを keyword として光らせる(keywordじゃまずいかな…)。
398 (defun YaTeX-19-collect-macros ()
399 (cond
400 ((and (featurep 'hilit19) (fboundp 'hilit-translate))
401 (let ((get-face
402 (function
403 (lambda (table)
404 (cond
405 ((eq hilit-background-mode 'light) (car table))
406 ((eq hilit-background-mode 'dark) (car (cdr table)))
407 (t nil)))))
408 sect single)
409 (hilit-translate
410 ;;sectioning (funcall get-face YaTeX-hilit-sectioning-face)
411 macro (funcall get-face YaTeX-hilit-singlecmd-face))
412 (if (setq sect (append user-section-table tmp-section-table))
413 (setq sect (concat "\\\\\\("
414 (mapconcat
415 (function
416 (lambda (s) (regexp-quote (car s))))
417 sect
418 "\\|")
419 "\\){")))
420 (if (setq single (append user-singlecmd-table tmp-singlecmd-table))
421 (setq single (concat "\\\\\\("
422 (mapconcat
423 (function (lambda (s) (regexp-quote (car s))))
424 single
425 "\\|")
426 "\\)\\b")))
427 (setq hilit-patterns-alist ;Remove at first.
428 (delq (assq 'yatex-mode hilit-patterns-alist) hilit-patterns-alist)
429 hilit-patterns-alist
430 (cons
431 (cons 'yatex-mode
432 (append
433 (list nil)
434 YaTeX-sectioning-patterns-alist
435 YaTeX-hilit-pattern-adjustment-private
436 ;;YaTeX-hilit-pattern-adjustment-default
437 YaTeX-hilit-patterns-alist
438 (delq nil
439 (list
440 (if sect (list
441 'YaTeX-19-region-section-type
442 sect
443 'keyword))
444 (if single (list single 0 'macro))))))
445 hilit-patterns-alist))))))
446 ;;(YaTeX-19-collect-macros) ;causes an error
447 (defun YaTeX-hilit-recenter (arg)
448 "Collect current local macro and hilit-recenter."
449 (interactive "P")
450 (YaTeX-19-collect-macros)
451 (hilit-recenter arg))
452 (if (fboundp 'hilit-recenter) ;Replace hilit-recenter with
453 (mapcar (function (lambda (key) ;YaTeX-hilit-recenter in yatex-mode
454 (define-key YaTeX-mode-map key 'YaTeX-hilit-recenter)))
455 (where-is-internal 'hilit-recenter)))
457 (defun YaTeX-switch-to-new-window ()
458 (let ((c 0) (i 1) (free (make-string win:max-configs ? )))
459 (while (< i win:max-configs)
460 (or (aref win:configs i) (aset free i (+ i win:base-key)))
461 (setq i (1+ i)))
462 (while (not (string-match (char-to-string c) free))
463 (message "Which window to create? [%s]: " free)
464 (setq c (read-char)))
465 (message "Creating window [%c]" c)
466 (set-buffer (get-buffer-create "*scratch*"))
467 (win:switch-window (- c win:base-key))))
469 (defun YaTeX-visit-main-other-frame ()
470 "Visit main file in other frame.
471 WARNING, This code is not perfect."
472 (interactive)
473 (if (YaTeX-main-file-p) (message "I think this is main LaTeX source.")
474 (let (parent)
475 (save-excursion (YaTeX-visit-main t) (setq parent (current-buffer)))
476 (cond
477 ((get-buffer-window parent t)
478 (goto-buffer-window parent))
479 ((and (featurep 'windows) win:use-frame)
480 (YaTeX-switch-to-new-window)
481 (switch-to-buffer parent))
482 (t (switch-to-buffer-other-frame (buffer-name parent)))))))
484 (defun YaTeX-goto-corresponding-*-other-frame (arg)
485 "Go to corresponding object in other frame."
486 (interactive "P")
487 (let (b p)
488 (save-window-excursion
489 (save-excursion
490 (YaTeX-goto-corresponding-* arg)
491 (setq b (current-buffer) p (point))))
492 (cond
493 ((get-buffer-window b t)
494 (goto-buffer-window b)
495 (goto-char p))
496 ((and (featurep 'windows) win:use-frame)
497 (YaTeX-switch-to-new-window)
498 (switch-to-buffer b)
499 (goto-char p))
500 (t (switch-to-buffer-other-frame (buffer-name b))
501 (goto-char p))))
502 )
504 ;;; reverseVideo にして hilit-background-mode を 'dark
505 ;;; にしている人は数式などが暗くなりすぎて見づらいかもしれない。
506 ;;; 次のコードを hilit19 をロードしている場所の直後に置くとちょっ
507 ;;; とはまし。
508 ;;; (if (eq hilit-background-mode 'dark)
509 ;;; (hilit-translate
510 ;;; string 'mediumspringgreen
511 ;;; formula 'khaki
512 ;;; label 'yellow-underlined))
513 (and YaTeX-emacs-19
514 (boundp 'byte-compile-current-file)
515 (if (and (boundp 'window-system) window-system)
516 (require 'hilit19)
517 (error "Byte compile this file on window system! Not `-nw'!")))
519 (provide 'yatex19)