From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: open parens in column zero and c-mode Date: Sun, 21 May 2006 00:20:31 +0200 Message-ID: <446F962F.8080505@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1148163852 26681 80.91.229.2 (20 May 2006 22:24:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 20 May 2006 22:24:12 +0000 (UTC) Cc: bug-cc-mode@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 21 00:24:11 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FhZrl-0002VA-ND for ged-emacs-devel@m.gmane.org; Sun, 21 May 2006 00:24:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhZrl-0000qe-67 for ged-emacs-devel@m.gmane.org; Sat, 20 May 2006 18:24:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FhZrZ-0000q9-5S for emacs-devel@gnu.org; Sat, 20 May 2006 18:23:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FhZrX-0000po-Fv for emacs-devel@gnu.org; Sat, 20 May 2006 18:23:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhZrX-0000pl-B6 for emacs-devel@gnu.org; Sat, 20 May 2006 18:23:55 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FhZvA-0000kF-53 for emacs-devel@gnu.org; Sat, 20 May 2006 18:27:40 -0400 Original-Received: (qmail invoked by alias); 20 May 2006 22:23:53 -0000 Original-Received: from N937P019.adsl.highway.telekom.at (EHLO [62.47.61.19]) [62.47.61.19] by mail.gmx.net (mp034) with SMTP; 21 May 2006 00:23:53 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: emacs-devel X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54896 Archived-At: With emacs -Q open `syntax.c' and execute the following function: (defun foo () (interactive) (re-search-forward "string-to-syntax") (forward-line 6) (recenter 0)) My Emacs misfontifies some 20 lines with `font-lock-string-face' here. The culprit is obviously the left paren before CODE in the doc-string of `string-to-syntax' (CODE . MATCHING-CHAR) that can be used as value of a `syntax-table' and it would be easy to correct that. What I want to ask, however, is whether there's any good reason why 1. `open-paren-in-column-0-is-defun-start' is t in c-mode, 2. `syntax-begin-function' is not `c-beginning-of-defun' in c-mode, and 3. `beginning-of-defun-function' and `end-of-defun-function' are not respectively `c-beginning-of-defun' and `c-end-of-defun' in c-mode. If any of these questions has to be answered with `yes' I'd suggest to color left parens within comments at bol with `font-lock-warning-face' as in Lisp mode to satisfy the following excerpt from the Emacs manual: "To help you catch violations of this convention, Font Lock mode highlights confusing opening delimiters (those that ought to be quoted) in bold red."