From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.bugs Subject: Re: bug#1756: awk-mode: An empty line is not a paragraph separator (should be) Date: Wed, 07 Jan 2009 18:32:56 +0200 Message-ID: <87fxjvt6tj.fsf@iki.fi> References: <87sko35t3u.fsf@iki.fi> <20090105183502.GC2501@muc.de> <87hc4dbnua.fsf@iki.fi> <20090106161541.GB5612@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1231346034 4790 80.91.229.12 (7 Jan 2009 16:33:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Jan 2009 16:33:54 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, 1756@emacsbugs.donarmstrong.com To: bug-cc-mode@gnu.org Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Wed Jan 07 17:35:04 2009 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists.sourceforge.net ([216.34.181.88]) by lo.gmane.org with esmtp (Exim 4.50) id 1LKbMr-0006zu-2Z for sf-cc-mode-help@m.gmane.org; Wed, 07 Jan 2009 17:34:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by 235xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1LKbLW-0000OD-BZ; Wed, 07 Jan 2009 16:33:30 +0000 Original-Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by 235xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1LKbLV-0000O4-IW for cc-mode-help@lists.sourceforge.net; Wed, 07 Jan 2009 16:33:29 +0000 X-ACL-Warn: Original-Received: from fencepost.gnu.org ([140.186.70.10]) by 1b2kzd1.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1LKbLN-0007hH-TU for cc-mode-help@lists.sourceforge.net; Wed, 07 Jan 2009 16:33:29 +0000 Original-Received: from mx10.gnu.org ([199.232.76.166]:44833) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LKbK9-0004n8-SK for bug-cc-mode@gnu.org; Wed, 07 Jan 2009 11:32:05 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LKbLH-0005X8-Jh for bug-cc-mode@gnu.org; Wed, 07 Jan 2009 11:33:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Original-Received: from mta-out.inet.fi ([195.156.147.13]:36515 helo=jenni2.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LKbLG-0005W3-Ut; Wed, 07 Jan 2009 11:33:15 -0500 Original-Received: from mithlond.arda.local (80.220.180.181) by jenni2.inet.fi (8.5.014) id 48FC5A88036C4565; Wed, 7 Jan 2009 18:32:59 +0200 Original-Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1LKbKy-00041i-KR; Wed, 07 Jan 2009 18:32:56 +0200 In-Reply-To: <20090106161541.GB5612@muc.de> (Alan Mackenzie's message of "Tue\, 6 Jan 2009 16\:15\:41 +0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Spam-Score: -4.0 (----) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [140.186.70.10 listed in list.dnswl.org] X-Headers-End: 1LKbLN-0007hH-TU X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:5283 gmane.emacs.bugs:23878 Archived-At: Alan Mackenzie (2009-01-06 16:15 +0000) wrote: >> After "C-c . awk RET" it changes to this: > >> "[ \t]*\\(\\(#+\\)[ \t]*\\)?$\\|^\f" > ^^ > >> Even though I chose to override the style settings "#*" changes to "#+". > > I don't think this is a bug. You asked for "awk" style to be set on the > buffer, and this is exactly what you got. Well, I asked that, but I had also explicitly asked to override style settings (through the customize interface). My opinion is that the current behavior is so confusing that it's either a bug or simply wrong design decision. I don't mean to complain too loudly, though. See below. > I am guessing that the cause is in the fine CC Mode manual, [...] > [...] perhaps it would be better if amended something like this: > > When you initialize the buffer, the settings are made in the > following order. So if you make conflicting settings in several of > these ways, the way that takes precedence is the one that appears > latest in the list(2): > > Style > Top-level command or "customization interface" > Hook > File Style > ---------- Footnotes ---------- > (2) If you later call `c-set-style' (C-c .), all the style variables > will get set to the style you select. > > What do you think? Well, my real opinion first: User's explicit "override style settings" setting should just do that: override style settings no matter what style changes the user does while editing the buffer. For example, user may want to choose certain custom comment prefix settings and, while editing the code, she may want to experiment with different style settings or convert the code from one style to another. Logically, if she wants to get comment prefix settings from a pre-defined style she chooses "Use style settings" (c-comment-prefix-regexp). If she wants to use her own comment prefix she chooses "Override style settings". I think this is the most intuitive behaviour. Currently user can only override style settings for the initial style state. But if you choose to maintain the current behaviour anyway, then I'd say that the changes you suggested for the documentation are very good. I'd also suggest to change the documentation of c-comment-prefix-regexp variable so that it tells how the variable effects in the practice. Anyway, the empty-line bug is the main thing. If that bug in Awk mode gets fixed (you already did with that patch) then there shouldn't be much need for changing comment prefixes in the first place. So I'm really more on the "thank you" side than on "complaining" side. :-) ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB