unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3473: [PATCH] sgml-tag-help fixes for HTML mode
@ 2009-06-05  4:48 ` Aaron S. Hawley
  2009-10-18  4:15   ` bug#3473: marked as done ([PATCH] sgml-tag-help fixes for HTML mode) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron S. Hawley @ 2009-06-05  4:48 UTC (permalink / raw)
  To: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 4421 bytes --]

I noticed that `C-c ?' in HTML mode doesn't work as it is described in
the Emacs manual, and for a few of the tags that it supports.  Some of
the tags lacked descriptions, notably DIV and SPAN.  The patch below
tries to rectify both of these.

Here's the Emacs manual's description of `C-c ?':

`C-c ? TAG <RET>'
     Display a description of the meaning of tag TAG (`sgml-tag-help').
     If the argument TAG is empty, describe the tag at point.

Thanks for Emacs,
/a

Index: sgml-mode.el
===================================================================
2009-06-05  Aaron S. Hawley  <aaron.s.hawley@gmail.com>

        * textmodes/sgml-mode.el (sgml-tag-help): Prompt user for tag as
        the documentation describes.
        (html-tag-alist, html-tag-help): Add descriptions for undocumented
        entries and make note of obsolete tags.

--- sgml-mode.el        9 Jan 2009 04:19:12 -0000       1.139
+++ sgml-mode.el        5 Jun 2009 04:31:18 -0000
@@ -720,8 +720,10 @@

 (defun sgml-tag-help (&optional tag)
   "Display description of tag TAG.  If TAG is omitted, use the tag at point."
-  (interactive)
-  (or tag
+  (interactive
+   (list (completing-read "Tag: "
+                         sgml-tag-alist nil nil nil 'sgml-tag-history)))
+  (or (and tag (> (length tag) 0))
       (save-excursion
        (if (eq (following-char) ?<)
            (forward-char))
@@ -1731,7 +1733,7 @@
       ("array" (nil \n
                    ("Item: " "<item>" str (if sgml-xml-mode "</item>") \n))
        "align")
-      ("au")
+      ("au") ;; Cite an author.
       ("b")
       ("big")
       ("blink")
@@ -1755,7 +1757,7 @@
       ("dt" (t _ (if sgml-xml-mode "</dt>")
              "<dd>" (if sgml-xml-mode "</dd>") \n))
       ("em")
-      ;("fn" "id" "fn")  ; ???
+      ("fn" "id" "fn")  ;; Footnotes were deprecated in HTML 3.2
       ("head" \n)
       ("html" (\n
               "<head>\n"
@@ -1777,7 +1779,7 @@
       ("nobr")
       ("option" t ("value") ("label") ("selected" t))
       ("over" t)
-      ("person")
+      ("person") ;; Tag for person's name tag deprecated in HTML 3.2
       ("pre" \n)
       ("q")
       ("rev")
@@ -1809,11 +1811,11 @@
 (defvar html-tag-help
   `(,@sgml-tag-help
     ("a" . "Anchor of point or link elsewhere")
-    ("abbrev" . "?")
-    ("acronym" . "?")
+    ("abbrev" . "Abbreviation")
+    ("acronym" . "Acronym")
     ("address" . "Formatted mail address")
     ("array" . "Math array")
-    ("au" . "?")
+    ("au" . "Author")
     ("b" . "Bold face")
     ("base" . "Base address for URLs")
     ("big" . "Font size")
@@ -1828,9 +1830,10 @@
     ("cite" . "Citation of a document")
     ("code" . "Formatted source code")
     ("dd" . "Definition of term")
-    ("del" . "?")
-    ("dfn" . "?")
+    ("del" . "Deleted text")
+    ("dfn" . "Defining instance of a term")
     ("dir" . "Directory list (obsolete)")
+    ("div" . "Generic block-level container")
     ("dl" . "Definition list")
     ("dt" . "Term to be definined")
     ("em" . "Emphasized")
@@ -1839,7 +1842,7 @@
     ("figa" . "Figure anchor")
     ("figd" . "Figure description")
     ("figt" . "Figure text")
-    ;("fn" . "?")  ; ???
+    ("fn" . "Footnote") ;; No one supports special footnote rendering.
     ("font" . "Font size")
     ("form" . "Form with input fields")
     ("group" . "Document grouping")
@@ -1855,7 +1858,7 @@
     ("i" . "Italic face")
     ("img" . "Graphic image")
     ("input" . "Form input field")
-    ("ins" . "?")
+    ("ins" . "Inserted text")
     ("isindex" . "Input field for index search")
     ("kbd" . "Keybard example face")
     ("lang" . "Natural language")
@@ -1871,15 +1874,16 @@
     ("over" . "Math fraction rule")
     ("p" . "Paragraph start")
     ("panel" . "Floating panel")
-    ("person" . "?")
+    ("person" . "Person's name") ;; Originally for people harvesting.
     ("pre" . "Preformatted fixed width text")
-    ("q" . "?")
+    ("q" . "Quotation")
     ("rev" . "Reverse video")
-    ("s" . "?")
+    ("s" . "Strikeout")
     ("samp" . "Sample text")
     ("select" . "Selection list")
     ("small" . "Font size")
     ("sp" . "Nobreak space")
+    ("span" . "Generic inline container")
     ("strong" . "Standout text")
     ("sub" . "Subscript")
     ("sup" . "Superscript")

-- 
In general, we reserve the right to have a poor
memory--the computer, however, is supposed to
remember!  Poor computer.  -- Guy Lewis Steele Jr.

[-- Attachment #2: sgml-mode.el.diff --]
[-- Type: application/octet-stream, Size: 3703 bytes --]

Index: sgml-mode.el
===================================================================
2009-06-05  Aaron S. Hawley  <aaron.s.hawley@gmail.com>

	* textmodes/sgml-mode.el (sgml-tag-help): Prompt user for tag as
	the documentation describes.
	(html-tag-alist, html-tag-help): Add descriptions for undocumented
	entries and make note of obsolete tags.

--- sgml-mode.el	9 Jan 2009 04:19:12 -0000	1.139
+++ sgml-mode.el	5 Jun 2009 04:31:18 -0000
@@ -720,8 +720,10 @@
 
 (defun sgml-tag-help (&optional tag)
   "Display description of tag TAG.  If TAG is omitted, use the tag at point."
-  (interactive)
-  (or tag
+  (interactive
+   (list (completing-read "Tag: "
+			  sgml-tag-alist nil nil nil 'sgml-tag-history)))
+  (or (and tag (> (length tag) 0))
       (save-excursion
 	(if (eq (following-char) ?<)
 	    (forward-char))
@@ -1731,7 +1733,7 @@
       ("array" (nil \n
 		    ("Item: " "<item>" str (if sgml-xml-mode "</item>") \n))
        "align")
-      ("au")
+      ("au") ;; Cite an author.
       ("b")
       ("big")
       ("blink")
@@ -1755,7 +1757,7 @@
       ("dt" (t _ (if sgml-xml-mode "</dt>")
              "<dd>" (if sgml-xml-mode "</dd>") \n))
       ("em")
-      ;("fn" "id" "fn")  ; ???
+      ("fn" "id" "fn")  ;; Footnotes were deprecated in HTML 3.2
       ("head" \n)
       ("html" (\n
 	       "<head>\n"
@@ -1777,7 +1779,7 @@
       ("nobr")
       ("option" t ("value") ("label") ("selected" t))
       ("over" t)
-      ("person")
+      ("person") ;; Tag for person's name tag deprecated in HTML 3.2
       ("pre" \n)
       ("q")
       ("rev")
@@ -1809,11 +1811,11 @@
 (defvar html-tag-help
   `(,@sgml-tag-help
     ("a" . "Anchor of point or link elsewhere")
-    ("abbrev" . "?")
-    ("acronym" . "?")
+    ("abbrev" . "Abbreviation")
+    ("acronym" . "Acronym")
     ("address" . "Formatted mail address")
     ("array" . "Math array")
-    ("au" . "?")
+    ("au" . "Author")
     ("b" . "Bold face")
     ("base" . "Base address for URLs")
     ("big" . "Font size")
@@ -1828,9 +1830,10 @@
     ("cite" . "Citation of a document")
     ("code" . "Formatted source code")
     ("dd" . "Definition of term")
-    ("del" . "?")
-    ("dfn" . "?")
+    ("del" . "Deleted text")
+    ("dfn" . "Defining instance of a term")
     ("dir" . "Directory list (obsolete)")
+    ("div" . "Generic block-level container")
     ("dl" . "Definition list")
     ("dt" . "Term to be definined")
     ("em" . "Emphasized")
@@ -1839,7 +1842,7 @@
     ("figa" . "Figure anchor")
     ("figd" . "Figure description")
     ("figt" . "Figure text")
-    ;("fn" . "?")  ; ???
+    ("fn" . "Footnote") ;; No one supports special footnote rendering.
     ("font" . "Font size")
     ("form" . "Form with input fields")
     ("group" . "Document grouping")
@@ -1855,7 +1858,7 @@
     ("i" . "Italic face")
     ("img" . "Graphic image")
     ("input" . "Form input field")
-    ("ins" . "?")
+    ("ins" . "Inserted text")
     ("isindex" . "Input field for index search")
     ("kbd" . "Keybard example face")
     ("lang" . "Natural language")
@@ -1871,15 +1874,16 @@
     ("over" . "Math fraction rule")
     ("p" . "Paragraph start")
     ("panel" . "Floating panel")
-    ("person" . "?")
+    ("person" . "Person's name") ;; Originally for people harvesting.
     ("pre" . "Preformatted fixed width text")
-    ("q" . "?")
+    ("q" . "Quotation")
     ("rev" . "Reverse video")
-    ("s" . "?")
+    ("s" . "Strikeout")
     ("samp" . "Sample text")
     ("select" . "Selection list")
     ("small" . "Font size")
     ("sp" . "Nobreak space")
+    ("span" . "Generic inline container")
     ("strong" . "Standout text")
     ("sub" . "Subscript")
     ("sup" . "Superscript")

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#3473: marked as done ([PATCH] sgml-tag-help fixes for HTML mode)
  2009-06-05  4:48 ` bug#3473: [PATCH] sgml-tag-help fixes for HTML mode Aaron S. Hawley
@ 2009-10-18  4:15   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-10-18  4:15 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

Your message dated Sun, 18 Oct 2009 00:07:22 -0400
with message-id <87pr8lcpl1.fsf@stupidchicken.com>
and subject line Re: [PATCH] sgml-tag-help fixes for HTML mode
has caused the Emacs bug report #3473,
regarding [PATCH] sgml-tag-help fixes for HTML mode
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3473: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3473
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 12620 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 4421 bytes --]

I noticed that `C-c ?' in HTML mode doesn't work as it is described in
the Emacs manual, and for a few of the tags that it supports.  Some of
the tags lacked descriptions, notably DIV and SPAN.  The patch below
tries to rectify both of these.

Here's the Emacs manual's description of `C-c ?':

`C-c ? TAG <RET>'
     Display a description of the meaning of tag TAG (`sgml-tag-help').
     If the argument TAG is empty, describe the tag at point.

Thanks for Emacs,
/a

Index: sgml-mode.el
===================================================================
2009-06-05  Aaron S. Hawley  <aaron.s.hawley@gmail.com>

        * textmodes/sgml-mode.el (sgml-tag-help): Prompt user for tag as
        the documentation describes.
        (html-tag-alist, html-tag-help): Add descriptions for undocumented
        entries and make note of obsolete tags.

--- sgml-mode.el        9 Jan 2009 04:19:12 -0000       1.139
+++ sgml-mode.el        5 Jun 2009 04:31:18 -0000
@@ -720,8 +720,10 @@

 (defun sgml-tag-help (&optional tag)
   "Display description of tag TAG.  If TAG is omitted, use the tag at point."
-  (interactive)
-  (or tag
+  (interactive
+   (list (completing-read "Tag: "
+                         sgml-tag-alist nil nil nil 'sgml-tag-history)))
+  (or (and tag (> (length tag) 0))
       (save-excursion
        (if (eq (following-char) ?<)
            (forward-char))
@@ -1731,7 +1733,7 @@
       ("array" (nil \n
                    ("Item: " "<item>" str (if sgml-xml-mode "</item>") \n))
        "align")
-      ("au")
+      ("au") ;; Cite an author.
       ("b")
       ("big")
       ("blink")
@@ -1755,7 +1757,7 @@
       ("dt" (t _ (if sgml-xml-mode "</dt>")
              "<dd>" (if sgml-xml-mode "</dd>") \n))
       ("em")
-      ;("fn" "id" "fn")  ; ???
+      ("fn" "id" "fn")  ;; Footnotes were deprecated in HTML 3.2
       ("head" \n)
       ("html" (\n
               "<head>\n"
@@ -1777,7 +1779,7 @@
       ("nobr")
       ("option" t ("value") ("label") ("selected" t))
       ("over" t)
-      ("person")
+      ("person") ;; Tag for person's name tag deprecated in HTML 3.2
       ("pre" \n)
       ("q")
       ("rev")
@@ -1809,11 +1811,11 @@
 (defvar html-tag-help
   `(,@sgml-tag-help
     ("a" . "Anchor of point or link elsewhere")
-    ("abbrev" . "?")
-    ("acronym" . "?")
+    ("abbrev" . "Abbreviation")
+    ("acronym" . "Acronym")
     ("address" . "Formatted mail address")
     ("array" . "Math array")
-    ("au" . "?")
+    ("au" . "Author")
     ("b" . "Bold face")
     ("base" . "Base address for URLs")
     ("big" . "Font size")
@@ -1828,9 +1830,10 @@
     ("cite" . "Citation of a document")
     ("code" . "Formatted source code")
     ("dd" . "Definition of term")
-    ("del" . "?")
-    ("dfn" . "?")
+    ("del" . "Deleted text")
+    ("dfn" . "Defining instance of a term")
     ("dir" . "Directory list (obsolete)")
+    ("div" . "Generic block-level container")
     ("dl" . "Definition list")
     ("dt" . "Term to be definined")
     ("em" . "Emphasized")
@@ -1839,7 +1842,7 @@
     ("figa" . "Figure anchor")
     ("figd" . "Figure description")
     ("figt" . "Figure text")
-    ;("fn" . "?")  ; ???
+    ("fn" . "Footnote") ;; No one supports special footnote rendering.
     ("font" . "Font size")
     ("form" . "Form with input fields")
     ("group" . "Document grouping")
@@ -1855,7 +1858,7 @@
     ("i" . "Italic face")
     ("img" . "Graphic image")
     ("input" . "Form input field")
-    ("ins" . "?")
+    ("ins" . "Inserted text")
     ("isindex" . "Input field for index search")
     ("kbd" . "Keybard example face")
     ("lang" . "Natural language")
@@ -1871,15 +1874,16 @@
     ("over" . "Math fraction rule")
     ("p" . "Paragraph start")
     ("panel" . "Floating panel")
-    ("person" . "?")
+    ("person" . "Person's name") ;; Originally for people harvesting.
     ("pre" . "Preformatted fixed width text")
-    ("q" . "?")
+    ("q" . "Quotation")
     ("rev" . "Reverse video")
-    ("s" . "?")
+    ("s" . "Strikeout")
     ("samp" . "Sample text")
     ("select" . "Selection list")
     ("small" . "Font size")
     ("sp" . "Nobreak space")
+    ("span" . "Generic inline container")
     ("strong" . "Standout text")
     ("sub" . "Subscript")
     ("sup" . "Superscript")

-- 
In general, we reserve the right to have a poor
memory--the computer, however, is supposed to
remember!  Poor computer.  -- Guy Lewis Steele Jr.

[-- Attachment #2.1.2: sgml-mode.el.diff --]
[-- Type: application/octet-stream, Size: 3703 bytes --]

Index: sgml-mode.el
===================================================================
2009-06-05  Aaron S. Hawley  <aaron.s.hawley@gmail.com>

	* textmodes/sgml-mode.el (sgml-tag-help): Prompt user for tag as
	the documentation describes.
	(html-tag-alist, html-tag-help): Add descriptions for undocumented
	entries and make note of obsolete tags.

--- sgml-mode.el	9 Jan 2009 04:19:12 -0000	1.139
+++ sgml-mode.el	5 Jun 2009 04:31:18 -0000
@@ -720,8 +720,10 @@
 
 (defun sgml-tag-help (&optional tag)
   "Display description of tag TAG.  If TAG is omitted, use the tag at point."
-  (interactive)
-  (or tag
+  (interactive
+   (list (completing-read "Tag: "
+			  sgml-tag-alist nil nil nil 'sgml-tag-history)))
+  (or (and tag (> (length tag) 0))
       (save-excursion
 	(if (eq (following-char) ?<)
 	    (forward-char))
@@ -1731,7 +1733,7 @@
       ("array" (nil \n
 		    ("Item: " "<item>" str (if sgml-xml-mode "</item>") \n))
        "align")
-      ("au")
+      ("au") ;; Cite an author.
       ("b")
       ("big")
       ("blink")
@@ -1755,7 +1757,7 @@
       ("dt" (t _ (if sgml-xml-mode "</dt>")
              "<dd>" (if sgml-xml-mode "</dd>") \n))
       ("em")
-      ;("fn" "id" "fn")  ; ???
+      ("fn" "id" "fn")  ;; Footnotes were deprecated in HTML 3.2
       ("head" \n)
       ("html" (\n
 	       "<head>\n"
@@ -1777,7 +1779,7 @@
       ("nobr")
       ("option" t ("value") ("label") ("selected" t))
       ("over" t)
-      ("person")
+      ("person") ;; Tag for person's name tag deprecated in HTML 3.2
       ("pre" \n)
       ("q")
       ("rev")
@@ -1809,11 +1811,11 @@
 (defvar html-tag-help
   `(,@sgml-tag-help
     ("a" . "Anchor of point or link elsewhere")
-    ("abbrev" . "?")
-    ("acronym" . "?")
+    ("abbrev" . "Abbreviation")
+    ("acronym" . "Acronym")
     ("address" . "Formatted mail address")
     ("array" . "Math array")
-    ("au" . "?")
+    ("au" . "Author")
     ("b" . "Bold face")
     ("base" . "Base address for URLs")
     ("big" . "Font size")
@@ -1828,9 +1830,10 @@
     ("cite" . "Citation of a document")
     ("code" . "Formatted source code")
     ("dd" . "Definition of term")
-    ("del" . "?")
-    ("dfn" . "?")
+    ("del" . "Deleted text")
+    ("dfn" . "Defining instance of a term")
     ("dir" . "Directory list (obsolete)")
+    ("div" . "Generic block-level container")
     ("dl" . "Definition list")
     ("dt" . "Term to be definined")
     ("em" . "Emphasized")
@@ -1839,7 +1842,7 @@
     ("figa" . "Figure anchor")
     ("figd" . "Figure description")
     ("figt" . "Figure text")
-    ;("fn" . "?")  ; ???
+    ("fn" . "Footnote") ;; No one supports special footnote rendering.
     ("font" . "Font size")
     ("form" . "Form with input fields")
     ("group" . "Document grouping")
@@ -1855,7 +1858,7 @@
     ("i" . "Italic face")
     ("img" . "Graphic image")
     ("input" . "Form input field")
-    ("ins" . "?")
+    ("ins" . "Inserted text")
     ("isindex" . "Input field for index search")
     ("kbd" . "Keybard example face")
     ("lang" . "Natural language")
@@ -1871,15 +1874,16 @@
     ("over" . "Math fraction rule")
     ("p" . "Paragraph start")
     ("panel" . "Floating panel")
-    ("person" . "?")
+    ("person" . "Person's name") ;; Originally for people harvesting.
     ("pre" . "Preformatted fixed width text")
-    ("q" . "?")
+    ("q" . "Quotation")
     ("rev" . "Reverse video")
-    ("s" . "?")
+    ("s" . "Strikeout")
     ("samp" . "Sample text")
     ("select" . "Selection list")
     ("small" . "Font size")
     ("sp" . "Nobreak space")
+    ("span" . "Generic inline container")
     ("strong" . "Standout text")
     ("sub" . "Subscript")
     ("sup" . "Superscript")

[-- Attachment #3: Type: message/rfc822, Size: 1862 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: "Aaron S. Hawley" <aaron.s.hawley@gmail.com>
Cc: 3473-done@emacsbugs.donarmstrong.com
Subject: Re: [PATCH] sgml-tag-help fixes for HTML mode
Date: Sun, 18 Oct 2009 00:07:22 -0400
Message-ID: <87pr8lcpl1.fsf@stupidchicken.com>

> I noticed that `C-c ?' in HTML mode doesn't work as it is described in
> the Emacs manual, and for a few of the tags that it supports.  Some of
> the tags lacked descriptions, notably DIV and SPAN.  The patch below
> tries to rectify both of these.

Thanks, and sorry for the late reply.  I've checked in your patch, with
minor modifications (adding a default argument to completing read).

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-18  4:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87pr8lcpl1.fsf@stupidchicken.com>
2009-06-05  4:48 ` bug#3473: [PATCH] sgml-tag-help fixes for HTML mode Aaron S. Hawley
2009-10-18  4:15   ` bug#3473: marked as done ([PATCH] sgml-tag-help fixes for HTML mode) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).