mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 19:31:02 -08:00
Add basic HTML5 tags and a template
* lisp/textmodes/sgml-mode.el: Basic HTML5 support. (html-tag-alist): Add HTML5 tags. (html-tag-help): Add new tags descriptions. (html-navigational-links): Template for nav links. (html-html5-template): Template for a HTML5 page.
This commit is contained in:
parent
ec13f4b344
commit
0c81a8bfde
1 changed files with 42 additions and 1 deletions
|
|
@ -1828,6 +1828,8 @@ This takes effect when first loading the library.")
|
||||||
("array" (nil \n
|
("array" (nil \n
|
||||||
("Item: " "<item>" str (if sgml-xml-mode "</item>") \n))
|
("Item: " "<item>" str (if sgml-xml-mode "</item>") \n))
|
||||||
"align")
|
"align")
|
||||||
|
("article" \n)
|
||||||
|
("aside" \n)
|
||||||
("au")
|
("au")
|
||||||
("b")
|
("b")
|
||||||
("big")
|
("big")
|
||||||
|
|
@ -1853,7 +1855,10 @@ This takes effect when first loading the library.")
|
||||||
"<dd>" (if sgml-xml-mode "</dd>") \n))
|
"<dd>" (if sgml-xml-mode "</dd>") \n))
|
||||||
("em")
|
("em")
|
||||||
("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2
|
("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2
|
||||||
|
("footer" \n)
|
||||||
("head" \n)
|
("head" \n)
|
||||||
|
("header" \n)
|
||||||
|
("hgroup" \n)
|
||||||
("html" (\n
|
("html" (\n
|
||||||
"<head>\n"
|
"<head>\n"
|
||||||
"<title>" (setq str (read-input "Title: ")) "</title>\n"
|
"<title>" (setq str (read-input "Title: ")) "</title>\n"
|
||||||
|
|
@ -1871,6 +1876,7 @@ This takes effect when first loading the library.")
|
||||||
("lang")
|
("lang")
|
||||||
("li" ,(not sgml-xml-mode))
|
("li" ,(not sgml-xml-mode))
|
||||||
("math" \n)
|
("math" \n)
|
||||||
|
("nav" \n)
|
||||||
("nobr")
|
("nobr")
|
||||||
("option" t ("value") ("label") ("selected" t))
|
("option" t ("value") ("label") ("selected" t))
|
||||||
("over" t)
|
("over" t)
|
||||||
|
|
@ -1880,6 +1886,7 @@ This takes effect when first loading the library.")
|
||||||
("rev")
|
("rev")
|
||||||
("s")
|
("s")
|
||||||
("samp")
|
("samp")
|
||||||
|
("section" \n)
|
||||||
("small")
|
("small")
|
||||||
("span" nil
|
("span" nil
|
||||||
("class"
|
("class"
|
||||||
|
|
@ -1910,6 +1917,8 @@ This takes effect when first loading the library.")
|
||||||
("acronym" . "Acronym")
|
("acronym" . "Acronym")
|
||||||
("address" . "Formatted mail address")
|
("address" . "Formatted mail address")
|
||||||
("array" . "Math array")
|
("array" . "Math array")
|
||||||
|
("article" . "An independent part of document or site")
|
||||||
|
("aside" . "Secondary content related to surrounding content (e.g. page or article)")
|
||||||
("au" . "Author")
|
("au" . "Author")
|
||||||
("b" . "Bold face")
|
("b" . "Bold face")
|
||||||
("base" . "Base address for URLs")
|
("base" . "Base address for URLs")
|
||||||
|
|
@ -1939,6 +1948,7 @@ This takes effect when first loading the library.")
|
||||||
("figt" . "Figure text")
|
("figt" . "Figure text")
|
||||||
("fn" . "Footnote") ;; No one supports special footnote rendering.
|
("fn" . "Footnote") ;; No one supports special footnote rendering.
|
||||||
("font" . "Font size")
|
("font" . "Font size")
|
||||||
|
("footer" . "Footer of a section")
|
||||||
("form" . "Form with input fields")
|
("form" . "Form with input fields")
|
||||||
("group" . "Document grouping")
|
("group" . "Document grouping")
|
||||||
("h1" . "Most important section headline")
|
("h1" . "Most important section headline")
|
||||||
|
|
@ -1948,6 +1958,8 @@ This takes effect when first loading the library.")
|
||||||
("h5" . "Unimportant section headline")
|
("h5" . "Unimportant section headline")
|
||||||
("h6" . "Least important section headline")
|
("h6" . "Least important section headline")
|
||||||
("head" . "Document header")
|
("head" . "Document header")
|
||||||
|
("header" . "Header of a section")
|
||||||
|
("hgroup" . "Group of headings - h1-h6 elements")
|
||||||
("hr" . "Horizontal rule")
|
("hr" . "Horizontal rule")
|
||||||
("html" . "HTML Document")
|
("html" . "HTML Document")
|
||||||
("i" . "Italic face")
|
("i" . "Italic face")
|
||||||
|
|
@ -1960,8 +1972,9 @@ This takes effect when first loading the library.")
|
||||||
("li" . "List item")
|
("li" . "List item")
|
||||||
("link" . "Link relationship")
|
("link" . "Link relationship")
|
||||||
("math" . "Math formula")
|
("math" . "Math formula")
|
||||||
("menu" . "Menu list (obsolete)")
|
("menu" . "List of commands")
|
||||||
("mh" . "Form mail header")
|
("mh" . "Form mail header")
|
||||||
|
("nav" . "Group of navigational links")
|
||||||
("nextid" . "Allocate new id")
|
("nextid" . "Allocate new id")
|
||||||
("nobr" . "Text without line break")
|
("nobr" . "Text without line break")
|
||||||
("ol" . "Ordered list")
|
("ol" . "Ordered list")
|
||||||
|
|
@ -1975,6 +1988,7 @@ This takes effect when first loading the library.")
|
||||||
("rev" . "Reverse video")
|
("rev" . "Reverse video")
|
||||||
("s" . "Strikeout")
|
("s" . "Strikeout")
|
||||||
("samp" . "Sample text")
|
("samp" . "Sample text")
|
||||||
|
("section" . "Section of a document")
|
||||||
("select" . "Selection list")
|
("select" . "Selection list")
|
||||||
("small" . "Font size")
|
("small" . "Font size")
|
||||||
("sp" . "Nobreak space")
|
("sp" . "Nobreak space")
|
||||||
|
|
@ -2242,6 +2256,33 @@ HTML Autoview mode is a buffer-local minor mode for use with
|
||||||
"")))
|
"")))
|
||||||
\n))
|
\n))
|
||||||
|
|
||||||
|
(define-skeleton html-navigational-links
|
||||||
|
"Group of navigational links."
|
||||||
|
nil
|
||||||
|
"<nav>" \n
|
||||||
|
"<ul>" \n
|
||||||
|
"<li><a href=\"" (skeleton-read "URL: " "#") "\">"
|
||||||
|
(skeleton-read "Title: ") "</a>"
|
||||||
|
(if sgml-xml-mode (if sgml-xml-mode "</li>")) \n
|
||||||
|
"</ul>" \n
|
||||||
|
"</nav>")
|
||||||
|
|
||||||
|
(define-skeleton html-html5-template
|
||||||
|
"Initial HTML5 template"
|
||||||
|
nil
|
||||||
|
"<!DOCTYPE html>" \n
|
||||||
|
"<html lang=\"en\">" \n
|
||||||
|
"<head>" \n
|
||||||
|
"<meta charset=\"utf-8\">" \n
|
||||||
|
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">" \n
|
||||||
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">" \n
|
||||||
|
"<title>" (skeleton-read "Page Title: ") "</title>" \n
|
||||||
|
"</head>" \n
|
||||||
|
"<body>" \n
|
||||||
|
"<div id=\"app\"></div>" \n
|
||||||
|
"</body>" \n
|
||||||
|
"</html>")
|
||||||
|
|
||||||
(provide 'sgml-mode)
|
(provide 'sgml-mode)
|
||||||
|
|
||||||
;;; sgml-mode.el ends here
|
;;; sgml-mode.el ends here
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue