diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-11-03 16:06:26 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-11-03 16:06:35 +0100 |
commit | ba8a7882de5bbdb39c9c1d74297a9613aa28463f (patch) | |
tree | 121691f6fecefcccf8bbbfa7d374b8262ad98da0 /lisp/textmodes | |
parent | e323a84c9f208f7ce5c3416581c8b14c75ec5c11 (diff) | |
download | emacs-ba8a7882de5bbdb39c9c1d74297a9613aa28463f.tar.gz emacs-ba8a7882de5bbdb39c9c1d74297a9613aa28463f.tar.bz2 emacs-ba8a7882de5bbdb39c9c1d74297a9613aa28463f.zip |
Add a <a id=...> skeleton to html-mode
* lisp/textmodes/sgml-mode.el (html-id-anchor): New skeleton
and keystroke (bug#37651).
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/sgml-mode.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index d8210037c6d..f75ce905472 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1801,6 +1801,7 @@ This takes effect when first loading the library.") (define-key map "\C-c\C-cl" 'html-list-item) (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-c#" 'html-id-anchor) (define-key map "\C-c\C-ci" 'html-image) (when html-quick-keys (define-key map "\C-c-" 'html-horizontal-rule) @@ -1812,6 +1813,7 @@ This takes effect when first loading the library.") (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-c#" 'html-id-anchor) (define-key map "\C-ci" 'html-image) (define-key map "\C-cs" 'html-span)) (define-key map "\C-c\C-s" 'html-autoview-mode) @@ -1839,6 +1841,7 @@ This takes effect when first loading the library.") (define-key menu-map "i" '("Image" . html-image)) (define-key menu-map "h" '("Href Anchor" . html-href-anchor)) (define-key menu-map "n" '("Name Anchor" . html-name-anchor)) + (define-key menu-map "#" '("ID Anchor" . html-id-anchor)) map) "Keymap for commands for use in HTML mode.") @@ -2451,6 +2454,11 @@ HTML Autoview mode is a buffer-local minor mode for use with (if sgml-xml-mode (concat " id=\"" str "\"")) ">" _ "</a>") +(define-skeleton html-id-anchor + "HTML anchor tag with id attribute." + "ID: " + "<a id=\"" str "\">" _ "</a>") + (define-skeleton html-headline-1 "HTML level 1 headline tags." nil |