aboutsummaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2001-11-12 09:46:22 +0800
committerkuriyama <kuriyama@FreeBSD.org>2001-11-12 09:46:22 +0800
commit2b02b9035b7796fd8800a941c0b8516470bb71e8 (patch)
tree94432732499c70bdfbb1eae5aace7a4259b290c5 /editors
parent275b4bc4f4ff6bf359937cb961dddf2dfcacea0f (diff)
downloadfreebsd-ports-gnome-2b02b9035b7796fd8800a941c0b8516470bb71e8.tar.gz
freebsd-ports-gnome-2b02b9035b7796fd8800a941c0b8516470bb71e8.tar.zst
freebsd-ports-gnome-2b02b9035b7796fd8800a941c0b8516470bb71e8.zip
o Use sgml-mode for *.html files instead of html-mode.
o Turn on syntax highlighting by default. If you want to disable this, please add (setq sgml-set-face nil) after (require 'psgml-startup) line.
Diffstat (limited to 'editors')
-rw-r--r--editors/psgml-emacs/Makefile1
-rw-r--r--editors/psgml-emacs/files/psgml-startup.el.in45
-rw-r--r--editors/psgml/Makefile1
-rw-r--r--editors/psgml/files/psgml-startup.el.in45
4 files changed, 92 insertions, 0 deletions
diff --git a/editors/psgml-emacs/Makefile b/editors/psgml-emacs/Makefile
index 2f17a0757b17..c9828264943c 100644
--- a/editors/psgml-emacs/Makefile
+++ b/editors/psgml-emacs/Makefile
@@ -7,6 +7,7 @@
PORTNAME= psgml
PORTVERSION= ${PSGML_VER}
+PORTREVISION= 1
CATEGORIES= editors elisp
MASTER_SITES= ftp://ftp.lysator.liu.se/pub/sgml/
PKGNAMESUFFIX= -${EMACS_PORT_NAME}
diff --git a/editors/psgml-emacs/files/psgml-startup.el.in b/editors/psgml-emacs/files/psgml-startup.el.in
index bf710b769f23..3460d69ff988 100644
--- a/editors/psgml-emacs/files/psgml-startup.el.in
+++ b/editors/psgml-emacs/files/psgml-startup.el.in
@@ -12,6 +12,10 @@
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)
+(setq auto-mode-alist
+ (append (list '("\\.s?html?\\'" . sgml-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\">")
@@ -66,4 +70,45 @@
"<!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)
diff --git a/editors/psgml/Makefile b/editors/psgml/Makefile
index 2f17a0757b17..c9828264943c 100644
--- a/editors/psgml/Makefile
+++ b/editors/psgml/Makefile
@@ -7,6 +7,7 @@
PORTNAME= psgml
PORTVERSION= ${PSGML_VER}
+PORTREVISION= 1
CATEGORIES= editors elisp
MASTER_SITES= ftp://ftp.lysator.liu.se/pub/sgml/
PKGNAMESUFFIX= -${EMACS_PORT_NAME}
diff --git a/editors/psgml/files/psgml-startup.el.in b/editors/psgml/files/psgml-startup.el.in
index bf710b769f23..3460d69ff988 100644
--- a/editors/psgml/files/psgml-startup.el.in
+++ b/editors/psgml/files/psgml-startup.el.in
@@ -12,6 +12,10 @@
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)
+(setq auto-mode-alist
+ (append (list '("\\.s?html?\\'" . sgml-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\">")
@@ -66,4 +70,45 @@
"<!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)