From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Trouble with quotes in comments for mode derived from sql-mode Date: 20 Jan 2006 21:42:01 +1100 Message-ID: <87oe279o5i.fsf@tiger.rapttech.com.au> References: <1137680440.990855.5430@f14g2000cwb.googlegroups.com> Reply-To: timx@spamto.devnul.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137765066 2320 80.91.229.2 (20 Jan 2006 13:51:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2006 13:51:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 20 14:50:53 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ezweq-0007a7-08 for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jan 2006 14:50:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzwfN-00013q-3s for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jan 2006 08:51:01 -0500 Original-Newsgroups: gnu.emacs.help Original-Lines: 48 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Original-NNTP-Posting-Host: ppp7-56.lns1.syd7.internode.on.net Original-X-Trace: duster.adelaide.on.net 1137753721 59.167.7.56 (20 Jan 2006 21:12:01 +1050) Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!news.xtra.co.nz!news-south.connect.com.au!duster.adelaide.on.net!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:137129 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32750 Archived-At: "colin.florendo@sybase.com" writes: > Hello, > > I've written a very simple derived mode 'isq' mode which adds c++ style > comments > to sql-mode. The problem am having is unbalanced quotes in comments > mess up string > highlighting. I've seen similar problems in this group but haven't > found a solution. > > Here's my derived mode: > > (define-derived-mode isq-mode sql-mode "ISQ" "Major mode to edit Sybase > ISQ files." > (setq indent-tabs-mode nil) > (setq comment-start "// ") > ) > > (font-lock-add-keywords 'isq-mode '(("\\(--.*\\|//.*\\)$" (0 > 'font-lock-comment-face t)))) > (add-to-list 'auto-mode-alist '(".isq\\'" . isq-mode)) > > I'm not sure if this is a shortcoming of sql-mode itself or if I'm > missing something. > Any help would be appreciated. > > I'm using gnu emacs 21.1.1 on solaris 2.8 > This may not be of any use, but I use to use plsql-mode (http://www.emacswiki.org/) which is also derived from sql mode. The point is that plsql mode uses comments which start with -- (not that much differenct from //). So, maybe this might give you some hints. Therre were some bugs in plsql-mode which I contacted the maintainer about (including patches), but never got a reply. However, aside from the bugs, it worked quite will and I used it a lot back when I was working with Oracle on a daily basis. Tim -- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!