From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Trouble with quotes in comments for mode derived from sql-mode
Date: Tue, 24 Jan 2006 23:53:43 -0500 [thread overview]
Message-ID: <87mzhkud0u.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 1138115023.499061.187840@g14g2000cwa.googlegroups.com
> The file format I'm using supports both sql "--" and c++ "//" comments.
> sql-mode provides the "--" comment, and handles quotes in this comment
> style correctly.
> I added the "//" comment style through the derived mode, but the c++
> comment style does not handle the quotes correctly. I will try the
> latest newcomment.el, but I suspect I'll need to modify the syntax
> table as suggested by David Hansen below.
Of course, you'll have to create a new syntax-table (probably inheriting
from the other one).
But you'll probably also discover at some point that Emacs's syntax-tables
can't correctly handle -- and // at the same time. I.e. if you tell it
that -- and // both start comments, then Emacs will then mistakenly also
consider -/ and /- to be comment starters :-(
One way out is to use font-lock-syntactic-keywords, but it's not as robust.
Stefan
next prev parent reply other threads:[~2006-01-25 4:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-19 14:20 Trouble with quotes in comments for mode derived from sql-mode colin.florendo
2006-01-19 21:21 ` albrns
2006-01-20 9:55 ` Andreas Röhler
2006-01-24 15:03 ` colin.florendo
2006-01-25 4:53 ` Stefan Monnier [this message]
2006-01-20 10:42 ` Tim X
2006-01-20 15:05 ` David Hansen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mzhkud0u.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
/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 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.