all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: martin rudalics <rudalics@gmx.at>, Richard Stallman <rms@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: font-locking and open parens in column 0
Date: Fri, 03 Nov 2006 09:14:07 -0500	[thread overview]
Message-ID: <jwvbqnoaah8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <DA6197CAE190A847B662079EF7631C0603407A89@OEKAW2EXVS03.hbi.ad.harman.com> (Alan Mackenzie's message of "Fri\, 3 Nov 2006 09\:44\:09 +0100")

>> > The cause of this (as Martin (almost) discerned) is that the handling of
>> > (eq open-paren-in-column-0-is-defun-start nil) in begining-of-defun-raw
>> > hasn't been implemented.  The function just looks for a "(" in C0
>> > regardless of that variable.

According to its docstring, the current behavior is correct:

   Normally a defun starts when there is a char with open-parenthesis
   syntax at the beginning of a line.

I think the bug is in cc-mode's use of beginning-of-defun.
BTW, the alternative used in elisp might be OK as well: flag with a big
`warning' face those spots in the file which match defun-prompt-regexp (or
where the line starts with an open paren) but which are inside a comment or
string.  This way you may get erroneous fontification, but the root cause is
clearly marked.



        Stefan

  parent reply	other threads:[~2006-11-03 14:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03  8:44 AW: font-locking and open parens in column 0 Mackenzie, Alan
2006-11-03 14:02 ` martin rudalics
2006-11-03 14:14 ` Stefan Monnier [this message]
2006-11-04  6:38 ` Richard Stallman
2006-11-10 17:49   ` Stefan Monnier
2006-11-11  2:11     ` Richard Stallman
2006-11-11  4:52       ` Stefan Monnier
2006-11-12  5:14         ` Richard Stallman
2006-11-12  5:14         ` Richard Stallman
2006-11-12 19:45           ` martin rudalics
2006-11-13 17:16           ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2006-11-03 16:19 Mackenzie, Alan
2006-11-03 19:29 ` Stefan Monnier
2006-11-04 11:35   ` martin rudalics
2006-11-04  9:30 ` martin rudalics
2006-11-05  7:08 ` Richard Stallman
2006-11-02  8:49 Mackenzie, Alan
2006-11-02 18:31 ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbqnoaah8.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.