comparison lisp/psgml/psgml-html.el @ 120:cca96a509cfe r20-1b12

Import from CVS: tag r20-1b12
author cvs
date Mon, 13 Aug 2007 09:25:29 +0200
parents 9f59509498e1
children b980b6286996
comparison
equal deleted inserted replaced
119:d101af7320b8 120:cca96a509cfe
45 (require 'iso-sgml)) 45 (require 'iso-sgml))
46 (require 'tempo) ;essential part of html-helper-mode 46 (require 'tempo) ;essential part of html-helper-mode
47 47
48 ;;{{{ user variables 48 ;;{{{ user variables
49 49
50 (defgroup html nil
51 "HyperText Markup Language"
52 :group 'sgml)
53
54 (defgroup psgml-html nil
55 "HTML mode in conjunction with PSGML"
56 :tag "Psgml Html"
57 :prefix "html-helper-"
58 :group 'html
59 :group 'psgml)
60
50 ;; Set this to be whatever signature you want on the bottom of your pages. 61 ;; Set this to be whatever signature you want on the bottom of your pages.
51 (defvar html-helper-address-string 62 (defcustom html-helper-address-string
52 (concat "<a href=\"mailto:" (user-mail-address) "\">" 63 (concat "<a href=\"mailto:" (user-mail-address) "\">"
53 (user-full-name) "</a>") 64 (user-full-name) "</a>")
54 "*The default author string of each file.") 65 "*The default author string of each file."
55 66 :type 'string
56 (defvar html-helper-htmldtd-version "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n" 67 :group 'psgml-html)
57 "*Version of HTML DTD you're using.") 68
58 69 (defcustom html-helper-htmldtd-version "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
59 (defvar html-helper-do-write-file-hooks t 70 "*Version of HTML DTD you're using."
60 "*If not nil, then modify `local-write-file-hooks' to do timestamps.") 71 :type 'string
61 72 :group 'psgml-html)
62 (defvar html-helper-build-new-buffer t 73
63 "*If not nil, then insert `html-helper-new-buffer-strings' for new buffers.") 74 (defcustom html-helper-do-write-file-hooks t
64 75 "*If not nil, then modify `local-write-file-hooks' to do timestamps."
65 (defvar html-helper-timestamp-hook 'html-helper-default-insert-timestamp 76 :type 'boolean
77 :group 'psgml-html)
78
79 (defcustom html-helper-build-new-buffer t
80 "*If not nil, then insert `html-helper-new-buffer-strings' for new buffers."
81 :type 'boolean
82 :group 'psgml-html)
83
84 (defcustom html-helper-timestamp-hook 'html-helper-default-insert-timestamp
66 "*Hook called for timestamp insertion. 85 "*Hook called for timestamp insertion.
67 Override this for your own timestamp styles.") 86 Override this for your own timestamp styles."
87 :type 'boolean
88 :group 'psgml-html)
68 89
69 ;; strings you might want to change 90 ;; strings you might want to change
70 91
71 (defvar html-helper-new-buffer-template 92 (defcustom html-helper-new-buffer-template
72 '(html-helper-htmldtd-version 93 '(html-helper-htmldtd-version
73 "<html>\n" 94 "<html>\n"
74 " <head>\n" 95 " <head>\n"
75 " <title>" (p "Document Title: " title) "</title>\n" 96 " <title>" (p "Document Title: " title) "</title>\n"
76 " </head>\n" 97 " </head>\n"
84 html-helper-timestamp-start 105 html-helper-timestamp-start
85 html-helper-timestamp-end 106 html-helper-timestamp-end
86 "\n </body>\n</html>\n") 107 "\n </body>\n</html>\n")
87 "*Template for new buffers. 108 "*Template for new buffers.
88 Inserted by `html-helper-insert-new-buffer-strings' if 109 Inserted by `html-helper-insert-new-buffer-strings' if
89 `html-helper-build-new-buffer' is set to t") 110 `html-helper-build-new-buffer' is set to t"
90 111 :type 'sexp
91 (defvar html-helper-timestamp-start "<!-- hhmts start -->\n" 112 :group 'psgml-html)
113
114 (defcustom html-helper-timestamp-start "<!-- hhmts start -->\n"
92 "*Start delimiter for timestamps. 115 "*Start delimiter for timestamps.
93 Everything between `html-helper-timestamp-start' and 116 Everything between `html-helper-timestamp-start' and
94 `html-helper-timestamp-end' will be deleted and replaced with the output 117 `html-helper-timestamp-end' will be deleted and replaced with the output
95 of the functions `html-helper-timestamp-hook' if 118 of the functions `html-helper-timestamp-hook' if
96 `html-helper-do-write-file-hooks' is t") 119 `html-helper-do-write-file-hooks' is t"
97 120 :type 'string
98 (defvar html-helper-timestamp-end "<!-- hhmts end -->" 121 :group 'psgml-html)
122
123 (defcustom html-helper-timestamp-end "<!-- hhmts end -->"
99 "*End delimiter for timestamps. 124 "*End delimiter for timestamps.
100 Everything between `html-helper-timestamp-start' and 125 Everything between `html-helper-timestamp-start' and
101 `html-helper-timestamp-end' will be deleted and replaced with the output 126 `html-helper-timestamp-end' will be deleted and replaced with the output
102 of the function `html-helper-insert-timestamp' if 127 of the function `html-helper-insert-timestamp' if
103 `html-helper-do-write-file-hooks' is t") 128 `html-helper-do-write-file-hooks' is t"
129 :type 'string
130 :group 'psgml-html)
104 131
105 ;; control over what types of tags to load. By default, we load all the 132 ;; control over what types of tags to load. By default, we load all the
106 ;; ones we know of. 133 ;; ones we know of.
107 134
108 (defvar html-helper-types-to-install 135 (defcustom html-helper-types-to-install
109 '(anchor header logical phys list textel entity image head form) 136 '(anchor header logical phys list textel entity image head form)
110 "*List of tag types to install when html-helper-mode is first loaded. 137 "*List of tag types to install when html-helper-mode is first loaded.
111 If you want to not install some type of tag, override this variable. 138 If you want to not install some type of tag, override this variable.
112 Order is significant: menus go in this order.") 139 Order is significant: menus go in this order."
113 140 :type '(repeat symbol)
114 (defvar html-mode-hook nil 141 :group 'psgml-html)
115 "*Hook called by `html-mode'.") 142
143 (defcustom html-mode-hook nil
144 "*Hook called by `html-mode'."
145 :type 'hook
146 :group 'psgml-html)
116 147
117 ;;}}} end of user variables 148 ;;}}} end of user variables
118 ;;{{{ type based keymap and menu variable and function setup 149 ;;{{{ type based keymap and menu variable and function setup
119 150
120 ;; html-helper-mode has a concept of "type" of tags. Each type is a 151 ;; html-helper-mode has a concept of "type" of tags. Each type is a