From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?UHJ6ZW15c8WCYXcgV29qbm93c2tp?= Newsgroups: gmane.emacs.devel Subject: [PATCH] Add basic HTML5 support to sgml-mode Date: Tue, 28 Apr 2015 19:18:47 +0200 Message-ID: <553FC0F7.7080603@cumego.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080807070508030005090504" X-Trace: ger.gmane.org 1430241565 19303 80.91.229.3 (28 Apr 2015 17:19:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2015 17:19:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 28 19:19:16 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Yn9A6-000250-IZ for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2015 19:19:10 +0200 Original-Received: from localhost ([::1]:35148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn9A5-0004Ul-Vt for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2015 13:19:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn99r-0004Ug-Pl for emacs-devel@gnu.org; Tue, 28 Apr 2015 13:18:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn99m-0003hu-Ld for emacs-devel@gnu.org; Tue, 28 Apr 2015 13:18:55 -0400 Original-Received: from smtp23.iq.pl ([86.111.242.228]:37897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn99m-0003eJ-AT for emacs-devel@gnu.org; Tue, 28 Apr 2015 13:18:50 -0400 Original-Received: (qmail 29258 invoked from network); 28 Apr 2015 17:18:47 -0000 Original-Received: from unknown (HELO [192.168.1.106]) (esperanto@cumego.com@[159.205.25.146]) (envelope-sender ) by smtp23.iq.pl with AES128-SHA encrypted SMTP for ; 28 Apr 2015 17:18:47 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.111.242.228 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185977 Archived-At: This is a multi-part message in MIME format. --------------080807070508030005090504 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hello everybody, The patch adds support for basic HTML5 tags and two templates: navigational links and HTML5 initial page. Cheers, Przemysław --------------080807070508030005090504 Content-Type: text/x-patch; name="0001-Add-basic-HTML5-tags-and-a-template.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Add-basic-HTML5-tags-and-a-template.patch" >From 7c6dd4ba9d349a977080055896eac6639891bbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Wojnowski?= Date: Tue, 28 Apr 2015 19:10:01 +0200 Subject: [PATCH] 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. --- lisp/textmodes/sgml-mode.el | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index c71ecb4..2ffe9c1 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.") ("array" (nil \n ("Item: " "" str (if sgml-xml-mode "") \n)) "align") + ("article" \n) + ("aside" \n) ("au") ("b") ("big") @@ -1853,7 +1855,10 @@ This takes effect when first loading the library.") "
" (if sgml-xml-mode "
") \n)) ("em") ("fn" "id" "fn") ;; Footnotes were deprecated in HTML 3.2 + ("footer" \n) ("head" \n) + ("header" \n) + ("hgroup" \n) ("html" (\n "\n" "" (setq str (read-input "Title: ")) "\n" @@ -1871,6 +1876,7 @@ This takes effect when first loading the library.") ("lang") ("li" ,(not sgml-xml-mode)) ("math" \n) + ("nav" \n) ("nobr") ("option" t ("value") ("label") ("selected" t)) ("over" t) @@ -1880,6 +1886,7 @@ This takes effect when first loading the library.") ("rev") ("s") ("samp") + ("section" \n) ("small") ("span" nil ("class" @@ -1910,6 +1917,8 @@ This takes effect when first loading the library.") ("acronym" . "Acronym") ("address" . "Formatted mail address") ("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") @@ -1939,6 +1948,7 @@ This takes effect when first loading the library.") ("figt" . "Figure text") ("fn" . "Footnote") ;; No one supports special footnote rendering. ("font" . "Font size") + ("footer" . "Footer of a section") ("form" . "Form with input fields") ("group" . "Document grouping") ("h1" . "Most important section headline") @@ -1948,6 +1958,8 @@ This takes effect when first loading the library.") ("h5" . "Unimportant section headline") ("h6" . "Least important section headline") ("head" . "Document header") + ("header" . "Header of a section") + ("hgroup" . "Group of headings - h1-h6 elements") ("hr" . "Horizontal rule") ("html" . "HTML Document") ("i" . "Italic face") @@ -1960,8 +1972,9 @@ This takes effect when first loading the library.") ("li" . "List item") ("link" . "Link relationship") ("math" . "Math formula") - ("menu" . "Menu list (obsolete)") + ("menu" . "List of commands") ("mh" . "Form mail header") + ("nav" . "Group of navigational links") ("nextid" . "Allocate new id") ("nobr" . "Text without line break") ("ol" . "Ordered list") @@ -1975,6 +1988,7 @@ This takes effect when first loading the library.") ("rev" . "Reverse video") ("s" . "Strikeout") ("samp" . "Sample text") + ("section" . "Section of a document") ("select" . "Selection list") ("small" . "Font size") ("sp" . "Nobreak space") @@ -2242,6 +2256,33 @@ HTML Autoview mode is a buffer-local minor mode for use with ""))) \n)) +(define-skeleton html-navigational-links + "Group of navigational links." + nil + "") + +(define-skeleton html-html5-template + "Initial HTML5 template" + nil + "" \n + "" \n + "" \n + "" \n + "" \n + "" \n + "" (skeleton-read "Page Title: ") "" \n + "" \n + "" \n + "
" \n + "" \n + "") + (provide 'sgml-mode) ;;; sgml-mode.el ends here -- 2.1.0 --------------080807070508030005090504--