blob: 0f4e53f7fe2789a6248fe3cfc1c825d0770bb934 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
;; -*- lisp -*-
;;
;; @(#)psgml-startup.el -- psgml startup elisp file.
;; -- by shige@FreeBSD.ORG
;; setup load-path
(if (not (fboundp 'normal-top-level-add-subdirs-to-load-path))
(setq load-path (append '(
"%%PSGML_LISPDIR%%"
) load-path)))
(defalias 'sgml-mode 'psgml-mode)
(defalias 'xml-mode 'pxml-mode)
(autoload 'psgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'pxml-mode "psgml" "Major mode to edit XML files." t)
(setq auto-mode-alist
(append '(
("\\.s?html?\\'" . sgml-mode)
("\\.xml\\'" . xml-mode)
) auto-mode-alist))
(setq sgml-custom-dtd
'(("HTML" "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">")
("HTML 2.0" "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">")
("HTML 2.0 Level 1"
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0 Level 1//EN\">")
("HTML 2.0 Level 2"
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0 Level 2//EN\">")
("HTML 2.0 Strict Level 1"
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0 Strict Level 1//EN\">")
("HTML 2.0 Strict Level 2"
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0 Strict Level 2//EN\">")
("HTML 3.2" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">")
("HTML 4.0" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">")
("HTML 4.0 Transitional"
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">")
("HTML 4.0 Frameset"
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Frameset//EN\">")
("HTML 4.01" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">")
("HTML 4.01 Transitional"
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">")
("HTML 4.01 Frameset"
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">")
("XHTML 1.0 Strict"
"<?xml version=\"1.0\"?><!-- -*- xml -*- -->\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">")
("XHTML 1.0 Transitional"
"<?xml version=\"1.0\"?><!-- -*- xml -*- -->\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
("XHTML 1.0 Frameset"
"<?xml version=\"1.0\"?><!-- -*- xml -*- -->\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">")
("DocBook V2.4.1"
"<!DOCTYPE DOCBOOK PUBLIC \"-//Davenport//DTD DocBook V2.4.1//EN\">")
("DocBook V3.0"
"<!DOCTYPE DOCBOOK PUBLIC \"-//Davenport//DTD DocBook V3.0//EN\">")
("DocBook V3.1"
"<!DOCTYPE DOCBOOK PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">")
("DocBook V4.0"
"<!DOCTYPE DOCBOOK PUBLIC \"-//OASIS//DTD DocBook V4.0//EN\">")
("DocBook V4.1"
"<!DOCTYPE DOCBOOK PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\">")
("LINUXDOC"
"<!DOCTYPE LINUXDOC PUBLIC \"-//FreeBSD//DTD linuxdoc//EN\">")
("LINUXDOC 1.0"
"<!DOCTYPE LINUXDOC PUBLIC \"-//FreeBSD//DTD linuxdoc 1.0//EN\">")
("LINUXDOC 1.1"
"<!DOCTYPE LINUXDOC PUBLIC \"-//FreeBSD//DTD linuxdoc 1.1//EN\">")
("Article"
"<!DOCTYPE Article PUBLIC \"ISO 12083:1993//DTD Article//EN\">")
("Book"
"<!DOCTYPE Book PUBLIC \"ISO 12083:1993//DTD Book//EN\">")
("Mathematics"
"<!DOCTYPE Mathematics PUBLIC \"ISO 12083:1993//DTD Mathematics//EN\">")
("Serial"
"<!DOCTYPE Serial PUBLIC \"ISO 12083:1993//DTD Serial//EN\">")
))
(setq-default sgml-auto-activate-dtd t)
(setq-default sgml-set-face t)
(make-face 'sgml-comment-face)
(make-face 'sgml-doctype-face)
(make-face 'sgml-end-tag-face)
(make-face 'sgml-entity-face)
(make-face 'sgml-ignored-face)
(make-face 'sgml-ms-end-face)
(make-face 'sgml-ms-start-face)
(make-face 'sgml-pi-face)
(make-face 'sgml-sgml-face)
(make-face 'sgml-short-ref-face)
(make-face 'sgml-start-tag-face)
(set-face-foreground 'sgml-comment-face "dark green")
(set-face-foreground 'sgml-doctype-face "maroon")
(set-face-foreground 'sgml-end-tag-face "SlateBlue")
(set-face-foreground 'sgml-entity-face "OrangeRed4")
(set-face-foreground 'sgml-ignored-face "maroon")
(set-face-background 'sgml-ignored-face "gray90")
(set-face-foreground 'sgml-ms-end-face "maroon")
(set-face-foreground 'sgml-ms-start-face "maroon")
(set-face-foreground 'sgml-pi-face "maroon")
(set-face-foreground 'sgml-sgml-face "maroon")
(set-face-foreground 'sgml-short-ref-face "goldenrod")
(set-face-foreground 'sgml-start-tag-face "SlateBlue")
(setq-default sgml-markup-faces
'((comment . sgml-comment-face)
(doctype . sgml-doctype-face)
(end-tag . sgml-end-tag-face)
(entity . sgml-entity-face)
(ignored . sgml-ignored-face)
(ms-end . sgml-ms-end-face)
(ms-start . sgml-ms-start-face)
(pi . sgml-pi-face)
(sgml . sgml-sgml-face)
(short-ref . sgml-short-ref-face)
(start-tag . sgml-start-tag-face)))
(provide 'psgml-startup)
|