comparison lisp/hm--html-menus/hm--html-not-standard.el @ 42:8b8b7f3559a2 r19-15b104

Import from CVS: tag r19-15b104
author cvs
date Mon, 13 Aug 2007 08:54:51 +0200
parents
children 6a22abad6937
comparison
equal deleted inserted replaced
41:5d6df4963a99 42:8b8b7f3559a2
1 ;;; hm--html-not-standard.el
2 ;;; v1.00; 22-Feb-1997
3 ;;; Copyright (C) 1997 Heiko Muenkel
4 ;;; email: muenkel@tnt.uni-hannover.de
5 ;;;
6 ;;; This program is free software; you can redistribute it and/or modify
7 ;;; it under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 2, or (at your option)
9 ;;; any later version.
10 ;;;
11 ;;; This program is distributed in the hope that it will be useful,
12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with this program; if not, write to the Free Software
18 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 ;;;
20 ;;;
21 ;;; Description:
22 ;;;
23 ;;; This file contains lisp code for the insertation of non standard
24 ;;; HTML 3.2 elements. I don't think, that's a good idea to use this
25 ;;; elements in any HTML documents :-)
26 ;;;
27 ;;; Installation:
28 ;;;
29 ;;; Put this file in one of your load path directories.
30 ;;;
31 ;;; Put a (require 'hm--html-not-standard) in your .emacs
32 ;;;
33 ;;; Look at the files hm--html-mode.el and hm--html-configuration
34 ;;; for further installation points.
35 ;;;
36
37 ;(require 'hm--html-mode)
38
39 (defun hm--html-add-server-side-include-command-with-parameter (command
40 parameter)
41 "This function adds a server side include command directive in the buffer.
42 The directive is only supported by the NCSA http daemon."
43 (interactive (list
44 (completing-read
45 "Include Command: "
46 hm--html-server-side-include-command-with-parameter-alist)
47 (read-string "Parameterlist sepearted by '?': ")))
48 (let ((start (point)))
49 (if (string= command "")
50 (error "ERROR: No command specified !")
51 (if (string= parameter "")
52 (error "ERROR: No parameter specified !")
53 (if (= ?| (string-to-char command))
54 (if (= ?? (string-to-char parameter))
55 (insert "<INC SRVURL \"" command parameter "\">")
56 (insert "<INC SRVURL \"" command "?" parameter "\">"))
57 (if (= ?? (string-to-char parameter))
58 (insert "<INC SRVURL \"|" command parameter "\">")
59 (insert "<INC SRVURL \"|" command "?" parameter "\">")))
60 (html-maybe-deemphasize-region (1+ start) (1- (point)))))))
61
62
63 (defun hm--html-add-plaintext ()
64 "Adds the HTML tags for plaintext."
65 (interactive)
66 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
67 "<XMP>"
68 'hm--html-insert-end-tag-with-newline
69 "</XMP>"))
70
71
72 (defun hm--html-add-plaintext-to-region ()
73 "Adds the HTML tags for plaintext to the region."
74 (interactive)
75 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
76 "<XMP>"
77 'hm--html-insert-end-tag-with-newline
78 "</XMP>"))
79
80
81 (defun hm--html-add-abstract ()
82 "Adds the HTML tags for abstract text at the point in the current buffer."
83 (interactive)
84 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
85 "<ABSTRACT>"
86 'hm--html-insert-end-tag-with-newline
87 "</ABSTRACT>"))
88
89
90 (defun hm--html-add-abstract-to-region ()
91 "Adds the HTML tags for abstract text to the region."
92 (interactive)
93 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
94 "<ABSTRACT>"
95 'hm--html-insert-end-tag-with-newline
96 "</ABSTRACT>"))
97
98
99 (defun hm--html-add-quote ()
100 "Adds the HTML tags for Quote at the point in the current buffer."
101 (interactive)
102 (hm--html-add-tags 'hm--html-insert-start-tag
103 "<Q>"
104 'hm--html-insert-end-tag
105 "</Q>"))
106
107
108 (defun hm--html-add-quote-to-region ()
109 "Adds the HTML tags for Quote to the region."
110 (interactive)
111 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
112 "<Q>"
113 'hm--html-insert-end-tag
114 "</Q>"))
115
116
117 (defun hm--html-add-person ()
118 "Adds the HTML tags for Person at the point in the current buffer."
119 (interactive)
120 (hm--html-add-tags 'hm--html-insert-start-tag
121 "<PERSON>"
122 'hm--html-insert-end-tag
123 "</PERSON>"))
124
125
126 (defun hm--html-add-person-to-region ()
127 "Adds the HTML tags for Person to the region."
128 (interactive)
129 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
130 "<PERSON>"
131 'hm--html-insert-end-tag
132 "</PERSON>"))
133
134
135 (defun hm--html-add-instance ()
136 "Adds the HTML tags for Instance at the point in the current buffer."
137 (interactive)
138 (hm--html-add-tags 'hm--html-insert-start-tag
139 "<INS>"
140 'hm--html-insert-end-tag
141 "</INS>"))
142
143
144 (defun hm--html-add-instance-to-region ()
145 "Adds the HTML tags for Instance to the region."
146 (interactive)
147 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
148 "<INS>"
149 'hm--html-insert-end-tag
150 "</INS>"))
151
152
153 (defun hm--html-add-publication ()
154 "Adds the HTML tags for Publication at the point in the current buffer."
155 (interactive)
156 (hm--html-add-tags 'hm--html-insert-start-tag
157 "<PUB>"
158 'hm--html-insert-end-tag
159 "</PUB>"))
160
161
162 (defun hm--html-add-publication-to-region ()
163 "Adds the HTML tags for Publication to the region."
164 (interactive)
165 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
166 "<PUB>"
167 'hm--html-insert-end-tag
168 "</PUB>"))
169
170
171 (defun hm--html-add-author ()
172 "Adds the HTML tags for Author at the point in the current buffer."
173 (interactive)
174 (hm--html-add-tags 'hm--html-insert-start-tag
175 "<AUTHOR>"
176 'hm--html-insert-end-tag
177 "</AUTHOR>"))
178
179
180 (defun hm--html-add-author-to-region ()
181 "Adds the HTML tags for Author to the region."
182 (interactive)
183 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
184 "<AUTHOR>"
185 'hm--html-insert-end-tag
186 "</AUTHOR>"))
187
188
189 (defun hm--html-add-editor ()
190 "Adds the HTML tags for Editor at the point in the current buffer."
191 (interactive)
192 (hm--html-add-tags 'hm--html-insert-start-tag
193 "<EDITOR>"
194 'hm--html-insert-end-tag
195 "</EDITOR>"))
196
197
198 (defun hm--html-add-editor-to-region ()
199 "Adds the HTML tags for Editor to the region."
200 (interactive)
201 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
202 "<EDITOR>"
203 'hm--html-insert-end-tag
204 "</EDITOR>"))
205
206
207 (defun hm--html-add-credits ()
208 "Adds the HTML tags for Credits at the point in the current buffer."
209 (interactive)
210 (hm--html-add-tags 'hm--html-insert-start-tag
211 "<CREDITS>"
212 'hm--html-insert-end-tag
213 "</CREDITS>"))
214
215
216 (defun hm--html-add-credits-to-region ()
217 "Adds the HTML tags for Credits to the region."
218 (interactive)
219 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
220 "<CREDITS>"
221 'hm--html-insert-end-tag
222 "</CREDITS>"))
223
224
225 (defun hm--html-add-copyright ()
226 "Adds the HTML tags for Copyright at the point in the current buffer."
227 (interactive)
228 (hm--html-add-tags 'hm--html-insert-start-tag
229 "<COPYRIGHT>"
230 'hm--html-insert-end-tag
231 "</COPYRIGHT>"))
232
233
234 (defun hm--html-add-copyright-to-region ()
235 "Adds the HTML tags for Copyright to the region."
236 (interactive)
237 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
238 "<COPYRIGHT>"
239 'hm--html-insert-end-tag
240 "</COPYRIGHT>"))
241
242
243 (defun hm--html-add-isbn ()
244 "Adds the HTML tags for ISBN at the point in the current buffer."
245 (interactive)
246 (hm--html-add-tags 'hm--html-insert-start-tag
247 "<ISBN>"
248 'hm--html-insert-end-tag
249 "</ISBN>"))
250
251
252 (defun hm--html-add-isbn-to-region ()
253 "Adds the HTML tags for ISBN to the region."
254 (interactive)
255 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
256 "<ISBN>"
257 'hm--html-insert-end-tag
258 "</ISBN>"))
259
260
261 (defun hm--html-add-acronym ()
262 "Adds the HTML tags for Acronym at the point in the current buffer."
263 (interactive)
264 (hm--html-add-tags 'hm--html-insert-start-tag
265 "<ACRONYM>"
266 'hm--html-insert-end-tag
267 "</ACRONYM>"))
268
269
270 (defun hm--html-add-acronym-to-region ()
271 "Adds the HTML tags for Acronym to the region."
272 (interactive)
273 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
274 "<ACRONYM>"
275 'hm--html-insert-end-tag
276 "</ACRONYM>"))
277
278
279 (defun hm--html-add-abbrevation ()
280 "Adds the HTML tags for Abbrevation at the point in the current buffer."
281 (interactive)
282 (hm--html-add-tags 'hm--html-insert-start-tag
283 "<ABBREV>"
284 'hm--html-insert-end-tag
285 "</ABBREV>"))
286
287
288 (defun hm--html-add-abbrev-to-region ()
289 "Adds the HTML tags for Abbrev to the region."
290 (interactive)
291 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
292 "<ABBREV>"
293 'hm--html-insert-end-tag
294 "</ABBREV>"))
295
296
297 (defun hm--html-add-command ()
298 "Adds the HTML tags for Command at the point in the current buffer."
299 (interactive)
300 (hm--html-add-tags 'hm--html-insert-start-tag
301 "<CMD>"
302 'hm--html-insert-end-tag
303 "</CMD>"))
304
305
306 (defun hm--html-add-command-to-region ()
307 "Adds the HTML tags for Command to the region."
308 (interactive)
309 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
310 "<CMD>"
311 'hm--html-insert-end-tag
312 "</CMD>"))
313
314
315 (defun hm--html-add-argument ()
316 "Adds the HTML tags for Argument at the point in the current buffer."
317 (interactive)
318 (hm--html-add-tags 'hm--html-insert-start-tag
319 "<ARG>"
320 'hm--html-insert-end-tag
321 "</ARG>"))
322
323
324 (defun hm--html-add-argument-to-region ()
325 "Adds the HTML tags for Argument to the region."
326 (interactive)
327 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
328 "<ARG>"
329 'hm--html-insert-end-tag
330 "</ARG>"))
331
332
333 (defun hm--html-add-literature ()
334 "Adds the HTML tags for Literature at the point in the current buffer."
335 (interactive)
336 (hm--html-add-tags 'hm--html-insert-start-tag
337 "<LIT>"
338 'hm--html-insert-end-tag
339 "</LIT>"))
340
341
342 (defun hm--html-add-literature-to-region ()
343 "Adds the HTML tags for Literature to the region."
344 (interactive)
345 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
346 "<LIT>"
347 'hm--html-insert-end-tag
348 "</LIT>"))
349
350
351 (defun hm--html-add-footnote ()
352 "Adds the HTML tags for Footnote at the point in the current buffer."
353 (interactive)
354 (hm--html-add-tags 'hm--html-insert-start-tag
355 "<FOOTNOTE>"
356 'hm--html-insert-end-tag
357 "</FOOTNOTE>"))
358
359
360 (defun hm--html-add-footnote-to-region ()
361 "Adds the HTML tags for Footnote to the region."
362 (interactive)
363 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
364 "<FOOTNOTE>"
365 'hm--html-insert-end-tag
366 "</FOOTNOTE>"))
367
368
369 (defun hm--html-add-margin ()
370 "Adds the HTML tags for Margin at the point in the current buffer."
371 (interactive)
372 (hm--html-add-tags 'hm--html-insert-start-tag
373 "<MARGIN>"
374 'hm--html-insert-end-tag
375 "</MARGIN>"))
376
377
378 (defun hm--html-add-margin-to-region ()
379 "Adds the HTML tags for Margin to the region."
380 (interactive)
381 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
382 "<MARGIN>"
383 'hm--html-insert-end-tag
384 "</MARGIN>"))
385
386
387 (defun hm--html-add-listing ()
388 "Adds the HTML tags for listing."
389 (interactive)
390 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
391 "<LISTING>"
392 'hm--html-insert-end-tag-with-newline
393 "</LISTING>"))
394
395
396 (defun hm--html-add-listing-to-region ()
397 "Adds the HTML tags for listing to the region."
398 (interactive)
399 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
400 "<LISTING>"
401 'hm--html-insert-end-tag-with-newline
402 "</LISTING>"))
403
404
405 (provide 'hm--html-not-standard)