all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* font-locking and open parens in column zero
@ 2006-09-10 10:09 martin rudalics
  2006-09-10 18:52 ` Richard Stallman
  2006-09-10 19:26 ` Stefan Monnier
  0 siblings, 2 replies; 19+ messages in thread
From: martin rudalics @ 2006-09-10 10:09 UTC (permalink / raw)


NEWS contains the entry:


+++
*** font-lock: in modes like C and Lisp where the fontification assumes that
an open-paren in column 0 is always outside of any string or comment,
font-lock now highlights any such open-paren-in-column-zero in bold-red
if it is inside a string or a comment, to indicate that it can cause
trouble with fontification and/or indentation.


This entry is wrong: In C mode open parens in column 0 are not
highlighted in bold-red, probably due to the test

	     (eq (or syntax-begin-function
		     font-lock-beginning-of-syntax-function)
		 'beginning-of-defun)

in `font-lock-compile-keywords' which fails since
`syntax-begin-function' equals `c-beginning-of-syntax' in C mode.

I'd propose to either not mention C mode in the NEWS entry or change
`font-lock-compile-keywords' appropriately, for example, by setting and
checking a property of the involved symbols.

In addition, it might seem reasonable to check whether the settings of
`open-paren-in-column-0-is-defun-start' conflict with the approach used
by `font-lock-compile-keywords'.  Currently, any user settings for
`open-paren-in-column-0-is-defun-start' are overridden by C mode.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-09-25  8:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.