mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 18:37:33 +00:00
Add HTML4 tags to HTML mode
* lisp/textmodes/sgml-mode.el (html-tag-alist): Add HTML4 tags. (html-tag-help): Add short descriptions of those tags.
This commit is contained in:
parent
46edc38005
commit
09462b9548
1 changed files with 74 additions and 8 deletions
|
|
@ -1779,11 +1779,12 @@ This takes effect when first loading the library.")
|
|||
"Value of `sgml-display-text' for HTML mode.")
|
||||
|
||||
|
||||
;; should code exactly HTML 3 here when that is finished
|
||||
(defvar html-tag-alist
|
||||
(let* ((1-7 '(("1") ("2") ("3") ("4") ("5") ("6") ("7")))
|
||||
(1-9 `(,@1-7 ("8") ("9")))
|
||||
(align '(("align" ("left") ("center") ("right"))))
|
||||
(ialign '(("align" ("top") ("middle") ("bottom") ("left")
|
||||
("right"))))
|
||||
(valign '(("top") ("middle") ("bottom") ("baseline")))
|
||||
(rel '(("next") ("previous") ("parent") ("subdocument") ("made")))
|
||||
(href '("href" ("ftp:") ("file:") ("finger:") ("gopher:") ("http:")
|
||||
|
|
@ -1796,16 +1797,26 @@ This takes effect when first loading the library.")
|
|||
("title")))
|
||||
(list '((nil \n ("List item: " "<li>" str
|
||||
(if sgml-xml-mode "</li>") \n))))
|
||||
(shape '(("shape" ("rect") ("circle") ("poly") ("default"))))
|
||||
(cell `(t
|
||||
,@align
|
||||
("valign" ,@valign)
|
||||
("colspan" ,@1-9)
|
||||
("rowspan" ,@1-9)
|
||||
("nowrap" t))))
|
||||
("nowrap" t)))
|
||||
(cellhalign '(("align" ("left") ("center") ("right")
|
||||
("justify") ("char"))
|
||||
("char") ("charoff")))
|
||||
(cellvalign '(("valign" ("top") ("middle") ("bottom")
|
||||
("baseline")))))
|
||||
;; put ,-expressions first, else byte-compile chokes (as of V19.29)
|
||||
;; and like this it's more efficient anyway
|
||||
`(("a" ,name ,@link)
|
||||
("area" t ,@shape ("coords") ("href") ("nohref" "nohref") ("alt")
|
||||
("tabindex") ("accesskey") ("onfocus") ("onblur"))
|
||||
("base" t ,@href)
|
||||
("col" t ,@cellhalign ,@cellvalign ("span") ("width"))
|
||||
("colgroup" \n ,@cellhalign ,@cellvalign ("span") ("width"))
|
||||
("dir" ,@list)
|
||||
("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7)
|
||||
("form" (\n _ \n "<input type=\"submit\" value=\"\""
|
||||
|
|
@ -1818,6 +1829,9 @@ This takes effect when first loading the library.")
|
|||
("h5" ,@align)
|
||||
("h6" ,@align)
|
||||
("hr" t ("size" ,@1-9) ("width") ("noshade" t) ,@align)
|
||||
("iframe" \n ,@ialign ("longdesc") ("name") ("src")
|
||||
("frameborder" ("1") ("0")) ("marginwidth") ("marginheight")
|
||||
("scrolling" ("yes") ("no") ("auto")) ("height") ("width"))
|
||||
("img" t ("align" ,@valign ("texttop") ("absmiddle") ("absbottom"))
|
||||
("src") ("alt") ("width" "1") ("height" "1")
|
||||
("border" "1") ("vspace" "1") ("hspace" "1") ("ismap" t))
|
||||
|
|
@ -1839,14 +1853,17 @@ This takes effect when first loading the library.")
|
|||
"<tr><" str ?> _
|
||||
(if sgml-xml-mode (concat "<" str "></tr>")) \n))
|
||||
("border" t ,@1-9) ("width" "10") ("cellpadding"))
|
||||
("tbody" \n ,@cellhalign ,@cellvalign)
|
||||
("td" ,@cell)
|
||||
("textarea" ,name ("rows" ,@1-9) ("cols" ,@1-9))
|
||||
("tfoot" \n ,@cellhalign ,@cellvalign)
|
||||
("th" ,@cell)
|
||||
("thead" \n ,@cellhalign ,@cellvalign)
|
||||
("ul" ,@list ("type" ("disc") ("circle") ("square")))
|
||||
|
||||
,@sgml-tag-alist
|
||||
|
||||
("abbrev")
|
||||
("abbr")
|
||||
("acronym")
|
||||
("address")
|
||||
("array" (nil \n
|
||||
|
|
@ -1856,19 +1873,24 @@ This takes effect when first loading the library.")
|
|||
("aside" \n)
|
||||
("au")
|
||||
("b")
|
||||
("bdo" nil ("lang") ("dir" ("ltr") ("rtl")))
|
||||
("big")
|
||||
("blink")
|
||||
("blockquote" \n)
|
||||
("blockquote" \n ("cite"))
|
||||
("body" \n ("background" ".gif") ("bgcolor" "#") ("text" "#")
|
||||
("link" "#") ("alink" "#") ("vlink" "#"))
|
||||
("box" (nil _ "<over>" _ (if sgml-xml-mode "</over>")))
|
||||
("br" t ("clear" ("left") ("right")))
|
||||
("button" nil ("name") ("value")
|
||||
("type" ("submit") ("reset") ("button"))
|
||||
("disabled" "disabled")
|
||||
("tabindex") ("accesskey") ("onfocus") ("onblur"))
|
||||
("caption" ("valign" ("top") ("bottom")))
|
||||
("center" \n)
|
||||
("cite")
|
||||
("code" \n)
|
||||
("dd" ,(not sgml-xml-mode))
|
||||
("del")
|
||||
("del" nil ("cite") ("datetime"))
|
||||
("dfn")
|
||||
("div")
|
||||
("dl" (nil \n
|
||||
|
|
@ -1878,8 +1900,13 @@ This takes effect when first loading the library.")
|
|||
("dt" (t _ (if sgml-xml-mode "</dt>")
|
||||
"<dd>" (if sgml-xml-mode "</dd>") \n))
|
||||
("em")
|
||||
("fieldset" \n)
|
||||
("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2
|
||||
("footer" \n)
|
||||
("frame" t ("longdesc") ("name") ("src")
|
||||
("frameborder" ("1") ("0")) ("marginwidth") ("marginheight")
|
||||
("noresize" "noresize") ("scrolling" ("yes") ("no") ("auto")))
|
||||
("frameset" \n ("rows") ("cols") ("onload") ("onunload"))
|
||||
("head" \n)
|
||||
("header" \n)
|
||||
("hgroup" \n)
|
||||
|
|
@ -1894,22 +1921,37 @@ This takes effect when first loading the library.")
|
|||
"</body>"
|
||||
))
|
||||
("i")
|
||||
("ins")
|
||||
("ins" nil ("cite") ("datetime"))
|
||||
("isindex" t ("action") ("prompt"))
|
||||
("kbd")
|
||||
("label" nil ("for") ("accesskey") ("onfocus") ("onblur"))
|
||||
("lang")
|
||||
("legend" nil ("accesskey"))
|
||||
("li" ,(not sgml-xml-mode))
|
||||
("map" \n ("name"))
|
||||
("math" \n)
|
||||
("meta" t ("http-equiv") ("name") ("content") ("scheme"))
|
||||
("nav" \n)
|
||||
("nobr")
|
||||
("noframes" \n)
|
||||
("noscript" \n)
|
||||
("object" \n ("declare" "declare") ("classid") ("codebase")
|
||||
("data") ("type") ("codetype") ("archive") ("standby")
|
||||
("height") ("width") ("usemap") ("name") ("tabindex"))
|
||||
("optgroup" \n ("name") ("size") ("multiple" "multiple")
|
||||
("disabled" "disabled") ("tabindex") ("onfocus") ("onblur")
|
||||
("onchange"))
|
||||
("option" t ("value") ("label") ("selected" t))
|
||||
("over" t)
|
||||
("param" t ("name") ("value")
|
||||
("valuetype" ("data") ("ref") ("object")) ("type"))
|
||||
("person") ;; Tag for person's name tag deprecated in HTML 3.2
|
||||
("pre" \n)
|
||||
("q")
|
||||
("q" nil ("cite"))
|
||||
("rev")
|
||||
("s")
|
||||
("samp")
|
||||
("script" nil ("charset") ("type") ("src") ("defer" "defer"))
|
||||
("section" \n)
|
||||
("small")
|
||||
("span" nil
|
||||
|
|
@ -1924,6 +1966,7 @@ This takes effect when first loading the library.")
|
|||
("variable-name")
|
||||
("warning")))
|
||||
("strong")
|
||||
("style" \n ("type") ("media") ("title"))
|
||||
("sub")
|
||||
("sup")
|
||||
("title")
|
||||
|
|
@ -1937,26 +1980,31 @@ This takes effect when first loading the library.")
|
|||
(defvar html-tag-help
|
||||
`(,@sgml-tag-help
|
||||
("a" . "Anchor of point or link elsewhere")
|
||||
("abbrev" . "Abbreviation")
|
||||
("abbr" . "Abbreviation")
|
||||
("acronym" . "Acronym")
|
||||
("address" . "Formatted mail address")
|
||||
("area" . "Region of an image map")
|
||||
("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")
|
||||
("b" . "Bold face")
|
||||
("base" . "Base address for URLs")
|
||||
("bdo" . "Override text directionality")
|
||||
("big" . "Font size")
|
||||
("blink" . "Blinking text")
|
||||
("blockquote" . "Indented quotation")
|
||||
("body" . "Document body")
|
||||
("box" . "Math fraction")
|
||||
("br" . "Line break")
|
||||
("button" . "Clickable button")
|
||||
("caption" . "Table caption")
|
||||
("center" . "Centered text")
|
||||
("changed" . "Change bars")
|
||||
("cite" . "Citation of a document")
|
||||
("code" . "Formatted source code")
|
||||
("col" . "Group of attribute specifications for table columns")
|
||||
("colgroup" . "Group of columns")
|
||||
("dd" . "Definition of term")
|
||||
("del" . "Deleted text")
|
||||
("dfn" . "Defining instance of a term")
|
||||
|
|
@ -1966,6 +2014,7 @@ This takes effect when first loading the library.")
|
|||
("dt" . "Term to be defined")
|
||||
("em" . "Emphasized")
|
||||
("embed" . "Embedded data in foreign format")
|
||||
("fieldset" . "Group of related controls and labels")
|
||||
("fig" . "Figure")
|
||||
("figa" . "Figure anchor")
|
||||
("figd" . "Figure description")
|
||||
|
|
@ -1974,6 +2023,8 @@ This takes effect when first loading the library.")
|
|||
("font" . "Font size")
|
||||
("footer" . "Footer of a section")
|
||||
("form" . "Form with input fields")
|
||||
("frame" . "Frame in which another HTML document can be displayed")
|
||||
("frameset" . "Container for frames")
|
||||
("group" . "Document grouping")
|
||||
("h1" . "Most important section headline")
|
||||
("h2" . "Important section headline")
|
||||
|
|
@ -1987,44 +2038,59 @@ This takes effect when first loading the library.")
|
|||
("hr" . "Horizontal rule")
|
||||
("html" . "HTML Document")
|
||||
("i" . "Italic face")
|
||||
("iframe" . "Inline frame with a nested browsing context")
|
||||
("img" . "Graphic image")
|
||||
("input" . "Form input field")
|
||||
("ins" . "Inserted text")
|
||||
("isindex" . "Input field for index search")
|
||||
("kbd" . "Keyboard example face")
|
||||
("label" . "Caption for a user interface item")
|
||||
("lang" . "Natural language")
|
||||
("legend" . "Caption for a fieldset")
|
||||
("li" . "List item")
|
||||
("link" . "Link relationship")
|
||||
("map" . "Image map (a clickable link area")
|
||||
("math" . "Math formula")
|
||||
("menu" . "List of commands")
|
||||
("meta" . "Document properties")
|
||||
("mh" . "Form mail header")
|
||||
("nav" . "Group of navigational links")
|
||||
("nextid" . "Allocate new id")
|
||||
("nobr" . "Text without line break")
|
||||
("noframes" . "Content for user agents that don't support frames")
|
||||
("noscript" . "Alternate content for when a script isn't executed")
|
||||
("object" . "External resource")
|
||||
("ol" . "Ordered list")
|
||||
("optgroup" . "Group of options")
|
||||
("option" . "Selection list item")
|
||||
("over" . "Math fraction rule")
|
||||
("p" . "Paragraph start")
|
||||
("panel" . "Floating panel")
|
||||
("param" . "Parameters for an object")
|
||||
("person" . "Person's name")
|
||||
("pre" . "Preformatted fixed width text")
|
||||
("q" . "Quotation")
|
||||
("rev" . "Reverse video")
|
||||
("s" . "Strikeout")
|
||||
("samp" . "Sample text")
|
||||
("script" . "Executable script within a document")
|
||||
("section" . "Section of a document")
|
||||
("select" . "Selection list")
|
||||
("small" . "Font size")
|
||||
("sp" . "Nobreak space")
|
||||
("span" . "Generic inline container")
|
||||
("strong" . "Standout text")
|
||||
("style" . "Style information")
|
||||
("sub" . "Subscript")
|
||||
("sup" . "Superscript")
|
||||
("table" . "Table with rows and columns")
|
||||
("tb" . "Table vertical break")
|
||||
("tbody" . "Table body")
|
||||
("td" . "Table data cell")
|
||||
("textarea" . "Form multiline edit area")
|
||||
("tfoot" . "Table foot")
|
||||
("th" . "Table header cell")
|
||||
("thead" . "Table head")
|
||||
("title" . "Document title")
|
||||
("tr" . "Table row separator")
|
||||
("tt" . "Typewriter face")
|
||||
|
|
|
|||
Loading…
Reference in a new issue