[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xemacs psgml mode
On Tue, 06 Oct 1998 19:00:08 +0400, Boris Tobotras wrote:
> (add-hook 'sgml-mode-hook 'My-SGML-highlight)
И вот что я тут увлекшись наваял:
(make-face 'tei-head-1-face)
(set-face-foreground 'tei-head-1-face "dark green")
(set-face-font 'tei-head-1-face "-*-courier-bold-r-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-head-2-face)
(set-face-foreground 'tei-head-2-face "dark blue")
(set-face-font 'tei-head-2-face "-*-courier-bold-r-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-head-3-face)
(set-face-foreground 'tei-head-3-face "dark green")
(set-face-font 'tei-head-3-face "-*-courier-normal-r-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-head-4-face)
(set-face-foreground 'tei-head-4-face "dark blue")
(set-face-font 'tei-head-4-face "-*-courier-normal-r-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-head-5-face)
(set-face-foreground 'tei-head-5-face "brown")
(set-face-font 'tei-head-5-face "-*-courier-bold-r-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-emph-face)
(set-face-font 'tei-emph-face "-*-lucidatypewriter-medium-i-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-title-face)
(set-face-font 'tei-title-face "-*-lucidatypewriter-bold-r-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-eg-face)
(set-face-font 'tei-eg-face "-*-lucidatypewriter-medium-r-*-*-*-180-*-*-*-*-koi8-*")
(make-face 'tei-label-face)
(set-face-font 'tei-label-face "-adobe-courier-medium-o-*-*-*-180-*-*-*-*-koi8-*")
(defun My-SGML-highlight ()
(setq
font-lock-keywords
'(
("<div1[^>]*><head/[^/]*/" . tei-head-1-face)
("<div1[^>]*><head[^>]*>.*</>" . tei-head-1-face)
("<div1[^>]*><head[^>]*>.*</head>" . tei-head-1-face)
("<div2[^>]*><head/[^/]*/" . tei-head-2-face)
("<div2[^>]*><head[^>]*>.*</>" . tei-head-2-face)
("<div2[^>]*><head[^>]*>.*</head>" . tei-head-2-face)
("<div3[^>]*><head/[^/]*/" . tei-head-3-face)
("<div3[^>]*><head[^>]*>.*</>" . tei-head-3-face)
("<div3[^>]*><head[^>]*>.*</head>" . tei-head-3-face)
("<div4[^>]*><head/[^/]*/" . tei-head-4-face)
("<div4[^>]*><head[^>]*>.*</>" . tei-head-4-face)
("<div4[^>]*><head[^>]*>.*</head>" . tei-head-4-face)
("<div5[^>]*><head/[^/]*/" . tei-head-5-face)
("<div5[^>]*><head[^>]*>.*</>" . tei-head-5-face)
("<div5[^>]*><head[^>]*>.*</head>" . tei-head-5-face)
("<emph/[^/]*/" . tei-emph-face)
("<emph[^>]*>.*</emph>" . tei-emph-face)
("<emph[^>]*>.*</>" . tei-emph-face)
("<hi/[^/]*/" . tei-emph-face)
("<hi[^>]*>.*</emph>" . tei-emph-face)
("<hi[^>]*>.*</>" . tei-emph-face)
("<title/[^/]*/" . tei-title-face)
("<title[^>]*>.*</emph>" . tei-title-face)
("<title[^>]*>.*</>" . tei-title-face)
("<eg[^>]*>.*</>" . tei-eg-face)
("<eg[^>]*>.*</eg>" . tei-eg-face)
("<code/[^/]*/" . tei-eg-face)
("<code[^>]*>.*</>" . tei-eg-face)
("<code[^>]*>.*</code>" . tei-eg-face)
("<kw/[^/]*/" . tei-eg-face)
("<kw[^>]*>.*</>" . tei-eg-face)
("<kw[^>]*>.*</kw>" . tei-eg-face)
("<label/[^/]*/" . tei-label-face)
("<label[^>]*>.*</>" . tei-label-face)
("<label[^>]*>.*</label>" . tei-label-face)
)
)
)
--
Best regards, -- Boris.