unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Mackenzie, Alan" <AMackenzie@harmanbecker.com>,
	emacs-devel@gnu.org, rudalics@gmx.at
Subject: Re: AW: font-locking and open parens in column 0
Date: Fri, 10 Nov 2006 12:49:40 -0500	[thread overview]
Message-ID: <jwvpsbvi4fa.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1GgFB2-0003xI-4i@fencepost.gnu.org> (Richard Stallman's message of "Sat\, 04 Nov 2006 01\:38\:48 -0500")

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

> The purpose of open-paren-in-column-0-is-defun-start is to enable to
> disable this heuristic.  Setting it to nil disables the heuristic.
> So I think his change is correct.

Huh?  What do you mean by "heuristic".  The definition of
beginning-of-defun has never used syntax-tables or anything like that.
E.g. when defun-prompt-regexp is used it doesn't pay attention to
syntax-tables either.

open-paren-in-column-0-is-defun-start is only used as a heuristic in
syntax.c when skipping backward over comment.

There's another related heuristic, which is the use of beginning-of-defun
for syntax-begin-function.  This one is a heuristic specifically because
beginning-of-defun only works with regexps.  If we make beginning-of-defun
aware of strings and comments, then we'll have to warn every coder who uses
it in syntax-begin-function that it's not a good heuristic any more
(especially if beginning-of-defun uses syntax-ppss in which case we may get
into inf-loops).


        Stefan

  reply	other threads:[~2006-11-10 17:49 UTC|newest]

Thread overview: 11+ 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
2006-11-04  6:38 ` AW: " Richard Stallman
2006-11-10 17:49   ` Stefan Monnier [this message]
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

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwvpsbvi4fa.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=AMackenzie@harmanbecker.com \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).