* open parens in column zero and c-mode
@ 2006-05-20 22:20 martin rudalics
0 siblings, 0 replies; only message in thread
From: martin rudalics @ 2006-05-20 22:20 UTC (permalink / raw)
Cc: bug-cc-mode
With emacs -Q open `syntax.c' and execute the following function:
(defun foo ()
(interactive)
(re-search-forward "string-to-syntax")
(forward-line 6)
(recenter 0))
My Emacs misfontifies some 20 lines with `font-lock-string-face' here.
The culprit is obviously the left paren before CODE in the doc-string of
`string-to-syntax'
(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table'
and it would be easy to correct that. What I want to ask, however, is
whether there's any good reason why
1. `open-paren-in-column-0-is-defun-start' is t in c-mode,
2. `syntax-begin-function' is not `c-beginning-of-defun' in c-mode, and
3. `beginning-of-defun-function' and `end-of-defun-function' are not
respectively `c-beginning-of-defun' and `c-end-of-defun' in c-mode.
If any of these questions has to be answered with `yes' I'd suggest to
color left parens within comments at bol with `font-lock-warning-face'
as in Lisp mode to satisfy the following excerpt from the Emacs manual:
"To help you catch violations of this convention, Font Lock mode
highlights confusing opening delimiters (those that ought to be quoted)
in bold red."
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-20 22:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-20 22:20 open parens in column zero and c-mode martin rudalics
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).