.emacs-my
changeset 698 2a081d4e2e7c
parent 691 0722f3949eda
child 699 9ec79850e725
--- a/.emacs-my	Sun Sep 04 23:38:40 2011 +0300
+++ b/.emacs-my	Mon Sep 19 21:04:48 2011 +0300
@@ -1639,26 +1639,32 @@
 ;;; ----------------------------------------------------------------
 (message "psgml")
 
+(setq my-html-template
+      '("html"
+        (nil
+         "\n<head>" \n
+         "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" (read-input "Charset: ") "\">" \n
+         "<title>" (setq str (read-input "Title: ")) "</title>\n"
+         "</head>\n"
+         "<body>\n<h1>" str "</h1>"
+         "\n<address>" \n
+         "<a href=\"mailto:" user-mail-address "\">" (user-full-name) "</a>" \n
+         "</address>" \n
+         "</body>\n"
+         ))
+      )
+
 (setq sgml-set-face t)                  ; for highlighting in sgml
 (eval-after-load 'sgml-mode
   '(progn
-     (setq html-tag-alist
-           (cons
-            '("html" (nil
-                      "\n<head>" \n
-                      "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" (read-input "Charset: ") "\">" \n
-                      "<title>" (setq str (read-input "Title: ")) "</title>\n"
-                      "</head>\n"
-                      "<body>\n<h1>" str "</h1>"
-                      "\n<address>" \n
-                      "<a href=\"mailto:" user-mail-address "\">" (user-full-name) "</a>" \n
-                      "</address>" \n
-                      "</body>\n"
-                      ))
-            (my-filter
-             (lambda (item) (not (equal (car item) "html")))
-             html-tag-alist)))
-     ))
+     (unless (featurep 'psgml)
+       (setq html-tag-alist
+             (cons
+              my-html-template
+              (my-filter
+               (lambda (item) (not (equal (car item) "html")))
+               html-tag-alist)))
+     )))
 
 ;;; ----------------------------------------------------------------
 (message "sh, bash")