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