From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#7509: 24.0.50; doc for `comment-style' and `comment-styles' Date: Tue, 30 Nov 2010 14:36:41 -0800 Message-ID: <27E6B536A09248629C372671995E7E97@us.oracle.com> References: <9166F5772B0D414D84ECE3808ECD3964@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291174438 24419 80.91.229.12 (1 Dec 2010 03:33:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 03:33:58 +0000 (UTC) Cc: 7509@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 01 04:33:51 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 1PNdRy-0008R9-BB for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Dec 2010 04:33:46 +0100 Original-Received: from localhost ([127.0.0.1]:56316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNdRx-0006Mw-MF for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Nov 2010 22:33:45 -0500 Original-Received: from [140.186.70.92] (port=53675 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNdRn-0002OT-6m for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 22:33:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNYwZ-0003vq-58 for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 17:45:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNYwZ-0003vX-1u for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 17:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PNYjy-0007Gc-B4; Tue, 30 Nov 2010 17:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" 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 22:32: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.129115630827911 (code B ref 7509); Tue, 30 Nov 2010 22:32:02 +0000 Original-Received: (at 7509) by debbugs.gnu.org; 30 Nov 2010 22:31:48 +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 1PNYjj-0007G8-Cn for submit@debbugs.gnu.org; Tue, 30 Nov 2010 17:31:47 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNYjh-0007Fw-5k for 7509@debbugs.gnu.org; Tue, 30 Nov 2010 17:31:45 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oAUMbKxo028153 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Nov 2010 22:37:22 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oAUBucOP027936; Tue, 30 Nov 2010 22:37:19 GMT Original-Received: from abhmt004.oracle.com by acsmt353.oracle.com with ESMTP id 828862081291156601; Tue, 30 Nov 2010 14:36:41 -0800 Original-Received: from dradamslap1 (/10.159.217.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 30 Nov 2010 14:36:41 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcuQ2vK+868ZSwtfRMK4wQAx7gV50gAAE0jA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 30 Nov 2010 17:32: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:42017 Archived-At: > > I came across some variable definition weirdness (unrelated to this > > bug): > > I must say I have no idea how you got into such a mess. My only > explanation would be that some part of the patch did not > apply properly. No, I did not mean to suggest that this had anything to do with your patch. (And I just "applied" the patch by hand editing.) > AFAIK, none of those things occur in my usage. I won't worry about it. If I have time I'll report it. I don't have the time now. > > What's the magic to competely undo a defcustom or defconst > > - `makunbound' doesn't seem to be enough. > > There's no such magic. Are you saying that `makunbound' should take care of it? It's pretty easy to see at least some of the problems, I think. Put these in different files: (defcustom foo 1 "The first definition" :type 'integer) (defcustom foo 2 "The second definition" :type 'integer) Then eval the first, then the second, then maybe the first again, using C-M-x. Use C-h v and see if you don't see at least the wrong file name mentioned at some points. I do right away, using the latest Windows binary (built today by Sean) and emacs -Q. But all this is outside of bug #7509. I didn't mean to suggest it had anything to do with your patch. > From memory: feel free to test them in a C-mode buffer. I'll go by your memory. Someone can correct them later if your memory isn't perfect. > plain: > /* blabla */ > /* bla */ > > indent > /* blabla */ > /* bla */ > > multi-line > /* blabla > * bla */ > > extra-line > /* > * blabla > * bla > */ > > aligned > /* blabla */ > /* bla */ > > box > /**********/ > /* blabla */ > /* bla */ > /**********/ > > box-multi > /********** > * blabla * > * bla * > **********/ > > When comment-end is the empty string, > indent=multi-line=extra-line=aligned and box=box-multi. Thanks. That helps a lot. Below are some suggestions. Also, it wouldn't hurt to include such tiny diagrams in the doc string for `comment-styles' (esp. since it is a defconst). In this case, a set of pictures is worth more than a set of one-liner descriptions. BTW, why are all of the various possibilities (align, extra, box etc.) defined only for indented comments? plain - Start in column 0 (do not indent) indent - Full comment per line, ends not aligned aligned - Full comment per line, ends aligned box - Full comment per line, ends aligned, + top and bottom extra-line - One comment for all lines, end on a line by itself multi-line - One comment for all lines, end on last commented line box-multi - One comment for all lines, + top and bottom And the descriptions make more sense if presented in this order, IMO. The doc string for `comment-styles' can also point out: 1. That all except for `plain' indent the comment to the current indent level. 2. That when `comment-end' is empty... Those general rules help understanding and recollection. HTH.