From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stjernholm Newsgroups: gmane.emacs.devel Subject: Re: [kemenczy@rogers.com: cc-engine:c-guess-basic-syntax related problem in latest CVS] Date: Wed, 09 Jul 2003 01:31:30 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5b1xx0tx2l.fsf@lister.roxen.com> References: Reply-To: bug-cc-mode@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1057717529 32393 80.91.224.249 (9 Jul 2003 02:25:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Jul 2003 02:25:29 +0000 (UTC) Cc: bug-cc-mode@gnu.org, rms@gnu.org, monnier@cs.yale.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jul 09 04:25:22 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19a4e2-0008Pu-00 for ; Wed, 09 Jul 2003 04:25:22 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19a4oe-0002HN-00 for ; Wed, 09 Jul 2003 04:36:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19a4Ws-0002wO-V0 for emacs-devel@quimby.gnus.org; Tue, 08 Jul 2003 22:17:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19a4Wp-0002vk-EX for emacs-devel@gnu.org; Tue, 08 Jul 2003 22:17:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19a4K6-0007ng-77 for emacs-devel@gnu.org; Tue, 08 Jul 2003 22:05:17 -0400 Original-Received: from gnuftp.gnu.org ([199.232.41.6]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19a37t-0007RJ-KK; Tue, 08 Jul 2003 20:48:05 -0400 Original-Received: from godzilla.roxen.com ([194.52.182.190] helo=mail.roxen.com) by gnuftp.gnu.org with esmtp (Exim 4.20) id 19a1vw-0005OT-MM; Tue, 08 Jul 2003 19:31:40 -0400 Original-Received: by mail.roxen.com (Postfix, from userid 52) id 335BB99E4; Wed, 9 Jul 2003 01:31:32 +0200 (MEST) Original-Received: from lister.roxen.com (lister.roxen.com [194.52.182.147]) by mail.roxen.com (Postfix) with ESMTP id A871D99E1; Wed, 9 Jul 2003 01:31:28 +0200 (MEST) Original-Received: from mast by lister.roxen.com with local (Exim 3.36 #1 (Debian)) id 19a1vm-0005Km-00; Wed, 09 Jul 2003 01:31:30 +0200 Original-To: "Zoltan Kemenczy" In-Reply-To: (Richard Stallman's message of "Tue, 08 Jul 2003 16:02:30 -0400") User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15504 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15504 > From: "Zoltan Kemenczy" > Subject: cc-engine:c-guess-basic-syntax related problem in latest CVS > To: > Date: Tue Jul 8 04:11:46 2003 +0200 > > Try S-M-; (c-guess-basic-syntax) at different points within a buffer > visiting a C source file that is *write-protected*... - I get a "Buffer is > read-only: #" message in many places. If the buffer is made > writeable, the syntactic information is returned... This has to do with functions that make "hidden buffer changes", i.e. change text properties for internal purposes. See the blurb on that near the top of cc-engine.el. c-guess-basic-syntax is a function that could do such hidden buffer changes, but I've now wrapped it so that it can be called in read only mode again. > A related question (that started all this) is that the point value of the > syntactic information is now returned as '(syntax-symbol point-integer) list > (it used to be a cons cell: '(symbol . point-integer)). This breaks my > gud-find-class function inside gud.el. I fixed that function (to use more > maintainable predicate functions on the syntactic info as opposed to the > (car (cdr...)), but before I submit the patch, I'd like to ask if this > change to the '(syntax-symbol point-integer) is there to stay... It is. I had to do that change to be able to extend syntactic information. There's a note about it in NEWS (which I've extended a bit now). I think such predicate functions belong in CC Mode. How did you design them?