yatex

diff yatex19.el @ 51:b0371b6ed799

Created `ChangeLog'. Log hereafter will be written in `ChangeLog'.
author yuuji
date Tue, 20 Dec 1994 21:00:21 +0000
parents eb0512bfcb7f
children 5d94deabb9f9
line diff
     1.1 --- a/yatex19.el	Fri Nov 25 08:26:13 1994 +0000
     1.2 +++ b/yatex19.el	Tue Dec 20 21:00:21 1994 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  ;;; -*- Emacs-Lisp -*-
     1.5  ;;; YaTeX facilities for Emacs 19
     1.6  ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
     1.7 -;;; Last modified Mon Nov 21 21:52:16 1994 on figaro
     1.8 +;;; Last modified Mon Dec 19 02:55:36 1994 on VFR
     1.9  ;;; $Id$
    1.10  
    1.11  ;;; とりあえず hilit19 を使っている時に色が付くようにして
    1.12 @@ -205,7 +205,10 @@
    1.13  ;; Highlightening
    1.14  ;; ローカルなマクロを読み込んだ後 redraw すると
    1.15  ;; ローカルマクロを keyword として光らせる(keywordじゃまずいかな…)。
    1.16 -(defvar YaTeX-hilit-pattern-adjustment
    1.17 +(defvar YaTeX-hilit-patterns-alist nil
    1.18 +  "*Hiliting pattern alist for LaTeX text.
    1.19 +Default value is equal to latex-mode's one.")
    1.20 +(defvar YaTeX-hilit-pattern-adjustment-default
    1.21    (list
    1.22     ;;\def が define なんだから new* も define でしょう。
    1.23     '("\\\\\\(re\\)?new\\(environment\\|command\\){" "}" define)
    1.24 @@ -215,17 +218,26 @@
    1.25      (concat "\\\\\\(" YaTeX-sectioning-regexp "\\){") "}"
    1.26      'sectioning)
    1.27     ;;eqnarray などの数式環境が入ってないみたい…
    1.28 -   '("\\\\begin{\\(eqnarray\\*?\\)\\|\\(equation\\*?\\)}"
    1.29 -     "\\\\end{\\(eqnarray\\*?\\)\\|\\(equation\\*?\\)}"
    1.30 +   '("\\\\begin{\\(eqnarray\\*?\\|equation\\*?\\)}"
    1.31 +     "\\\\end{\\(eqnarray\\*?\\|equation\\*?\\)}"
    1.32       formula))
    1.33    "Adjustment for hilit19's LaTeX hilit pattern.")
    1.34 +(defvar YaTeX-hilit-pattern-adjustment-private nil
    1.35 +  "*Private variable, same purpose as YaTeX-hilit-pattern-adjustment-default.")
    1.36  (defvar YaTeX-hilit-sectioning-face
    1.37 -  '(yellow/dodgerblue yellow/cornflowerblue))
    1.38 +  '(yellow/dodgerblue yellow/cornflowerblue)
    1.39 +  "*Hilightening face for sectioning unit.  '(FaceForLight FaceForDark)")
    1.40  (defvar YaTeX-hilit-singlecmd-face
    1.41 -  '(slateblue2 aquamarine))
    1.42 +  '(slateblue2 aquamarine)
    1.43 +  "*Hilightening face for maketitle type.  '(FaceForLight FaceForDark)")
    1.44  (defun YaTeX-19-collect-macro ()
    1.45    (cond
    1.46     ((and (featurep 'hilit19) (fboundp 'hilit-translate))
    1.47 +    (or YaTeX-hilit-patterns-alist
    1.48 +	(let ((alist (cdr (assq 'latex-mode hilit-patterns-alist))))
    1.49 +	  (setcar (assoc "\\\\item\\(\\[[^]]*\\]\\)?" alist)
    1.50 +		  (concat YaTeX-item-regexp "\\b\\(\\[[^]]*\\]\\)?"))
    1.51 +	  (setq YaTeX-hilit-patterns-alist alist)))
    1.52      (let ((get-face
    1.53  	   (function
    1.54  	    (lambda (table)
    1.55 @@ -242,8 +254,9 @@
    1.56  	  (cons
    1.57  	   (cons 'yatex-mode
    1.58  		 (append
    1.59 -		  YaTeX-hilit-pattern-adjustment
    1.60 -		  (cdr (assq 'latex-mode hilit-patterns-alist))
    1.61 +		  YaTeX-hilit-pattern-adjustment-private
    1.62 +		  YaTeX-hilit-pattern-adjustment-default
    1.63 +		  YaTeX-hilit-patterns-alist
    1.64  		  (list
    1.65  		   (list
    1.66  		    (concat "\\\\\\("
    1.67 @@ -259,7 +272,7 @@
    1.68  			     (function (lambda (s) (regexp-quote (car s))))
    1.69  			     (append user-singlecmd-table tmp-singlecmd-table)
    1.70  			     "\\|")
    1.71 -			    "\\)")
    1.72 +			    "\\)\\b")
    1.73  		    0 'macro))))
    1.74  	   hilit-patterns-alist)))))
    1.75  (YaTeX-19-collect-macro)