all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 7509@debbugs.gnu.org
Subject: bug#7509: 24.0.50; doc for `comment-style' and `comment-styles'
Date: Tue, 30 Nov 2010 13:15:35 -0500	[thread overview]
Message-ID: <jwvbp56smqx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <DEAC438297F545708052B31A3A37615D@us.oracle.com> (Drew Adams's message of "Sun, 28 Nov 2010 14:49:30 -0800")

Can you try the patch below and tell us if it addresses your problem
(I'm not that happy with the doc for some of those styles, so if you
have suggestions for improvements, I'm all ears).


        Stefan
        
        
=== modified file 'lisp/newcomment.el'
--- lisp/newcomment.el	2010-10-22 13:45:31 +0000
+++ lisp/newcomment.el	2010-11-29 18:26:11 +0000
@@ -187,16 +187,18 @@
 it is 1 so that regions are commented with two or three semi-colons.")
 
 (defconst comment-styles
-  '((plain	. (nil nil nil nil))
-    (indent	. (nil nil nil t))
+  '((plain    nil nil nil nil "Comment in column 0"))
+    (indent   nil nil nil t "Indented as code"))
     (indent-or-triple
-                . (nil nil nil multi-char))
-    (aligned	. (nil t nil t))
-    (multi-line	. (t nil nil t))
-    (extra-line	. (t nil t t))
-    (box	. (nil t t t))
-    (box-multi	. (t t t t)))
-  "Comment region styles of the form (STYLE . (MULTI ALIGN EXTRA INDENT)).
+                nil nil nil multi-char "Indent only multi-char starters"))
+    (aligned	nil t nil t "Indented and with closers aligned"))
+    (multi-line	t nil nil t "Use multi-line comments"))
+    (extra-line	t nil t   t "Multi-line with starter&ender on their own line"))
+    (box	nil t t   t "Wrap comments in boxes"))
+    (box-multi	t   t t   t "Boxes using multi-line comments")))
+  "Comment region style definitions.
+Each style is defined with a form (STYLE . (MULTI ALIGN EXTRA INDENT DOC)).
+DOC should succinctly describe the style.
 STYLE should be a mnemonic symbol.
 MULTI specifies that comments are allowed to span multiple lines.
 ALIGN specifies that the `comment-end' markers should be aligned.
@@ -210,7 +212,8 @@
 (defcustom comment-style 'indent
   "Style to be used for `comment-region'.
 See `comment-styles' for a list of available styles."
-  :type `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles))
+  :type `(choice ,@(mapcar (lambda (s) `(const :tag ,(nth 5 s) ,(car s)))
+                           comment-styles))
   :version "23.1"
   :group 'comment)
 






  reply	other threads:[~2010-11-30 18:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28 19:42 bug#7509: 24.0.50; doc for `comment-style' and `comment-styles' Drew Adams
2010-11-28 21:01 ` Stefan Monnier
2010-11-28 22:34   ` Drew Adams
2010-11-28 22:49     ` Drew Adams
2010-11-30 18:15       ` Stefan Monnier [this message]
2010-11-30 19:13         ` Drew Adams
2010-11-30 22:06           ` Stefan Monnier
2010-11-30 22:36             ` Drew Adams
2010-12-01  2:57               ` Stefan Monnier
2010-12-01  4:10                 ` Drew Adams
2010-12-03 23:16                   ` Stefan Monnier
2010-12-03 23:34                     ` Drew Adams
2010-11-29  1:38     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbp56smqx.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=7509@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.