100
|
1 ;;; $Id: hm--html-keys.el,v 1.3 1997/02/24 01:13:27 steve Exp $
|
2
|
2 ;;;
|
98
|
3 ;;; Copyright (C) 1995, 1996, 1997 Heiko Muenkel
|
0
|
4 ;;; email: muenkel@tnt.uni-hannover.de
|
|
5 ;;;
|
|
6 ;;; This program is free software; you can redistribute it and/or modify
|
|
7 ;;; it under the terms of the GNU General Public License as published by
|
98
|
8 ;;; the Free Software Foundation; either version 2, or (at your option)
|
0
|
9 ;;; any later version.
|
|
10 ;;;
|
|
11 ;;; This program is distributed in the hope that it will be useful,
|
|
12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 ;;; GNU General Public License for more details.
|
|
15 ;;;
|
|
16 ;;; You should have received a copy of the GNU General Public License
|
|
17 ;;; along with this program; if not, write to the Free Software
|
|
18 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
19 ;;;
|
|
20 ;;;
|
|
21 ;;; Description:
|
|
22 ;;;
|
|
23 ;;; Defines the new keybindigs for the hm--html-menus package.
|
|
24 ;;;
|
|
25 ;;; Installation:
|
|
26 ;;;
|
|
27 ;;; Put this file in one of your load path directories.
|
|
28 ;;;
|
|
29
|
2
|
30 (if (adapt-emacs19p)
|
|
31 (progn
|
|
32
|
|
33 (defvar hm--html-emacs19-popup-noregion-menu-button [C-down-mouse-3]
|
|
34 "This is the mouse button , which pops up the noregion menus.
|
|
35 It could have the same value as
|
|
36 `hm--html-emacs19-popup-region-menu-button'.")
|
|
37
|
|
38 (defvar hm--html-emacs19-popup-region-menu-button [C-down-mouse-3]
|
|
39 "This is the mouse button , which pops up the region menus.
|
|
40 It could have the same value as
|
|
41 `hm--html-emacs19-popup-noregion-menu-button'.")
|
|
42
|
|
43 ))
|
0
|
44
|
|
45
|
|
46 (defvar hm--html-noregion-anchor-map nil
|
|
47 "Noregion sub keymap for inserting anchors.")
|
|
48
|
|
49 (if hm--html-noregion-anchor-map
|
|
50 ()
|
|
51 (setq hm--html-noregion-anchor-map (make-sparse-keymap))
|
2
|
52 (define-key hm--html-noregion-anchor-map "r" 'hm--html-add-relative-link)
|
0
|
53 (define-key hm--html-noregion-anchor-map "h" 'hm--html-add-html-link)
|
|
54 (define-key hm--html-noregion-anchor-map "i" 'hm--html-add-info-link)
|
|
55 (define-key hm--html-noregion-anchor-map "g" 'hm--html-add-gopher-link)
|
|
56 (define-key hm--html-noregion-anchor-map "f" 'hm--html-add-file-link)
|
|
57 (define-key hm--html-noregion-anchor-map "\C-f" 'hm--html-add-ftp-link)
|
|
58 (define-key hm--html-noregion-anchor-map "n" 'hm--html-add-news-link)
|
70
|
59 (define-key hm--html-noregion-anchor-map "m" 'hm--html-add-mail-link)
|
|
60 ; (define-key hm--html-noregion-anchor-map "\C-m" 'hm--html-add-mailto-link)
|
0
|
61 (define-key hm--html-noregion-anchor-map
|
|
62 [(control m)] 'hm--html-add-mailto-link)
|
|
63 (define-key hm--html-noregion-anchor-map "w" 'hm--html-add-direct-wais-link)
|
|
64 (define-key hm--html-noregion-anchor-map "\C-w" 'hm--html-add-wais-link)
|
|
65 (define-key hm--html-noregion-anchor-map "p" 'hm--html-add-proggate-link)
|
|
66 (define-key hm--html-noregion-anchor-map
|
|
67 "\C-p" 'hm--html-add-local-proggate-link)
|
2
|
68 (define-key hm--html-noregion-anchor-map "l" 'hm--html-add-normal-link)
|
0
|
69 (define-key hm--html-noregion-anchor-map "t" 'hm--html-add-link-target)
|
|
70 )
|
|
71
|
|
72 (defvar hm--html-region-anchor-map nil
|
|
73 "Region sub keymap for inserting anchors.")
|
|
74
|
|
75 (if hm--html-region-anchor-map
|
|
76 ()
|
|
77 (setq hm--html-region-anchor-map (make-sparse-keymap))
|
2
|
78 (define-key hm--html-region-anchor-map
|
|
79 "r" 'hm--html-add-relative-link-to-region)
|
0
|
80 (define-key hm--html-region-anchor-map "h" 'hm--html-add-html-link-to-region)
|
|
81 (define-key hm--html-region-anchor-map "i" 'hm--html-add-info-link-to-region)
|
|
82 (define-key hm--html-region-anchor-map
|
|
83 "g" 'hm--html-add-gopher-link-to-region)
|
|
84 (define-key hm--html-region-anchor-map "f" 'hm--html-add-file-link-to-region)
|
|
85 (define-key hm--html-region-anchor-map
|
|
86 "\C-f" 'hm--html-add-ftp-link-to-region)
|
|
87 (define-key hm--html-region-anchor-map "n" 'hm--html-add-news-link-to-region)
|
70
|
88 (define-key hm--html-region-anchor-map "m" 'hm--html-add-mail-link-to-region)
|
|
89 ; (define-key hm--html-region-anchor-map
|
|
90 ; "\C-m" 'hm--html-add-mailto-link-to-region)
|
0
|
91 (define-key hm--html-region-anchor-map
|
|
92 [(control m)] 'hm--html-add-mailto-link-to-region)
|
|
93 (define-key hm--html-region-anchor-map
|
|
94 "w" 'hm--html-add-direct-wais-link-to-region)
|
|
95 (define-key hm--html-region-anchor-map
|
|
96 "\C-w" 'hm--html-add-wais-link-to-region)
|
|
97 (define-key hm--html-region-anchor-map
|
|
98 "p" 'hm--html-add-proggate-link-to-region)
|
|
99 (define-key hm--html-region-anchor-map
|
|
100 "\C-p" 'hm--html-add-local-proggate-link-to-region)
|
|
101 (define-key hm--html-region-anchor-map
|
|
102 "l" 'hm--html-add-normal-link-to-region)
|
|
103 (define-key hm--html-region-anchor-map
|
2
|
104 "t" 'hm--html-add-link-target-to-region)
|
0
|
105 )
|
|
106
|
|
107 (defvar hm--html-noregion-frame-map nil
|
|
108 "Noregion sub keymap for inserting frame elements.")
|
|
109
|
|
110 (if hm--html-noregion-frame-map
|
|
111 ()
|
|
112 (setq hm--html-noregion-frame-map (make-sparse-keymap))
|
|
113 (define-key hm--html-noregion-frame-map "f" 'hm--html-add-full-html-frame)
|
|
114 (define-key hm--html-noregion-frame-map [(control h)] 'hm--html-add-html)
|
|
115 (define-key hm--html-noregion-frame-map [(meta h)] 'hm--html-add-head)
|
|
116 (define-key hm--html-noregion-frame-map "b" 'hm--html-add-body)
|
|
117 (define-key hm--html-noregion-frame-map
|
|
118 [(control t)] 'hm--html-add-title-and-header)
|
|
119 (define-key hm--html-noregion-frame-map "t" 'hm--html-add-title)
|
|
120 (define-key hm--html-noregion-frame-map "h" 'hm--html-add-header)
|
|
121 (define-key hm--html-noregion-frame-map "n" 'hm--html-add-normal-node-link)
|
2
|
122 (define-key hm--html-noregion-frame-map "a" 'hm--html-add-address)
|
0
|
123 (define-key hm--html-noregion-frame-map "s" 'hm--html-add-signature)
|
|
124 (define-key hm--html-noregion-frame-map
|
|
125 [(control c)] 'hm--html-insert-created-comment)
|
|
126 (define-key hm--html-noregion-frame-map "c" 'hm--html-insert-changed-comment)
|
|
127 (define-key hm--html-noregion-frame-map "d" 'hm--html-new-date)
|
|
128 )
|
|
129
|
|
130 (defvar hm--html-region-frame-map nil
|
|
131 "Region sub keymap for inserting frame elements.")
|
|
132
|
|
133 (if hm--html-region-frame-map
|
|
134 ()
|
|
135 (setq hm--html-region-frame-map (make-sparse-keymap))
|
|
136 (define-key hm--html-region-frame-map
|
|
137 "f" 'hm--html-add-full-html-frame-with-region)
|
|
138 (define-key hm--html-region-frame-map
|
|
139 [(meta h)] 'hm--html-add-head-to-region)
|
|
140 (define-key hm--html-region-frame-map "b" 'hm--html-add-body-to-region)
|
|
141 (define-key hm--html-region-frame-map
|
|
142 [(control t)] 'hm--html-add-title-and-header-to-region)
|
|
143 (define-key hm--html-region-frame-map "t" 'hm--html-add-title-to-region)
|
|
144 (define-key hm--html-region-frame-map "h" 'hm--html-add-header-to-region)
|
|
145 (define-key hm--html-region-frame-map "a" 'hm--html-add-address-to-region)
|
|
146 )
|
|
147
|
|
148 (defvar hm--html-noregion-structure-map nil
|
|
149 "Noregion sub keymap for inserting entities.")
|
|
150
|
|
151 (if hm--html-noregion-structure-map
|
|
152 ()
|
|
153 (setq hm--html-noregion-structure-map (make-sparse-keymap))
|
2
|
154 (define-key hm--html-noregion-structure-map
|
|
155 "i" 'hm--html-add-list-or-menu-item)
|
|
156 (define-key hm--html-noregion-structure-map "m" 'hm--html-add-menu)
|
|
157 (define-key hm--html-noregion-structure-map "u" 'hm--html-add-list)
|
0
|
158 (define-key hm--html-noregion-structure-map "o" 'hm--html-add-numberlist)
|
|
159 (define-key hm--html-noregion-structure-map "d" 'hm--html-add-directory-list)
|
|
160 (define-key hm--html-noregion-structure-map
|
2
|
161 "\C-dl" 'hm--html-add-description-list)
|
0
|
162 (define-key hm--html-noregion-structure-map
|
|
163 "\C-dt" 'hm--html-add-description-title)
|
|
164 (define-key hm--html-noregion-structure-map
|
2
|
165 "\C-de" 'hm--html-add-description-entry)
|
0
|
166 (define-key hm--html-noregion-structure-map
|
2
|
167 "\C-d\C-t" 'hm--html-add-description-title-and-entry)
|
0
|
168 (define-key hm--html-noregion-structure-map
|
|
169 "\C-tt" 'hm--html-add-table)
|
|
170 (define-key hm--html-noregion-structure-map
|
|
171 "\C-t\C-t" 'hm--html-add-table-title)
|
|
172 (define-key hm--html-noregion-structure-map
|
|
173 "\C-th" 'hm--html-add-table-header)
|
|
174 (define-key hm--html-noregion-structure-map
|
|
175 "\C-tr" 'hm--html-add-first-table-row)
|
|
176 (define-key hm--html-noregion-structure-map
|
|
177 "\C-t\C-r" 'hm--html-add-additional-table-row)
|
|
178 (define-key hm--html-noregion-structure-map "p" 'hm--html-add-paragraph)
|
|
179 (define-key hm--html-noregion-structure-map
|
|
180 "\C-p" 'hm--html-add-paragraph-separator)
|
|
181 (define-key hm--html-noregion-structure-map "\C-m" 'hm--html-add-line-break)
|
|
182 (define-key hm--html-noregion-structure-map
|
|
183 "h" 'hm--html-add-horizontal-rule)
|
|
184 )
|
|
185
|
|
186 (defvar hm--html-region-structure-map nil
|
|
187 "Region sub keymap for inserting entities.")
|
|
188
|
|
189 (if hm--html-region-structure-map
|
|
190 ()
|
|
191 (setq hm--html-region-structure-map (make-sparse-keymap))
|
98
|
192 (define-key hm--html-region-structure-map
|
2
|
193 "i" 'hm--html-add-list-or-menu-item-to-region)
|
0
|
194 (define-key hm--html-region-structure-map "m" 'hm--html-add-menu-to-region)
|
|
195 (define-key hm--html-region-structure-map "u" 'hm--html-add-list-to-region)
|
|
196 (define-key hm--html-region-structure-map
|
|
197 "o" 'hm--html-add-numberlist-to-region)
|
|
198 (define-key hm--html-region-structure-map
|
70
|
199 "d" 'hm--html-add-directory-list-to-region)
|
0
|
200 (define-key hm--html-region-structure-map
|
2
|
201 "\C-dl" 'hm--html-add-description-list-to-region)
|
|
202 (define-key hm--html-region-structure-map
|
|
203 "\C-dt" 'hm--html-add-description-title-to-region)
|
|
204 (define-key hm--html-region-structure-map
|
|
205 "\C-de" 'hm--html-add-description-entry-to-region)
|
70
|
206 ; (define-key hm--html-region-structure-map
|
|
207 ; "\C-d\C-t" 'html-add-description-title-and-entry-to-region))
|
0
|
208 (define-key hm--html-region-structure-map
|
|
209 "\C-tt" 'hm--html-add-table-to-region)
|
|
210 (define-key hm--html-region-structure-map
|
|
211 "\C-t\C-t" 'hm--html-add-table-title-to-region)
|
|
212 (define-key hm--html-region-structure-map
|
|
213 "p" 'hm--html-add-paragraph-to-region)
|
|
214 )
|
|
215
|
|
216 (defvar hm--html-noregion-formating-paragraph-map nil
|
|
217 "Noregion sub keymap for inserting paragraph formating elements.")
|
|
218
|
|
219 (if hm--html-noregion-formating-paragraph-map
|
|
220 ()
|
|
221 (setq hm--html-noregion-formating-paragraph-map (make-sparse-keymap))
|
|
222 (define-key hm--html-noregion-formating-paragraph-map
|
70
|
223 "o" 'hm--html-add-plaintext)
|
|
224 (define-key hm--html-noregion-formating-paragraph-map
|
|
225 "w" 'hm--html-add-preformated)
|
0
|
226 (define-key hm--html-noregion-formating-paragraph-map
|
2
|
227 "b" 'hm--html-add-blockquote)
|
0
|
228 (define-key hm--html-noregion-formating-paragraph-map
|
70
|
229 "l" 'hm--html-add-listing)
|
0
|
230 (define-key hm--html-noregion-formating-paragraph-map
|
70
|
231 "a" 'hm--html-add-abstract)
|
0
|
232 )
|
|
233
|
|
234 (defvar hm--html-region-formating-paragraph-map nil
|
|
235 "Region sub keymap for inserting paragraph formating elements.")
|
|
236
|
|
237 (if hm--html-region-formating-paragraph-map
|
|
238 ()
|
|
239 (setq hm--html-region-formating-paragraph-map (make-sparse-keymap))
|
|
240 (define-key hm--html-region-formating-paragraph-map
|
70
|
241 "o" 'hm--html-add-plaintext-to-region)
|
|
242 (define-key hm--html-region-formating-paragraph-map
|
|
243 "w" 'hm--html-add-preformated-to-region)
|
0
|
244 (define-key hm--html-region-formating-paragraph-map
|
|
245 "b" 'hm--html-add-blockquote-to-region)
|
|
246 (define-key hm--html-region-formating-paragraph-map
|
70
|
247 "l" 'hm--html-add-listing-to-region)
|
0
|
248 (define-key hm--html-region-formating-paragraph-map
|
70
|
249 "a" 'hm--html-add-abstract-to-region)
|
0
|
250 )
|
|
251
|
|
252 (defvar hm--html-noregion-formating-word-map nil
|
|
253 "Norgion sub keymap for inserting physical text formating elements.")
|
|
254
|
|
255 (if hm--html-noregion-formating-word-map
|
|
256 ()
|
|
257 (setq hm--html-noregion-formating-word-map (make-sparse-keymap))
|
|
258 (define-key hm--html-noregion-formating-word-map
|
|
259 "b" 'hm--html-add-bold)
|
|
260 (define-key hm--html-noregion-formating-word-map
|
|
261 "i" 'hm--html-add-italic)
|
|
262 (define-key hm--html-noregion-formating-word-map
|
|
263 "u" 'hm--html-add-underline)
|
|
264 (define-key hm--html-noregion-formating-word-map
|
2
|
265 "t" 'hm--html-add-fixed)
|
0
|
266 (define-key hm--html-noregion-formating-word-map
|
|
267 "s" 'hm--html-add-strikethru)
|
|
268 (define-key hm--html-noregion-formating-word-map
|
|
269 "\C-p" 'hm--html-add-superscript)
|
|
270 (define-key hm--html-noregion-formating-word-map
|
|
271 "\C-b" 'hm--html-add-subscript)
|
|
272 (define-key hm--html-noregion-formating-word-map
|
2
|
273 "e" 'hm--html-add-emphasized)
|
|
274 (define-key hm--html-noregion-formating-word-map
|
|
275 "\C-s" 'hm--html-add-strong)
|
0
|
276 (define-key hm--html-noregion-formating-word-map
|
2
|
277 "\M-s" 'hm--html-add-small)
|
|
278 (define-key hm--html-noregion-formating-word-map
|
|
279 "\M-b" 'hm--html-add-big)
|
0
|
280 )
|
|
281
|
|
282 (defvar hm--html-region-formating-word-map nil
|
|
283 "Region sub keymap for inserting word text formating elements.")
|
|
284
|
|
285 (if hm--html-region-formating-word-map
|
|
286 ()
|
|
287 (setq hm--html-region-formating-word-map (make-sparse-keymap))
|
|
288 (define-key hm--html-region-formating-word-map
|
|
289 "b" 'hm--html-add-bold-to-region)
|
|
290 (define-key hm--html-region-formating-word-map
|
|
291 "i" 'hm--html-add-italic-to-region)
|
|
292 (define-key hm--html-region-formating-word-map
|
|
293 "u" 'hm--html-add-underline-to-region)
|
|
294 (define-key hm--html-region-formating-word-map
|
|
295 "t" 'hm--html-add-fixed-to-region)
|
|
296 (define-key hm--html-region-formating-word-map
|
|
297 "s" 'hm--html-add-strikethru-to-region)
|
|
298 (define-key hm--html-region-formating-word-map
|
|
299 "\C-p" 'hm--html-add-superscript-to-region)
|
|
300 (define-key hm--html-region-formating-word-map
|
|
301 "\C-b" 'hm--html-add-subscript-to-region)
|
|
302 (define-key hm--html-region-formating-word-map
|
|
303 "e" 'hm--html-add-emphasized-to-region)
|
|
304 (define-key hm--html-region-formating-word-map
|
|
305 "\C-s" 'hm--html-add-strong-to-region)
|
2
|
306 (define-key hm--html-region-formating-word-map
|
|
307 "\M-s" 'hm--html-add-small-to-region)
|
|
308 (define-key hm--html-region-formating-word-map
|
|
309 "\M-b" 'hm--html-add-big-to-region)
|
0
|
310 )
|
|
311
|
2
|
312 (defvar hm--html-noregion-include-map nil
|
|
313 "Noregion sub keymap for include images and other stuff.")
|
|
314
|
|
315 (if hm--html-noregion-include-map
|
|
316 ()
|
|
317 (setq hm--html-noregion-include-map (make-sparse-keymap))
|
70
|
318 (define-key hm--html-noregion-include-map "t" 'hm--html-add-image-top)
|
|
319 (define-key hm--html-noregion-include-map "m" 'hm--html-add-image-middle)
|
|
320 (define-key hm--html-noregion-include-map "b" 'hm--html-add-image-bottom)
|
2
|
321 (define-key hm--html-noregion-include-map "a" 'hm--html-add-applet)
|
70
|
322 (define-key hm--html-noregion-include-map "p" 'hm--html-add-applet)
|
2
|
323 )
|
0
|
324
|
2
|
325 (defvar hm--html-region-include-map nil
|
|
326 "Region sub keymap for include images and other stuff.")
|
0
|
327
|
2
|
328 (if hm--html-region-include-map
|
|
329 ()
|
|
330 (setq hm--html-region-include-map (make-sparse-keymap))
|
|
331 )
|
0
|
332
|
2
|
333 ;(defvar hm--html-noregion-text-elements-map nil
|
|
334 ; "Noregion sub keymap for inserting text elements.")
|
|
335
|
|
336 ;(if hm--html-noregion-text-elements-map
|
0
|
337 ; ()
|
2
|
338 ; (setq hm--html-noregion-text-elements-map (make-sparse-keymap))
|
0
|
339 ; )
|
|
340
|
2
|
341 ;(defvar hm--html-region-text-elements-map nil
|
|
342 ; "Region sub keymap for inserting text elements.")
|
0
|
343
|
2
|
344 ;(if hm--html-region-text-elements-map
|
|
345 ; ()
|
|
346 ; (setq hm--html-region-text-elements-map (make-sparse-keymap))
|
|
347 ; )
|
0
|
348
|
|
349 (defvar hm--html-noregion-forms-map nil
|
|
350 "Noregion sub keymap for inserting forms.")
|
|
351
|
|
352 (if hm--html-noregion-forms-map
|
|
353 ()
|
|
354 (setq hm--html-noregion-forms-map (make-sparse-keymap))
|
2
|
355
|
|
356 (define-key hm--html-noregion-forms-map "f" 'hm--html-add-form)
|
|
357 (define-key hm--html-noregion-forms-map "a" 'hm--html-form-add-input-audio)
|
|
358 (define-key hm--html-noregion-forms-map
|
|
359 "c" 'hm--html-form-add-input-checkbox)
|
|
360 (define-key hm--html-noregion-forms-map
|
|
361 "d" 'hm--html-form-add-input-date)
|
|
362 (define-key hm--html-noregion-forms-map
|
|
363 "\C-f" 'hm--html-form-add-input-float)
|
|
364 (define-key hm--html-noregion-forms-map "i" 'hm--html-form-add-input-image)
|
|
365 (define-key hm--html-noregion-forms-map
|
|
366 "\C-i" 'hm--html-form-add-input-integer)
|
|
367 (define-key hm--html-noregion-forms-map
|
|
368 "\M-i" 'hm--html-form-add-input-isindex)
|
|
369 (define-key hm--html-noregion-forms-map
|
|
370 "p" 'hm--html-form-add-input-password)
|
|
371 (define-key hm--html-noregion-forms-map "r" 'hm--html-form-add-input-radio)
|
|
372 (define-key hm--html-noregion-forms-map
|
|
373 "\C-r" 'hm--html-form-add-input-reset)
|
|
374 (define-key hm--html-noregion-forms-map
|
|
375 "\C-s" 'hm--html-form-add-input-scribble)
|
|
376 (define-key hm--html-noregion-forms-map "s" 'hm--html-form-add-input-submit)
|
|
377 (define-key hm--html-noregion-forms-map "t" 'hm--html-form-add-input-text)
|
|
378 (define-key hm--html-noregion-forms-map "u" 'hm--html-form-add-input-url)
|
|
379 (define-key hm--html-noregion-forms-map "o" 'hm--html-form-add-select-option)
|
|
380 (define-key hm--html-noregion-forms-map
|
|
381 "m" 'hm--html-form-add-select-option-menu)
|
|
382 (define-key hm--html-noregion-forms-map
|
|
383 "l" 'hm--html-form-add-select-scrolled-list)
|
|
384 (define-key hm--html-noregion-forms-map "\C-t" 'hm--html-form-add-textarea)
|
0
|
385 )
|
|
386
|
|
387 (defvar hm--html-region-forms-map nil
|
|
388 "Region sub keymap for inserting forms.")
|
|
389
|
|
390 (if hm--html-region-forms-map
|
|
391 ()
|
|
392 (setq hm--html-region-forms-map (make-sparse-keymap))
|
2
|
393
|
|
394 (define-key hm--html-region-forms-map "f" 'hm--html-add-form-to-region)
|
0
|
395 )
|
|
396
|
|
397 (defvar hm--html-region-sub-map-1 nil
|
2
|
398 "Region sub keymap for the `hm--html-mode'.")
|
0
|
399
|
|
400 (if hm--html-region-sub-map-1
|
|
401 ()
|
|
402 (setq hm--html-region-sub-map-1 (make-sparse-keymap))
|
|
403 (define-key hm--html-region-sub-map-1 "\C-o" hm--html-region-forms-map)
|
|
404 (define-key hm--html-region-sub-map-1 "\C-a" hm--html-region-anchor-map)
|
2
|
405 (define-key hm--html-region-sub-map-1 "\C-i" hm--html-region-include-map)
|
|
406 ; (define-key hm--html-region-sub-map-1
|
|
407 ; "\C-t" hm--html-region-text-elements-map)
|
0
|
408 (define-key hm--html-region-sub-map-1 "\C-f" hm--html-region-frame-map)
|
|
409 (define-key hm--html-region-sub-map-1 "\C-s" hm--html-region-structure-map)
|
|
410 (define-key hm--html-region-sub-map-1
|
|
411 "\C-p" hm--html-region-formating-paragraph-map)
|
|
412 (define-key hm--html-region-sub-map-1
|
|
413 "\C-w" hm--html-region-formating-word-map)
|
|
414 )
|
|
415
|
|
416 (defvar hm--html-noregion-sub-map-1 nil
|
2
|
417 "Noregion sub keymap for the `hm--html-mode'.")
|
0
|
418
|
|
419 (if hm--html-noregion-sub-map-1
|
|
420 ()
|
|
421 (setq hm--html-noregion-sub-map-1 (make-sparse-keymap))
|
|
422
|
|
423 (define-key hm--html-noregion-sub-map-1 "\C-o" hm--html-noregion-forms-map)
|
|
424 (define-key hm--html-noregion-sub-map-1 "\C-a" hm--html-noregion-anchor-map)
|
|
425 (define-key hm--html-noregion-sub-map-1
|
2
|
426 [(control i)] hm--html-noregion-include-map)
|
|
427 ; (define-key hm--html-noregion-sub-map-1
|
|
428 ; "\C-t" hm--html-noregion-text-elements-map)
|
0
|
429 (define-key hm--html-noregion-sub-map-1 "\C-f" hm--html-noregion-frame-map)
|
|
430 (define-key hm--html-noregion-sub-map-1
|
|
431 "\C-s" hm--html-noregion-structure-map)
|
|
432 (define-key hm--html-noregion-sub-map-1
|
|
433 "\C-p" hm--html-noregion-formating-paragraph-map)
|
|
434 (define-key hm--html-noregion-sub-map-1
|
|
435 "\C-w" hm--html-noregion-formating-word-map)
|
|
436 )
|
|
437
|
|
438 (defvar hm--html-region-sub-map nil
|
2
|
439 "Region sub keymap for the `hm--html-mode'.")
|
0
|
440
|
|
441 (if hm--html-region-sub-map
|
|
442 ()
|
|
443 (setq hm--html-region-sub-map (make-sparse-keymap))
|
|
444 ; (define-key hm--html-region-sub-map "\C-n" hm--html-noregion-sub-map-1)
|
|
445 ; (define-key hm--html-region-sub-map "\C-r" hm--html-region-sub-map-1)
|
|
446 (define-key hm--html-region-sub-map "\M-n" hm--html-noregion-sub-map-1)
|
|
447 (define-key hm--html-region-sub-map "\M-r" hm--html-region-sub-map-1)
|
|
448
|
|
449 (if (adapt-emacs19p)
|
|
450 (map-keymap '(lambda (key-description-list binding)
|
|
451 (define-key hm--html-region-sub-map
|
2
|
452 (vector key-description-list) binding))
|
|
453 ; (single-key-description key-description-list) binding))
|
0
|
454 hm--html-region-sub-map-1)
|
|
455 (map-keymap '(lambda (key-description-list binding)
|
|
456 (define-key hm--html-region-sub-map
|
|
457 key-description-list binding))
|
|
458 hm--html-region-sub-map-1)
|
|
459 )
|
|
460 )
|
|
461
|
|
462 (defvar hm--html-noregion-sub-map nil
|
2
|
463 "Noregion keymap for the `hm--html-mode'.")
|
0
|
464
|
|
465 (if hm--html-noregion-sub-map
|
|
466 ()
|
|
467 (setq hm--html-noregion-sub-map (make-sparse-keymap))
|
|
468 ; (define-key hm--html-noregion-sub-map "\C-n" hm--html-noregion-sub-map-1)
|
|
469 ; (define-key hm--html-noregion-sub-map "\C-r" hm--html-region-sub-map-1)
|
|
470 (define-key hm--html-noregion-sub-map "\M-n" hm--html-noregion-sub-map-1)
|
|
471 (define-key hm--html-noregion-sub-map "\M-r" hm--html-region-sub-map-1)
|
|
472
|
|
473 (if (adapt-emacs19p)
|
|
474 (map-keymap '(lambda (key-description-list binding)
|
2
|
475 (define-key hm--html-noregion-sub-map
|
|
476 (vector key-description-list) binding))
|
|
477 ; (single-key-description key-description-list) binding))
|
|
478 hm--html-noregion-sub-map-1)
|
0
|
479 (map-keymap '(lambda (key-description-list binding)
|
|
480 (define-key hm--html-noregion-sub-map
|
|
481 key-description-list binding))
|
|
482 hm--html-noregion-sub-map-1)
|
|
483 )
|
|
484 )
|
|
485
|
|
486 (defvar hm--html-mode-map nil
|
2
|
487 "Normal and noregion keymap for the `hm--html-mode'.")
|
0
|
488
|
|
489 (if hm--html-mode-map
|
|
490 ()
|
|
491 (setq hm--html-mode-map (make-sparse-keymap))
|
2
|
492 (define-key hm--html-mode-map
|
|
493 hm--html-mode-prefix-key hm--html-noregion-sub-map)
|
0
|
494 (if (adapt-xemacsp)
|
2
|
495 (progn
|
|
496 (define-key hm--html-mode-map '(button3) 'hm--html-popup-menu)
|
|
497 (define-key hm--html-mode-map
|
|
498 [(meta control button1)] 'idd-mouse-drag-and-drop))
|
|
499 ; (define-key hm--html-mode-map [down-mouse-3] 'hm--html-popup-menu)
|
|
500 (if hm--html-expert
|
|
501 (define-key hm--html-mode-map
|
|
502 hm--html-emacs19-popup-noregion-menu-button
|
|
503 hm--html-menu-noregion-expert-map)
|
|
504 (define-key hm--html-mode-map
|
|
505 hm--html-emacs19-popup-noregion-menu-button
|
|
506 hm--html-menu-noregion-novice-map))
|
|
507 (define-key hm--html-mode-map
|
|
508 [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
|
0
|
509 (if hm--html-bind-latin-1-char-entities
|
|
510 (progn
|
|
511 (define-key hm--html-mode-map [adiaeresis] 'hm--html_ae)
|
|
512 (define-key hm--html-mode-map [odiaeresis] 'hm--html_oe)
|
|
513 (define-key hm--html-mode-map [udiaeresis] 'hm--html_ue)
|
|
514 (define-key hm--html-mode-map [aring] 'hm--html_aa)
|
|
515 (define-key hm--html-mode-map [Adiaeresis] 'hm--html_Ae)
|
|
516 (define-key hm--html-mode-map [Odiaeresis] 'hm--html_Oe)
|
|
517 (define-key hm--html-mode-map [Udiaeresis] 'hm--html_Ue)
|
|
518 (define-key hm--html-mode-map [Aring] 'hm--html_Aa)
|
|
519 (define-key hm--html-mode-map [ediaeresis] 'hm--html_ediaeresis)
|
|
520 (define-key hm--html-mode-map [Ediaeresis] 'hm--html_Ediaeresis)
|
|
521 (define-key hm--html-mode-map [idiaeresis] 'hm--html_idiaeresis)
|
|
522 (define-key hm--html-mode-map [Idiaeresis] 'hm--html_Idiaeresis)
|
|
523 (define-key hm--html-mode-map [ssharp] 'hm--html_sz)
|
|
524 (define-key hm--html-mode-map [aacute] 'hm--html_aacute)
|
|
525 (define-key hm--html-mode-map [eacute] 'hm--html_eacute)
|
|
526 (define-key hm--html-mode-map [iacute] 'hm--html_iacute)
|
|
527 (define-key hm--html-mode-map [oacute] 'hm--html_oacute)
|
|
528 (define-key hm--html-mode-map [uacute] 'hm--html_uacute)
|
|
529 (define-key hm--html-mode-map [Aacute] 'hm--html_Aacute)
|
|
530 (define-key hm--html-mode-map [Eacute] 'hm--html_Eacute)
|
|
531 (define-key hm--html-mode-map [Iacute] 'hm--html_Iacute)
|
|
532 (define-key hm--html-mode-map [Oacute] 'hm--html_Oacute)
|
|
533 (define-key hm--html-mode-map [Uacute] 'hm--html_Uacute)
|
|
534 (define-key hm--html-mode-map [agrave] 'hm--html_agrave)
|
|
535 (define-key hm--html-mode-map [egrave] 'hm--html_egrave)
|
|
536 (define-key hm--html-mode-map [igrave] 'hm--html_igrave)
|
|
537 (define-key hm--html-mode-map [ograve] 'hm--html_ograve)
|
|
538 (define-key hm--html-mode-map [ugrave] 'hm--html_ugrave)
|
|
539 (define-key hm--html-mode-map [Agrave] 'hm--html_Agrave)
|
|
540 (define-key hm--html-mode-map [Egrave] 'hm--html_Egrave)
|
|
541 (define-key hm--html-mode-map [Igrave] 'hm--html_Igrave)
|
|
542 (define-key hm--html-mode-map [Ograve] 'hm--html_Ograve)
|
|
543 (define-key hm--html-mode-map [Ugrave] 'hm--html_Ugrave)
|
|
544 (define-key hm--html-mode-map [ccedilla] 'hm--html_ccedilla)
|
|
545 (define-key hm--html-mode-map [Ccedilla] 'hm--html_Ccedilla)
|
|
546 (define-key hm--html-mode-map [acircumflex] 'hm--html_acircumflex)
|
|
547 (define-key hm--html-mode-map [ecircumflex] 'hm--html_ecircumflex)
|
|
548 (define-key hm--html-mode-map [icircumflex] 'hm--html_icircumflex)
|
|
549 (define-key hm--html-mode-map [ocircumflex] 'hm--html_ocircumflex)
|
|
550 (define-key hm--html-mode-map [ucircumflex] 'hm--html_ucircumflex)
|
|
551 (define-key hm--html-mode-map [Acircumflex] 'hm--html_Acircumflex)
|
|
552 (define-key hm--html-mode-map [Ecircumflex] 'hm--html_Ecircumflex)
|
|
553 (define-key hm--html-mode-map [Icircumflex] 'hm--html_Icircumflex)
|
|
554 (define-key hm--html-mode-map [Ocircumflex] 'hm--html_Ocircumflex)
|
|
555 (define-key hm--html-mode-map [Ucircumflex] 'hm--html_Ucircumflex)
|
|
556 (define-key hm--html-mode-map [atilde] 'hm--html_atilde)
|
|
557 (define-key hm--html-mode-map [otilde] 'hm--html_otilde)
|
|
558 (define-key hm--html-mode-map [ntilde] 'hm--html_ntilde)
|
|
559 (define-key hm--html-mode-map [Atilde] 'hm--html_Atilde)
|
|
560 (define-key hm--html-mode-map [Otilde] 'hm--html_Otilde)
|
|
561 (define-key hm--html-mode-map [Ntilde] 'hm--html_Ntilde)
|
|
562 (define-key hm--html-mode-map [eth] 'hm--html_eth)
|
|
563 (define-key hm--html-mode-map [ETH] 'hm--html_Eth)
|
|
564 (define-key hm--html-mode-map [thorn] 'hm--html_thorn)
|
|
565 (define-key hm--html-mode-map [THORN] 'hm--html_Thorn)
|
|
566 ))
|
|
567 (define-key hm--html-mode-map "<" 'hm--html-smart-less-than)
|
|
568 (define-key hm--html-mode-map ">" 'hm--html-smart-greater-than)
|
2
|
569 (define-key hm--html-mode-map "&" 'hm--html-smart-ampersand)
|
0
|
570 )
|
|
571
|
|
572 (defvar hm--html-region-mode-map nil
|
2
|
573 "Region keymap for the `hm--html-mode'.")
|
0
|
574
|
|
575 (if hm--html-region-mode-map
|
|
576 ()
|
|
577 (setq hm--html-region-mode-map (make-sparse-keymap))
|
2
|
578 (define-key hm--html-region-mode-map
|
|
579 hm--html-mode-prefix-key hm--html-region-sub-map)
|
0
|
580 (if (adapt-xemacsp)
|
|
581 (progn
|
|
582 (define-key hm--html-region-mode-map
|
2
|
583 '(button3) 'hm--html-popup-menu-region)
|
0
|
584 (define-key hm--html-region-mode-map
|
2
|
585 [(meta control button1)] 'idd-mouse-drag-and-drop))
|
|
586 ; (define-key hm--html-region-mode-map
|
|
587 ; [down-mouse-3] 'hm--html-popup-menu-region)
|
|
588 (if hm--html-expert
|
|
589 (define-key hm--html-region-mode-map
|
|
590 hm--html-emacs19-popup-region-menu-button
|
|
591 hm--html-menu-region-expert-map)
|
|
592 (define-key hm--html-region-mode-map
|
|
593 hm--html-emacs19-popup-region-menu-button
|
|
594 hm--html-menu-region-novice-map))
|
|
595 (define-key hm--html-region-mode-map
|
|
596 [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
|
|
597 ;; It maybe a better idea to set the following to undefine in this list...
|
|
598 ; (if hm--html-bind-latin-1-char-entities
|
|
599 ; (progn
|
|
600 ; (define-key hm--html-region-mode-map [adiaeresis] 'hm--html_ae)
|
|
601 ; (define-key hm--html-region-mode-map [odiaeresis] 'hm--html_oe)
|
|
602 ; (define-key hm--html-region-mode-map [udiaeresis] 'hm--html_ue)
|
|
603 ; (define-key hm--html-region-mode-map [aring] 'hm--html_aa)
|
|
604 ; (define-key hm--html-region-mode-map [Adiaeresis] 'hm--html_Ae)
|
|
605 ; (define-key hm--html-region-mode-map [Odiaeresis] 'hm--html_Oe)
|
|
606 ; (define-key hm--html-region-mode-map [Udiaeresis] 'hm--html_Ue)
|
|
607 ; (define-key hm--html-region-mode-map [Aring] 'hm--html_Aa)
|
|
608 ; (define-key hm--html-region-mode-map
|
|
609 ; [ediaeresis] 'hm--html_ediaeresis)
|
|
610 ; (define-key hm--html-region-mode-map
|
|
611 ; [Ediaeresis] 'hm--html_Ediaeresis)
|
|
612 ; (define-key hm--html-region-mode-map
|
|
613 ; [idiaeresis] 'hm--html_idiaeresis)
|
|
614 ; (define-key hm--html-region-mode-map
|
|
615 ; [Idiaeresis] 'hm--html_Idiaeresis)
|
|
616 ; (define-key hm--html-region-mode-map [ssharp] 'hm--html_sz)
|
|
617 ; (define-key hm--html-region-mode-map [aacute] 'hm--html_aacute)
|
|
618 ; (define-key hm--html-region-mode-map [eacute] 'hm--html_eacute)
|
|
619 ; (define-key hm--html-region-mode-map [iacute] 'hm--html_iacute)
|
|
620 ; (define-key hm--html-region-mode-map [oacute] 'hm--html_oacute)
|
|
621 ; (define-key hm--html-region-mode-map [uacute] 'hm--html_uacute)
|
|
622 ; (define-key hm--html-region-mode-map [Aacute] 'hm--html_Aacute)
|
|
623 ; (define-key hm--html-region-mode-map [Eacute] 'hm--html_Eacute)
|
|
624 ; (define-key hm--html-region-mode-map [Iacute] 'hm--html_Iacute)
|
|
625 ; (define-key hm--html-region-mode-map [Oacute] 'hm--html_Oacute)
|
|
626 ; (define-key hm--html-region-mode-map [Uacute] 'hm--html_Uacute)
|
|
627 ; (define-key hm--html-region-mode-map [agrave] 'hm--html_agrave)
|
|
628 ; (define-key hm--html-region-mode-map [egrave] 'hm--html_egrave)
|
|
629 ; (define-key hm--html-region-mode-map [igrave] 'hm--html_igrave)
|
|
630 ; (define-key hm--html-region-mode-map [ograve] 'hm--html_ograve)
|
|
631 ; (define-key hm--html-region-mode-map [ugrave] 'hm--html_ugrave)
|
|
632 ; (define-key hm--html-region-mode-map [Agrave] 'hm--html_Agrave)
|
|
633 ; (define-key hm--html-region-mode-map [Egrave] 'hm--html_Egrave)
|
|
634 ; (define-key hm--html-region-mode-map [Igrave] 'hm--html_Igrave)
|
|
635 ; (define-key hm--html-region-mode-map [Ograve] 'hm--html_Ograve)
|
|
636 ; (define-key hm--html-region-mode-map [Ugrave] 'hm--html_Ugrave)
|
|
637 ; (define-key hm--html-region-mode-map [ccedilla] 'hm--html_ccedilla)
|
|
638 ; (define-key hm--html-region-mode-map [Ccedilla] 'hm--html_Ccedilla)
|
|
639 ; (define-key hm--html-region-mode-map
|
|
640 ; [acircumflex] 'hm--html_acircumflex)
|
|
641 ; (define-key hm--html-region-mode-map
|
|
642 ; [ecircumflex] 'hm--html_ecircumflex)
|
|
643 ; (define-key hm--html-region-mode-map
|
|
644 ; [icircumflex] 'hm--html_icircumflex)
|
|
645 ; (define-key hm--html-region-mode-map
|
|
646 ; [ocircumflex] 'hm--html_ocircumflex)
|
|
647 ; (define-key hm--html-region-mode-map
|
|
648 ; [ucircumflex] 'hm--html_ucircumflex)
|
|
649 ; (define-key hm--html-region-mode-map
|
|
650 ; [Acircumflex] 'hm--html_Acircumflex)
|
|
651 ; (define-key hm--html-region-mode-map
|
|
652 ; [Ecircumflex] 'hm--html_Ecircumflex)
|
|
653 ; (define-key hm--html-region-mode-map
|
|
654 ; [Icircumflex] 'hm--html_Icircumflex)
|
|
655 ; (define-key hm--html-region-mode-map
|
|
656 ; [Ocircumflex] 'hm--html_Ocircumflex)
|
|
657 ; (define-key hm--html-region-mode-map
|
|
658 ; [Ucircumflex] 'hm--html_Ucircumflex)
|
|
659 ; (define-key hm--html-region-mode-map [atilde] 'hm--html_atilde)
|
|
660 ; (define-key hm--html-region-mode-map [otilde] 'hm--html_otilde)
|
|
661 ; (define-key hm--html-region-mode-map [ntilde] 'hm--html_ntilde)
|
|
662 ; (define-key hm--html-region-mode-map [Atilde] 'hm--html_Atilde)
|
|
663 ; (define-key hm--html-region-mode-map [Otilde] 'hm--html_Otilde)
|
|
664 ; (define-key hm--html-region-mode-map [Ntilde] 'hm--html_Ntilde)
|
|
665 ; (define-key hm--html-region-mode-map [eth] 'hm--html_eth)
|
|
666 ; (define-key hm--html-region-mode-map [ETH] 'hm--html_Eth)
|
|
667 ; (define-key hm--html-region-mode-map [thorn] 'hm--html_thorn)
|
|
668 ; (define-key hm--html-region-mode-map [THORN] 'hm--html_Thorn)
|
|
669 ; ))
|
|
670 (define-key hm--html-region-mode-map "<" 'hm--html-smart-less-than)
|
|
671 (define-key hm--html-region-mode-map ">" 'hm--html-smart-greater-than)
|
|
672 (define-key hm--html-region-mode-map "&" 'hm--html-smart-ampersand)
|
0
|
673 )
|
|
674
|
|
675
|
2
|
676 ;;; For the hm--html minor modes
|
|
677 (defvar hm--html-minor-mode-map nil
|
|
678 "Normal and noregion keymap for the `hm--html-minor-mode'.")
|
0
|
679
|
2
|
680 (if hm--html-minor-mode-map
|
|
681 ()
|
|
682 (setq hm--html-minor-mode-map (make-sparse-keymap))
|
|
683 (define-key hm--html-minor-mode-map
|
|
684 hm--html-minor-mode-prefix-key hm--html-noregion-sub-map)
|
|
685 (if (adapt-xemacsp)
|
|
686 (progn
|
|
687 (define-key hm--html-minor-mode-map
|
|
688 '(button3) 'hm--html-popup-minor-html-menu)
|
|
689 (define-key hm--html-minor-mode-map
|
|
690 [(meta control button1)] 'idd-mouse-drag-and-drop))
|
|
691 (if hm--html-expert
|
|
692 (define-key hm--html-minor-mode-map
|
|
693 hm--html-emacs19-popup-noregion-menu-button
|
|
694 hm--html-menu-noregion-expert-map)
|
|
695 (define-key hm--html-minor-mode-map
|
|
696 hm--html-emacs19-popup-noregion-menu-button
|
|
697 hm--html-menu-noregion-novice-map))
|
|
698 (define-key hm--html-minor-mode-map
|
|
699 [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
|
|
700 (define-key hm--html-minor-mode-map "<" 'hm--html-smart-less-than)
|
|
701 (define-key hm--html-minor-mode-map ">" 'hm--html-smart-greater-than)
|
|
702 (define-key hm--html-minor-mode-map "&" 'hm--html-smart-ampersand)
|
|
703 )
|
0
|
704
|
|
705
|
2
|
706 (defvar hm--html-minor-region-mode-map nil
|
|
707 "Region keymap for the `hm--html-minor-mode'.")
|
0
|
708
|
2
|
709 (if hm--html-minor-region-mode-map
|
|
710 ()
|
|
711 (setq hm--html-minor-region-mode-map (make-sparse-keymap))
|
|
712 (define-key hm--html-minor-region-mode-map
|
|
713 hm--html-minor-mode-prefix-key hm--html-region-sub-map)
|
|
714 (if (adapt-xemacsp)
|
|
715 (progn
|
|
716 (define-key hm--html-minor-region-mode-map
|
|
717 '(button3) 'hm--html-popup-menu-region)
|
|
718 (define-key hm--html-minor-region-mode-map
|
|
719 [(meta control button1)] 'idd-mouse-drag-and-drop))
|
|
720 (if hm--html-expert
|
|
721 (define-key hm--html-minor-region-mode-map
|
|
722 hm--html-emacs19-popup-region-menu-button
|
|
723 hm--html-menu-region-expert-map)
|
|
724 (define-key hm--html-minor-region-mode-map
|
|
725 hm--html-emacs19-popup-region-menu-button
|
|
726 hm--html-menu-region-novice-map))
|
|
727 (define-key hm--html-minor-region-mode-map
|
|
728 [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
|
|
729 (define-key hm--html-minor-region-mode-map "<" 'hm--html-smart-less-than)
|
|
730 (define-key hm--html-minor-region-mode-map ">" 'hm--html-smart-greater-than)
|
|
731 (define-key hm--html-minor-region-mode-map "&" 'hm--html-smart-ampersand)
|
|
732 )
|
|
733
|
|
734
|
|
735 ;;; Announce the feature hm--html-keys
|
|
736 (provide 'hm--html-keys)
|