朝顔日記

html+-mode のカスタマイズ

2002-12-09

昨晩はあまりにも早く寝たため夜中に目が覚めてごそごそしていました。で、また寝て、また起きました。おはようございます。:p)

私の table の師匠(謎)でもある U-Z さんが、あくび 12月で、html+-modeのカスタマイズ例を御紹介くださいました。ありがとうございます。

御紹介いただいたカスタマイズ例
補完リストに入れていても殆ど手打ちだったりするという噂 @ Hello World!!! 2001年10月16日

それを参考にいじった私のカスタマイズは、以下の通りです。


(defvar *html+-guess-list*
  ; めちゃめちゃてきとー且つ自己充足的です
  '((""
     . ("html"))
    ("html"
     . ("head" "body"))
    ("head"
     . ("title"))
    ("body"
     . ("p" "div" "dl" "ul" "ol" "blockquote" "h2" "h3" "table" "h1"))
    ("blockquote"
     . ("p" "div" "dl" "ul" "ol" "blockquote" "table"))
    ("p"
     . ("strong" "em" "span" "code"))
    ("div"
     . ("p" "div" "dl" "ul" "ol" "blockquote" "pre" "table"))
    ("table"
     . ("tr" "tbody" "thead" "tfoot" "caption" "col id=\"\" /" "colgroup"))
    ("colgroup"
     . ("col id=\"\" /"))
    ("thead"
     . ("tr"))
    ("tbody"
     . ("tr"))
    ("tfoot"
     . ("tr"))
    ("tr"
     . ("td" "th"))
    ("dl"
     . ("dt" "dd"))
    ("ul"
     . ("li" "ul" "ol"))
    ("ol"
     . ("li" "ol" "ul")))
  "html+-mode: 状況依存したタグの候補")

さすがに師匠(私が勝手にそう思っているだけですが)、table 回りが充実していていい感じです。ありがとうございます。

「html+-mode のカスタマイズ」へコメントをつける

書き込み時の挙動について
URI らしき文字列には自動的にリンクが張られます。また "<" や、">" は実体参照化されます。
スパム対策のため、リファラを切っていると投稿できません。

この記事へのツッコミ

1: orz (2005-09-21T13:19:36+09:00)
(defvar *html+-guess-list*
'(
(""
. ("html"))
("html"
. ("head" "body"))
("head"
. ("title" "base" "script" "style" "meta" "link" "object"))
("body"
. ("p" "h1" "h2" "h3" "h4" "h5" "h6" "ul" "ol" "pre" "dl" "div" "noscript" "blockquote" "form" "hr" "table" "fieldset" "address" "ins" "del"))
("p"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
2: orz 2 (2005-09-21T13:20:21+09:00)
("h1"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("h2"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("h3"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("h4"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
3: orz 3 (2005-09-21T13:20:47+09:00)
("h5"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("h6"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("ul"
. ("li"))
("ol"
. ("li"))
("li"
. ("p" "h1" "h2" "h3" "h4" "h5" "h6" "ul" "ol" "pre" "dl" "div" "noscript" "blockquote" "form" "hr" "table" "fieldset" "address" "ins" "del"
"em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
4: orz 4 (2005-09-21T13:21:32+09:00)
("pre"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("dl"
. ("dt" "dd"))
("dt"
. ("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("dd"
. ("p" "h1" "h2" "h3" "h4" "h5" "h6" "ul" "ol" "pre" "dl" "div" "noscript" "blockquote" "form" "hr" "table" "fieldset" "address" "ins" "del"
"em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
5: orz 5 (2005-09-21T13:21:52+09:00)
("div"
. ("p" "h1" "h2" "h3" "h4" "h5" "h6" "ul" "ol" "pre" "dl" "div" "noscript" "blockquote" "form" "hr" "table" "fieldset" "address" "ins" "del"
"em" "strong" "dfn" "code" "samp" "kbd" "var" "cite" "abbr" "acronym" "a" "img" "object" "br" "script" "map" "q" "sub" "sup" "span" "bdo" "input" "select" "textarea" "label" "button"))
("noscript"
. ("p" "h1" "h2" "h3" "h4" "h5" "h6" "ul" "ol" "pre" "dl" "div" "noscript" "blockquote" "form" "hr" "table" "fieldset" "address" "ins" "del"))
("blockquote"
. ("p" "h1" "h2" "h3" "h4" "h5" "h6" "ul" "ol" "pre" "dl" "div" "noscript" "blockquote" "form" "hr" "table" "fieldset" "address" "ins" "del"))
6: orz 5 (2005-09-21T13:22:42+09:00)
長すぎやめた
7: のり (2005-09-21T18:13:37+09:00)
結局現在では、デフォルト設定で使うようになりました。:p)
この記事の永続的 URI ならびに トラックバック ping URI
http://diary.noasobi.net/2002/12/diary_021209c.html