aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrzemysław Wojnowski2015-04-28 19:10:01 +0200
committerDmitry Gutov2015-05-10 20:56:45 +0300
commit0c81a8bfdefdc7e7ee687f6cce51649c9e808876 (patch)
tree1df74d7bac84bb37b9a240172ee0216dd606d6f6
parentec13f4b344fc8f840647209137e29be470143969 (diff)
downloademacs-0c81a8bfdefdc7e7ee687f6cce51649c9e808876.tar.gz
emacs-0c81a8bfdefdc7e7ee687f6cce51649c9e808876.zip
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.
-rw-r--r--lisp/textmodes/sgml-mode.el43
1 files changed, 42 insertions, 1 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index c71ecb4d7a0..2ffe9c1e7ed 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -1828,6 +1828,8 @@ This takes effect when first loading the library.")
1828 ("array" (nil \n 1828 ("array" (nil \n
1829 ("Item: " "<item>" str (if sgml-xml-mode "</item>") \n)) 1829 ("Item: " "<item>" str (if sgml-xml-mode "</item>") \n))
1830 "align") 1830 "align")
1831 ("article" \n)
1832 ("aside" \n)
1831 ("au") 1833 ("au")
1832 ("b") 1834 ("b")
1833 ("big") 1835 ("big")
@@ -1853,7 +1855,10 @@ This takes effect when first loading the library.")
1853 "<dd>" (if sgml-xml-mode "</dd>") \n)) 1855 "<dd>" (if sgml-xml-mode "</dd>") \n))
1854 ("em") 1856 ("em")
1855 ("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2 1857 ("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2
1858 ("footer" \n)
1856 ("head" \n) 1859 ("head" \n)
1860 ("header" \n)
1861 ("hgroup" \n)
1857 ("html" (\n 1862 ("html" (\n
1858 "<head>\n" 1863 "<head>\n"
1859 "<title>" (setq str (read-input "Title: ")) "</title>\n" 1864 "<title>" (setq str (read-input "Title: ")) "</title>\n"
@@ -1871,6 +1876,7 @@ This takes effect when first loading the library.")
1871 ("lang") 1876 ("lang")
1872 ("li" ,(not sgml-xml-mode)) 1877 ("li" ,(not sgml-xml-mode))
1873 ("math" \n) 1878 ("math" \n)
1879 ("nav" \n)
1874 ("nobr") 1880 ("nobr")
1875 ("option" t ("value") ("label") ("selected" t)) 1881 ("option" t ("value") ("label") ("selected" t))
1876 ("over" t) 1882 ("over" t)
@@ -1880,6 +1886,7 @@ This takes effect when first loading the library.")
1880 ("rev") 1886 ("rev")
1881 ("s") 1887 ("s")
1882 ("samp") 1888 ("samp")
1889 ("section" \n)
1883 ("small") 1890 ("small")
1884 ("span" nil 1891 ("span" nil
1885 ("class" 1892 ("class"
@@ -1910,6 +1917,8 @@ This takes effect when first loading the library.")
1910 ("acronym" . "Acronym") 1917 ("acronym" . "Acronym")
1911 ("address" . "Formatted mail address") 1918 ("address" . "Formatted mail address")
1912 ("array" . "Math array") 1919 ("array" . "Math array")
1920 ("article" . "An independent part of document or site")
1921 ("aside" . "Secondary content related to surrounding content (e.g. page or article)")
1913 ("au" . "Author") 1922 ("au" . "Author")
1914 ("b" . "Bold face") 1923 ("b" . "Bold face")
1915 ("base" . "Base address for URLs") 1924 ("base" . "Base address for URLs")
@@ -1939,6 +1948,7 @@ This takes effect when first loading the library.")
1939 ("figt" . "Figure text") 1948 ("figt" . "Figure text")
1940 ("fn" . "Footnote") ;; No one supports special footnote rendering. 1949 ("fn" . "Footnote") ;; No one supports special footnote rendering.
1941 ("font" . "Font size") 1950 ("font" . "Font size")
1951 ("footer" . "Footer of a section")
1942 ("form" . "Form with input fields") 1952 ("form" . "Form with input fields")
1943 ("group" . "Document grouping") 1953 ("group" . "Document grouping")
1944 ("h1" . "Most important section headline") 1954 ("h1" . "Most important section headline")
@@ -1948,6 +1958,8 @@ This takes effect when first loading the library.")
1948 ("h5" . "Unimportant section headline") 1958 ("h5" . "Unimportant section headline")
1949 ("h6" . "Least important section headline") 1959 ("h6" . "Least important section headline")
1950 ("head" . "Document header") 1960 ("head" . "Document header")
1961 ("header" . "Header of a section")
1962 ("hgroup" . "Group of headings - h1-h6 elements")
1951 ("hr" . "Horizontal rule") 1963 ("hr" . "Horizontal rule")
1952 ("html" . "HTML Document") 1964 ("html" . "HTML Document")
1953 ("i" . "Italic face") 1965 ("i" . "Italic face")
@@ -1960,8 +1972,9 @@ This takes effect when first loading the library.")
1960 ("li" . "List item") 1972 ("li" . "List item")
1961 ("link" . "Link relationship") 1973 ("link" . "Link relationship")
1962 ("math" . "Math formula") 1974 ("math" . "Math formula")
1963 ("menu" . "Menu list (obsolete)") 1975 ("menu" . "List of commands")
1964 ("mh" . "Form mail header") 1976 ("mh" . "Form mail header")
1977 ("nav" . "Group of navigational links")
1965 ("nextid" . "Allocate new id") 1978 ("nextid" . "Allocate new id")
1966 ("nobr" . "Text without line break") 1979 ("nobr" . "Text without line break")
1967 ("ol" . "Ordered list") 1980 ("ol" . "Ordered list")
@@ -1975,6 +1988,7 @@ This takes effect when first loading the library.")
1975 ("rev" . "Reverse video") 1988 ("rev" . "Reverse video")
1976 ("s" . "Strikeout") 1989 ("s" . "Strikeout")
1977 ("samp" . "Sample text") 1990 ("samp" . "Sample text")
1991 ("section" . "Section of a document")
1978 ("select" . "Selection list") 1992 ("select" . "Selection list")
1979 ("small" . "Font size") 1993 ("small" . "Font size")
1980 ("sp" . "Nobreak space") 1994 ("sp" . "Nobreak space")
@@ -2242,6 +2256,33 @@ HTML Autoview mode is a buffer-local minor mode for use with
2242 ""))) 2256 "")))
2243 \n)) 2257 \n))
2244 2258
2259(define-skeleton html-navigational-links
2260 "Group of navigational links."
2261 nil
2262 "<nav>" \n
2263 "<ul>" \n
2264 "<li><a href=\"" (skeleton-read "URL: " "#") "\">"
2265 (skeleton-read "Title: ") "</a>"
2266 (if sgml-xml-mode (if sgml-xml-mode "</li>")) \n
2267 "</ul>" \n
2268 "</nav>")
2269
2270(define-skeleton html-html5-template
2271 "Initial HTML5 template"
2272 nil
2273 "<!DOCTYPE html>" \n
2274 "<html lang=\"en\">" \n
2275 "<head>" \n
2276 "<meta charset=\"utf-8\">" \n
2277 "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">" \n
2278 "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">" \n
2279 "<title>" (skeleton-read "Page Title: ") "</title>" \n
2280 "</head>" \n
2281 "<body>" \n
2282 "<div id=\"app\"></div>" \n
2283 "</body>" \n
2284 "</html>")
2285
2245(provide 'sgml-mode) 2286(provide 'sgml-mode)
2246 2287
2247;;; sgml-mode.el ends here 2288;;; sgml-mode.el ends here