From: Ryan Bowman <ryanlbowman@yahoo.com>
Subject: Re: Separating // and /**/ comment fontification
Date: Tue, 14 Jun 2005 12:13:48 -0700 (PDT) [thread overview]
Message-ID: <20050614191348.10706.qmail@web51903.mail.yahoo.com> (raw)
In-Reply-To: <87hdg9ixhz.fsf-monnier+gnu.emacs.help@gnu.org>
--- Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > How can I change the fontification of one (or the
> > other) to use a different face?
>
> Try C-h v font-lock-syntactic-face-function.
>
>
> Stefan
;; from font-lock.el
(defvar font-lock-syntactic-face-function
(lambda (state)
(if (nth 3 state) font-lock-string-face
font-lock-comment-face))
"Function to determine which face to use when
fontifying syntactically.
The function is called with a single parameter (the
state as returned by
`parse-partial-sexp' at the beginning of the region to
highlight) and
should return a face.")
So as I understand it
font-lock-syntactic-face-function will return the face
with which to highlight something: -string-face if
it's a string, -comment-face otherwise.
Following the link to parse-partial-sexp item #7 of
the return value looks somewhat helpful:
7. t if in a comment of style b; symbol
`syntax-table' if the comment
should be terminated by a generic comment
delimiter.
but I don't quite understand it. What is a comment of
style b? I assume that if the symbol `syntax-table'
is returned it means that the comment must be
terminated by the comment delimiter defined in the
syntax table for the current mode, is that correct?
In Java would the latter then be '*/' and a comment of
style b be a comment started with '//'?
----
Ryan Bowman
There is no vi there is only Emacs
----
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
next prev parent reply other threads:[~2005-06-14 19:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3751.1118182395.25862.help-gnu-emacs@gnu.org>
2005-06-07 23:00 ` Separating // and /**/ comment fontification Stefan Monnier
2005-06-14 19:13 ` Ryan Bowman [this message]
2005-06-14 20:10 ` Ryan Bowman
[not found] <mailman.1.1118779995.2857.help-gnu-emacs@gnu.org>
2005-06-15 5:30 ` Stefan Monnier
2005-06-07 22:09 Ryan Bowman
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=20050614191348.10706.qmail@web51903.mail.yahoo.com \
--to=ryanlbowman@yahoo.com \
/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.
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).