Mercurial > hg > xemacs-beta
comparison lisp/hm--html-menus/hm--html-not-standard.el @ 116:9f59509498e1 r20-1b10
Import from CVS: tag r20-1b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:23:06 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
115:f109f7dabbe2 | 116:9f59509498e1 |
---|---|
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 (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 "\">")))))) | |
59 | |
60 | |
61 (defun hm--html-add-server-side-include-command-with-isindex-parameter | |
62 (command) | |
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." | |
65 (interactive (list | |
66 (completing-read "Include Command: " | |
67 hm--html-server-side-include-command-alist))) | |
68 (hm--html-add-server-side-include-command command t)) | |
69 | |
70 | |
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." | |
77 (interactive (list | |
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 "\">"))))) | |
86 | |
87 | |
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: ") | |
92 (if (string= file "") | |
93 (error "ERROR: No filename specified !") | |
94 (insert "<INC SRV \"" file "\">"))) | |
95 | |
96 | |
97 (defun hm--html-add-plaintext () | |
98 "Adds the HTML tags for plaintext." | |
99 (interactive) | |
100 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline | |
101 "<XMP>" | |
102 'hm--html-insert-end-tag-with-newline | |
103 "</XMP>")) | |
104 | |
105 | |
106 (defun hm--html-add-plaintext-to-region () | |
107 "Adds the HTML tags for plaintext to the region." | |
108 (interactive) | |
109 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline | |
110 "<XMP>" | |
111 'hm--html-insert-end-tag-with-newline | |
112 "</XMP>")) | |
113 | |
114 | |
115 (defun hm--html-add-abstract () | |
116 "Adds the HTML tags for abstract text at the point in the current buffer." | |
117 (interactive) | |
118 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline | |
119 "<ABSTRACT>" | |
120 'hm--html-insert-end-tag-with-newline | |
121 "</ABSTRACT>")) | |
122 | |
123 | |
124 (defun hm--html-add-abstract-to-region () | |
125 "Adds the HTML tags for abstract text to the region." | |
126 (interactive) | |
127 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline | |
128 "<ABSTRACT>" | |
129 'hm--html-insert-end-tag-with-newline | |
130 "</ABSTRACT>")) | |
131 | |
132 | |
133 (defun hm--html-add-quote () | |
134 "Adds the HTML tags for Quote at the point in the current buffer." | |
135 (interactive) | |
136 (hm--html-add-tags 'hm--html-insert-start-tag | |
137 "<Q>" | |
138 'hm--html-insert-end-tag | |
139 "</Q>")) | |
140 | |
141 | |
142 (defun hm--html-add-quote-to-region () | |
143 "Adds the HTML tags for Quote to the region." | |
144 (interactive) | |
145 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
146 "<Q>" | |
147 'hm--html-insert-end-tag | |
148 "</Q>")) | |
149 | |
150 | |
151 (defun hm--html-add-person () | |
152 "Adds the HTML tags for Person at the point in the current buffer." | |
153 (interactive) | |
154 (hm--html-add-tags 'hm--html-insert-start-tag | |
155 "<PERSON>" | |
156 'hm--html-insert-end-tag | |
157 "</PERSON>")) | |
158 | |
159 | |
160 (defun hm--html-add-person-to-region () | |
161 "Adds the HTML tags for Person to the region." | |
162 (interactive) | |
163 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
164 "<PERSON>" | |
165 'hm--html-insert-end-tag | |
166 "</PERSON>")) | |
167 | |
168 | |
169 (defun hm--html-add-instance () | |
170 "Adds the HTML tags for Instance at the point in the current buffer." | |
171 (interactive) | |
172 (hm--html-add-tags 'hm--html-insert-start-tag | |
173 "<INS>" | |
174 'hm--html-insert-end-tag | |
175 "</INS>")) | |
176 | |
177 | |
178 (defun hm--html-add-instance-to-region () | |
179 "Adds the HTML tags for Instance to the region." | |
180 (interactive) | |
181 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
182 "<INS>" | |
183 'hm--html-insert-end-tag | |
184 "</INS>")) | |
185 | |
186 | |
187 (defun hm--html-add-publication () | |
188 "Adds the HTML tags for Publication at the point in the current buffer." | |
189 (interactive) | |
190 (hm--html-add-tags 'hm--html-insert-start-tag | |
191 "<PUB>" | |
192 'hm--html-insert-end-tag | |
193 "</PUB>")) | |
194 | |
195 | |
196 (defun hm--html-add-publication-to-region () | |
197 "Adds the HTML tags for Publication to the region." | |
198 (interactive) | |
199 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
200 "<PUB>" | |
201 'hm--html-insert-end-tag | |
202 "</PUB>")) | |
203 | |
204 | |
205 (defun hm--html-add-author () | |
206 "Adds the HTML tags for Author at the point in the current buffer." | |
207 (interactive) | |
208 (hm--html-add-tags 'hm--html-insert-start-tag | |
209 "<AUTHOR>" | |
210 'hm--html-insert-end-tag | |
211 "</AUTHOR>")) | |
212 | |
213 | |
214 (defun hm--html-add-author-to-region () | |
215 "Adds the HTML tags for Author to the region." | |
216 (interactive) | |
217 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
218 "<AUTHOR>" | |
219 'hm--html-insert-end-tag | |
220 "</AUTHOR>")) | |
221 | |
222 | |
223 (defun hm--html-add-editor () | |
224 "Adds the HTML tags for Editor at the point in the current buffer." | |
225 (interactive) | |
226 (hm--html-add-tags 'hm--html-insert-start-tag | |
227 "<EDITOR>" | |
228 'hm--html-insert-end-tag | |
229 "</EDITOR>")) | |
230 | |
231 | |
232 (defun hm--html-add-editor-to-region () | |
233 "Adds the HTML tags for Editor to the region." | |
234 (interactive) | |
235 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
236 "<EDITOR>" | |
237 'hm--html-insert-end-tag | |
238 "</EDITOR>")) | |
239 | |
240 | |
241 (defun hm--html-add-credits () | |
242 "Adds the HTML tags for Credits at the point in the current buffer." | |
243 (interactive) | |
244 (hm--html-add-tags 'hm--html-insert-start-tag | |
245 "<CREDITS>" | |
246 'hm--html-insert-end-tag | |
247 "</CREDITS>")) | |
248 | |
249 | |
250 (defun hm--html-add-credits-to-region () | |
251 "Adds the HTML tags for Credits to the region." | |
252 (interactive) | |
253 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
254 "<CREDITS>" | |
255 'hm--html-insert-end-tag | |
256 "</CREDITS>")) | |
257 | |
258 | |
259 (defun hm--html-add-copyright () | |
260 "Adds the HTML tags for Copyright at the point in the current buffer." | |
261 (interactive) | |
262 (hm--html-add-tags 'hm--html-insert-start-tag | |
263 "<COPYRIGHT>" | |
264 'hm--html-insert-end-tag | |
265 "</COPYRIGHT>")) | |
266 | |
267 | |
268 (defun hm--html-add-copyright-to-region () | |
269 "Adds the HTML tags for Copyright to the region." | |
270 (interactive) | |
271 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
272 "<COPYRIGHT>" | |
273 'hm--html-insert-end-tag | |
274 "</COPYRIGHT>")) | |
275 | |
276 | |
277 (defun hm--html-add-isbn () | |
278 "Adds the HTML tags for ISBN at the point in the current buffer." | |
279 (interactive) | |
280 (hm--html-add-tags 'hm--html-insert-start-tag | |
281 "<ISBN>" | |
282 'hm--html-insert-end-tag | |
283 "</ISBN>")) | |
284 | |
285 | |
286 (defun hm--html-add-isbn-to-region () | |
287 "Adds the HTML tags for ISBN to the region." | |
288 (interactive) | |
289 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
290 "<ISBN>" | |
291 'hm--html-insert-end-tag | |
292 "</ISBN>")) | |
293 | |
294 | |
295 (defun hm--html-add-acronym () | |
296 "Adds the HTML tags for Acronym at the point in the current buffer." | |
297 (interactive) | |
298 (hm--html-add-tags 'hm--html-insert-start-tag | |
299 "<ACRONYM>" | |
300 'hm--html-insert-end-tag | |
301 "</ACRONYM>")) | |
302 | |
303 | |
304 (defun hm--html-add-acronym-to-region () | |
305 "Adds the HTML tags for Acronym to the region." | |
306 (interactive) | |
307 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
308 "<ACRONYM>" | |
309 'hm--html-insert-end-tag | |
310 "</ACRONYM>")) | |
311 | |
312 | |
313 (defun hm--html-add-abbrevation () | |
314 "Adds the HTML tags for Abbrevation at the point in the current buffer." | |
315 (interactive) | |
316 (hm--html-add-tags 'hm--html-insert-start-tag | |
317 "<ABBREV>" | |
318 'hm--html-insert-end-tag | |
319 "</ABBREV>")) | |
320 | |
321 | |
322 (defun hm--html-add-abbrev-to-region () | |
323 "Adds the HTML tags for Abbrev to the region." | |
324 (interactive) | |
325 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
326 "<ABBREV>" | |
327 'hm--html-insert-end-tag | |
328 "</ABBREV>")) | |
329 | |
330 | |
331 (defun hm--html-add-command () | |
332 "Adds the HTML tags for Command at the point in the current buffer." | |
333 (interactive) | |
334 (hm--html-add-tags 'hm--html-insert-start-tag | |
335 "<CMD>" | |
336 'hm--html-insert-end-tag | |
337 "</CMD>")) | |
338 | |
339 | |
340 (defun hm--html-add-command-to-region () | |
341 "Adds the HTML tags for Command to the region." | |
342 (interactive) | |
343 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
344 "<CMD>" | |
345 'hm--html-insert-end-tag | |
346 "</CMD>")) | |
347 | |
348 | |
349 (defun hm--html-add-argument () | |
350 "Adds the HTML tags for Argument at the point in the current buffer." | |
351 (interactive) | |
352 (hm--html-add-tags 'hm--html-insert-start-tag | |
353 "<ARG>" | |
354 'hm--html-insert-end-tag | |
355 "</ARG>")) | |
356 | |
357 | |
358 (defun hm--html-add-argument-to-region () | |
359 "Adds the HTML tags for Argument to the region." | |
360 (interactive) | |
361 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
362 "<ARG>" | |
363 'hm--html-insert-end-tag | |
364 "</ARG>")) | |
365 | |
366 | |
367 (defun hm--html-add-literature () | |
368 "Adds the HTML tags for Literature at the point in the current buffer." | |
369 (interactive) | |
370 (hm--html-add-tags 'hm--html-insert-start-tag | |
371 "<LIT>" | |
372 'hm--html-insert-end-tag | |
373 "</LIT>")) | |
374 | |
375 | |
376 (defun hm--html-add-literature-to-region () | |
377 "Adds the HTML tags for Literature to the region." | |
378 (interactive) | |
379 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
380 "<LIT>" | |
381 'hm--html-insert-end-tag | |
382 "</LIT>")) | |
383 | |
384 | |
385 (defun hm--html-add-footnote () | |
386 "Adds the HTML tags for Footnote at the point in the current buffer." | |
387 (interactive) | |
388 (hm--html-add-tags 'hm--html-insert-start-tag | |
389 "<FOOTNOTE>" | |
390 'hm--html-insert-end-tag | |
391 "</FOOTNOTE>")) | |
392 | |
393 | |
394 (defun hm--html-add-footnote-to-region () | |
395 "Adds the HTML tags for Footnote to the region." | |
396 (interactive) | |
397 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
398 "<FOOTNOTE>" | |
399 'hm--html-insert-end-tag | |
400 "</FOOTNOTE>")) | |
401 | |
402 | |
403 (defun hm--html-add-margin () | |
404 "Adds the HTML tags for Margin at the point in the current buffer." | |
405 (interactive) | |
406 (hm--html-add-tags 'hm--html-insert-start-tag | |
407 "<MARGIN>" | |
408 'hm--html-insert-end-tag | |
409 "</MARGIN>")) | |
410 | |
411 | |
412 (defun hm--html-add-margin-to-region () | |
413 "Adds the HTML tags for Margin to the region." | |
414 (interactive) | |
415 (hm--html-add-tags-to-region 'hm--html-insert-start-tag | |
416 "<MARGIN>" | |
417 'hm--html-insert-end-tag | |
418 "</MARGIN>")) | |
419 | |
420 | |
421 (defun hm--html-add-listing () | |
422 "Adds the HTML tags for listing." | |
423 (interactive) | |
424 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline | |
425 "<LISTING>" | |
426 'hm--html-insert-end-tag-with-newline | |
427 "</LISTING>")) | |
428 | |
429 | |
430 (defun hm--html-add-listing-to-region () | |
431 "Adds the HTML tags for listing to the region." | |
432 (interactive) | |
433 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline | |
434 "<LISTING>" | |
435 'hm--html-insert-end-tag-with-newline | |
436 "</LISTING>")) | |
437 | |
438 | |
439 (provide 'hm--html-not-standard) |