Mercurial > hgrepos > hgweb.cgi > 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 wrap: on
line diff
--- a/yatex19.el Mon Sep 19 16:54:19 1994 +0000 +++ b/yatex19.el Mon Oct 24 17:26:47 1994 +0000 @@ -1,7 +1,7 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX facilities for Emacs 19 ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Sat Sep 17 12:53:23 1994 on figaro +;;; Last modified Fri Sep 23 04:30:27 1994 on figaro ;;; $Id$ ;;; $B$H$j$"$($:(B hilit19 $B$r;H$C$F$$$k;~$K?'$,IU$/$h$&$K$7$F(B @@ -9,6 +9,8 @@ ;;; $B$$$C$?$$C/$,%a%K%e!<%P!<;H$C$F(BLaTeX$B%=!<%9=q$/$s$@$m$&$+(B? ;;; $B$^$"$$$$$dN}=,N}=,!#8e$m$NJ}$K$A$g$C$H%3%a%s%H$"$j!#(B +(require 'yatex) + (defun YaTeX-19-define-sub-menu (map vec &rest bindings) "Define sub-menu-item in MAP at vector VEC as BINDINGS. BINDINGS is a form with optional length: (symbol title binding). @@ -111,7 +113,7 @@ '(comment "Comment region or environment" YaTeX-comment-region) '(uncomment "Unomment region or environment" YaTeX-uncomment-region) '(commentp "Comment paragraph" YaTeX-comment-paragraph) - '(uncommentp "Unomment paragraph" YaTeX-uncomment-paragraph) + '(uncommentp "Uncomment paragraph" YaTeX-uncomment-paragraph) '(sepcom "--" nil) ) @@ -139,7 +141,7 @@ (cons "Section-type region(long name)" (make-sparse-keymap "Enclose region with section-type macro"))) (define-key YaTeX-mode-map [menu-bar yatex section] - (cons "Sectio-type(long name)" + (cons "Section-type(long name)" (make-sparse-keymap "Section-type macro"))) (let ((sorted-section (sort @@ -214,12 +216,23 @@ 'sectioning)) "Adjustment for hilit19's LaTeX hilit pattern.") (defvar YaTeX-hilit-sectioning-face - 'yellow/cornflowerblue) + '(yellow/dodgerblue yellow/cornflowerblue)) +(defvar YaTeX-hilit-singlecmd-face + '(slateblue2 aquamarine)) (defun YaTeX-19-collect-macro () (cond ((and (featurep 'hilit19) (fboundp 'hilit-translate)) - (hilit-translate sectioning YaTeX-hilit-sectioning-face) - (setq hilit-patterns-alist ;Remove at the first time. + (let ((get-face + (function + (lambda (table) + (cond + ((eq hilit-background-mode 'light) (car table)) + ((eq hilit-background-mode 'dark) (car (cdr table))) + (t nil)))))) + (hilit-translate + sectioning (funcall get-face YaTeX-hilit-sectioning-face) + macro (funcall get-face YaTeX-hilit-singlecmd-face))) + (setq hilit-patterns-alist ;Remove at first. (delq 'yatex-mode hilit-patterns-alist) hilit-patterns-alist (cons @@ -235,7 +248,15 @@ (append user-section-table tmp-section-table) "\\|") "\\){") - "}" 'keyword)))) + "}" 'keyword) + (list + (concat "\\\\\\(" + (mapconcat + (function (lambda (s) (regexp-quote (car s)))) + (append user-singlecmd-table tmp-singlecmd-table) + "\\|") + "\\)") + 0 'macro)))) hilit-patterns-alist))))) (YaTeX-19-collect-macro) (defun YaTeX-hilit-recenter (arg)