From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: c-submode-indicators at wrong place in minor-mode-alist Date: Thu, 15 Dec 2005 15:40:47 -0500 Message-ID: <87bqzinm0i.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134679468 6987 80.91.229.2 (15 Dec 2005 20:44:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 20:44:28 +0000 (UTC) Cc: Nick Roberts , bug-cc-mode@gnu.org, emacs-devel@gnu.org Original-X-From: cc-mode-help-admin@lists.sourceforge.net Thu Dec 15 21:44:24 2005 Return-path: Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmzvQ-0003Bv-QJ for sf-cc-mode-help@m.gmane.org; Thu, 15 Dec 2005 21:42:05 +0100 Original-Received: from sc8-sf-list1-b.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 12F5C123B7; Thu, 15 Dec 2005 12:42:04 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1Emzug-0005hh-1b for cc-mode-help@lists.sourceforge.net; Thu, 15 Dec 2005 12:41:18 -0800 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtps (TLSv1:DES-CBC3-SHA:168) (Exim 4.44) id 1Emzuf-0001eQ-IA for cc-mode-help@lists.sourceforge.net; Thu, 15 Dec 2005 12:41:18 -0800 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.34) id 1EmztD-0004sQ-CH for bug-cc-mode@gnu.org; Thu, 15 Dec 2005 15:39:47 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1EmzxM-0004Zb-Rs for bug-cc-mode@gnu.org; Thu, 15 Dec 2005 15:44:15 -0500 Original-Received: from [209.226.175.97] (helo=tomts40-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmzxL-0004YW-7u; Thu, 15 Dec 2005 15:44:04 -0500 Original-Received: from alfajor ([65.92.242.250]) by tomts40-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20051215204047.MGBO5216.tomts40-srv.bellnexxia.net@alfajor>; Thu, 15 Dec 2005 15:40:47 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 63F78D7611; Thu, 15 Dec 2005 15:40:47 -0500 (EST) Original-To: Alan Mackenzie In-Reply-To: (Alan Mackenzie's message of "Thu, 15 Dec 2005 14:25:19 +0000 (GMT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Originating-IP: [0] X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python X-Spam-Level: X-Spam-Status: No, hits=0.1 required=5.0 tests=RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 1.0 X_ORIG_IP_NOT_IPV4 X-Originating-IP doesn't look like IPv4 address Original-Sender: cc-mode-help-admin@lists.sourceforge.net Errors-To: cc-mode-help-admin@lists.sourceforge.net X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Unsubscribe: , List-Id: Bug reports, feature requests, and general talk about CC Mode. List-Post: List-Help: List-Subscribe: , List-Archive: X-Original-Date: Thu, 15 Dec 2005 15:40:47 -0500 Xref: news.gmane.org gmane.emacs.cc-mode.general:2802 gmane.emacs.devel:47814 Archived-At: >> > After opening a C file and activating smerge-mode, I get a modeline >> > that reads: >> > >> > ............... (C SMerge/l Fly Abbrev) >> > >> > The /l comes from c-submode-indicators and has nothing to do >> > with SMerge. >> > The problem is that SMerge was loaded after C mode was turned on so it >> > ended up in front of c-submode-indicators in minor-mode-alist. >> > I think that c-submode-indicators should either be put in >> > mode-line-process, or that c-mode sets mode-name to '("C" >> > c-submode-indicators). > Problem Acknowledged. Thanks, and sorry 'bout forgetting bug-cc-mode. > CC Mode has a convention that defuns/variables with doc strings are part > of the API (i.e. things like line-up functions and derived modes are > "permitted" to use them), but those without doc strings are "internal", > i.e. subject to arbitrary change/disappearance between CC Mode versions. I must say I dislike this convention. Docstrings are also very convenient for hacking on the code, debugging, etc... where you definitely do not want to be limited to the "official API". Another convention would be preferable. Some packages use "foo-bar" vs "foo--bar" to make the distinction (that's also what I tend to use), others use "foo-bar" vs "Foo-bar", ..., you can invent your own. Note also that in practice the "official API" changes anyway. And even for the non-official "API", when you change it you often find out that you still need to add backward-compatibility cruft because someone didn't stick to your "official API" (and this someone's package is sufficiently important and won't be updated soon enough). > for Emacs 19.34), getting a steady compilation environment (so that byte > compilation will do the Right Thing regardless of what's loaded in the > Emacs Lisp space) or for language variables. And as we've seen countless times here, including one occurrence very recently, this is a losing battle. It just makes it harder for an external casual hacker (e.g. myself) to debug your code. [ speaking as someone who's suffered trying to understand why some change in the macro-expansion code completely broken the cc-require horror. ] > It is also fair to point out that a great deal of CC Mode (cc-engine.el, > cc-cmds.el, ...) is written in "standard" Elisp. Indeed. And a very useful piece of code on top of that. Stefan ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click