1 ;;; hm--html-not-standard.el
3 ;;; Copyright (C) 1997 Heiko Muenkel
4 ;;; email: muenkel@tnt.uni-hannover.de
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)
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.
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.
23 ;;; This file contains lisp code for the insertion 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 :-)
29 ;;; Put this file in one of your load path directories.
31 ;;; Put a (require 'hm--html-not-standard) in your .emacs
33 ;;; Look at the files hm--html-mode.el and hm--html-configuration
34 ;;; for further installation points.
37 ;(require 'hm--html-mode)
39 (defun hm--html-add-server-side-include-command-with-parameter (command
41 "This function adds a server side include command directive in the buffer.
42 The directive is only supported by the NCSA http daemon."
46 hm--html-server-side-include-command-with-parameter-alist)
47 (read-string "Parameterlist sepearted by '?': ")))
48 (if (string= command "")
49 (error "ERROR: No command specified !")
50 (if (string= parameter "")
51 (error "ERROR: No parameter specified !")
52 (if (= ?| (string-to-char command))
53 (if (= ?? (string-to-char parameter))
54 (insert "<INC SRVURL \"" command parameter "\">")
55 (insert "<INC SRVURL \"" command "?" parameter "\">"))
56 (if (= ?? (string-to-char parameter))
57 (insert "<INC SRVURL \"|" command parameter "\">")
58 (insert "<INC SRVURL \"|" command "?" parameter "\">"))))))
61 (defun hm--html-add-server-side-include-command-with-isindex-parameter
63 "This function adds a server side include command directive in the buffer.
64 The include command uses the \"isindex\"- parameter for the specified command."
66 (completing-read "Include Command: "
67 hm--html-server-side-include-command-alist)))
68 (hm--html-add-server-side-include-command command t))
71 (defun hm--html-add-server-side-include-command (command &optional srvurl)
72 "This function adds a server side include command directive in the buffer.
73 The directive is only supported by the NCSA http daemon.
74 If SRVURL is t, then the attribute srvurl instead of srv is used for the
75 include command. With srvurl, the include command uses the \"isindex\"-
76 parameter for the specified command."
78 (completing-read "Include Command: "
79 hm--html-server-side-include-command-alist)))
80 (let ((attribute (if srvurl "SRVURL" "SRV")))
81 (if (string= command "")
82 (error "ERROR: No command specified !")
83 (if (= ?| (string-to-char command))
84 (insert "<INC " attribute" \"" command "\">")
85 (insert "<INC " attribute " \"|" command "\">")))))
88 (defun hm--html-add-server-side-include-file (file)
89 "This function adds a server side include file directive in the buffer.
90 The directive is only supported by the NCSA http daemon."
91 (interactive "FInclude File: ")
93 (error "ERROR: No filename specified !")
94 (insert "<INC SRV \"" file "\">")))
97 (defun hm--html-add-plaintext ()
98 "Adds the HTML tags for plaintext."
100 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
102 'hm--html-insert-end-tag-with-newline
106 (defun hm--html-add-plaintext-to-region ()
107 "Adds the HTML tags for plaintext to the region."
109 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
111 'hm--html-insert-end-tag-with-newline
115 (defun hm--html-add-abstract ()
116 "Adds the HTML tags for abstract text at the point in the current buffer."
118 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
120 'hm--html-insert-end-tag-with-newline
124 (defun hm--html-add-abstract-to-region ()
125 "Adds the HTML tags for abstract text to the region."
127 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
129 'hm--html-insert-end-tag-with-newline
133 (defun hm--html-add-quote ()
134 "Adds the HTML tags for Quote at the point in the current buffer."
136 (hm--html-add-tags 'hm--html-insert-start-tag
138 'hm--html-insert-end-tag
142 (defun hm--html-add-quote-to-region ()
143 "Adds the HTML tags for Quote to the region."
145 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
147 'hm--html-insert-end-tag
151 (defun hm--html-add-person ()
152 "Adds the HTML tags for Person at the point in the current buffer."
154 (hm--html-add-tags 'hm--html-insert-start-tag
156 'hm--html-insert-end-tag
160 (defun hm--html-add-person-to-region ()
161 "Adds the HTML tags for Person to the region."
163 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
165 'hm--html-insert-end-tag
169 (defun hm--html-add-instance ()
170 "Adds the HTML tags for Instance at the point in the current buffer."
172 (hm--html-add-tags 'hm--html-insert-start-tag
174 'hm--html-insert-end-tag
178 (defun hm--html-add-instance-to-region ()
179 "Adds the HTML tags for Instance to the region."
181 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
183 'hm--html-insert-end-tag
187 (defun hm--html-add-publication ()
188 "Adds the HTML tags for Publication at the point in the current buffer."
190 (hm--html-add-tags 'hm--html-insert-start-tag
192 'hm--html-insert-end-tag
196 (defun hm--html-add-publication-to-region ()
197 "Adds the HTML tags for Publication to the region."
199 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
201 'hm--html-insert-end-tag
205 (defun hm--html-add-author ()
206 "Adds the HTML tags for Author at the point in the current buffer."
208 (hm--html-add-tags 'hm--html-insert-start-tag
210 'hm--html-insert-end-tag
214 (defun hm--html-add-author-to-region ()
215 "Adds the HTML tags for Author to the region."
217 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
219 'hm--html-insert-end-tag
223 (defun hm--html-add-editor ()
224 "Adds the HTML tags for Editor at the point in the current buffer."
226 (hm--html-add-tags 'hm--html-insert-start-tag
228 'hm--html-insert-end-tag
232 (defun hm--html-add-editor-to-region ()
233 "Adds the HTML tags for Editor to the region."
235 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
237 'hm--html-insert-end-tag
241 (defun hm--html-add-credits ()
242 "Adds the HTML tags for Credits at the point in the current buffer."
244 (hm--html-add-tags 'hm--html-insert-start-tag
246 'hm--html-insert-end-tag
250 (defun hm--html-add-credits-to-region ()
251 "Adds the HTML tags for Credits to the region."
253 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
255 'hm--html-insert-end-tag
259 (defun hm--html-add-copyright ()
260 "Adds the HTML tags for Copyright at the point in the current buffer."
262 (hm--html-add-tags 'hm--html-insert-start-tag
264 'hm--html-insert-end-tag
268 (defun hm--html-add-copyright-to-region ()
269 "Adds the HTML tags for Copyright to the region."
271 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
273 'hm--html-insert-end-tag
277 (defun hm--html-add-isbn ()
278 "Adds the HTML tags for ISBN at the point in the current buffer."
280 (hm--html-add-tags 'hm--html-insert-start-tag
282 'hm--html-insert-end-tag
286 (defun hm--html-add-isbn-to-region ()
287 "Adds the HTML tags for ISBN to the region."
289 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
291 'hm--html-insert-end-tag
295 (defun hm--html-add-acronym ()
296 "Adds the HTML tags for Acronym at the point in the current buffer."
298 (hm--html-add-tags 'hm--html-insert-start-tag
300 'hm--html-insert-end-tag
304 (defun hm--html-add-acronym-to-region ()
305 "Adds the HTML tags for Acronym to the region."
307 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
309 'hm--html-insert-end-tag
313 (defun hm--html-add-abbrevation ()
314 "Adds the HTML tags for Abbrevation at the point in the current buffer."
316 (hm--html-add-tags 'hm--html-insert-start-tag
318 'hm--html-insert-end-tag
322 (defun hm--html-add-abbrev-to-region ()
323 "Adds the HTML tags for Abbrev to the region."
325 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
327 'hm--html-insert-end-tag
331 (defun hm--html-add-command ()
332 "Adds the HTML tags for Command at the point in the current buffer."
334 (hm--html-add-tags 'hm--html-insert-start-tag
336 'hm--html-insert-end-tag
340 (defun hm--html-add-command-to-region ()
341 "Adds the HTML tags for Command to the region."
343 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
345 'hm--html-insert-end-tag
349 (defun hm--html-add-argument ()
350 "Adds the HTML tags for Argument at the point in the current buffer."
352 (hm--html-add-tags 'hm--html-insert-start-tag
354 'hm--html-insert-end-tag
358 (defun hm--html-add-argument-to-region ()
359 "Adds the HTML tags for Argument to the region."
361 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
363 'hm--html-insert-end-tag
367 (defun hm--html-add-literature ()
368 "Adds the HTML tags for Literature at the point in the current buffer."
370 (hm--html-add-tags 'hm--html-insert-start-tag
372 'hm--html-insert-end-tag
376 (defun hm--html-add-literature-to-region ()
377 "Adds the HTML tags for Literature to the region."
379 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
381 'hm--html-insert-end-tag
385 (defun hm--html-add-footnote ()
386 "Adds the HTML tags for Footnote at the point in the current buffer."
388 (hm--html-add-tags 'hm--html-insert-start-tag
390 'hm--html-insert-end-tag
394 (defun hm--html-add-footnote-to-region ()
395 "Adds the HTML tags for Footnote to the region."
397 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
399 'hm--html-insert-end-tag
403 (defun hm--html-add-margin ()
404 "Adds the HTML tags for Margin at the point in the current buffer."
406 (hm--html-add-tags 'hm--html-insert-start-tag
408 'hm--html-insert-end-tag
412 (defun hm--html-add-margin-to-region ()
413 "Adds the HTML tags for Margin to the region."
415 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
417 'hm--html-insert-end-tag
421 (defun hm--html-add-listing ()
422 "Adds the HTML tags for listing."
424 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
426 'hm--html-insert-end-tag-with-newline
430 (defun hm--html-add-listing-to-region ()
431 "Adds the HTML tags for listing to the region."
433 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
435 'hm--html-insert-end-tag-with-newline
439 (provide 'hm--html-not-standard)