yatex

diff yatex19.el @ 47:d7e7b4654058

Support special popup frame. Refine highlightening method. On Emacs-19, couldn't save user completion table correctly, fixed.
author yuuji
date Mon, 24 Oct 1994 17:26:47 +0000
parents cd1b63102eed
children eb0512bfcb7f
line diff
     1.1 --- a/yatex19.el	Mon Sep 19 16:54:19 1994 +0000
     1.2 +++ b/yatex19.el	Mon Oct 24 17:26:47 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 Sat Sep 17 12:53:23 1994 on figaro
     1.8 +;;; Last modified Fri Sep 23 04:30:27 1994 on figaro
     1.9  ;;; $Id$
    1.10  
    1.11  ;;; $B$H$j$"$($:(B hilit19 $B$r;H$C$F$$$k;~$K?'$,IU$/$h$&$K$7$F(B
    1.12 @@ -9,6 +9,8 @@
    1.13  ;;; $B$$$C$?$$C/$,%a%K%e!<%P!<;H$C$F(BLaTeX$B%=!<%9=q$/$s$@$m$&$+(B?
    1.14  ;;; $B$^$"$$$$$dN}=,N}=,!#8e$m$NJ}$K$A$g$C$H%3%a%s%H$"$j!#(B
    1.15  
    1.16 +(require 'yatex)
    1.17 +
    1.18  (defun YaTeX-19-define-sub-menu (map vec &rest bindings)
    1.19    "Define sub-menu-item in MAP at vector VEC as BINDINGS.
    1.20  BINDINGS is a form with optional length: (symbol title binding).
    1.21 @@ -111,7 +113,7 @@
    1.22   '(comment	"Comment region or environment" YaTeX-comment-region)
    1.23   '(uncomment	"Unomment region or environment" YaTeX-uncomment-region)
    1.24   '(commentp	"Comment paragraph" YaTeX-comment-paragraph)
    1.25 - '(uncommentp	"Unomment paragraph" YaTeX-uncomment-paragraph)
    1.26 + '(uncommentp	"Uncomment paragraph" YaTeX-uncomment-paragraph)
    1.27   '(sepcom	"--"	nil)
    1.28  )
    1.29  
    1.30 @@ -139,7 +141,7 @@
    1.31    (cons "Section-type region(long name)"
    1.32  	(make-sparse-keymap "Enclose region with section-type macro")))
    1.33  (define-key YaTeX-mode-map [menu-bar yatex section]
    1.34 -  (cons "Sectio-type(long name)"
    1.35 +  (cons "Section-type(long name)"
    1.36  	(make-sparse-keymap "Section-type macro")))
    1.37  (let ((sorted-section
    1.38         (sort
    1.39 @@ -214,12 +216,23 @@
    1.40      'sectioning))
    1.41    "Adjustment for hilit19's LaTeX hilit pattern.")
    1.42  (defvar YaTeX-hilit-sectioning-face
    1.43 -  'yellow/cornflowerblue)
    1.44 +  '(yellow/dodgerblue yellow/cornflowerblue))
    1.45 +(defvar YaTeX-hilit-singlecmd-face
    1.46 +  '(slateblue2 aquamarine))
    1.47  (defun YaTeX-19-collect-macro ()
    1.48    (cond
    1.49     ((and (featurep 'hilit19) (fboundp 'hilit-translate))
    1.50 -    (hilit-translate sectioning YaTeX-hilit-sectioning-face)
    1.51 -    (setq hilit-patterns-alist		;Remove at the first time.
    1.52 +    (let ((get-face
    1.53 +	   (function
    1.54 +	    (lambda (table)
    1.55 +	      (cond
    1.56 +	       ((eq hilit-background-mode 'light) (car table))
    1.57 +	       ((eq hilit-background-mode 'dark) (car (cdr table)))
    1.58 +	       (t nil))))))
    1.59 +      (hilit-translate
    1.60 +       sectioning (funcall get-face YaTeX-hilit-sectioning-face)
    1.61 +       macro (funcall get-face YaTeX-hilit-singlecmd-face)))
    1.62 +    (setq hilit-patterns-alist		;Remove at first.
    1.63  	  (delq 'yatex-mode hilit-patterns-alist)
    1.64  	  hilit-patterns-alist
    1.65  	  (cons
    1.66 @@ -235,7 +248,15 @@
    1.67  			     (append user-section-table tmp-section-table)
    1.68  			     "\\|")
    1.69  			    "\\){")
    1.70 -		    "}" 'keyword))))
    1.71 +		    "}" 'keyword)
    1.72 +		   (list
    1.73 +		    (concat "\\\\\\("
    1.74 +			    (mapconcat
    1.75 +			     (function (lambda (s) (regexp-quote (car s))))
    1.76 +			     (append user-singlecmd-table tmp-singlecmd-table)
    1.77 +			     "\\|")
    1.78 +			    "\\)")
    1.79 +		    0 'macro))))
    1.80  	   hilit-patterns-alist)))))
    1.81  (YaTeX-19-collect-macro)
    1.82  (defun YaTeX-hilit-recenter (arg)