PageRenderTime 47ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/xemacs-packages-extra-20110502/xemacs-packages/hm--html-menus/hm--html-keys.el

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