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