From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: font-locking and open parens in column zero
Date: Mon, 11 Sep 2006 10:18:57 -0400 [thread overview]
Message-ID: <jwv64fucwsr.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <45055F33.4030007@gmx.at> (martin rudalics's message of "Mon\, 11 Sep 2006 15\:05\:55 +0200")
>> That is probably obsolete, from the days before C mode started using
>> `c-beginning-of-syntax'. This feature is no longer needed in C mode,
>> since `c-beginning-of-syntax' prevents the confusion it was meant to warn
>> the user about.
> When `c-beginning-of-syntax' doesn't find a cached position it calls
> `c-beginning-of-defun-1' which, on Emacs, calls `beginning-of-defun':
> (1) With emacs -Q open ~/src/syntax.c
> (2) Execute
> (defun foo ()
> (interactive)
> (re-search-forward "string-to-syntax")
> (forward-line 6)
> (recenter 0))
> This will fontify the entire body of `string_to_syntax' as a C string
> due to the left paren in column zero of the doc-string.
Then C-mode's font-lock-keywords should highlight this open-paren.
It's not font-lock's job to figure out what c-beginning-of-defun does.
Maybe I should completely remove this tweak in font-lock.el and move it to
lisp-modes (which other modes does it work with anyway)?
Stefan
next prev parent reply other threads:[~2006-09-11 14:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-10 10:09 font-locking and open parens in column zero martin rudalics
2006-09-10 18:52 ` Richard Stallman
2006-09-11 13:05 ` martin rudalics
2006-09-11 14:18 ` Stefan Monnier [this message]
2006-09-12 2:01 ` Richard Stallman
2006-09-14 8:41 ` martin rudalics
2006-09-17 15:12 ` Richard Stallman
2006-09-17 21:13 ` martin rudalics
2006-09-18 23:40 ` Richard Stallman
2006-09-19 9:00 ` martin rudalics
2006-09-23 3:34 ` Richard Stallman
2006-09-23 14:55 ` martin rudalics
2006-09-24 2:10 ` Richard Stallman
2006-09-24 9:42 ` martin rudalics
2006-09-25 0:46 ` Stefan Monnier
2006-09-25 8:05 ` martin rudalics
2006-09-25 3:17 ` Richard Stallman
2006-09-25 8:10 ` martin rudalics
2006-09-10 19:26 ` 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=jwv64fucwsr.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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).