From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie 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 14:25:19 +0000 (GMT) Message-ID: References: <17312.47104.983030.315296@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1134669460 3719 80.91.229.2 (15 Dec 2005 17:57:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 17:57:40 +0000 (UTC) Cc: Stefan Monnier , bug-cc-mode@gnu.org, emacs-devel@gnu.org Original-X-From: cc-mode-help-admin@lists.sourceforge.net Thu Dec 15 18:57:29 2005 Return-path: Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmxIL-0000yS-MJ for sf-cc-mode-help@m.gmane.org; Thu, 15 Dec 2005 18:53:34 +0100 Original-Received: from sc8-sf-list1-b.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam1.sourceforge.net (Postfix) with ESMTP id AA8E532DE1; Thu, 15 Dec 2005 09:53:14 -0800 (PST) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1EmxH0-0004CF-FS for cc-mode-help@lists.sourceforge.net; Thu, 15 Dec 2005 09:52:10 -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 1EmxGy-0004Gj-O9 for cc-mode-help@lists.sourceforge.net; Thu, 15 Dec 2005 09:52:10 -0800 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.34) id 1EmxFW-0004e7-N5 for bug-cc-mode@gnu.org; Thu, 15 Dec 2005 12:50:38 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1EmxJl-0007M9-KB for bug-cc-mode@gnu.org; Thu, 15 Dec 2005 12:55:04 -0500 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmxJj-0007Jg-Ul; Thu, 15 Dec 2005 12:55:01 -0500 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id OAA00696; Thu, 15 Dec 2005 14:25:20 GMT X-Sender: root@acm.acm Original-To: Nick Roberts In-Reply-To: <17312.47104.983030.315296@kahikatea.snap.net.nz> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none 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 FORGED_RCVD_HELO Received: contains a forged HELO 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 14:25:19 +0000 (GMT) Xref: news.gmane.org gmane.emacs.cc-mode.general:2800 gmane.emacs.devel:47790 Archived-At: Hi, Nick and Stefan! On Thu, 15 Dec 2005, Nick Roberts wrote: > > 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. >I have also made the following bug report for c-submode-indicators (4th Dec) >but not heard anything, possibly because I didn't cc to bug-cc-mode@gnu.org >last time: Sorry. It's not a matter of arrogant aloofness, I just didn't spot it in the mass of emails in emacs-devel. Always bug CC Mode with a cc to bug-cc-mode! :-) > I have two suggestions: > 1) Clicking mouse-2 on the characters after "C" on the mode-line describes > c-submode-indicators. It would be helpful if this variable was documented > to explain the meaning of its value. > 2) The sub-menus of the "Toggle..." menu-item should be radio buttons so > the user can see their current value. >Also the menu item "Syntactic indentation" is permanently disabled and can't >be toggled. As a matter of interest, are any of these mousey things coupled with a particular window manager or toolkit or the like? (Personally, I develop with Emacs on a tty.) >For some reason none of the defvars in cc-langs.el seem to have doc strings. Some do - `c-identifier-syntax-table', for example. 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. >The missing functionality might be due to my setup: CC mode almost seems >to be a dialect of Emacs Lisp with its own virtual world of macros. That's not unfair. ;-) Most of these macros are for smoothing over the differences between (X)Emacs versions (we've only just dropped support 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. Language variables are those whose values depend on the target language (C, C++, Java, Objective C, IDL, Pike, AWK). Here's an example: (c-lang-defconst c-string-escaped-newlines "Set if the language support backslash escaped newlines inside string literals." t nil (c c++ objc pike) t) (c-lang-defvar c-string-escaped-newlines (c-lang-const c-string-escaped-newlines)) This defines the variable `c-string-escaped-newlines', and sets it up to the value t for C, C++, Objective C and Pike, and nil for the other languages. The system also allows derived modes to hook into it. The simplicity of these declarations necessitates very hairy macros (which I don't fully understand either) to support them. 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. >Nick -- Alan Mackenzie (Munich, Germany). ------------------------------------------------------- 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