diff -r 49597064d851 lisp/textmodes/sgml-mode.el --- a/lisp/textmodes/sgml-mode.el Sun Mar 30 16:22:49 2008 +0200 +++ b/lisp/textmodes/sgml-mode.el Mon Mar 31 20:53:56 2008 +0200 @@ -1552,10 +1552,15 @@ Currently just returns (EMPTY-TAGS UNCLO :type 'hook :options '(html-autoview-mode)) -(defvar html-quick-keys sgml-quick-keys - "Use C-c X combinations for quick insertion of frequent tags when non-nil. -This defaults to `sgml-quick-keys'. -This takes effect when first loading the library.") +(defvar html-use-quick-keys sgml-quick-keys + "Use `html-quick-keys-prefix'+letter combinations for quick +insertion of frequent tags when non-nil. This defaults to +`sgml-quick-keys'. This takes effect when first loading the +library.") + +(defvar html-quick-keys-prefix "\C-c\C-q" + "When `html-use-quick-keys' is set to non-nil, quick keys can be + inserted using this prefix.") (defvar html-mode-map (let ((map (make-sparse-keymap)) @@ -1578,16 +1583,6 @@ This takes effect when first loading the (define-key map "\C-c\C-ch" 'html-href-anchor) (define-key map "\C-c\C-cn" 'html-name-anchor) (define-key map "\C-c\C-ci" 'html-image) - (when html-quick-keys - (define-key map "\C-c-" 'html-horizontal-rule) - (define-key map "\C-co" 'html-ordered-list) - (define-key map "\C-cu" 'html-unordered-list) - (define-key map "\C-cr" 'html-radio-buttons) - (define-key map "\C-cc" 'html-checkboxes) - (define-key map "\C-cl" 'html-list-item) - (define-key map "\C-ch" 'html-href-anchor) - (define-key map "\C-cn" 'html-name-anchor) - (define-key map "\C-ci" 'html-image)) (define-key map "\C-c\C-s" 'html-autoview-mode) (define-key map "\C-c\C-v" 'browse-url-of-buffer) (define-key map [menu-bar html] (cons "HTML" menu-map)) @@ -1615,6 +1610,23 @@ This takes effect when first loading the (define-key menu-map "n" '("Name Anchor" . html-name-anchor)) map) "Keymap for commands for use in HTML mode.") + +(defvar html-quick-keys-map + (let ((map (make-sparse-keymap))) + (define-key map "-" 'html-horizontal-rule) + (define-key map "o" 'html-ordered-list) + (define-key map "u" 'html-unordered-list) + (define-key map "r" 'html-radio-buttons) + (define-key map "c" 'html-checkboxes) + (define-key map "l" 'html-list-item) + (define-key map "h" 'html-href-anchor) + (define-key map "n" 'html-name-anchor) + (define-key map "i" 'html-image) + map) + "HTML quick keys keymap.") + +(when html-use-quick-keys + (define-key html-mode-map html-quick-keys-prefix html-quick-keys-map)) (defvar html-face-tag-alist '((bold . "b")