From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#7509: 24.0.50; doc for `comment-style' and `comment-styles' Date: Tue, 30 Nov 2010 13:15:35 -0500 Message-ID: References: <9166F5772B0D414D84ECE3808ECD3964@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291183424 19724 80.91.229.12 (1 Dec 2010 06:03:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 06:03:44 +0000 (UTC) Cc: 7509@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 01 07:03:40 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PNfn1-0007qO-5X for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Dec 2010 07:03:39 +0100 Original-Received: from localhost ([127.0.0.1]:58862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNfn0-0008Bv-Aj for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Dec 2010 01:03:38 -0500 Original-Received: from [140.186.70.92] (port=53568 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNdwh-0002Nz-2K for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 23:05:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNVCI-0008Vm-V5 for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 13:45:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNVCI-0008VW-Ro for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 13:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PNUfO-0001Yx-32; Tue, 30 Nov 2010 13:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Nov 2010 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7509 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7509-submit@debbugs.gnu.org id=B7509.12911406055941 (code B ref 7509); Tue, 30 Nov 2010 18:11:02 +0000 Original-Received: (at 7509) by debbugs.gnu.org; 30 Nov 2010 18:10:05 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNUeS-0001Xm-I8 for submit@debbugs.gnu.org; Tue, 30 Nov 2010 13:10:04 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNUeQ-0001XG-50 for 7509@debbugs.gnu.org; Tue, 30 Nov 2010 13:10:02 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id oAUIFaeB016919; Tue, 30 Nov 2010 13:15:37 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id C667BA85ED; Tue, 30 Nov 2010 13:15:35 -0500 (EST) In-Reply-To: (Drew Adams's message of "Sun, 28 Nov 2010 14:49:30 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3695=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 30 Nov 2010 13:11:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42023 Archived-At: 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)