From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Newsgroups: gmane.emacs.bugs Subject: bug#23297: [PATCH] Add HTML5 tags to HTML mode Date: Fri, 15 Apr 2016 17:43:27 +0200 Message-ID: <1460735007.2242.3@smtp.gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-4CvRIXXG8k5JcQKSV/Vi" X-Trace: ger.gmane.org 1460735064 13499 80.91.229.3 (15 Apr 2016 15:44:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Apr 2016 15:44:24 +0000 (UTC) Cc: Stefan Monnier To: 23297@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 15 17:44:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ar5um-0008De-C0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Apr 2016 17:44:12 +0200 Original-Received: from localhost ([::1]:36546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar5ul-0002iu-TK for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Apr 2016 11:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar5ug-0002e2-7F for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 11:44:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ar5uc-00040R-4E for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 11:44:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar5uc-00040N-0o for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 11:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ar5ub-0004Ps-SG for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 11:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Apr 2016 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23297 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146073502516939 (code B ref -1); Fri, 15 Apr 2016 15:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Apr 2016 15:43:45 +0000 Original-Received: from localhost ([127.0.0.1]:36885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ar5uK-0004P9-SL for submit@debbugs.gnu.org; Fri, 15 Apr 2016 11:43:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ar5uJ-0004Ot-GP for submit@debbugs.gnu.org; Fri, 15 Apr 2016 11:43:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ar5uD-0003vR-3e for submit@debbugs.gnu.org; Fri, 15 Apr 2016 11:43:38 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar5uC-0003vK-W6 for submit@debbugs.gnu.org; Fri, 15 Apr 2016 11:43:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar5uB-0001kZ-Fi for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 11:43:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ar5u7-0003uC-DC for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 11:43:35 -0400 Original-Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:38191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar5u7-0003tt-0p for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 11:43:31 -0400 Original-Received: by mail-wm0-x231.google.com with SMTP id u206so38134514wme.1 for ; Fri, 15 Apr 2016 08:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:cc:message-id:mime-version; bh=pRduAab0ZqNQLJSUwzkJ/XpsJOjEOBW+Cuxp1BIk1C8=; b=j7TCN+RAB96vDsv6Rv1kla4BPjWAnOdmaqMCc6063r/dyUQnX8XwaKazWTW4GLbs40 NYFcRroQ8HMt7TJlhajCmq2YydB9WwChGo+/U1sHNFPzpdtRNHoqj6vg0DRo/N00vGYH pIGs+8ptfRo60s8iWjnHnA0axJXqD/RTrTp3p4MEqjPFVhQJJ61MvSzjKdDqlxoNyYm1 Lq1b0tkFNe0PXj5YhFKDB+F4ViL3DjddplAXbIrYHbVLz2+/vHY4fzIcY7TgzG//JiBy 55PCnS2kbnfj+6WivZwcUI/sDJtmgMIke0gdj0HQ7a2XmVL4gPSzuV5Mh44GhSCRvFiN HzyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:subject:to:cc:message-id:mime-version; bh=pRduAab0ZqNQLJSUwzkJ/XpsJOjEOBW+Cuxp1BIk1C8=; b=dPkChw2QuDCIvg+GLq9bq/OsJXmtwxYfbI9vA2IyvuZo6HV3v9dlhPaF7kVkZo13a3 OMU/Mu5G7Ojwha2RB8two3tJtOS/+tdqGi/dT/OBr2/dIW+ExkrnzMayG3grvuXwFowx sZhfmJvzaY9voyWsxczSnvs2/U9I9Afc8X94tOci80Vk3i6KNzKdGWV8H1CoTl6NwyM6 n078WXoyw1CQytOLQWQUGFK9D3ZO8Ieexl82hqI/ZbK+EcXU8UNiyb8ynwX9Uw4R//z+ mCpdkJ4niUk/6GnnojYNrAFdBWbJG1vC5aEbp0GEZyTokWzwmsro2uI2+TpszIHW+7yd upHg== X-Gm-Message-State: AOPr4FVFnm9wWHEAqNmabsEHCQbZV30haaoU457LFm83cPewZPA593oF+IiLG4W5EFyWqw== X-Received: by 10.194.170.201 with SMTP id ao9mr11163283wjc.100.1460735010177; Fri, 15 Apr 2016 08:43:30 -0700 (PDT) Original-Received: from [192.168.101.25] ([77.40.215.202]) by smtp.gmail.com with ESMTPSA id kj9sm49653008wjb.14.2016.04.15.08.43.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Apr 2016 08:43:29 -0700 (PDT) X-Mailer: geary/0.10.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116508 Archived-At: --=-4CvRIXXG8k5JcQKSV/Vi Content-Type: multipart/alternative; boundary="=-+mh/DA+PnshLA9VEwyc0" --=-+mh/DA+PnshLA9VEwyc0 Content-Type: text/plain; charset=utf-8; format=flowed The attached patch adds a bunch of HTML5 tags to `html-tag-alist' and descriptions of those to `html-tag-help'. This will benefit CSS mode in the future, since I'm planning to let it use `html-tag-alist' to provide completion candidates for HTML tags in CSS selectors. -- Simen --=-+mh/DA+PnshLA9VEwyc0 Content-Type: text/html; charset=utf-8
The attached patch adds a bunch of HTML5 tags to `html-tag-alist' and
descriptions of those to `html-tag-help'.

This will benefit CSS mode in the future, since I'm planning to let it
use `html-tag-alist' to provide completion candidates for HTML tags in
CSS selectors.

-- Simen
--=-+mh/DA+PnshLA9VEwyc0-- --=-4CvRIXXG8k5JcQKSV/Vi Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-HTML5-tags-to-HTML-mode.patch >From 2030bca157d51df4ddc3e5c3e4d14f30d9061f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Fri, 15 Apr 2016 17:36:10 +0200 Subject: [PATCH] Add HTML5 tags to HTML mode * lisp/textmodes/sgml-mode.el (html-tag-alist): Add HTML5 tags. (html-tag-help): Add short descriptions of those tags. --- lisp/textmodes/sgml-mode.el | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 0937c00..990c09b 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1818,6 +1818,8 @@ html-tag-alist ("col" t ,@cellhalign ,@cellvalign ("span") ("width")) ("colgroup" \n ,@cellhalign ,@cellvalign ("span") ("width")) ("dir" ,@list) + ("figcaption") + ("figure" \n) ("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7) ("form" (\n _ \n "" ">")) @@ -1872,7 +1874,13 @@ html-tag-alist ("article" \n) ("aside" \n) ("au") + ("audio" \n + ("src") ("crossorigin" ("anonymous") ("use-credentials")) + ("preload" ("none") ("metadata") ("auto")) + ("autoplay" "autoplay") ("mediagroup") ("loop" "loop") + ("muted" "muted") ("controls" "controls")) ("b") + ("bdi") ("bdo" nil ("lang") ("dir" ("ltr") ("rtl"))) ("big") ("blink") @@ -1885,10 +1893,12 @@ html-tag-alist ("type" ("submit") ("reset") ("button")) ("disabled" "disabled") ("tabindex") ("accesskey") ("onfocus") ("onblur")) + ("canvas" \n ("width") ("height")) ("caption" ("valign" ("top") ("bottom"))) ("center" \n) ("cite") ("code" \n) + ("datalist" \n) ("dd" ,(not sgml-xml-mode)) ("del" nil ("cite") ("datetime")) ("dfn") @@ -1900,6 +1910,7 @@ html-tag-alist ("dt" (t _ (if sgml-xml-mode "") "
" (if sgml-xml-mode "
") \n)) ("em") + ("embed" t ("src") ("type") ("width") ("height")) ("fieldset" \n) ("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2 ("footer" \n) @@ -1928,9 +1939,13 @@ html-tag-alist ("lang") ("legend" nil ("accesskey")) ("li" ,(not sgml-xml-mode)) + ("main" \n) ("map" \n ("name")) + ("mark") ("math" \n) ("meta" t ("http-equiv") ("name") ("content") ("scheme")) + ("meter" nil ("value") ("min") ("max") ("low") ("high") + ("optimum")) ("nav" \n) ("nobr") ("noframes" \n) @@ -1942,18 +1957,24 @@ html-tag-alist ("disabled" "disabled") ("tabindex") ("onfocus") ("onblur") ("onchange")) ("option" t ("value") ("label") ("selected" t)) + ("output" nil ("for") ("form") ("name")) ("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) + ("progress" nil ("value") ("max")) ("q" nil ("cite")) ("rev") + ("rp" t) + ("rt" t) + ("ruby") ("s") ("samp") ("script" nil ("charset") ("type") ("src") ("defer" "defer")) ("section" \n) ("small") + ("source" t ("src") ("type") ("media")) ("span" nil ("class" ("builtin") @@ -1968,12 +1989,23 @@ html-tag-alist ("strong") ("style" \n ("type") ("media") ("title")) ("sub") + ("summary") ("sup") + ("time" nil ("datetime")) ("title") ("tr" t) + ("track" t + ("kind" ("subtitles") ("captions") ("descriptions") + ("chapters") ("metadata")) + ("src") ("srclang") ("label") ("default")) ("tt") ("u") ("var") + ("video" \n + ("src") ("crossorigin" ("anonymous") ("use-credentials")) + ("poster") ("preload" ("none") ("metadata") ("auto")) + ("autoplay" "autoplay") ("mediagroup") ("loop" "loop") + ("muted" "muted") ("controls" "controls") ("width") ("height")) ("wbr" t))) "Value of `sgml-tag-alist' for HTML mode.") @@ -1988,8 +2020,10 @@ html-tag-help ("article" . "An independent part of document or site") ("aside" . "Secondary content related to surrounding content (e.g. page or article)") ("au" . "Author") + ("audio" . "Sound or audio stream") ("b" . "Bold face") ("base" . "Base address for URLs") + ("bdi" . "Text isolated for bidirectional formatting") ("bdo" . "Override text directionality") ("big" . "Font size") ("blink" . "Blinking text") @@ -1998,6 +2032,7 @@ html-tag-help ("box" . "Math fraction") ("br" . "Line break") ("button" . "Clickable button") + ("canvas" . "Script generated graphics canvas") ("caption" . "Table caption") ("center" . "Centered text") ("changed" . "Change bars") @@ -2005,6 +2040,7 @@ html-tag-help ("code" . "Formatted source code") ("col" . "Group of attribute specifications for table columns") ("colgroup" . "Group of columns") + ("datalist" . "A set of predefined options") ("dd" . "Definition of term") ("del" . "Deleted text") ("dfn" . "Defining instance of a term") @@ -2017,8 +2053,10 @@ html-tag-help ("fieldset" . "Group of related controls and labels") ("fig" . "Figure") ("figa" . "Figure anchor") + ("figcaption" . "Caption for a figure") ("figd" . "Figure description") ("figt" . "Figure text") + ("figure" . "Self-contained content, often with a caption") ("fn" . "Footnote") ;; No one supports special footnote rendering. ("font" . "Font size") ("footer" . "Footer of a section") @@ -2049,10 +2087,13 @@ html-tag-help ("legend" . "Caption for a fieldset") ("li" . "List item") ("link" . "Link relationship") + ("main" . "Main content of the document body") ("map" . "Image map (a clickable link area") + ("mark" . "Highlighted text") ("math" . "Math formula") ("menu" . "List of commands") ("meta" . "Document properties") + ("meter" . "Scalar measurement within a known range") ("mh" . "Form mail header") ("nav" . "Group of navigational links") ("nextid" . "Allocate new id") @@ -2063,25 +2104,32 @@ html-tag-help ("ol" . "Ordered list") ("optgroup" . "Group of options") ("option" . "Selection list item") + ("output" . "Result of a calculation or user action") ("over" . "Math fraction rule") ("p" . "Paragraph start") ("panel" . "Floating panel") ("param" . "Parameters for an object") ("person" . "Person's name") ("pre" . "Preformatted fixed width text") + ("progress" . "Completion progress of a task") ("q" . "Quotation") ("rev" . "Reverse video") + ("rp" . "Fallback text for when ruby annotations aren't supported") + ("rt" . "Ruby text component of a ruby annotation") + ("ruby" . "Ruby annotation") ("s" . "Strikeout") ("samp" . "Sample text") ("script" . "Executable script within a document") ("section" . "Section of a document") ("select" . "Selection list") ("small" . "Font size") + ("source" . "Media resource for media elements") ("sp" . "Nobreak space") ("span" . "Generic inline container") ("strong" . "Standout text") ("style" . "Style information") ("sub" . "Subscript") + ("summary" . "Summary, caption, or legend") ("sup" . "Superscript") ("table" . "Table with rows and columns") ("tb" . "Table vertical break") @@ -2091,12 +2139,15 @@ html-tag-help ("tfoot" . "Table foot") ("th" . "Table header cell") ("thead" . "Table head") + ("time" . "Content with optional machine-readable timestamp") ("title" . "Document title") ("tr" . "Table row separator") + ("track" . "Timed text track for media elements") ("tt" . "Typewriter face") ("u" . "Underlined text") ("ul" . "Unordered list") ("var" . "Math variable face") + ("video" . "Video or movie") ("wbr" . "Enable
within ")) "Value of variable `sgml-tag-help' for HTML mode.") -- 2.8.0.rc3 --=-4CvRIXXG8k5JcQKSV/Vi--