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