annotate lisp/hm--html-menus/hm--html.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents ac2d302a0011
children 4103f0995bd7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1 ;;; $Id: hm--html.el,v 1.2 1997/02/16 01:29:10 steve Exp $
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2 ;;;
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3 ;;; Copyright (C) 1993 - 1997 Heiko Muenkel
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;;; email: muenkel@tnt.uni-hannover.de
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;;; This program is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;;; This program is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;; You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;;; along with this program; if not, write to the Free Software
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;;; Description:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;;; Defines functions for the file hm--html-menu.el.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; Installation:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;; Put this file in one of your load path directories.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
30 ;(require 'hm--date)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
31 ;(require 'adapt)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
34 (defun hm--html-set-marker-at-position (&optional position)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
35 "Creates a new marker and set the marker at the POSITION.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
36 If POSITION is nil, then the marker is set at the current point.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
37 The return value is the marker."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
38 (let ((marker (make-marker)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
39 (if position
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
40 (set-marker marker position)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
41 (set-marker marker (point)))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ;;; Functions for adding html commands which consists of a start and a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;;; end tag and some text between them. (Basicfunctions)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (defun hm--html-add-tags (function-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 start-tag
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
48 &optional
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
49 function-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
50 end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
51 function-insert-middle-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
52 middle-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
53 function-insert-middle-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
54 middle-end-tag)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 "Adds the start and the end html tag at point.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 The first parameter specifies the funtion which insert the start tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 and the third parameter specifies the function which insert the end tag.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 The second parameter is the string for the start tag and the fourth parameter
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 is the string for the end tag. The third and fourth parameters are optional.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 The fifth parameter is optional. If it exists, it specifies a function which
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
61 inserts the sixth parameter (the middle-start-tag) between the start and the
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
62 end tag."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (eval (list function-insert-start-tag start-tag))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
64 (if function-insert-middle-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
65 (eval (list function-insert-middle-start-tag middle-start-tag)))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
66 (let ((position (hm--html-set-marker-at-position (point))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
67 (if function-insert-middle-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
68 (eval (list function-insert-middle-end-tag middle-end-tag)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
69 (if function-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
70 (eval (list function-insert-end-tag end-tag)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
71 (goto-char position)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 (defun hm--html-add-tags-to-region (function-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 function-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 end-tag
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
78 &optional
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
79 function-insert-middle-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
80 middle-tag)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 "Adds the start and the end html tag to the active region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 The first parameter specifies the funtion which insert the start tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 and the third parameter specifies the function which insert the end tag.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 The second parameter is the string for the start tag and the fourth parameter
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 is the string for the end tag.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 The fifth parameter is optional. If it exists, it specifies a function which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 inserts the sixth parameter (the middle-tag) between the start and the end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 tag."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (save-window-excursion
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
90 (let ((start (hm--html-set-marker-at-position (region-beginning)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 (end (region-end)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (goto-char end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 (eval (list function-insert-end-tag end-tag))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (goto-char start)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
95 ; (backward-char (+ (length end-tag) (- end start)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (eval (list function-insert-start-tag start-tag))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (if function-insert-middle-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (eval (list function-insert-middle-tag middle-tag)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (defun hm--html-insert-start-tag (tag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 "Inserts the HTML start tag 'tag' without a Newline.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 The parameter must be a string (i.e. \"<B>\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (insert tag)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
107 (hm--html-indent-region start (point))))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
108 ; (html-maybe-deemphasize-region start (- (point) 1))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (defun hm--html-insert-end-tag (tag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 "Inserts the HTML end tag 'tag' without a Newline.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 The parameter must be a string (i.e. \"</B>\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 (insert tag)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
116 (hm--html-indent-region start (point))))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
117 ; (html-maybe-deemphasize-region start (- (point) 1))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (defun hm--html-insert-start-tag-with-newline (tag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 "Inserts the HTML start tag 'tag' with a Newline.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 The parameter must be a string (i.e. \"<PRE>\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (insert tag)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
125 (hm--html-indent-region start (point))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
126 )
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (insert "\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (defun hm--html-insert-end-tag-with-newline (tag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 "Inserts the HTML end tag 'tag' with a Newline.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 The parameter must be a string (i.e. \"</PRE>\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (insert "\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 (insert tag)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
136 (hm--html-indent-region start (point))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 ;;; Functions which add simple tags of the form <tag>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
142 (defun hm--html-add-list-or-menu-item-separator ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
143 "Adds a list or menu item. Assume we're at the end of the last item."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
144 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
145 (hm--html-add-tags 'hm--html-insert-end-tag-with-newline "<LI> "))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
146
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
147 (defun hm--html-add-list-or-menu-item ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
148 "Adds the tags for a menu item at the point in the current buffer."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
149 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
150 (hm--html-add-tags 'hm--html-insert-end-tag-with-newline "<LI> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
151 'hm--html-insert-end-tag " </LI>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
152
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
153 (defun hm--html-add-list-or-menu-item-to-region ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
154 "Adds the tags for a menu item to the region in the current buffer."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
155 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
156 (hm--html-add-tags-to-region 'hm--html-insert-start-tag "<LI> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
157 'hm--html-insert-end-tag " </LI>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
158
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (defun hm--html-add-line-break ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 "Adds the HTML tag for a line break."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (hm--html-add-tags 'hm--html-insert-start-tag "<BR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (defun hm--html-add-horizontal-rule ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 "Adds the HTML tag for a horizontal rule (line)."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 (hm--html-add-tags 'hm--html-insert-start-tag "<HR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (defun hm--html-add-paragraph ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 "Adds the HTML tags for a paragraph at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 "<P>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 "</P>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (defun hm--html-add-paragraph-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 "Adds the HTML tags for a paragraph to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 "<P>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 "</P>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 (defun hm--html-add-paragraph-separator ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 "Adds the tag for a paragraph seperator."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (hm--html-add-tags 'hm--html-insert-start-tag "<P>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 ;;; Functions which include something in HTML- documents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (defvar hm--html-url-history-list nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 "History list for the function 'hm--html-read-url'")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 (defun hm--html-read-url-predicate (table-element-list usagesymbol)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 "Predicatefunction for hm--html-read-url."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (hm--html-read-url-predicate-1 (cdr table-element-list) usagesymbol))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (defun hm--html-read-url-predicate-1 (table-element-list usagesymbol)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 "Internal function of hm--html-read-url-predicate."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 (cond ((not table-element-list) nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 ((eq (car table-element-list) usagesymbol))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 (t (hm--html-read-url-predicate-1 (cdr table-element-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 usagesymbol))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 (defun hm--html-read-url (prompt &optional
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 predicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 require-match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 initial-contents)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 "Function prompts for a URL string.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 TABLE is an alist whose elements' cars are URL's.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 PREDICATE limits completion to a subset of TABLE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 the input is (or completes to) an element of TABLE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 INITIAL-CONTENTS is a string to insert in the minibuffer before reading.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 If INITIAL-CONTENTS is nil, the car of the 'hm--html-url-history-list'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 is used instead."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 (if table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (completing-read prompt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 predicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 require-match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 initial-contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 hm--html-url-history-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (read-string prompt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 (if initial-contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 initial-contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 (car hm--html-url-history-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 hm--html-url-history-list)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 (defun hm--html-read-altenate (url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 "Function reads the value for the \"ALT\"- attribute in IMG tags.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 URL will be used as the default URL for the external viewer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 (let ((alttype
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 (string-to-int
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 (completing-read
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 ; "0: No ALT atribute, 1: ALT=\"\", 2: ALT=Text, 3: ALT=External Viewer: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 "0: No ALT atribute, 1: ALT=\"\", 2: ALT=Text: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 ; '(("0") ("1") ("2") ("3"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 '(("0") ("1") ("2"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 "2"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 (cond ((= alttype 0) nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 ((= alttype 1) "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 ((= alttype 2) (read-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 "Text for the ALT attribute: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 (substring (file-name-nondirectory url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 (string-match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 "\\."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 (file-name-nondirectory url)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 ; ((= alttype 3) (concat "<A HREF=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 ; url
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 ; "\">"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 ; (file-name-nondirectory url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 ; "</A>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 (defun hm--html-add-image-bottom (href alt)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 "Add an image, bottom aligned."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 (interactive (let ((url (hm--html-read-url "Image URL: ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 (list url (hm--html-read-altenate url))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
276 (hm--html-add-tags
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
277 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
278 (concat "<IMG ALIGN=BOTTOM SRC=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
279 href
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
280 (when alt
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
281 (concat "\" ALT=\"" alt))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
282 "\">")))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 (defun hm--html-add-image-middle (href alt)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 "Add an image, middle aligned."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 (interactive (let ((url (hm--html-read-url "Image URL: ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 (list url (hm--html-read-altenate url))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
289 (hm--html-add-tags
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
290 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
291 (concat "<IMG ALIGN=MIDDLE SRC=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
292 href
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
293 (when alt
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
294 (concat "\" ALT=\"" alt))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
295 "\">")))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 (defun hm--html-add-image-top (href alt)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 "Add an image, top aligned."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 (interactive (let ((url (hm--html-read-url "Image URL: ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 (list url (hm--html-read-altenate url))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
302 (hm--html-add-tags
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
303 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
304 (concat "<IMG ALIGN=TOP SRC=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
305 href
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
306 (when alt
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
307 (concat "\" ALT=\"" alt))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
308 "\">")))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
309
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
310
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
311 (defun hm--html-add-applet (name code width height)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
312 "Add an applet."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
313 (interactive (let ((name (read-string "Applet Name: " "applet"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
314 (code (read-file-name "Applet Class File: "))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
315 (width (read-number "Width (i.e.: 100): " t))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
316 (height (read-number "Height (i.e.: 100): " t)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
317 (list name code width height)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
318 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
319 (concat "<APPLET "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
320 (if (string= name "")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
321 ""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
322 (concat "NAME=\"" name "\"\n"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
323 "CODE=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
324 code
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
325 "\"\n"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
326 "WIDTH=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
327 width
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
328 "\"\n"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
329 "HEIGHT=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
330 height
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
331 "\">")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
332 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
333 "</APPLET>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
334
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
335 (defun hm--html-add-applet-parameter (name value)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
336 "Adds the tag for an applet parameter at the current point.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
337 This tag must be added between <APPLET> and </APPLET>."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
338 (interactive "sParameter Name: \nsParameter Value: ")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
339 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
340 (concat "<PARAM "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
341 "NAME=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
342 name
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
343 "\" VALUE=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
344 value
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
345 "\">")))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
346
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 (defun hm--html-add-server-side-include-file (file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 "This function adds a server side include file directive in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 The directive is only supported by the NCSA http daemon."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 (interactive "FInclude File: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 (if (string= file "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 (error "ERROR: No filename specified !")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
355 (insert "<INC SRV \"" file "\">"))))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
356 ; (html-maybe-deemphasize-region (1+ start) (1- (point))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 (defun hm--html-add-server-side-include-command-with-isindex-parameter
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 (command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 "This function adds a server side include command directive in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 The include command uses the \"isindex\"- parameter for the specified command."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 (interactive (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 (completing-read "Include Command: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 hm--html-server-side-include-command-alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 (hm--html-add-server-side-include-command command t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 (defun hm--html-add-server-side-include-command (command &optional srvurl)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 "This function adds a server side include command directive in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 The directive is only supported by the NCSA http daemon.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 If SRVURL is t, then the attribute srvurl instead of srv is used for the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 include command. With srvurl, the include command uses the \"isindex\"-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 parameter for the specified command."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 (interactive (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 (completing-read "Include Command: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 hm--html-server-side-include-command-alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 (let ((start (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 (attribute (if srvurl "SRVURL" "SRV")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 (if (string= command "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 (error "ERROR: No command specified !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 (if (= ?| (string-to-char command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 (insert "<INC " attribute" \"" command "\">")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
384 (insert "<INC " attribute " \"|" command "\">")))))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
385 ; (html-maybe-deemphasize-region (1+ start) (1- (point)))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 ;(defun hm--html-add-server-side-include-command-with-parameter (command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 ; parameter)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 ; "This function adds a server side include command directive in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 ;The directive is only supported by the NCSA http daemon."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 ; (interactive (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 ; (completing-read
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 ; "Include Command: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 ; hm--html-server-side-include-command-with-parameter-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 ; (read-string "Parameterlist sepearted by '?': ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 ; (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 ; (if (string= command "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 ; (error "ERROR: No command specified !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 ; (if (string= parameter "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 ; (error "ERROR: No parameter specified !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 ; (if (= ?| (string-to-char command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 ; (if (= ?? (string-to-char parameter))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 ; (insert "<INC SRVURL \"" command parameter "\">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 ; (insert "<INC SRVURL \"" command "?" parameter "\">"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 ; (if (= ?? (string-to-char parameter))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 ; (insert "<INC SRVURL \"|" command parameter "\">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 ; (insert "<INC SRVURL \"|" command "?" parameter "\">")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 ; (html-maybe-deemphasize-region (1+ start) (1- (point)))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 ;;; Functions, which adds tags of the form <starttag> ... </endtag>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
415 (defun hm--html-add-big ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
416 "Adds the HTML tags for Big at the point in the current buffer."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
417 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
418 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
419 "<BIG>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
420 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
421 "</BIG>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
422
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
423
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
424 (defun hm--html-add-big-to-region ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
425 "Adds the HTML tags for Big to the region."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
426 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
427 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
428 "<BIG>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
429 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
430 "</BIG>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
431
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
432
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
433 (defun hm--html-add-small ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
434 "Adds the HTML tags for Small at the point in the current buffer."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
435 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
436 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
437 "<SMALL>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
438 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
439 "</SMALL>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
440
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
441
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
442 (defun hm--html-add-small-to-region ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
443 "Adds the HTML tags for Small to the region."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
444 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
445 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
446 "<SMALL>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
447 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
448 "</SMALL>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
449
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
450
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 (defun hm--html-add-bold ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 "Adds the HTML tags for Bold at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 "<B>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 "</B>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 (defun hm--html-add-bold-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 "Adds the HTML tags for Bold to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 "<B>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 "</B>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 (defun hm--html-add-italic ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 "Adds the HTML tags for Italic at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 "<I>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 "</I>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 (defun hm--html-add-italic-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 "Adds the HTML tags for Italic to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 "<I>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 "</I>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 (defun hm--html-add-underline ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 "Adds the HTML tags for Underline at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 "<U>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 "</U>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 (defun hm--html-add-underline-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 "Adds the HTML tags for Underline to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 "<U>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 "</U>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 (defun hm--html-add-definition ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 "Adds the HTML tags for Definition at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 "<DFN>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 "</DFN>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 (defun hm--html-add-definition-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 "Adds the HTML tags for Definition to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 "<DFN>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 "</DFN>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 (defun hm--html-add-code ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 "Adds the HTML tags for Code at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 "<CODE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 "</CODE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 (defun hm--html-add-code-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 "Adds the HTML tags for Code to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 "<CODE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 "</CODE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
541 (defun hm--html-add-citation ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
542 "Adds the HTML tags for Citation."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
543 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
544 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
545 "<CITE>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
546 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
547 "</CITE>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
548
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 (defun hm--html-add-citation-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 "Adds the HTML tags for Citation to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 "<CITE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 "</CITE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
558 (defun hm--html-add-emphasized ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
559 "Adds the HTML tags for Emphasized."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
560 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
561 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
562 "<EM>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
563 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
564 "</EM>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
565
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
566
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 (defun hm--html-add-emphasized-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 "Adds the HTML tags for Emphasized to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 "<EM>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 "</EM>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
576 (defun hm--html-add-fixed ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
577 "Adds the HTML tags for Fixed."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
578 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
579 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
580 "<TT>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
581 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
582 "</TT>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
583
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
584
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585 (defun hm--html-add-fixed-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 "Adds the HTML tags for Fixed to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589 "<TT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591 "</TT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
594 (defun hm--html-add-keyboard ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
595 "Adds the HTML tags for Keyboard."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
596 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
597 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
598 "<KBD>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
599 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
600 "</KBD>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
601
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
602
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603 (defun hm--html-add-keyboard-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 "Adds the HTML tags for Keyboard to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 "<KBD>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
608 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
609 "</KBD>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
610
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
611
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
612 (defun hm--html-add-sample ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
613 "Adds the HTML tags for Sample."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
614 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
615 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
616 "<SAMP>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
617 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
618 "</SAMP>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
619
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
620 (defun hm--html-add-sample-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
621 "Adds the HTML tags for Sample to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
622 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
623 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
624 "<SAMP>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
625 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
626 "</SAMP>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
627
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
628
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
629 (defun hm--html-add-strong ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
630 "Adds the HTML tags for Strong."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
631 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
632 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
633 "<STRONG>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
634 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
635 "</STRONG>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
636
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
637
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
638 (defun hm--html-add-strong-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
639 "Adds the HTML tags for Strong to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
640 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
641 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
642 "<STRONG>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
643 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
644 "</STRONG>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
645
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
646
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
647 (defun hm--html-add-variable ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
648 "Adds the HTML tags for Variable."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
649 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
650 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
651 "<VAR>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
652 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
653 "</VAR>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
654
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655 (defun hm--html-add-variable-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656 "Adds the HTML tags for Variable to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659 "<VAR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
661 "</VAR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
662
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
664 (defun hm--html-add-comment ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665 "Adds the HTML tags for Comment at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
666 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
668 "<!-- "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
669 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670 " -->"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
671
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
672
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
673 (defun hm--html-add-comment-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
674 "Adds the HTML tags for Comment to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
675 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 "<!-- "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 " -->"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
681
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683 (defun hm--html-add-preformated ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684 "Adds the HTML tags for preformated text at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
685 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
686 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
687 "<PRE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
688 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689 "</PRE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
690
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
691
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
692 (defun hm--html-add-preformated-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
693 "Adds the HTML tags for preformated text to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
694 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
695 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
696 "<PRE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
697 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
698 "</PRE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
699
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
700
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
701 (defun hm--html-add-plaintext ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
702 "Adds the HTML tags for plaintext."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
703 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
704 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
705 "<XMP>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
706 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
707 "</XMP>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
708
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
709
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
710 (defun hm--html-add-plaintext-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
711 "Adds the HTML tags for plaintext to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
714 "<XMP>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
716 "</XMP>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
717
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
718
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
719 (defun hm--html-add-blockquote ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
720 "Adds the HTML tags for blockquote."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
721 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
722 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
723 "<BLOCKQUOTE>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
724 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
725 "</BLOCKQUOTE>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
726
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
727
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
728 (defun hm--html-add-blockquote-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
729 "Adds the HTML tags for blockquote to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
730 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
731 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
732 "<BLOCKQUOTE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
733 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
734 "</BLOCKQUOTE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
735
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
736 (defun hm--html-add-abstract ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
737 "Adds the HTML tags for abstract text at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
738 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
739 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
740 "<ABSTRACT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
741 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
742 "</ABSTRACT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
743
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
744
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
745 (defun hm--html-add-abstract-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
746 "Adds the HTML tags for abstract text to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
747 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
748 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
749 "<ABSTRACT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
750 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
751 "</ABSTRACT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
752
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
753
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
754
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
755 (defun hm--html-add-strikethru ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
756 "Adds the HTML tags for Strikethru at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
757 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
759 "<S>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761 "</S>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
762
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
763
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
764 (defun hm--html-add-strikethru-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
765 "Adds the HTML tags for Strikethru to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
766 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
767 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
768 "<S>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
769 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
770 "</S>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
771
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
772
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773 (defun hm--html-add-superscript ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
774 "Adds the HTML tags for Superscript at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
777 "<SUP>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
779 "</SUP>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
780
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
781
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
782 (defun hm--html-add-superscript-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
783 "Adds the HTML tags for Superscript to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
784 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
786 "<SUP>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 "</SUP>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
790
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791 (defun hm--html-add-subscript ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792 "Adds the HTML tags for Subscript at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
794 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795 "<SUB>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 "</SUB>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
799
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
800 (defun hm--html-add-subscript-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
801 "Adds the HTML tags for Subscript to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
802 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
803 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
804 "<SUB>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
805 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806 "</SUB>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
807
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
808
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 (defun hm--html-add-quote ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810 "Adds the HTML tags for Quote at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
811 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
812 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 "<Q>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815 "</Q>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 (defun hm--html-add-quote-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
819 "Adds the HTML tags for Quote to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822 "<Q>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
823 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
824 "</Q>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
825
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827 (defun hm--html-add-person ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828 "Adds the HTML tags for Person at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
829 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
830 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
831 "<PERSON>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
832 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
833 "</PERSON>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
834
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
835
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
836 (defun hm--html-add-person-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
837 "Adds the HTML tags for Person to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
838 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
839 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
840 "<PERSON>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
841 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
842 "</PERSON>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
843
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
844
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
845 (defun hm--html-add-instance ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
846 "Adds the HTML tags for Instance at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
847 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
848 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
849 "<INS>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
850 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
851 "</INS>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
852
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
853
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
854 (defun hm--html-add-instance-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
855 "Adds the HTML tags for Instance to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
856 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
857 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
858 "<INS>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
859 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
860 "</INS>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
862
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
863 (defun hm--html-add-option ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
864 "Adds the HTML tags for Option at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
865 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
866 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
867 "<OPT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 "</OPT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872 (defun hm--html-add-option-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873 "Adds the HTML tags for Option to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
874 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
875 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
876 "<OPT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
877 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
878 "</OPT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
879
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
880
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
881 (defun hm--html-add-publication ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
882 "Adds the HTML tags for Publication at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
883 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
884 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
885 "<PUB>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
886 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
887 "</PUB>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
888
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
889
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
890 (defun hm--html-add-publication-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891 "Adds the HTML tags for Publication to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
892 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
893 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
894 "<PUB>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
895 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
896 "</PUB>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899 (defun hm--html-add-author ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900 "Adds the HTML tags for Author at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 "<AUTHOR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 "</AUTHOR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
908 (defun hm--html-add-author-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
909 "Adds the HTML tags for Author to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
910 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
912 "<AUTHOR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
913 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
914 "</AUTHOR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
915
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
916
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
917 (defun hm--html-add-editor ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
918 "Adds the HTML tags for Editor at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
919 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
920 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
921 "<EDITOR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
922 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
923 "</EDITOR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
924
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
925
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
926 (defun hm--html-add-editor-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
927 "Adds the HTML tags for Editor to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
928 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
929 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
930 "<EDITOR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
931 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
932 "</EDITOR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
933
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
934
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
935 (defun hm--html-add-credits ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
936 "Adds the HTML tags for Credits at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
937 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
938 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
939 "<CREDITS>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
940 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
941 "</CREDITS>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
942
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
943
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
944 (defun hm--html-add-credits-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
945 "Adds the HTML tags for Credits to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
946 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
947 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
948 "<CREDITS>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
949 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
950 "</CREDITS>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
951
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
952
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
953 (defun hm--html-add-copyright ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
954 "Adds the HTML tags for Copyright at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
955 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
956 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
957 "<COPYRIGHT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
958 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
959 "</COPYRIGHT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
960
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
961
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
962 (defun hm--html-add-copyright-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
963 "Adds the HTML tags for Copyright to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
964 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
965 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
966 "<COPYRIGHT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
967 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
968 "</COPYRIGHT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
969
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
970
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
971 (defun hm--html-add-isbn ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
972 "Adds the HTML tags for ISBN at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
973 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
974 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
975 "<ISBN>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
976 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
977 "</ISBN>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
978
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
979
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
980 (defun hm--html-add-isbn-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
981 "Adds the HTML tags for ISBN to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
982 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
983 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
984 "<ISBN>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
985 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
986 "</ISBN>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
987
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
988
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
989 (defun hm--html-add-acronym ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
990 "Adds the HTML tags for Acronym at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
991 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
992 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
993 "<ACRONYM>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
994 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
995 "</ACRONYM>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
996
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
997
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
998 (defun hm--html-add-acronym-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
999 "Adds the HTML tags for Acronym to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1000 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1001 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1002 "<ACRONYM>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1003 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1004 "</ACRONYM>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1005
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1006
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1007 (defun hm--html-add-abbrevation ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1008 "Adds the HTML tags for Abbrevation at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1009 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1010 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1011 "<ABBREV>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1012 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1013 "</ABBREV>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1014
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1015
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1016 (defun hm--html-add-abbrev-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1017 "Adds the HTML tags for Abbrev to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1018 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1019 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1020 "<ABBREV>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1021 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1022 "</ABBREV>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1023
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1024
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1025 (defun hm--html-add-command ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1026 "Adds the HTML tags for Command at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1027 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1028 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1029 "<CMD>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1030 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1031 "</CMD>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1032
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1033
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1034 (defun hm--html-add-command-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1035 "Adds the HTML tags for Command to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1036 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1037 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1038 "<CMD>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1039 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1040 "</CMD>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1041
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1042
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1043 (defun hm--html-add-argument ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1044 "Adds the HTML tags for Argument at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1045 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1046 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1047 "<ARG>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1048 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1049 "</ARG>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1050
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1051
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1052 (defun hm--html-add-argument-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1053 "Adds the HTML tags for Argument to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1054 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1055 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1056 "<ARG>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1057 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1058 "</ARG>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1059
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1060
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1061 (defun hm--html-add-literature ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1062 "Adds the HTML tags for Literature at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1063 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1064 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1065 "<LIT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1066 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1067 "</LIT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1068
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1069
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1070 (defun hm--html-add-literature-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1071 "Adds the HTML tags for Literature to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1072 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1073 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1074 "<LIT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1075 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1076 "</LIT>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1077
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1078
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1079 (defun hm--html-add-footnote ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1080 "Adds the HTML tags for Footnote at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1081 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1082 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1083 "<FOOTNOTE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1084 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1085 "</FOOTNOTE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1086
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1087
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1088 (defun hm--html-add-footnote-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1089 "Adds the HTML tags for Footnote to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1090 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1091 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1092 "<FOOTNOTE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1093 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1094 "</FOOTNOTE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1095
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1096
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1097 (defun hm--html-add-margin ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1098 "Adds the HTML tags for Margin at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1099 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1100 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1101 "<MARGIN>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1102 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1103 "</MARGIN>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1105
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1106 (defun hm--html-add-margin-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1107 "Adds the HTML tags for Margin to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1108 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1109 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1110 "<MARGIN>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1111 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1112 "</MARGIN>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1114
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1116
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1118 ;;; Lists
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1120
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1121 (defun hm--html-add-listing ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1122 "Adds the HTML tags for listing."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1123 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1124 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1125 "<LISTING>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1126 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1127 "</LISTING>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1128
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1129
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1130 (defun hm--html-add-listing-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1131 "Adds the HTML tags for listing to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1132 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1133 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1134 "<LISTING>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1135 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1136 "</LISTING>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1137
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1138 (defun hm--html-add-center ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1139 "Adds the HTML tags for center at the current point."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1140 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1141 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1142 "<CENTER>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1143 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1144 "</CENTER>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1145
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1146 (defun hm--html-add-center-to-region ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1147 "Adds the HTML tags for center to the region."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1148 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1149 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1150 "<CENTER>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1151 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1152 "</CENTER>"))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1153
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1154 (defun hm--html-add-numberlist ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1155 "Adds the HTML tags for a numbered list at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1156 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1157 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1158 "<OL>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1159 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1160 "</OL>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1161 'hm--html-insert-start-tag
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1162 "<LI> "
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1163 'hm--html-insert-end-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1164 " </LI>"))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1165
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1166 (defun hm--html-add-numberlist-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1167 "Adds the HTML tags for a numbered list to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1168 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1169 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1170 "<OL>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1171 'hm--html-insert-end-tag-with-newline
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1172 "</OL>"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1173 ; 'hm--html-insert-start-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1174 ; "<LI> "))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1175
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1176
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1177 (defun hm--html-add-directory-list ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1178 "Adds the HTML tags for a directory list at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1179 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1180 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1181 "<DIR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1182 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1183 "</DIR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1184 'hm--html-insert-start-tag
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1185 "<LI> "
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1186 'hm--html-insert-end-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1187 " </LI>"))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1189 (defun hm--html-add-directorylist-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1190 "Adds the HTML tags for a directory list to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1191 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1192 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1193 "<DIR>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1194 'hm--html-insert-end-tag-with-newline
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1195 "</DIR>"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1196 ; 'hm--html-insert-start-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1197 ; "<LI> "))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1198
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1199
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1200 (defun hm--html-add-list ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1201 "Adds the HTML tags for a (unnumbered) list to the region."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1202 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1203 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1204 "<UL>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1205 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1206 "</UL>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1207 'hm--html-insert-start-tag
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1208 "<LI> "
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1209 'hm--html-insert-end-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1210 " </LI>"))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1211
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1212
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1213 (defun hm--html-add-list-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1214 "Adds the HTML tags for a (unnumbered) list to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1215 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1216 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1217 "<UL>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1218 'hm--html-insert-end-tag-with-newline
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1219 "</UL>"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1220 ; 'hm--html-insert-start-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1221 ; "<LI> "))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1222
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1223
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1224 ;(defun hm--html-add-menu ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1225 ; "Adds the HTML tags for a menu."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1226 ; (interactive)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1227 ; (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1228 ; "<MENU>"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1229 ; 'hm--html-insert-end-tag-with-newline
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1230 ; "</MENU>"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1231 ; 'hm--html-insert-start-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1232 ; "<LI> "))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1233
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1234
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1235 (defun hm--html-add-menu ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1236 "Adds the HTML tags for a menu."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1237 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1238 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1239 "<MENU>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1240 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1241 "</MENU>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1242 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1243 "<LI> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1244 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1245 " </LI>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1246
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1247
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1248 (defun hm--html-add-menu-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1249 "Adds the HTML tags for a menu to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1250 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1251 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1252 "<MENU>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1253 'hm--html-insert-end-tag-with-newline
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1254 "</MENU>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1255
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1256 ; 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1257 ; "<LI> "))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1258
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1259
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1260 (defun hm--html-add-description-title-and-entry ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1261 "Adds a definition title and entry.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1262 Assumes we're at the end of a previous entry."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1263 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1264 (hm--html-add-description-title)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1265 (let ((position (point))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1266 (case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1267 (search-forward "</dt>")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1268 (hm--html-add-description-entry)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1269 (goto-char position)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1270
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1271
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1272 (defun hm--html-add-description-list ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1273 "Adds the HTML tags for a description list.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1274 It also inserts a tag for the description title."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1275 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1276 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1277 "<DL>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1278 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1279 "</DL>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1280 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1281 "<DT> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1282 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1283 " </DT>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1284
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1285
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1286 (defun hm--html-add-description-list-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1287 "Adds the HTML tags for a description list to a region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1288 It also inserts a tag for the description title."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1289 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1290 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1291 "<DL>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1292 'hm--html-insert-end-tag-with-newline
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1293 "</DL>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1294
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1295 ; 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1296 ; "<DT> "))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1297
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1298
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1299 (defun hm--html-add-description-title ()
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1300 "Adds the HTML tags for a description title at current point in the buffer."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1301 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1302 (hm--html-add-tags 'hm--html-insert-end-tag-with-newline
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1303 "<DT> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1304 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1305 " </DT>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1306
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1307
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1308 (defun hm--html-add-description-title-to-region ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1309 "Adds the HTML tags for a description title to the region in the buffer."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1310 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1311 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1312 "<DT> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1313 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1314 " </DT>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1315
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1316
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1317 (defun hm--html-add-description-entry ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1318 "Adds the HTML tags for a description entry at current point in the buffer."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1319 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1320 (hm--html-add-tags 'hm--html-insert-end-tag-with-newline
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1321 "<DD> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1322 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1323 " </DD>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1324
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1325
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1326 (defun hm--html-add-description-entry-to-region ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1327 "Adds the HTML tags for a description entry to the region in the buffer."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1328 (interactive)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1329 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1330 "<DD> "
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1331 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1332 " </DD>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1333
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1334
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1335 (defun hm--html-add-address ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1336 "Adds the HTML tags for an address."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1337 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1338 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1339 "<ADDRESS>"
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1340 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1341 "</ADDRESS>"))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1342
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1343 (defun hm--html-add-address-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1344 "Adds the HTML tags for an address to the region"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1345 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1346 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1347 "<ADDRESS>"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1348 'hm--html-insert-end-tag
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1349 "</ADDRESS>"))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1350
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1351
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1352 (defvar hm--html-signature-reference-name "Signature"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1353 "The signature reference name.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1354
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1355
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1356 (defun hm--html-make-signature-link-string (signature-file-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1357 "Returns a string which is a link to a signature file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1358 (concat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1359 "<A Name="
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1360 hm--html-signature-reference-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1361 " HREF=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1362 signature-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1363 "\">"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1364
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1365
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1366 (defun hm--html-delete-old-signature ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1367 "Searches for the old signature and deletes it, if the user want it"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1368 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1369 (goto-char (point-min))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1370 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1371 (if (search-forward (concat "<address> "
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1372 "<a name="
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1373 hm--html-signature-reference-name
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1374 " href=\"")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1375 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1376 t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1377 (let ((signature-start (match-beginning 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1378 (signature-end (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1379 (search-forward "</address>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1380 (point))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1381 (if (yes-or-no-p "Delete the old signature (yes or no) ?")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1382 (delete-region signature-start signature-end)))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1383
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1384
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1385 (defun hm--html-set-point-for-signature ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1386 "Searches and sets the point for inserting the signature.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1387 It searches from the end to the beginning of the file. At first it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1388 tries to use the point before the </body> tag then the point before
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1389 the </html> tag and the the end of the file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1390 (goto-char (point-max))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1391 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1392 (cond ((search-backward "</body>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1393 (end-of-line 0)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1394 (if (> (current-column) 0)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1395 (newline 2)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1396 ((search-backward "</html>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1397 (end-of-line 0)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1398 (if (> (current-column) 0)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1399 (newline 2)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1400 ((> (current-column) 0)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1401 (newline 2))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1402 (t))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1403
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1404
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1405 (defun hm--html-add-signature ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1406 "Adds the owner's signature at the end of the buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1407 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1408 (if hm--html-signature-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1409 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1410 (if (not hm--html-username)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1411 (setq hm--html-username (user-full-name)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1412 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1413 (hm--html-delete-old-signature)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1414 (hm--html-set-point-for-signature)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1415 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1416 "<ADDRESS> "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1417 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1418 "</A></ADDRESS>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1419 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1420 (hm--html-make-signature-link-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1421 hm--html-signature-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1422 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1423 (insert hm--html-username)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1424 (error "ERROR: Define your hm--html-signature-file first !")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1425
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1426
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1427 (defun hm--html-add-header (size &optional header)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1428 "Adds the HTML tags for a header at the point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1429 (interactive "nSize (1 .. 6; 1 biggest): ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1430 (if (or (< size 1) (> size 6))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1431 (message "The size must be a number from 1 to 6 !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1432 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1433 (format "<H%d>" size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1434 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1435 (format "</H%d>" size))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1436 (if header
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1437 (insert header))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1438
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1439
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1440 (defun hm--html-add-header-to-region (size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1441 "Adds the HTML tags for a header to the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1442 The parameter 'size' specifies the size of the header."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1443 (interactive "nSize (1 .. 6; 1 biggest): ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1444 (if (or (< size 1) (> size 6))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1445 (message "The size must be a number from 1 to 6 !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1446 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1447 (format "<H%d>" size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1448 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1449 (format "</H%d>" size))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1450
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1451
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1452 (defun hm--html-set-point-for-title ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1453 "Searches and sets the point for inserting the HTML element title.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1454 The functions start at the beginning of the file and searches first
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1455 for the HTML tag <ISINDEX>. If such a tag exists, the point is set to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1456 position after the tag. If not, the function next searches for the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1457 tag <HEAD> and sets the point after the tag, if it exists, or searches for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1458 the tag <HTML>. If this tag exists, the point is set to the position after
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1459 this tag or the beginning of the file otherwise."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1460 (goto-char (point-min))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1461 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1462 (cond ((search-forward-regexp "<isindex>" nil t) (newline))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1463 ((search-forward-regexp "<head>" nil t) (newline))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1464 ((search-forward-regexp "<html>" nil t) (newline))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1465 (t))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1466
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1467
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1468 (defun hm--html-add-title (title)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1469 "Adds the HTML tags for a title at the beginning of the buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1470 (interactive "sTitle: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1471 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1472 (goto-char (point-min))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1473 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1474 (if (search-forward "<title>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1475 (let ((point-after-start-tag (point)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1476 (if (not (search-forward "</title>" nil t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1477 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1478 (goto-char (- (point) 8))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1479 (delete-backward-char (- (point) point-after-start-tag))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1480 (let ((start (point)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1481 (insert title " (" (hm--date) ")")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1482 (goto-char start))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1483 ;; Noch kein <TITLE> im Buffer vorhanden
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1484 (hm--html-set-point-for-title)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1485 (hm--html-add-tags 'hm--html-insert-start-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1486 "<TITLE>"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1487 'hm--html-insert-end-tag
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1488 "</TITLE>"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1489 'insert
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1490 (concat title " (" (hm--date) ")"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1491 (forward-char 8)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1492 (newline 1)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1493 ))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1494
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1495
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1496 (defun hm--html-add-title-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1497 "Adds the HTML tags for a title to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1498 (interactive)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1499 (let ((title (buffer-substring (region-beginning) (region-end)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1500 (case-fold-search t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1501 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1502 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1503 (if (search-forward "<title>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1504 (let ((point-after-start-tag (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1505 (if (not (search-forward "</title>" nil t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1506 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1507 (goto-char (- (point) 8))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1508 (delete-backward-char (- (point) point-after-start-tag))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1509 (insert title " (" (hm--date) ")")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1510 ;; Noch kein <TITLE> im Buffer vorhanden
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1511 (hm--html-set-point-for-title)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1512 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1513 "<TITLE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1514 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1515 "</TITLE>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1516 'insert
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1517 (concat title " (" (hm--date) ")"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1518 (forward-char 8)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1519 ;(newline 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1520 ))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1521
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1522
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1523 (defun hm--html-add-html ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1524 "Adds the HTML tags <HTML> and </HTML> in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1525 The tag <HTML> will be inserted at the beginning and </HTML> at the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1526 end of the file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1527 (interactive)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1528 (let ((new-cursor-position nil)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1529 (case-fold-search t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1530 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1531 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1532 (if (search-forward "<html>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1533 (error "There is an old tag <HTML> in the current buffer !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1534 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline "<HTML>")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1535 ; (newline 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1536 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1537 (setq new-cursor-position (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1538 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1539 (if (search-backward "</html>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1540 (error "There is an old tag </HTML> in the current buffer !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1541 (newline 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1542 (hm--html-add-tags 'hm--html-insert-end-tag "</HTML>")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1543 (goto-char new-cursor-position)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1544
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1545
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1546 (defun hm--html-add-head ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1547 "Adds the HTML tags <HEAD> and </HEAD> in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1548 The tags will be inserted after <HTML> or at the beginning of the file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1549 The function also looks for the tags <BODY> and </TITLE>."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1550 (interactive)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1551 (let ((case-fold-search t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1552 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1553 (if (search-forward "<html>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1554 (if (search-forward "<head>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1555 (error "There is an old tag <HEAD> in the current buffer !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1556 (if (search-forward "</head>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1557 (error "There is an old tag </HEAD> in the current buffer !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1558 (newline 1))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1559 (let ((start-tag-position (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1560 (if (search-forward "<body>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1561 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1562 (forward-line 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1563 (forward-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1564 (if (= (point) (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1565 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1566 (newline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1567 (forward-line -1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1568 (hm--html-add-tags 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1569 "</HEAD>")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1570 (goto-char start-tag-position)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1571 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1572 "<HEAD>")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1573 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1574 (if (search-forward "</title>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1575 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1576 (newline 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1577 (hm--html-add-tags 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1578 "</HEAD>")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1579 (goto-char start-tag-position)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1580 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1581 "<HEAD>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1582 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1583 "<HEAD>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1584 'hm--html-insert-end-tag-with-newline
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1585 "</HEAD>"))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1586
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1587
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1588 (defun hm--html-add-head-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1589 "Adds the HTML tags <HEAD> and </HEAD> to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1590 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1591 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1592 "<HEAD>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1593 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1594 "</HEAD>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1595
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1596
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1597 (defun hm--html-add-body ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1598 "Adds the HTML tags <BODY> and </BODY> in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1599 The tags will be inserted before </HTML> or at the end of the file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1600 (interactive)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1601 (let ((case-fold-search t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1602 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1603 (if (search-backward "</html>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1604 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1605 (if (search-backward "</body>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1606 (error "There is an old tag </BODY> in the current buffer !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1607 (if (search-backward "<body>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1608 (error "There is an old tag <BODY> in the current buffer !")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1609 (forward-char -1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1610 (let ((end-tag-position (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1611 (if (search-backward "</head>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1612 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1613 (forward-char 7)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1614 (newline 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1615 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1616 "<BODY>")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1617 (let ((cursor-position (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1618 (goto-char (+ end-tag-position 8))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1619 (hm--html-add-tags 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1620 "</BODY>")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1621 (goto-char cursor-position)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1622 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1623 (if (not (= (current-column) 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1624 (newline))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1625 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline "<BODY>"
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1626 'hm--html-insert-end-tag-with-newline "</BODY>")))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1627
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1628
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1629 (defun hm--html-add-body-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1630 "Adds the HTML tags <BODY> and </BODY> to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1631 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1632 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1633 "<BODY>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1634 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1635 "</BODY>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1636
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1637
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1638 (defun hm--html-add-title-and-header (title)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1639 "Adds the HTML tags for a title and a header in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1640 ; (interactive "sTitle and Header String: \nnHeader Size (1 .. 6): ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1641 ; (if (> size 6)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1642 ; (message "The size must be a number from 1 to 6 !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1643 (interactive "sTitle and Header String: ")
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1644 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1645 (hm--html-add-title title)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1646 (save-excursion
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1647 (goto-char (point-min))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1648 (search-forward "</title>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1649 (if (search-forward "</head>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1650 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1651 (search-forward "<body>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1652 (newline 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1653 (if (search-forward "<body>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1654 (newline 1)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1655 (if (string= (what-line) "Line 1")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1656 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1657 (end-of-line)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1658 (newline 1)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1659 (hm--html-add-header 1 title))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1660
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1661
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1662 (defun hm--html-add-title-and-header-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1663 "Adds the HTML tags for a title and a header to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1664 ;The parameter 'size' spezifies the size of the header.";"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1665 ; (interactive "nSize (1 .. 6): ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1666 ; (if (> size 6)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1667 ; (message "The size must be a number from 1 to 6 !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1668 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1669 (let ((title (buffer-substring (region-beginning) (region-end))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1670 (hm--html-add-header-to-region 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1671 (hm--html-add-title title)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1672
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1673
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1674 (defun hm--html-add-full-html-frame (title)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1675 "Adds a full HTML frame to the current buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1676 The frame consists of the elements html, head, body, title,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1677 header and the signature. The parameter TITLE specifies the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1678 title and the header of the document."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1679 (interactive "sTitle and Header String: ")
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1680 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1681 (hm--html-add-html)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1682 (hm--html-add-head)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1683 (hm--html-add-body)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1684 (hm--html-add-title-and-header title)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1685 (if hm--html-signature-file
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1686 (hm--html-add-signature))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1687 (goto-char (point-min))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1688 (search-forward "</h1>" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1689 (forward-line 1)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1690 (if hm--html-automatic-created-comment
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1691 (hm--html-insert-created-comment))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1692
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1693
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1694 (defun hm--html-add-full-html-frame-with-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1695 "Adds a full HTML frame to the current buffer with the use of a region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1696 The frame consists of the elements html, head, body, title,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1697 header and the signature. The function uses the region as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1698 the string for the title and the header of the document."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1699 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1700 (hm--html-add-title-and-header-to-region)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1701 (hm--html-add-html)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1702 (hm--html-add-head)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1703 (hm--html-add-body)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1704 (hm--html-add-signature)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1705 (if hm--html-automatic-created-comment
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1706 (hm--html-insert-created-comment)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1707
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1708
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1709 (defun hm--html-add-link-target-to-region (name)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1710 "Adds the HTML tags for a link target to the region."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1711 (interactive "sName: ")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1712 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1713 (concat "<A NAME=\"" name "\">")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1714 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1715 "</A>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1716
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1717 (defun hm--html-add-link-target (name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1718 "Adds the HTML tags for a link target at point in the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1719 ; (interactive "sName (or RET for numeric): ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1720 (interactive "sName: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1721 ; (and (string= name "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1722 ; (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1723 ; (setq html-link-counter (1+ html-link-counter))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1724 ; (setq name (format "%d" html-link-counter))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1725 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1726 (concat "<A NAME=\"" name "\">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1727 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1728 "</A>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1729
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1730
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1731 ;;; Functions which add links
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1732
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1733 (defun hm--html-mark-example (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1734 "Marks the example of the parameterlist in the current buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1735 It returns the example extent."
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1736 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1737 (if (hm--html-get-example-from-parameter-list parameter-list)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1738 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1739 (search-forward (hm--html-get-example-from-parameter-list
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1740 parameter-list))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1741 (let ((extent (make-extent (match-beginning 0)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1742 (match-end 0))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1743 (set-extent-face extent 'hm--html-help-face)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
1744 extent)))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1745
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1746
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1747 (defun hm--html-unmark-example (extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1748 "Unmarks the example for the current question."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1749 (if extent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1750 (delete-extent extent)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1751
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1752 ; )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1753 ; ;; For the Emacs 19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1754 ; (defun hm--html-mark-example (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1755 ; "Marks the example of the parameterlist in the current buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1756 ;It returns the example extent."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1757 ; (if (hm--html-get-example-from-parameter-list parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1758 ; (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1759 ; (search-forward (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1760 ; parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1761 ; (put-text-property (match-beginning 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1762 ; (match-end 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1763 ; 'face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1764 ; 'hm--html-help-face))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1765 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1766 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1767 ; (defun hm--html-unmark-example (extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1768 ; "Unmarks the example for the current question."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1769 ; t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1770
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1771
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1772 (defun hm--html-write-alist-in-buffer (alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1773 "The function writes the contents of the ALIST in the currentbuffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1774 (cond ((car alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1775 (insert (int-to-string (car (car alist))) ":\t" (cdr (car alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1776 (newline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1777 (hm--html-write-alist-in-buffer (cdr alist)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1778
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1779
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1780 (defun hm--html-select-directory (alist default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1781 "The function selects one of the directories of the ALIST,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1782 or the DEFAULT or the 'default-directory' by number. See also the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1783 documentation of the function hm--html-read-filename."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1784 (if (or (string= default "") (not default))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1785 (setq default default-directory))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1786 (if alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1787 (save-window-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1788 (let ((buffername (generate-new-buffer "*html-directories*")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1789 (set-buffer buffername)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1790 (insert "Select one of the following directories by number !")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1791 (newline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1792 (insert "===================================================")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1793 (newline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1794 (insert "0:\t" default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1795 (newline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1796 (hm--html-write-alist-in-buffer alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1797 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1798 (pop-to-buffer buffername))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1799 (let ((dirnumber (read-number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1800 "Select directory prefix by number: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1801 t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1802 (kill-buffer "*html-directories*")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1803 (expand-file-name (or (cdr (assoc dirnumber alist)) default))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1804 (expand-file-name default))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1805 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1806
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1807
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1808 (defun hm--html-delete-wrong-path-prefix-1 (filename prefix-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1809 "The function deletes wrong path prefixes."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1810 (cond (prefix-list (if (string-match (car prefix-list) filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1811 (substring filename (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1812 (hm--html-delete-wrong-path-prefix-1 filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1813 (cdr prefix-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1814 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1815 (t filename)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1816
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1817
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1818 (defun hm--html-delete-wrong-path-prefix (filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1819 "The function deletes wrong path prefixes.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1820 The path prefixes are specified by the variable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1821 `hm--html-delete-wrong-path-prefix'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1822 (if (not hm--html-delete-wrong-path-prefix)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1823 filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1824 (if (listp hm--html-delete-wrong-path-prefix)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1825 (hm--html-delete-wrong-path-prefix-1 filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1826 hm--html-delete-wrong-path-prefix)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1827 (hm--html-delete-wrong-path-prefix-1 filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1828 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1829 hm--html-delete-wrong-path-prefix))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1830 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1831
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1832
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1833 (defun hm--html-read-filename (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1834 "The function reads a filename with its directory path,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1835 if PARAMETER-LIST is not nil. If the PARAMETER-LIST is nil, only an empty
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1836 string will be returned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1837 The PARAMETER-LIST consists of the following elements:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1838 PROMPT, ALIST, DEFAULT, REQUIRE-MATCH, EXAMPLE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1839 If the ALIST is nil and DEFAULT is nil, then the function only reads
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1840 a filename (without path). These precede the following.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1841 If the ALIST isn't nil, the function lists the contents of the ALIST
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1842 in a buffer and reads a number from the minbuffer, which selects one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1843 of the directories (lines) of the buffer. Therefore the ALIST must look
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1844 like the following alist:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1845 ((1 . \"/appl/gnu/\") (2 . \"/\"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1846 If only ALIST is nil, or if you type a number which is not in the ALIST,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1847 the DEFAULT directory is selected. If the DEFAULT is nil or \"\" the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1848 'default-directory' is selected.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1849 After that the function reads the name of the file from the minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1850 Therefore the PROMPT is printed in the minibuffer and the selected directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1851 is taken as the start of the path of the file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1852 If REQUIRE-MATCH is t, the filename with path must match an existing file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1853 (if parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1854 (let ((marked-object (hm--html-mark-example parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1855 (prompt (hm--html-get-prompt-from-parameter-list parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1856 (alist (hm--html-get-alist-from-parameter-list parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1857 (default (hm--html-get-default-from-parameter-list parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1858 (require-match (hm--html-get-require-match-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1859 parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1860 (filename nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1861 (if (or alist default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1862 (let ((directory (hm--html-select-directory alist default)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1863 (setq filename (read-file-name prompt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1864 directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1865 directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1866 require-match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1867 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1868 (setq filename (read-file-name prompt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1869 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1870 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1871 require-match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1872 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1873 (hm--html-unmark-example marked-object)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1874 (hm--html-delete-wrong-path-prefix filename))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1875 ; (if (not hm--html-delete-wrong-path-prefix)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1876 ; filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1877 ; (if (string-match hm--html-delete-wrong-path-prefix filename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1878 ; (substring filename (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1879 ; filename)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1880 ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1881
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1882
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1883 (defun hm--html-completing-read (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1884 "Reads a string with completing-read, if alist is non nil.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1885 The PARAMETER-LIST consists of the following elements:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1886 PROMPT, ALIST, DEFAULT, REQUIRE-MATCH, EXAMPLE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1887 If ALIST is nil, it returns the DEFAULT, or if the DEFAULT is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1888 also nil it returns an empty string."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1889 (let ((marked-object (hm--html-mark-example parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1890 (string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1891 (if (hm--html-get-alist-from-parameter-list parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1892 (completing-read
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1893 (hm--html-get-prompt-from-parameter-list parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1894 (hm--html-get-alist-from-parameter-list parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1895 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1896 (hm--html-get-require-match-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1897 parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1898 (hm--html-get-default-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1899 parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1900 (if (hm--html-get-default-from-parameter-list parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1901 (hm--html-get-default-from-parameter-list parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1902 ""))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1903 (hm--html-unmark-example marked-object)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1904 string))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1905
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1906
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1907 (defvar hm--html-faces-exist nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1908
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1909
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1910 (defun hm--html-generate-help-buffer-faces ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1911 "Generates faces for the add-link-help-buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1912 (if (not (facep 'hm--html-help-face))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1913 ; (if (not hm--html-faces-exist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1914 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1915 (setq hm--html-faces-exist t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1916 (make-face 'hm--html-help-face)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1917 (if hm--html-help-foreground
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1918 (set-face-foreground 'hm--html-help-face hm--html-help-foreground))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1919 (if hm--html-help-background
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1920 (set-face-background 'hm--html-help-face hm--html-help-background))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1921 (set-face-font 'hm--html-help-face hm--html-help-font)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1922 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1923
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1924
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1925 (defun hm--html-get-prompt-from-parameter-list (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1926 "Returns the prompt from the PARAMETER-LIST."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1927 (car parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1928
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1929
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1930 (defun hm--html-get-alist-from-parameter-list (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1931 "Returns the alist from the PARAMETER-LIST."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1932 (car (cdr parameter-list)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1933
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1934
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1935 (defun hm--html-get-default-from-parameter-list (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1936 "Returns the default from the PARAMETER-LIST."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1937 (car (cdr (cdr parameter-list))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1938
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1939
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1940 (defun hm--html-get-require-match-from-parameter-list (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1941 "Returns the require-match from the PARAMETER-LIST."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1942 (car (cdr (cdr (cdr parameter-list)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1943
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1944
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1945 (defun hm--html-get-example-from-parameter-list (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1946 "Returns the example from the PARAMETER-LIST."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1947 (car (cdr (cdr (cdr (cdr parameter-list))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1948
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1949
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1950 (defun hm--html-get-anchor-seperator-from-parameter-list (parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1951 "Returns the anchor-seperator from the PARAMETER-LIST."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1952 (car (cdr (cdr (cdr (cdr (cdr parameter-list)))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1953
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1954
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1955 (defun hm--html-generate-add-link-help-buffer (scheme-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1956 host-name:port-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1957 servername:port-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1958 path+file-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1959 anchor-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1960 "Generates and displays a help buffer with an example for adding a link."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1961 (let ((buffername (generate-new-buffer "*Link-Example*")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1962 (pop-to-buffer buffername)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1963 (shrink-window (- (window-height) 5))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1964 (insert "Example:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1965 (newline 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1966 (if (hm--html-get-example-from-parameter-list scheme-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1967 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1968 (insert (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1969 scheme-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1970 (if (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1971 scheme-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1972 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1973 (insert ":")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1974 (if (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1975 host-name:port-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1976 (insert "//"))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1977 (if (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1978 host-name:port-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1979 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1980 (insert (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1981 host-name:port-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1982 (if (and (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1983 servername:port-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1984 (not (string= "/"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1985 (substring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1986 (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1987 servername:port-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1988 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1989 1))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1990 (insert "/"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1991 (if (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1992 servername:port-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1993 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1994 (insert (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1995 servername:port-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1996 (if (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1997 path+file-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1998 (insert "/"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1999 (if (hm--html-get-example-from-parameter-list path+file-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2000 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2001 (insert (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2002 path+file-parameter-list))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2003 (if (hm--html-get-example-from-parameter-list anchor-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2004 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2005 (insert (hm--html-get-anchor-seperator-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2006 anchor-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2007 (insert (hm--html-get-example-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2008 anchor-parameter-list))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2009 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2010 buffername
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2011 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2012
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2013
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2014 (defun hm--html-add-link (function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2015 scheme-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2016 host-name:port-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2017 servername:port-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2018 path+file-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2019 anchor-parameter-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2020 "The function adds a link in the current buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2021 The parameter FUNCTION-ADD-TAGS determines the function which adds the tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2022 in the buffer (for example: 'hm--html-add-tags or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2023 'hm--html-add-tags-to-region).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2024 The parameters SCHEME-PARAMETER-LIST, HOST-NAME:PORT-PARAMETER-LIST,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2025 SERVERNAME:PORT-PARAMETER-LIST, PATH+FILE-PARAMETER-LIST and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2026 ANCHOR-PARAMETER-LIST are lists with a prompt string, an alist, a default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2027 value and an example string. The ANCHOR-PARAMETER-LIST has as an additional
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2028 element an anchor seperator string. All these elements are used to read and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2029 construct the link."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2030 (let ((point nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2031 (save-window-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2032 (let ((html-buffer (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2033 (html-help-buffer (hm--html-generate-add-link-help-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2034 scheme-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2035 host-name:port-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2036 servername:port-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2037 path+file-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2038 anchor-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2039 (scheme (hm--html-completing-read scheme-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2040 (hostname:port (hm--html-completing-read
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2041 host-name:port-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2042 (servername:port (hm--html-completing-read
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2043 servername:port-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2044 (path+file (hm--html-read-filename path+file-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2045 (anchor (hm--html-completing-read anchor-parameter-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2046 ; (hrefname (setq html-link-counter (1+ html-link-counter)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2047 (anchor-seperator
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2048 (hm--html-get-anchor-seperator-from-parameter-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2049 anchor-parameter-list)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2050 (if (not (string= scheme ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2051 (if (string= hostname:port "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2052 (setq scheme (concat scheme ":"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2053 (setq scheme (concat scheme "://"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2054 (if (and (not (string= hostname:port ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2055 (not (string= servername:port ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2056 (not (string= (substring servername:port 0 1) "/")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2057 (setq servername:port (concat "/" servername:port)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2058 (if (and (not (string= path+file ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2059 (not (string= "/" (substring path+file 0 1))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2060 (setq path+file (concat "/" path+file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2061 (if (not (string= anchor ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2062 (setq anchor (concat anchor-seperator anchor)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2063 (kill-buffer html-help-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2064 (pop-to-buffer html-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2065 (eval (list function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2066 ''hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2067 (concat "<A"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2068 ; "<A Name="
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2069 ; hrefname
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2070 " HREF=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2071 scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2072 hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2073 servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2074 path+file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2075 anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2076 "\">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2077 ''hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2078 "</A>")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2079 (setq point (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2080 (goto-char (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2081
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2082
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2083 (defun hm--html-add-info-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2084 "Internal function. Adds the HTML tags for a link on a GNU Info file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2085 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2086 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2087 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2088 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2089 "http"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2090 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2091 "http")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2092 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2093 "Gateway and Port: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2094 hm--html-info-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2095 hm--html-info-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2096 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2097 "www.tnt.uni-hannover.de:8005")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2098 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2099 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2100 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2101 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2102 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2103 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2104 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2105 "Path/File: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2106 hm--html-info-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2107 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2108 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2109 "/appl/lemacs/Global/info/dir")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2110 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2111 "Node: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2112 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2113 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2114 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2115 "emacs"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2116 ",")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2119 (defun hm--html-add-info-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2120 "Adds the HTML tags for a link on a GNU Info file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2121 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2122 (hm--html-add-info-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2124
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2125 (defun hm--html-add-info-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2126 "Adds the HTML tags for a link on a GNU Info file to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2127 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2128 (hm--html-add-info-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2131 (defun hm--html-add-wais-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2132 "Internal function. Adds the HTML tags for a link to a WAIS server."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2133 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2134 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2135 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2136 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2137 "http"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2138 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2139 "http")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2140 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2141 "Gateway and Port: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2142 hm--html-wais-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2143 hm--html-wais-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2144 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2145 "www.tnt.uni-hannover.de:8001")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2146 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2147 "Wais Servername and Port: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2148 hm--html-wais-servername:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2149 hm--html-wais-servername:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2150 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2151 "quake.think.com:210")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2152 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2153 "Database: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2154 hm--html-wais-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2155 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2156 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2157 "database")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2158 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2159 "Searchstring: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2160 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2161 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2162 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2163 "searchstring"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2164 "?")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2165
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2166
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2167 (defun hm--html-add-wais-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2168 "Adds the HTML tags for a link to a WAIS server."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2169 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2170 (hm--html-add-wais-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2171
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2172
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2173 (defun hm--html-add-wais-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2174 "Adds the HTML tags for a link to a WAIS server to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2175 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2176 (hm--html-add-wais-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2177
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2178
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2179 (defun hm--html-add-direct-wais-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2180 "Internal function. Adds the HTML tags for a direct link to a WAIS server.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2181 This function uses the new direct WAIS support instead of a WAIS gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2182 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2183 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2184 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2185 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2186 "wais"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2187 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2188 "wais")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2189 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2190 "Wais Servername and Port: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2191 hm--html-wais-servername:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2192 hm--html-wais-servername:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2193 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2194 "quake.think.com:210")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2195 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2196 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2197 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2198 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2199 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2200 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2201 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2202 "Database: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2203 hm--html-wais-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2204 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2205 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2206 "database")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2207 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2208 "Searchstring: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2209 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2210 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2211 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2212 "searchstring"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2213 "?")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2214
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2215
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2216 (defun hm--html-add-direct-wais-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2217 "Adds the HTML tags for a direct link to a WAIS server.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2218 This function uses the new direct WAIS support instead of a WAIS gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2219 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2220 (hm--html-add-direct-wais-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2221
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2222
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2223 (defun hm--html-add-direct-wais-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2224 "Adds the HTML tags for a direct link to a WAIS server to the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2225 This function uses the new direct WAIS support instead of a WAIS gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2226 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2227 (hm--html-add-direct-wais-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2228
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2229
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2230 (defun hm--html-add-html-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2231 "Internal function. Adds the HTML tags for a link to an HTML page."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2232 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2233 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2234 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2235 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2236 "http"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2237 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2238 "http")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2239 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2240 "Servername and Port: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2241 hm--html-html-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2242 hm--html-html-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2243 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2244 "www.tnt.uni-hannover.de:80")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2245 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2246 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2247 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2248 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2249 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2250 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2251 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2252 "Path/File: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2253 hm--html-html-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2254 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2255 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2256 "/data/info/www/tnt/overview.html")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2257 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2258 "Anchor: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2259 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2260 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2261 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2262 "1"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2263 "#")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2265
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2266 (defun hm--html-add-html-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2267 "Adds the HTML tags for a link to an HTML file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2268 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2269 (hm--html-add-html-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2270
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2271
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2272 (defun hm--html-add-html-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2273 "Adds the HTML tags for a link to an HTML file to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2274 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2275 (hm--html-add-html-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2276
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2277
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2278 (defun hm--html-add-file-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2279 "Internal function. Adds the HTML tags for a filegateway link."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2280 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2281 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2282 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2283 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2284 "file"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2285 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2286 "file")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2287 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2288 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2289 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2290 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2291 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2292 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2293 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2294 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2295 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2296 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2297 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2298 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2299 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2300 "Path/File: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2301 hm--html-file-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2302 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2303 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2304 "/data/info/www/tnt/overview.html")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2305 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2306 "Anchor: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2307 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2308 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2309 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2310 "1"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2311 "#")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2312
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2313
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2314 (defun hm--html-add-file-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2315 "Adds the HTML tags for a for a filegateway link."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2316 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2317 (hm--html-add-file-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2318
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2319
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2320 (defun hm--html-add-file-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2321 "Adds the HTML tags for a for a filegateway link to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2322 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2323 (hm--html-add-file-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2324
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2325
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2326 (defun hm--html-add-ftp-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2327 "Internal function. Adds the HTML tags for a link to an FTP server."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2328 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2329 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2330 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2331 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2332 "ftp"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2333 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2334 "ftp")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2335 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2336 "FTP Servername: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2337 hm--html-ftp-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2338 hm--html-ftp-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2339 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2340 "ftp.rrzn.uni-hannover.de")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2341 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2342 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2343 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2344 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2345 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2346 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2347 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2348 "Path/File: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2349 hm--html-ftp-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2350 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2351 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2352 "/pub/gnu/gcc-2.4.5.tar.gz")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2353 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2354 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2355 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2356 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2357 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2358 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2359 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2360
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2361
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2362 (defun hm--html-add-ftp-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2363 "Adds the HTML tags for a link to an FTP server."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2364 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2365 (hm--html-add-ftp-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2366
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2367
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2368 (defun hm--html-add-ftp-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2369 "Adds the HTML tags for a link to an FTP server to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2370 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2371 (hm--html-add-ftp-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2372
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2373
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2374 (defun hm--html-add-gopher-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2375 "Internal function. Adds the HTML tags for a link to a gopher server."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2376 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2377 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2378 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2379 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2380 "gopher"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2381 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2382 "gopher")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2383 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2384 "Gopher Servername: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2385 hm--html-gopher-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2386 hm--html-gopher-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2387 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2388 "newsserver.rrzn.uni-hannover.de:70")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2389 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2390 "Documenttype: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2391 hm--html-gopher-doctype-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2392 hm--html-gopher-doctype-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2393 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2394 "/1")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2395 nil ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2396 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2397 "Entrypoint: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2398 hm--html-gopher-anchor-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2399 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2400 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2401 "Subject%20Tree"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2402 "/")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2403
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2404
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2405 (defun hm--html-add-gopher-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2406 "Adds the HTML tags for a link to a gopher server."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2407 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2408 (hm--html-add-gopher-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2409
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2410
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2411 (defun hm--html-add-gopher-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2412 "Adds the HTML tags for a link to a gopher server to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2413 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2414 (hm--html-add-gopher-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2415
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2416
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2417 (defun hm--html-make-proggate-alist (proggate-allowed-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2418 "Makes a proggate-alist from the PROGGATE-ALLOWED-FILE."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2419 (if (and (stringp proggate-allowed-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2420 (file-exists-p proggate-allowed-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2421 (save-window-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2422 (let ((alist nil)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2423 (buffername (find-file-noselect proggate-allowed-file))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2424 (case-fold-search t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2425 (set-buffer buffername)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2426 (toggle-read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2427 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2428 (while (search-forward-regexp "[^ \t\n]+" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2429 (setq alist (append (list (list (buffer-substring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2430 (match-beginning 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2431 (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2432 alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2433 (kill-buffer buffername)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2434 alist))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2435 (error "ERROR: Can't find the 'hm--html-progate-allowed-file !")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2436
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2437
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2438 (defun hm--html-add-proggate-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2439 "Internal function. Adds the HTML tags for a link to a program.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2440 The program is called via the program gateway.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2441 Email to muenkel@tnt.uni-hannover.de for information over
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2442 this gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2443 (let ((progname-alist (hm--html-make-proggate-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2444 hm--html-proggate-allowed-file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2445 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2446 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2447 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2448 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2449 "http"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2450 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2451 "http")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2452 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2453 "Servername and Port: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2454 hm--html-proggate-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2455 hm--html-proggate-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2456 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2457 "www.tnt.uni-hannover.de:8007")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2458 (list ; program
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2459 "Programname: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2460 progname-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2461 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2462 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2463 "/usr/ucb/man")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2464 nil ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2465 (list ; Program Parameter
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2466 "Programparameter: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2467 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2468 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2469 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2470 "8+lpd"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2471 "+"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2472
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2473
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2474 (defun hm--html-add-proggate-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2475 "Adds the HTML tags for a link to a program.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2476 The program is called via the program gateway.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2477 Email to muenkel@tnt.uni-hannover.de for information over
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2478 this gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2479 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2480 (hm--html-add-proggate-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2481
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2482
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2483 (defun hm--html-add-proggate-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2484 "Adds the HTML tags for a link to a program to the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2485 The program is called via the program gateway.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2486 Email to muenkel@tnt.uni-hannover.de for information over
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2487 this gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2488 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2489 (hm--html-add-proggate-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2490
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2491
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2492 (defun hm--html-add-local-proggate-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2493 "Internal function. Adds the HTML tags for a link to a program.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2494 The program is called via the local program gateway.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2495 Email to muenkel@tnt.uni-hannover.de for information over
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2496 this gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2497 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2498 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2499 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2500 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2501 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2502 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2503 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2504 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2505 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2506 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2507 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2508 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2509 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2510 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2511 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2512 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2513 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2514 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2515 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2516 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2517 "Path/file: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2518 hm--html-local-proggate-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2519 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2520 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2521 "/data/info/programs/lemacs.evlm")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2522 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2523 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2524 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2525 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2526 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2527 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2528
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2529
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2530 (defun hm--html-add-local-proggate-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2531 "Adds the HTML tags for a link to a program.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2532 The program is called via the local program gateway.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2533 Email to muenkel@tnt.uni-hannover.de for information over
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2534 this gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2535 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2536 (hm--html-add-local-proggate-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2537
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2538
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2539 (defun hm--html-add-local-proggate-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2540 "Adds the HTML tags for a link to a program to the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2541 The program is called via the local program gateway.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2542 Email to muenkel@tnt.uni-hannover.de for information over
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2543 this gateway."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2544 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2545 (hm--html-add-local-proggate-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2546
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2547
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2548 (defvar hm--html-newsgroup-alist nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2549 "Alist with newsgroups for the newsgateway.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2550
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2551
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2552 (defvar gnus-newsrc-assoc nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2553
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2554
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2555 (defun hm--html-make-newsgroup-alist ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2556 "Makes a hm--html-make-newsgroup-alist from a .newsrc.el file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2557 The function looks at the environment variable NNTPSERVER.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2558 If this variable exists, it trys to open the file with the Name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2559 ~/$NNTPSERVER.el. If this file exists, the alist of the file is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2560 returned as the newsgroup-alist. If the file doesn't exist, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2561 tries to use the file ~/$NNTPSERVER to make the alist. The function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2562 returns '((\"\"))"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2563 (if hm--html-newsgroup-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2564 hm--html-newsgroup-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2565 (if gnus-newsrc-assoc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2566 (setq hm--html-newsgroup-alist gnus-newsrc-assoc)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2567 (if (not (getenv "NNTPSERVER"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2568 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2569 (let ((newsrc-file (expand-file-name (concat "~/.newsrc-"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2570 (getenv "NNTPSERVER")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2571 (if (file-exists-p (concat newsrc-file ".el"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2572 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2573 (load-file (concat newsrc-file ".el"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2574 (setq hm--html-newsgroup-alist gnus-newsrc-assoc))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2575 (if (not (file-exists-p newsrc-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2576 '((""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2577 (save-window-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2578 (let ((alist nil)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2579 (buffername (find-file-noselect newsrc-file))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2580 (case-fold-search t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2581 (set-buffer buffername)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2582 (toggle-read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2583 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2584 (while (search-forward-regexp "[^:!]+" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2585 (setq alist (append (list (list (buffer-substring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2586 (match-beginning 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2587 (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2588 alist))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2589 (search-forward-regexp "\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2590 (kill-buffer buffername)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2591 (setq hm--html-newsgroup-alist alist))))))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2592
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2593
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2594
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2595 (defun hm--html-add-news-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2596 "Internal function. Adds the HTML tags for a link to a news group."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2597 (let ((newsgroup-alist (hm--html-make-newsgroup-alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2598 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2599 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2600 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2601 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2602 "news"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2603 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2604 "news")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2605 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2606 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2607 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2608 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2609 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2610 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2611 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2612 "NEWS Group: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2613 newsgroup-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2614 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2615 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2616 "comp.emacs.xemacs")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2617 nil ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2618 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2619 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2620 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2621 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2622 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2623 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2624 nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2625
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2626
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2627 (defun hm--html-add-news-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2628 "Adds the HTML tags for a link to a news group."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2629 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2630 (hm--html-add-news-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2631
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2632
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2633 (defun hm--html-add-news-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2634 "Adds the HTML tags for a link to a news group to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2635 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2636 (hm--html-add-news-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2637
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2638
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2639 (defun hm--html-add-mail-box-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2640 "Internal function. Adds the HTML tags for a link to a mail box."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2641 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2642 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2643 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2644 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2645 "http"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2646 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2647 "http")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2648 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2649 "Hostname and Port: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2650 hm--html-mail-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2651 hm--html-mail-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2652 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2653 "www.tnt.uni-hannover.de:8003")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2654 (list ; servername:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2655 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2656 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2657 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2658 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2659 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2660 (list ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2661 "Path/File: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2662 hm--html-mail-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2663 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2664 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2665 "/data/info/mail/mailbox")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2666 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2667 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2668 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2669 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2670 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2671 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2672 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2673
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2674
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2675 (defun hm--html-add-mail-box-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2676 "Adds the HTML tags for a link to a mail box."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2677 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2678 (hm--html-add-mail-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2679
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2680
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2681 (defun hm--html-add-mail-box-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2682 "Adds the HTML tags for a link to a mail box to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2683 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2684 (hm--html-add-mail-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2685
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2686
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2687 (defun hm--html-add-mailto-link-1 (function-add-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2688 "Internal function. Adds the HTML tags for a mailto link."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2689 (let ((mailto-alist (if (and (boundp 'user-mail-address)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2690 user-mail-address)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2691 (cons (list user-mail-address)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2692 hm--html-mailto-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2693 hm--html-mailto-alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2694 (hm--html-add-link function-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2695 (list ; scheme
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2696 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2697 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2698 "mailto"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2699 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2700 "mailto")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2701 (list ; hostname:port
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2702 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2703 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2704 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2705 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2706 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2707 (list ; servername:port
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2708 "Mailaddress: "
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2709 mailto-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2710 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2711 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2712 "muenkel@tnt.uni-hannover.de")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2713 nil ; path/file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2714 (list ; anchor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2715 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2716 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2717 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2718 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2719 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2720 nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2721
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2722 (defun hm--html-add-mailto-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2723 "Adds the HTML tags for a mailto link."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2724 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2725 (hm--html-add-mailto-link-1 'hm--html-add-tags))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2726
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2727
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2728 (defun hm--html-add-mailto-link-to-region ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2729 "Adds the HTML tags for a mailto link to the region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2730 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2731 (hm--html-add-mailto-link-1 'hm--html-add-tags-to-region))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2732
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2733 (defun hm--html-add-relative-link (relative-file-path)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2734 "Adds the HTML tags for a relative link at the current point."
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2735 (interactive (list (file-relative-name
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2736 (read-file-name "Relative Filename: "
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2737 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2738 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2739 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2740 "")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2741 default-directory)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2742 ))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2743 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2744 (concat "<A HREF=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2745 relative-file-path
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2746 "\">")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2747 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2748 "</A>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2749
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2750 (defun hm--html-add-relative-link-to-region (relative-file-path)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2751 "Adds the HTML tags for a relative link to the region."
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2752 (interactive (list (file-relative-name
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2753 (read-file-name "Relative Filename: "
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2754 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2755 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2756 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2757 ""))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2758 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2759 (concat "<A HREF=\""
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2760 relative-file-path
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2761 "\">")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2762 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2763 "</A>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2764
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2765 (defun hm--html-add-normal-link (link-object)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2766 "Adds the HTML tags for a normal general link.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2767 Single argument LINK-OBJECT is value of HREF in the new anchor.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2768 Mark is set after anchor."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2769 (interactive "sNode Link to: ")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2770 (hm--html-add-tags 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2771 (concat "<A HREF=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2772 link-object
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2773 "\">")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2774 'hm--html-insert-end-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2775 "</A>"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2776
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2777 (defun hm--html-add-normal-link-to-region (link-object)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2778 "Adds the HTML tags for a normal general link to region.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2779 Single argument LINK-OBJECT is value of HREF in the new anchor.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2780 Mark is set after anchor."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2781 (interactive "sNode Link to: ")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2782 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2783 (concat "<A HREF=\""
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2784 ; (read-string "Link to: ")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
2785 link-object
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2786 "\">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2787 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2788 "</A>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2789
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2790
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2791 (defun hm--html-add-normal-node-link ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2792 "Adds the HTML tags for a normal node link (<LINK...>) at the point."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2793 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2794 (hm--html-insert-start-tag (concat "<LINK HREF=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2795 (read-string "Node Link to: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2796 "\">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2797 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2798
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2799 ;;; Functions to update the date and the changelog entries
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2800
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2801
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2802 (defun hm--html-maybe-new-date-and-changed-comment ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2803 "Hook function which updates the date in the title line, if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2804 'hm--html-automatic-new-date' is t and which inserts a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2805 \"changed comment\" line, if 'hm--html-automatic-changed-comment' is t."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2806 (if hm--html-automatic-new-date
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2807 (hm--html-new-date))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2808 (if hm--html-automatic-changed-comment
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2809 (hm--html-insert-changed-comment t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2810
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2811
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2812 (defun hm--html-new-date ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2813 "The function sets the date in the title line up."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2814 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2815 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2816 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2817 (let ((case-fold-search t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2818 (end-of-head (if (search-forward "</head>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2819 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2820 (if (search-forward "<body>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2821 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2822 (point-max)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2823 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2824 (if (re-search-forward
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2825 (concat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2826 "\\((\\)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2827 "\\([ \t]*[0-3]?[0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9][0-9][ \t]*\\)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2828 "\\()[ \t\n]*</title>\\)")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2829 end-of-head
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2830 t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2831 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2832 (delete-region (match-beginning 2) (match-end 2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2833 (goto-char (match-beginning 2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2834 (insert (hm--date)))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2835
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2836
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2837 (defun hm--html-insert-created-comment (&optional noerror)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2838 "The function inserts a \"created comment\".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2839 The comment looks like <!-- Created by: Heiko Münkel, 10-Dec-1993 -->.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2840 The comment will be inserted after the title line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2841 An error message is printed, if there is no title line and if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2842 noerror is nil."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2843 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2844 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2845 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2846 (let ((case-fold-search t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2847 (end-of-head (if (search-forward "</head>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2848 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2849 (if (search-forward "<body>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2850 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2851 (point-max)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2852 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2853 (if (not (search-forward "</title>" end-of-head t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2854 (if (not noerror)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2855 (error "ERROR: Please insert a title in the document !"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2856 (let ((end-of-title-position (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2857 (if (search-forward "<!-- Created by: " end-of-head t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2858 (if (yes-or-no-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2859 "Replace the old comment \"<!-- Created by: \" ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2860 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2861 (goto-char (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2862 (kill-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2863 (hm--html-add-comment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2864 (insert "Created by: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2865 (or hm--html-username (user-full-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2866 ", "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2867 (hm--date))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2868 (newline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2869 (hm--html-add-comment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2870 (insert "Created by: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2871 (or hm--html-username (user-full-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2872 ", "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2873 (hm--date)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2874 )))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2875
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2876
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2877 (defun hm--html-insert-changed-comment-1 (newline username)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2878 "Internal function of 'hm--html-insert-changed-comment'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2879 Inserts a newline if NEWLINE is t, before the comment is inserted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2880 USERNAME is the name to be inserted in the comment."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2881 (if newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2882 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2883 ; (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2884 (newline)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2885 (hm--html-add-comment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2886 (insert "Changed by: " username ", " (hm--date)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2887
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2888 (defun hm--html-insert-changed-comment (&optional noerror)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2889 "The function inserts a \"changed comment\".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2890 The comment looks like <!-- Changed by: Heiko Münkel, 10-Dec-1993 -->.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2891 The comment will be inserted after the last \"changed comment\" line, or,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2892 if there isn't such a line, after the \"created comment\" line, or,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2893 after the title line. If there is no title and NOERROR is nil, an error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2894 message is generated. The line is not inserted after the end of the head
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2895 or the beginning of the body.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2896 If the last \"changed line\" is from the same author, it is only replaced
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2897 by the new one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2898
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2899 Attention: Don't change the format of the lines and don't write anything
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2900 else in such a line !"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2901 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2902 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2903 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2904 (let ((case-fold-search t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2905 (end-of-head (if (search-forward "</head>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2906 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2907 (if (search-forward "<body>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2908 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2909 (point-max))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2910 (username (or hm--html-username (user-full-name))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2911 (goto-char end-of-head)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2912 (if (search-backward "<!-- Changed by: " nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2913 (if (string-match username
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2914 (buffer-substring (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2915 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2916 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2917 (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2918 ;; exchange the comment line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2919 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2920 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2921 (delete-region (point) (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2922 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2923 (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2924 (hm--html-insert-changed-comment-1 nil username))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2925 ;; new comment line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2926 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2927 (hm--html-insert-changed-comment-1 t username))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2928 (if (search-backward "<!-- Created by: " nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2929 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2930 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2931 (hm--html-insert-changed-comment-1 t username))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2932 (if (search-backward "</title>" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2933 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2934 (goto-char (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2935 (if (not (looking-at "\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2936 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2937 (newline)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2938 (forward-char -1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2939 (hm--html-insert-changed-comment-1 t username))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2940 (if (not noerror)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2941 (error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2942 "ERROR: Insert at first a title in the document !"))))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2943
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2944
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2945
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2946 ;;; Functions to insert templates
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2947
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2948 (defvar hm--html-template-file-history nil
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2949 "Historyvariable for the template files in the `hm--html-mode'.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2950
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2951 (defun hm--html-insert-template (filename)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2952 "Inserts a templatefile.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2953 It uses `tmpl-insert-template-file' to insert
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2954 the templates. The variables `tmpl-template-dir-list',
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2955 `tmpl-automatic-expand' and `tmpl-history-variable-name' are
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2956 overwritten by `hm--html-template-dir',
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2957 `hm--html-automatic-expand-templates' and `hm--html-template-file-history'."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2958 (interactive (list nil))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2959 (let ((tmpl-template-dir-list (if (listp hm--html-template-dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2960 hm--html-template-dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2961 (list hm--html-template-dir)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2962 (tmpl-automatic-expand hm--html-automatic-expand-templates)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2963 (tmpl-history-variable-name 'hm--html-template-file-history))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2964 (if filename
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2965 (tmpl-insert-template-file filename)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2966 (call-interactively 'tmpl-insert-template-file))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2967 ; (if hm--html-automatic-created-comment ; better in the template files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2968 ; (hm--html-insert-created-comment t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2969 ))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2970
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2971 (defun hm--html-insert-template-from-fixed-dirs (filename)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2972 "Inserts a templatefile.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2973 It uses `tmpl-insert-template-file-from-fixed-dirs' to insert
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2974 the templates. The variables `tmpl-template-dir-list',
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2975 `tmpl-automatic-expand', `tmpl-filter-regexp' and
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2976 `tmpl-history-variable-name' are overwritten by
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2977 `hm--html-template-dir', `hm--html-automatic-expand-templates',
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2978 `hm--html-template-filter-regexp' and `hm--html-template-file-history'."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2979 (interactive (list nil))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2980 (let ((tmpl-template-dir-list (if (listp hm--html-template-dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2981 hm--html-template-dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2982 (list hm--html-template-dir)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2983 (tmpl-automatic-expand hm--html-automatic-expand-templates)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2984 (tmpl-filter-regexp hm--html-template-filter-regexp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2985 (tmpl-history-variable-name 'hm--html-template-file-history))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2986 (if filename
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2987 (tmpl-insert-template-file-from-fixed-dirs filename)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2988 (call-interactively 'tmpl-insert-template-file-from-fixed-dirs))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2989 ; (if hm--html-automatic-created-comment ; better in the template files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2990 ; (hm--html-insert-created-comment t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2991 ))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2992
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2993 ;(defun hm--html-insert-template (filename)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2994 ; "Inserts a templatefile."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2995 ; (interactive
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2996 ; (list (tmpl-read-template-filename hm--html-template-dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2997 ; hm--html-automatic-expand-templates
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2998 ; hm--html-template-filter-regexp
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
2999 ; 'hm--html-template-file-history)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3000 ; (interactive (list
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3001 ; (let ((file-name-history hm--html-template-file-history))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3002 ; (read-file-name "Templatefile: "
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3003 ; hm--html-template-dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3004 ; nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3005 ; t
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3006 ; nil))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3007 ;; 'hm--html-template-file-history)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3008 ; (insert-file (expand-file-name filename))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3009 ; (if hm--html-automatic-expand-templates
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3010 ; (tmpl-expand-templates-in-buffer))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3011 ; (if hm--html-automatic-created-comment
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3012 ; (hm--html-insert-created-comment t)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3013
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3014
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3015
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3016 ;;; Functions for highlighting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3017
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3018 ;(defun hm--html-toggle-use-highlighting ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3019 ; "Toggles the variable html-use-highlighting."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3020 ; (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3021 ; (if html-use-highlighting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3022 ; (setq html-use-highlighting nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3023 ; (setq html-use-highlighting t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3024
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3025
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3026 ;;; Functions for font lock mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3027
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3028 (if (adapt-emacs19p)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3029 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3030 (make-face 'font-lock-comment-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3031 (make-face 'font-lock-doc-string-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3032 (make-face 'font-lock-string-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3033 (or (face-differs-from-default-p 'font-lock-doc-string-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3034 (copy-face 'font-lock-comment-face 'font-lock-doc-string-face))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3035 (or (face-differs-from-default-p 'font-lock-comment-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3036 (copy-face 'italic 'font-lock-comment-face))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3037 (or (face-differs-from-default-p 'font-lock-string-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3038 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3039 (copy-face 'font-lock-doc-string-face 'font-lock-string-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3040 (set-face-underline-p 'font-lock-string-face t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3041 (setq font-lock-comment-face 'font-lock-comment-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3042 ;; (setq font-lock-doc-string-face 'font-lock-doc-string-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3043 (setq font-lock-string-face 'font-lock-string-face)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3044
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3045
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3046 ;(defun hm--html-set-font-lock-color ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3047 ; "Sets the color for the font lock mode in HTML mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3048 ;This color is used to highlight HTML expressions."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3049 ; (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3050 ; (setq hm--html-font-lock-color
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3051 ; (completing-read "Color: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3052 ; '(("grey80")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3053 ; ("black")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3054 ; ("red")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3055 ; ("yellow")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3056 ; ("blue"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3057 ; nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3058 ; nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3059 ; "black"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3060 ; (set-face-foreground 'font-lock-comment-face hm--html-font-lock-color)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3061 ; (set-face-foreground 'font-lock-string-face hm--html-font-lock-color))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3062
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3063
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3064 ;;; Functions which determine if an active region exists
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3065
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3066 ;(defvar hm--region-active nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3067 ; "t : Region is active.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3068 ;nil: Region is inactive.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3069 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3070 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3071 ;(defun hm--set-hm--region-active ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3072 ; (setq hm--region-active t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3073 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3074 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3075 ;(defun hm--unset-hm--region-active ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3076 ; (setq hm--region-active nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3077
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3078
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3079
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3080 ;;; Functions to insert forms
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3081
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3082 (defun hm--html-form-read-method ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3083 "Reads the method for a form."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3084 (completing-read "Method of the form: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3085 '(("POST") ("GET"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3086 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3087 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3088 "POST"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3089
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3090
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3091 (defun hm--html-form-read-action (method)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3092 "Reads the URL for the action attribute of a form.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3093 It returns nil if no action attribute is wanted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3094 METHOD is the method of the form."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3095 (if (y-or-n-p "Current document URL as action attribute ? ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3096 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3097 (hm--html-read-url "Query server URL: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3098 hm--html-url-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3099 (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3100 (lambda (table-element-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3101 (hm--html-read-url-predicate table-element-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3102 (car
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3103 (read-from-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3104 method)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3105 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3106 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3108
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3109 (defun hm--html-add-form (&optional method)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3110 "Adds the HTML tags for a form.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3111 The function asks only for a method, if METHOD is nil, otherwise
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3112 the METHOD must have one of the values \"GET\" or \"POST\"."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3113 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3114 (let* ((method (or method (hm--html-form-read-method)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3115 (action (hm--html-form-read-action method)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3116 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3117 (concat "<FORM METHOD=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3118 method
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3119 "\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3120 (if action
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3121 (concat " ACTION=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3122 action
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3123 "\"")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3124 "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3125 ">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3126 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3127 "</FORM>")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3128
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3130 (defun hm--html-add-form-to-region (&optional method)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3131 "Adds the HTML tags for a form to a region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3132 The function asks only for a method, if METHOD is nil, otherwise
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3133 the METHOD must have one of the values \"GET\" or \"POST\"."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3134 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3135 (let* ((method (or method (hm--html-form-read-method)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3136 (action (hm--html-form-read-action method)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3137 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3138 (concat "<FORM METHOD=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3139 method
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3140 "\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3141 (if action
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3142 (concat " ACTION=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3143 action
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3144 "\"")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3145 "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3146 ">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3147 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3148 "</FORM>")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3149
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3150
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3151 (defun hm--html-form-read-name (&optional last-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3152 "Reads the name for an input tag."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3153 (read-string "Symbolic name: " last-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3155
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3156 (defun hm--html-form-read-value (prompt &optional initial-contents)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3157 "Reads the value for an input tag."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3158 (read-string prompt initial-contents))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3159
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3160
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3161 (defun hm--html-form-read-checked ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3162 "Reads whether a button is checked by default or not."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3163 (y-or-n-p "Should the button be checked by default ? "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3164
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3165
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3166 (defun hm--html-form-read-size ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3167 "Reads the size of text entry fields of input tags."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3168 (if (y-or-n-p "Defaultsize of the Inputfield ? ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3169 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3170 (format "%d,%d"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3171 (read-number "Width of the input field: " t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3172 (read-number "Height of the input field: " t))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3174
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3175 (defun hm--html-form-read-maxlength ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3176 "Reads the maxlength of text entry fields of input tags."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3177 (let ((maxlength (read-number "Maximum number of chars (0 = unlimited): "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3178 t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3179 (if (<= maxlength 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3180 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3181 (int-to-string maxlength))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3182
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3183
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3184 (defun hm--html-form-read-src (prompt &optional initial-contents)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3185 "Reads the src for an input tag."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3186 (read-string prompt initial-contents))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3187
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3189 (defun hm--html-form-add-input (type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3190 name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3191 value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3192 checked
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3193 size
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3194 maxlength
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3195 &optional src)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3196 "Adds the HTML tags for an input tag to the buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3197 (hm--html-insert-start-tag (concat "<INPUT TYPE=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3198 type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3199 "\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3200 (if (and name (not (string= name "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3201 (concat " NAME=\"" name "\""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3202 (if (and value (not (string= value "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3203 (concat " VALUE=\"" value "\""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3204 (if checked " CHECKED")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3205 (if (and size (not (string= size "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3206 (concat " SIZE=" size))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3207 (if (and maxlength
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3208 (not (string= maxlength "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3209 (concat " MAXLENGTH="
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3210 maxlength
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3211 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3212 (if (and src
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3213 (not (string= src "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3214 (concat " SRC=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3215 src
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3216 "\""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3217 ">")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3218
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3219
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3220 (defun hm--html-form-add-input-text (name value size maxlength)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3221 "Adds the HTML tags for a text input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3222 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3223 (hm--html-form-read-value "Defaultvalue: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3224 (hm--html-form-read-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3225 (hm--html-form-read-maxlength)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3226 (hm--html-form-add-input "text" name value nil size maxlength))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3227
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3228
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3229 (defun hm--html-form-add-input-password (name value size maxlength)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3230 "Adds the HTML tags for a password input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3231 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3232 (hm--html-form-read-value "Defaultvalue: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3233 (hm--html-form-read-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3234 (hm--html-form-read-maxlength)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3235 (hm--html-form-add-input "password" name value nil size maxlength))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3236
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3237
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3238 (defun hm--html-form-add-input-integer (name value size maxlength)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3239 "Adds the HTML tags for a integer input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3240 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3241 (hm--html-form-read-value "Defaultvalue: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3242 (hm--html-form-read-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3243 (hm--html-form-read-maxlength)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3244 (hm--html-form-add-input "int" name value nil size maxlength))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3245
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3246
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3247 (defun hm--html-form-add-input-float (name value size maxlength)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3248 "Adds the HTML tags for a float input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3249 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3250 (hm--html-form-read-value "Defaultvalue: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3251 (hm--html-form-read-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3252 (hm--html-form-read-maxlength)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3253 (hm--html-form-add-input "float" name value nil size maxlength))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3254
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3255
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3256 (defun hm--html-form-add-input-date (name value size maxlength)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3257 "Adds the HTML tags for a date input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3258 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3259 (hm--html-form-read-value "Defaultvalue: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3260 (hm--html-form-read-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3261 (hm--html-form-read-maxlength)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3262 (hm--html-form-add-input "date" name value nil size maxlength))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3263
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3265 (defun hm--html-form-add-input-url (name value size maxlength)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3266 "Adds the HTML tags for a url input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3267 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3268 (hm--html-form-read-value "Defaultvalue: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3269 (hm--html-form-read-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3270 (hm--html-form-read-maxlength)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3271 (hm--html-form-add-input "url" name value nil size maxlength))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3272
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3273
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3274 (defun hm--html-form-add-input-scribble (name value size maxlength)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3275 "Adds the HTML tags for a scribble input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3276 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3277 (hm--html-form-read-value "Defaultvalue: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3278 (hm--html-form-read-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3279 (hm--html-form-read-maxlength)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3280 (hm--html-form-add-input "scribble" name value nil size maxlength))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3281
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3282
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3283 (defun hm--html-form-add-input-checkbox (name value checked)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3284 "Adds the HTML tags for a checkbox button."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3285 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3286 (hm--html-form-read-value "Checkbox value: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3287 (hm--html-form-read-checked)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3288 (hm--html-form-add-input "checkbox" name value checked nil nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3289
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3290
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3291 (defvar hm--html-last-radio-button-name nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3292 "Name of the last radio button.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3293
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3294
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3295 (defun hm--html-form-add-input-radio (name value checked)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3296 "Adds the HTML tags for a radio button."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3297 (interactive (list (hm--html-form-read-name hm--html-last-radio-button-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3298 (hm--html-form-read-value "Radiobutton value: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3299 (hm--html-form-read-checked)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3300 (setq hm--html-last-radio-button-name name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3301 (hm--html-form-add-input "radio" name value checked nil nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3302
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3303
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3304 (defun hm--html-form-add-input-submit (value)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3305 "Adds the HTML tags for a submit input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3306 (interactive (list (hm--html-form-read-value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3307 "Label of the submit button: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3308 "Submit")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3309 (hm--html-form-add-input "submit" nil value nil nil nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3310
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3311
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3312 (defun hm--html-form-add-input-image (name src)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3313 "Adds the HTML tags for an image input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3314 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3315 (hm--html-read-url "Image URL: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3316 hm--html-url-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3317 (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3318 (lambda (table-element-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3319 (hm--html-read-url-predicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3320 table-element-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3321 'IMAGE)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3322 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3323 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3324 (hm--html-form-add-input "IMAGE"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3325 name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3326 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3327 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3328 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3329 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3330 src))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3331
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3332
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3333 (defun hm--html-form-add-input-audio (name src)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3334 "Adds the HTML tags for an audio input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3335 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3336 (hm--html-read-url "Audio URL: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3337 hm--html-url-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3338 (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3339 (lambda (table-element-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3340 (hm--html-read-url-predicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3341 table-element-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3342 'AUDIO)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3343 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3344 nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3345 (hm--html-form-add-input "AUDIO"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3346 name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3347 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3348 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3349 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3350 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3351 src))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3352
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3353
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3354 (defun hm--html-form-add-input-reset (value)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3355 "Adds the HTML tags for a reset input field."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3356 (interactive (list (hm--html-form-read-value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3357 "Label of the reset button: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3358 "Reset")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3359 (hm--html-form-add-input "reset" nil value nil nil nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3360
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3361
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3362 (defun hm--html-form-add-input-isindex (size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3363 "Adds the HTML tags for an isindex input field.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3364 Size is the value of the input field wide."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3365 (interactive "nWidth of the input field (i.e: 20): ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3366 (hm--html-insert-start-tag (concat "<INPUT NAME=\"isindex\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3367 (if (= size 20)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3368 ">"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3369 (format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3370 " SIZE=%d>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3371 size)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3372
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3373
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3374 (defun hm--html-form-add-select-option-menu (name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3375 "Adds the HTML tags for a select option menu to the buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3376 (interactive (list (hm--html-form-read-name)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3377 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3378 (concat "<SELECT NAME=\"" name "\">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3379 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3380 "</SELECT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3381 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3382 "<OPTION> "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3383
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3384
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3385 (defun hm--html-form-add-select-scrolled-list (name listsize multiple)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3386 "Adds the HTML tags for a select scrolled list to the buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3387 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3388 (read-number "No of visible items (>1): " t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3389 (y-or-n-p "Multiple selections allowed ? ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3390 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3391 (concat "<SELECT NAME=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3392 name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3393 "\" SIZE="
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3394 (int-to-string listsize)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3395 (if multiple
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3396 " MULTIPLE")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3397 ">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3398 'hm--html-insert-end-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3399 "</SELECT>"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3400 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3401 "<OPTION> "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3402
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3403
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3404 (defun hm--html-form-add-select-option (selected-by-default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3405 "Adds the tags for an option in a select form menu."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3406 (interactive (list (y-or-n-p "Select this option by default ? ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3407 (hm--html-insert-end-tag-with-newline (concat "<OPTION"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3408 (if selected-by-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3409 " SELECTED")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3410 "> ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3411
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3412
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3413 (defun hm--html-form-add-textarea (name rows columns)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3414 "Adds the tags for a textarea tag."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3415 (interactive (list (hm--html-form-read-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3416 (read-number "Number of Rows of the Textarea: " t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3417 (read-number "Number of Columns of the Textarea: " t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3418 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3419 (concat "<TEXTAREA NAME=\""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3420 name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3421 "\" ROWS="
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3422 (int-to-string rows)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3423 " COLS="
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3424 (int-to-string columns)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3425 ">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3426 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3427 "</TEXTAREA>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3428
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3429
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3430 ;;; Functions to insert tables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3431
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3432 (defun hm--html-add-table (border compact)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3433 "Add the HTML tags for a table frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3434 If BORDER is t, then the table should be drawn with a border.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3435 If COMPACT is t, then the table should be drawn in a smaller size."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3436 (interactive (list (y-or-n-p "Use a table with a border? ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3437 (y-or-n-p "Use a small table? ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3438 (hm--html-add-tags 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3439 (concat "<TABLE"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3440 (if border " border" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3441 (if compact " compact" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3442 ">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3443 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3444 "</TABLE>")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3445 (backward-char))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3446
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3447
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3448 (defun hm--html-add-table-to-region (border compact)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3449 "Add the HTML tags for a table frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3450 If BORDER is t, then the table should be drawn with a border.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3451 If COMPACT is t, then the table should be drawn in a smaller size."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3452 (interactive (list (y-or-n-p "Use a table with a border? ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3453 (y-or-n-p "Use a small table? ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3454 (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3455 (concat "<TABLE"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3456 (if border " border" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3457 (if compact " compact" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3458 ">")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3459 'hm--html-insert-start-tag-with-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3460 "</TABLE>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3461
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3462
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3463 (defun hm--html-add-table-title (top)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3464 "Adds the HTML tag for a table title at the current point.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3465 If TOP is t, then the title will positioned at the top instead of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3466 bottom of the table."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3467 (interactive (list (y-or-n-p "Put the title at the table top? ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3468 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3469 (concat "\n<CAPTION"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3470 (if top " align=top" " align=bottom")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3471 "> ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3472 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3473 " </CAPTION>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3474
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3475
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3476 (defun hm--html-add-table-title-to-region (top)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3477 "Adds the HTML tag for a table title to the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3478 If TOP is t, then the title will positioned at the top instead of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3479 bottom of the table."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3480 (interactive (list (y-or-n-p "Put the title at the table top? ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3481 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3482 (concat "<CAPTION"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3483 (if top " align=top" " align=bottom")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3484 "> ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3485 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3486 " </CAPTION>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3487
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3488
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3489 (defvar hm--html-table-alignment-alist '(("default")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3490 ("left")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3491 ("right")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3492 ("center"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3493 "Alist with table alignments.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3494
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3495 (defun hm--html-table-read-cell-entries-and-alignments (cell-no
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3496 no-of-cells
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3497 &optional
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3498 alignment-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3499 "Reads the alignments and the entries for NO-OF-CELLS cells.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3500 The return is a list with strings of the form: \"align=left> entry\".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3501 CELL-NO is the current cell no.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3502 If (car ALIGNMENT-LIST) is non-nil, then it is used as alignment."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3503 (if (> cell-no no-of-cells)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3504 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3505 (let ((alignment
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3506 (or (car alignment-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3507 (completing-read (format "Alignment of the %d. cell: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3508 cell-no)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3509 hm--html-table-alignment-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3510 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3511 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3512 "default")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3513 (entry (read-string (format "Entry of the %d. cell: " cell-no))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3514 (if (string= "default" alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3515 (setq alignment "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3516 (setq alignment (concat " align=" alignment)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3517 (cons (concat alignment "> " entry)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3518 (hm--html-table-read-cell-entries-and-alignments (1+ cell-no)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3519 no-of-cells
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3520 (cdr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3521 alignment-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3522 ))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3523
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3524 (defun hm--html-add-table-header (no-of-cells)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3525 "Adds the HTML tags for a complete simple table header line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3526 It asks for the number of cells and the allignment of the cells.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3527 The number of cells can also be given as prefix argument."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3528 (interactive "NNo of cells in a row: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3529 (if (< no-of-cells 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3530 (error "ERROR: There must be at least one cell in a row!"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3531 (hm--html-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3532 'hm--html-insert-end-tag-with-newline
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3533 (concat "<TR>"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3534 (mapconcat '(lambda (entry)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3535 (concat "<TH" entry))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3536 (hm--html-table-read-cell-entries-and-alignments
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3537 1
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3538 no-of-cells)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3539 " </TH>")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3540 " </TH></TR>")))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3541
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3542
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3543 (defun hm--html-add-first-table-row (no-of-cells)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3544 "Adds the HTML tags for a table row.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3545 It asks for the number of cells and the allignment of the cells.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3546 The number of cells can also be given as prefix argument."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3547 (interactive "NNo of cells in a row: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3548 (if (< no-of-cells 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3549 (error "ERROR: There must be at least one cell in a row!"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3550 (hm--html-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3551 'hm--html-insert-end-tag-with-newline
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3552 (concat "<TR><TD"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3553 (car (hm--html-table-read-cell-entries-and-alignments 1 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3554 " </TD>"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3555 (if (<= no-of-cells 1)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3556 "</TR>"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3557 (concat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3558 (mapconcat '(lambda (entry)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3559 (concat "<TD" entry))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3560 (hm--html-table-read-cell-entries-and-alignments
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3561 2 no-of-cells)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3562 " </TD>")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3563 " </TD></TR>")))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3564
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3565
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3566 (defun hm--html-table-get-previous-alignments ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3567 "Returns a list with the alignments of the previous table row.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3568 The row must be a data row and not a header row!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3569 An example for the return list: '(\"left\" \"default\" \"center\" \"right\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3570 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3571 (let* ((point-of-view (point))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3572 (case-fold-search t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3573 (end-of-last-row (search-backward "</tr>" (point-min) t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3574 (begin-of-last-row (progn (search-backward "<tr" (point-min) t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3575 (re-search-forward "<t[dh]"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3576 point-of-view t)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3577 (match-beginning 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3578 (alignment-list nil))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3579 (goto-char begin-of-last-row)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3580 (if (not (re-search-forward "<t[dh]" end-of-last-row t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3581 (error "Error: No previous data row found!")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3582 (goto-char end-of-last-row)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3583 (while (> (point) begin-of-last-row)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3584 (let ((cell-start
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3585 (search-backward-regexp "\\(<td[^>]*>\\)\\|\\(<th[^>]*>\\)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3586 begin-of-last-row
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3587 t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3588 (if (not cell-start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3589 (goto-char begin-of-last-row)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3590 (setq alignment-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3591 (cons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3592 (if (search-forward-regexp "\\(align=\\)\\([^ \t\n>]*\\)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3593 (match-end 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3594 t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3595 (buffer-substring (match-beginning 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3596 (match-end 2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3597 "default")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3598 alignment-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3599 (goto-char cell-start))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3600 alignment-list))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3601
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3602
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3603 (defun hm--html-add-additional-table-row ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3604 "Adds the HTML tags for a table row.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3605 It tries to detect the number of cells and their alignments
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3606 from existing rows of the table."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3607 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3608 (let* ((old-alignment-list (hm--html-table-get-previous-alignments))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3609 (no-of-cells (length old-alignment-list)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3610 (hm--html-add-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3611 'hm--html-insert-end-tag-with-newline
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3612 (concat "<TR><TD" (car (hm--html-table-read-cell-entries-and-alignments
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3613 1
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3614 1
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3615 old-alignment-list))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3616 " </TD>"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3617 (if (<= no-of-cells 1)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3618 "</TR>"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3619 (concat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3620 (mapconcat '(lambda (entry)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3621 (concat "<TD" entry))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3622 (hm--html-table-read-cell-entries-and-alignments
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3623 2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3624 no-of-cells
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3625 (cdr old-alignment-list))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3626 " </TD>")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3627 " </TD></TR>"))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3628
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3629
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3630 (defun hm--html-add-row-entry (alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3631 "Adds the HTML tag for a table row entry at the current point."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3632 (interactive (list (completing-read "Alignment of the cell: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3633 hm--html-table-alignment-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3634 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3635 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3636 "default")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3637 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3638 (concat "<TD"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3639 (if (string= "default" alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3640 "> "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3641 (concat " align=" alignment "> ")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3642
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3643
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3644 (defun hm--html-add-header-entry (alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3645 "Adds the HTML tag for a table header entry at the current point."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3646 (interactive (list (completing-read "Alignment of the cell: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3647 hm--html-table-alignment-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3648 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3649 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3650 "default")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3651 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3652 (concat "<TH"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3653 (if (string= "default" alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3654 "> "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3655 (concat " align=" alignment "> ")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3656
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3657
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3658 (defun hm--html-add-row-frame (alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3659 "Adds the HTML tags for a table row start and end at the current point."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3660 (interactive (list (completing-read "Alignment of the start cell: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3661 hm--html-table-alignment-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3662 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3663 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3664 "default")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3665 (hm--html-add-tags 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3666 (concat "<TD"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3667 (if (string= "default" alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3668 "> "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3669 (concat " align=" alignment "> ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3670 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3671 "<TR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3672
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3673
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3674 (defun hm--html-add-row-frame-to-region (alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3675 "Adds the HTML tags for a table row start and end to the current region."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3676 (interactive (list (completing-read "Alignment of the start cell: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3677 hm--html-table-alignment-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3678 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3679 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3680 "default")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3681 (hm--html-add-tags-to-region 'hm--html-insert-start-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3682 (concat "<TD"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3683 (if (string= "default" alignment)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3684 "> "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3685 (concat " align=" alignment "> ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3686 'hm--html-insert-end-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3687 " <TR>"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3688
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3689
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3690 (defun hm--html-table-add-colspan-attribute (columns)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3691 "Adds a colspawn attribute to a table cell.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3692 A prefix arg is used as no of COLUMNS."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3693 (interactive "NNo of columns, spaned by this cell: ")
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3694 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3695 (save-excursion
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3696 (if (and (search-backward "<" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3697 (search-forward-regexp "<[ \t\n]*\\(th\\)\\|\\(td\\)" nil t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3698 (if (search-forward-regexp "\\([ \t\n]+colspan=\\)\\([^ \t\n>]*\\)"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3699 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3700 t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3701 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3702 (delete-region (match-beginning 2) (match-end 2))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3703 (insert (format "\"%d\"" columns)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3704 (insert (format " colspan=\"%d\"" columns)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3705 (error "ERROR: Point not in a table cell!")))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3706
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3707
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3708 (defun hm--html-table-add-rowspan-attribute (rows)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3709 "Adds a rowspan attribute to a table cell.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3710 A prefix arg is used as no of ROWS."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3711 (interactive "NNo of rows, spaned by this cell: ")
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3712 (let ((case-fold-search t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3713 (save-excursion
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3714 (if (and (search-backward "<" nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3715 (search-forward-regexp "<[ \t\n]*\\(th\\)\\|\\(td\\)" nil t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3716 (if (search-forward-regexp "\\([ \t\n]+rowspan=\\)\\([^ \t\n>]*\\)"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3717 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3718 t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3719 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3720 (delete-region (match-beginning 2) (match-end 2))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3721 (insert (format "\"%d\"" rows)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3722 (insert (format " rowspan=\"%d\"" rows)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
3723 (error "ERROR: Point not in a table cell!")))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3724
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3725
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3726 ;;; ISO-Characters for Emacs HTML-mode (Berthold Crysmann)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3727 ;(setq buffer-invisibility-spec '(hm--html-iso-entity-invisible-flag))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3728
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3729 ;(defvar hm--html-iso-entity-invisible-flag t
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3730 ; "Controls the visibility of the iso entities.")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3731
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3732 ;(defvar hm--html-iso-glyph-invisible-flag nil
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3733 ; "Controls the visibility of the iso character glyphs.")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3734
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3735 ;(defvar hm--html-glyph-cache nil
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3736 ; "Internal variable. An assoc list with the already created glyphs.")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3737
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3738 ;(defun hm--html-create-glyph (string)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3739 ; "Creates a glyph from the string or returns an existing one.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3740 ;The glyph is stored in `hm--html-glyph-cache'."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3741 ; (if nil ;(assoc string hm--html-glyph-cache)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3742 ; (cdr (assoc string hm--html-glyph-cache))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3743 ; (let ((glyph (make-glyph string)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3744 ; (setq hm--html-glyph-cache (cons (cons string glyph)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3745 ; hm--html-glyph-cache))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3746 ; glyph)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3747
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3748 ;(defun hm--html-attach-glyph-to-region (start
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3749 ; end
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3750 ; string
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3751 ; region-invisible-flag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3752 ; glyph-invisible-flag)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3753 ; "Make the region invisible and attach a glyph STRING.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3754 ;The invisible flags could be used, to toggle the visibility."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3755 ; (mapcar 'delete-annotation (annotations-at end)) ; delete old anotations
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3756 ; ;; delete old extents
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3757 ; (let ((extent (make-extent start end))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3758 ; (annotation nil))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3759 ; (set-extent-property extent 'invisible region-invisible-flag)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3760 ; (set-extent-property extent 'end-open t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3761 ; (set-extent-property extent 'start-open t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3762 ; (set-extent-property extent 'intangible t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3763 ; (setq annotation (make-annotation "Hallo Du da" ;(hm--html-create-glyph string)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3764 ; end
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3765 ; 'text))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3766 ; (goto-char end)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3767
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3768
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3769 ;(defun hm--html-insert-iso-char-as-entity-and-glyph (char entity)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3770 ; "Inserts an iso char as html ENTITY and displays a glyph.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3771 ;The glyph is created from the string CHAR."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3772 ; (let ((start (point)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3773 ; (insert entity)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3774 ; (hm--html-attach-glyph-to-region start
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3775 ; (point)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3776 ; char
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3777 ; 'hm--html-iso-entity-invisible-flag
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3778 ; 'hm--html-iso-glyph-invisible-flag)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3779
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3780 ;(defun hm--html_ue ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3781 ; (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3782 ; (hm--html-insert-iso-char-as-entity-and-glyph "ü" "&uuml;"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3783
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3784
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3785 ;(defun hm--html-insert-iso-char-as-entity-and-glyph (char entity)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3786 ; (let ((start (point))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3787 ; (end nil)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3788 ; (extent nil))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3789 ; (insert entity)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3790 ; (setq end (point))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3791 ; (setq extent (make-extent start end))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3792 ; (set-extent-begin-glyph extent char)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3793 ; (set-extent-property extent 'invisible t)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3794
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3795 ;(defun hm--html_ue ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3796 ; (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
3797 ; (hm--html-insert-iso-char-as-entity-and-glyph ?ü "&uuml;"))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3798
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3799 (defun hm--html_ue ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3800 "Insert the character 'ue'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3801 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3802 (insert "&uuml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3803
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3804 (defun hm--html_oe ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3805 "Insert the character 'oe'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3806 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3807 (insert "&ouml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3808
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3809 (defun hm--html_ae ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3810 "Insert the character 'ae'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3811 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3812 (insert "&auml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3813
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3814 (defun hm--html_aa ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3815 "Insert the character 'aa'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3816 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3817 (insert "&aring;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3818
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3819 (defun hm--html_Ue ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3820 "Insert the character 'Ue'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3821 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3822 (insert "&Uuml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3823
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3824 (defun hm--html_Oe ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3825 "Insert the character 'Oe'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3826 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3827 (insert "&Ouml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3828
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3829 (defun hm--html_Ae ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3830 "Insert the character 'Ae'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3831 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3832 (insert "&Auml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3833
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3834 (defun hm--html_Aa ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3835 "Insert the character 'Aa'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3836 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3837 (insert "&Aring;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3838
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3839 (defun hm--html_sz ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3840 "Insert the character 'sz'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3841 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3842 (insert "&szlig;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3843
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3844 (defun hm--html_aacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3845 "Insert the character 'aacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3846 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3847 (insert "&aacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3848
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3849 (defun hm--html_eacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3850 "Insert the character 'eacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3851 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3852 (insert "&eacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3853
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3854 (defun hm--html_iacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3855 "Insert the character 'iacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3856 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3857 (insert "&iacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3858
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3859 (defun hm--html_oacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3860 "Insert the character 'oacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3861 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3862 (insert "&oacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3863
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3864 (defun hm--html_uacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3865 "Insert the character 'uacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3866 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3867 (insert "&uacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3868
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3869 (defun hm--html_Aacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3870 "Insert the character 'Aacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3871 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3872 (insert "&aacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3873
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3874 (defun hm--html_Eacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3875 "Insert the character 'Eacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3876 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3877 (insert "&eacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3878
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3879 (defun hm--html_Iacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3880 "Insert the character 'Iacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3881 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3882 (insert "&iacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3883
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3884 (defun hm--html_Oacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3885 "Insert the character 'Oacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3886 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3887 (insert "&oacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3888
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3889 (defun hm--html_Uacute ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3890 "Insert the character 'Uacute'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3891 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3892 (insert "&uacute;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3893
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3894 (defun hm--html_agrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3895 "Insert the character 'agrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3896 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3897 (insert "&agrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3898
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3899 (defun hm--html_egrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3900 "Insert the character 'egrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3901 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3902 (insert "&egrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3903
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3904 (defun hm--html_igrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3905 "Insert the character 'igrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3906 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3907 (insert "&igrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3908
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3909 (defun hm--html_ograve ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3910 "Insert the character 'ograve'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3911 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3912 (insert "&ograve;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3913
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3914 (defun hm--html_ugrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3915 "Insert the character 'ugrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3916 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3917 (insert "&ugrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3918
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3919 (defun hm--html_Agrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3920 "Insert the character 'Agrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3921 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3922 (insert "&Agrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3923
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3924 (defun hm--html_Egrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3925 "Insert the character 'Egrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3926 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3927 (insert "&Egrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3928
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3929 (defun hm--html_Igrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3930 "Insert the character 'Igrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3931 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3932 (insert "&Igrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3933
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3934 (defun hm--html_Ograve ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3935 "Insert the character 'Ograve'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3936 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3937 (insert "&Ograve;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3938
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3939 (defun hm--html_Ugrave ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3940 "Insert the character 'Ugrave'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3941 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3942 (insert "&Ugrave;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3943
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3944 (defun hm--html_ccedilla ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3945 "Insert the character 'ccedilla'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3946 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3947 (insert "&ccedilla;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3948
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3949 (defun hm--html_Ccedilla ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3950 "Insert the character 'Ccedilla'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3951 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3952 (insert "&Ccedilla;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3953
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3954 (defun hm--html_atilde ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3955 "Insert the character 'atilde'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3956 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3957 (insert "&atilde;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3958
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3959 (defun hm--html_otilde ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3960 "Insert the character 'otilde'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3961 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3962 (insert "&otilde;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3963
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3964 (defun hm--html_ntilde ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3965 "Insert the character 'ntilde'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3966 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3967 (insert "&ntilde;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3968
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3969 (defun hm--html_Atilde ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3970 "Insert the character 'Atilde'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3971 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3972 (insert "&Atilde;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3973
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3974 (defun hm--html_Otilde ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3975 "Insert the character 'Otilde'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3976 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3977 (insert "&Otilde;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3978
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3979 (defun hm--html_Ntilde ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3980 "Insert the character 'Ntilde'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3981 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3982 (insert "&Ntilde;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3983
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3984 (defun hm--html_acircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3985 "Insert the character 'acircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3986 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3987 (insert "&acircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3988
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3989 (defun hm--html_ecircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3990 "Insert the character 'ecircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3991 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3992 (insert "&ecircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3993
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3994 (defun hm--html_icircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3995 "Insert the character 'icircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3996 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3997 (insert "&icircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3998
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3999 (defun hm--html_ocircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4000 "Insert the character 'ocircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4001 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4002 (insert "&ocircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4003
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4004 (defun hm--html_ucircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4005 "Insert the character 'ucircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4006 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4007 (insert "&ucircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4008
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4009 (defun hm--html_Acircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4010 "Insert the character 'Acircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4011 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4012 (insert "&Acircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4013
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4014 (defun hm--html_Ecircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4015 "Insert the character 'Ecircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4016 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4017 (insert "&Ecircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4018
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4019 (defun hm--html_Icircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4020 "Insert the character 'Icircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4021 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4022 (insert "&Icircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4023
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4024 (defun hm--html_Ocircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4025 "Insert the character 'Ocircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4026 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4027 (insert "&Ocircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4028
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4029 (defun hm--html_Ucircumflex ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4030 "Insert the character 'Ucircumflex'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4031 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4032 (insert "&Ucircumflex;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4033
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4034 (defun hm--html_ediaeresis ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4035 "Insert the character 'ediaeresis'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4036 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4037 (insert "&euml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4038
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4039 (defun hm--html_idiaeresis ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4040 "Insert the character 'idiaeresis'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4041 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4042 (insert "&iuml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4043
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4044 (defun hm--html_Ediaeresis ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4045 "Insert the character 'Ediaeresis'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4046 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4047 (insert "&Euml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4048
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4049 (defun hm--html_Idiaeresis ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4050 "Insert the character 'Idiaeresis'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4051 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4052 (insert "&Iuml;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4053
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4054 (defun hm--html_thorn ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4055 "Insert the character 'thorn'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4056 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4057 (insert "&thorn;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4058
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4059 (defun hm--html_Thorn ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4060 "Insert the character 'Thorn'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4061 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4062 (insert "&THORN;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4063
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4064 (defun hm--html_eth ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4065 "Insert the character 'eth'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4066 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4067 (insert "&eth;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4068
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4069 (defun hm--html_Eth ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4070 "Insert the character 'Eth'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4071 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4072 (insert "&ETH;"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4073
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4074
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4075 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4076 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4077 ; smart functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4078
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4079 (defvar hm--just-insert-less-than nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4080 "Internal variable.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4081
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4082 (defun hm--html-less-than ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4083 "Inserts the entity '&gt;'."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4084 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4085 (insert "&lt;"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4086
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4087 (defun hm--html-smart-less-than ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4088 "Insert a '<' or the entity '&lt;' if you execute this command twice."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4089 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4090 (if (and (eq last-command 'hm--html-smart-less-than)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4091 hm--just-insert-less-than)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4092 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4093 (delete-char -1)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4094 (hm--html-less-than)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4095 (setq hm--just-insert-less-than nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4096 (insert ?<)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4097 (setq hm--just-insert-less-than t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4098
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4099 (defvar hm--just-insert-greater-than nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4100 "Internal variable.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4101
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4102 (defun hm--html-greater-than ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4103 "Inserts the entity '&gt;'."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4104 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4105 (insert "&gt;"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4106
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4107 (defun hm--html-smart-greater-than ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4108 "Insert a '>' or the entity '&gt;' if you execute this command twice."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4109 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4110 (if (and (eq last-command 'hm--html-smart-greater-than)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4111 hm--just-insert-greater-than)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4112 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4113 (delete-char -1)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4114 (hm--html-greater-than)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4115 (setq hm--just-insert-greater-than nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4116 (insert ?>)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4117 (setq hm--just-insert-greater-than t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4119
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4120 (defvar hm--just-insert-ampersand nil
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4121 "Internal variable.")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4122
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4123 (defun hm--html-ampersand ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4124 "Inserts the entity '&amp;'."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4125 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4126 (insert "&amp;"))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4127
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4128 (defun hm--html-smart-ampersand ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4129 "Insert a '&' or the entity '&amp;' if you execute this command twice."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4130 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4131 (if (and (eq last-command 'hm--html-smart-ampersand)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4132 hm--just-insert-ampersand)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4133 (progn
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4134 (delete-char -1)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4135 (hm--html-ampersand)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4136 (setq hm--just-insert-ampersand nil))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4137 (insert ?&)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4138 (setq hm--just-insert-ampersand t)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4139
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4140
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4141 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4142 ; sending the contents of a html buffer to netscape
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4143 ; (Thanks to Adrian Aichner for providing this function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4144
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4145 (defun hm--html-send-buffer-to-netscape (buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4146 &optional new-netscape new-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4147 "View html buffer with Netscape.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4148 This should be changed in the fututure, so that it doesn't need vm."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4149 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4150 (require 'vm)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4151 (if new-netscape
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4152 (vm-run-background-command vm-netscape-program buffer-file-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4153 (or (equal 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4154 (vm-run-command vm-netscape-program
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4155 "-remote"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4156 (concat "openURL(file://localhost"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4157 buffer-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4158 (if new-window ", new-window" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4159 ")")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4160 (hm--html-send-buffer-to-netscape buffer t new-window))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4161
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4162
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4164 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4165 ; some other usefull functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4166 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4167
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4168 (defun hm--html-remove-numeric-names ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4169 "Remove the number in numbered links in the current buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4170 Eg: the string \"Name=3\". The function asks the user every time whether
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4171 the number should be removed."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4172 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4173 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4174 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4175 (query-replace-regexp "name=\"?[0-9]+\"?+[ \t]*" "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4176
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4177 ;;This should be extended in the future to use also other viewers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4178 (defun hm--html-view-www-package-docu ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4179 "View the WWW documentation of the package."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4180 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4181 (w3-fetch "http://www.tnt.uni-hannover.de:80/data/info/www/tnt/soft/info/www/html-editors/hm--html-menus/overview.html"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4182
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4183 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4184 ; Bug reporting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4185 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4186
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4187 (defun hm--html-submit-bug-report ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4188 "Submit via mail a bug report on hm--html-menus."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4189 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4190 (require 'reporter)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4191 (let ((reporter-prompt-for-summary-p t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4192 (reporter-submit-bug-report
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4193 hm--html-menus-package-maintainer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4194 (concat hm--html-menus-package-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4195 " "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4196 hm--html-menus-package-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4197 (list 'emacs-version
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4198 'major-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4199 'hm--html-automatic-changed-comment
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4200 'hm--html-automatic-created-comment
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4201 'hm--html-automatic-expand-templates
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4202 'hm--html-automatic-new-date
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4203 'hm--html-expert
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4204 'hm--html-favorite-http-server-host-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4205 'hm--html-file-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4206 'hm--html-ftp-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4207 'hm--html-ftp-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4208 'hm--html-ftp-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4209 'hm--html-gopher-anchor-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4210 'hm--html-gopher-doctype-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4211 'hm--html-gopher-doctype-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4212 'hm--html-gopher-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4213 'hm--html-gopher-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4214 'hm--html-html-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4215 'hm--html-html-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4216 'hm--html-html-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4217 'hm--html-info-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4218 'hm--html-info-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4219 'hm--html-info-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4220 'hm--html-local-proggate-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4221 'hm--html-mail-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4222 'hm--html-mail-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4223 'hm--html-mail-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4224 'hm--html-marc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4225 'hm--html-menu-load-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4226 'hm--html-proggate-allowed-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4227 'hm--html-proggate-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4228 'hm--html-proggate-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4229 'hm--html-server-side-include-command-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4230 'hm--html-server-side-include-command-with-parameter-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4231 'hm--html-signature-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4232 'hm--html-template-dir
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4233 'hm--html-url-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4234 'hm--html-user-config-file
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4235 'hm--html-site-config-file
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4236 'hm--html-username
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4237 'hm--html-wais-hostname:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4238 'hm--html-wais-hostname:port-default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4239 'hm--html-wais-path-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4240 'hm--html-wais-servername:port-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4241 'hm--html-wais-servername:port-default
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4242 ; 'html-deemphasize-color
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4243 'html-document-previewer
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4244 ; 'html-document-previewer-args
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4245 ; 'html-emphasize-color
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4246 ; 'html-quotify-hrefs-on-find
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4247 'hm--html-region-mode
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4248 'html-sigusr1-signal-value
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4249 ; 'html-use-font-lock
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4250 ; 'html-use-highlighting
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4251 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4252 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4253 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4254 "Decribe your Bug: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4255 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4256
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4257
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4258 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4259 ; hook adding functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4260 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4261
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4262 (if (adapt-xemacsp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4263 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4264
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4265 (add-hook 'zmacs-activate-region-hook
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4266 'hm--html-switch-region-modes-on)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4267 ; (function (lambda () (hm--html-region-mode 1))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4268
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4269 (add-hook 'zmacs-deactivate-region-hook
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4270 'hm--html-switch-region-modes-off)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4271 ; (function (lambda () (hm--html-region-mode -1))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4272
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4273 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4274
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4275 (transient-mark-mode t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4276
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4277 (add-hook 'activate-mark-hook
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4278 'hm--html-switch-region-modes-on)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4279 ; (function (lambda () (hm--html-region-mode t))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4280
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4281 (add-hook 'deactivate-mark-hook
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4282 'hm--html-switch-region-modes-off)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4283 ; (function (lambda () (hm--html-region-mode nil))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4284
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4285 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4286
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4287
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4288 ;(add-hook 'hm--html-mode-hook
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4289 ; (function
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4290 ; (lambda ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4291 ; (make-variable-buffer-local 'write-file-hooks)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4292 ; (add-hook 'write-file-hooks
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4293 ; 'hm--html-maybe-new-date-and-changed-comment))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4294
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4295 ;(add-hook 'zmacs-activate-region-hook 'hm--set-hm--region-active)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4296 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4297 ;(add-hook 'zmacs-deactivate-region-hook 'hm--unset-hm--region-active)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4298
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4299
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4300
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4301 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4302 ; Environment loading
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4303 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4304
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4305 (defun hm--html-load-config-files ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4306 "Load the html configuration files.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4307 First, the system config file (detemined by the environment variable
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4308 HTML_CONFIG_FILE; normaly hm--html-configuration.el(c)) is loaded.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4309 At second a site config file is loaded, if the environment variable
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4310 HTML_SITE_CONFIG_FILE or the lisp variable `hm--html-site-config-file'
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4311 is set to such a file.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4312 At least the user config file (determined by the environment variable
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4313 HTML_USER_CONFIG_FILE; normaly the file ~/.hm--html-configuration.el(c)).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4314 If no HTML_CONFIG_FILE exists, then the file hm--html-configuration.el(c)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4315 is searched in one of the lisp load path directories.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4316 If no HTML_USER_CONFIG_FILE exists, then the variable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4317 `hm--html-user-config-file' is checked. If this variable is nil or the file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4318 also doesn't exist, then the file ~/.hm--html-configuration.el(c) is used."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4319 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4320 ;; at first the system config file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4321 (if (and (stringp (getenv "HTML_CONFIG_FILE"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4322 (file-exists-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4323 (expand-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4324 (getenv "HTML_CONFIG_FILE"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4325 (load-library (expand-file-name (getenv "HTML_CONFIG_FILE")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4326 (load-library "hm--html-configuration"))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4327
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4328 ;; at second the site config file
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4329 (if (and (stringp (getenv "HTML_SITE_CONFIG_FILE"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4330 (file-exists-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4331 (expand-file-name
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4332 (getenv "HTML_SITE_CONFIG_FILE"))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4333 (load-file (expand-file-name (getenv "HTML_SITE_CONFIG_FILE")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4334 (when (and (boundp 'hm--html-site-config-file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4335 (stringp hm--html-site-config-file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4336 (file-exists-p (expand-file-name hm--html-site-config-file)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 2
diff changeset
4337 (load-file (expand-file-name hm--html-site-config-file))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4338
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4339 ;; and now the user config file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4340 (cond ((and (stringp (getenv "HTML_USER_CONFIG_FILE"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4341 (file-exists-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4342 (expand-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4343 (getenv "HTML_USER_CONFIG_FILE"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4344 (load-file (expand-file-name (getenv "HTML_USER_CONFIG_FILE"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4345 ((and (boundp 'hm--html-user-config-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4346 (stringp hm--html-user-config-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4347 (file-exists-p (expand-file-name hm--html-user-config-file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4348 (load-file (expand-file-name hm--html-user-config-file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4349 ((file-exists-p (expand-file-name "~/.hm--html-configuration.elc"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4350 (load-file (expand-file-name "~/.hm--html-configuration.elc")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4351 ((file-exists-p (expand-file-name "~/.hm--html-configuration.el"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4352 (load-file (expand-file-name "~/.hm--html-configuration.el")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4353 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4354 (message (concat "WARNING: No HTML User Config File ! "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4355 "Look at hm--html-load-config-files !")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4356 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4357 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4358
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4359
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4360
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4361 ;(hm--html-load-config-files)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4362
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4363 ;;; Definition of the minor mode html-region-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4364
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4365 ;(defvar html-region-mode nil
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4366 ; "*t, if the minor mode html-region-mode is on and nil otherwise.")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4367
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4368 ;(make-variable-buffer-local 'html-region-mode)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4369
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4370 ;(defvar html-region-mode-map nil "")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4371
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4372 ;(hm--html-load-config-files)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4373
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4374 ;(if hm--html-use-old-keymap
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4375 ; (progn
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4376
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4377 ;;(setq minor-mode-alist (cons '(html-region-mode " Region") minor-mode-alist))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4378 ;(or (assq 'html-region-mode minor-mode-alist)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4379 ; (setq minor-mode-alist
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4380 ; (purecopy
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4381 ; (append minor-mode-alist
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4382 ; '((html-region-mode " Region"))))))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4383
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4384 ;(defun html-region-mode (on)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4385 ; "Turns the minor mode html-region-mode on or off.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4386 ;The function turns the html-region-mode on, if ON is t and off otherwise."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4387 ; (if (string= mode-name "HTML")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4388 ; (if on
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4389 ; ;; html-region-mode on
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4390 ; (progn
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4391 ; (setq html-region-mode t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4392 ; (use-local-map html-region-mode-map))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4393 ; ;; html-region-mode off
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4394 ; (setq html-region-mode nil)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4395 ; (use-local-map html-mode-map))))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4396
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4397 ;))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4398
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4399
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4400
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4401
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4402
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4403 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4404 ; Set font lock color
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4405 ; (hm--html-font-lock-color should be defined in hm--html-configuration.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4406 ; oder .hm--html-configuration.el)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4407 ;
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4408 ;(require 'font-lock)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4409 ;(load-library "font-lock")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4410 ;(set-face-foreground 'font-lock-comment-face hm--html-font-lock-color)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4411
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4412
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4413 ;(hm--html-generate-help-buffer-faces)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4414
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4415
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4416
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4417
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4418 ;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4419 ;(setq hm--html-hostname-search-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4420 ; "[-a-zA-Z0-9]*\\.[-a-zA-Z0-9]*\\.[-a-zA-Z0-9.]*")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4421 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4422 ;(defun hm--html-get-next-hostname ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4423 ; (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4424 ; (search-forward-regexp hm--html-hostname-search-string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4425 ; (buffer-substring (match-beginning 0) (match-end 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4426 ;
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4427
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4428 ;;; Announce the feature hm--html-configuration
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4429
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4430 ;;; quotify href
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4431
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4432 (defvar hm--html-quotify-href-regexp
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4433 "<[aA][ \t\n]+\\([nN][aA][mM][eE]=[a-zA-Z0-9]+[ \t\n]+\\)?[hH][rR][eE][fF]="
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4434 "Regular expression used for searching hrefs.")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4435
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4436 (defun hm--html-quotify-hrefs ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4437 "Insert quotes around all HREF and NAME attribute value literals.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4438
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4439 This remedies the problem with old HTML files that can't be processed
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4440 by SGML parsers. That is, changes <A HREF=foo> to <A HREF=\"foo\">.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4441
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4442 Look also at the variable `hm--html-quotify-href-regexp'."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4443 (interactive)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4444 (save-excursion
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4445 (goto-char (point-min))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4446 (while
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4447 (re-search-forward hm--html-quotify-href-regexp
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4448 (point-max)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4449 t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4450 (cond
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4451 ((null (looking-at "\""))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4452 (insert "\"")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4453 (re-search-forward "[ \t\n>]" (point-max) t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4454 (forward-char -1)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4455 (insert "\""))))))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4456
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4457
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4458
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
4459 (provide 'hm--html)