help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with quotes in comments for mode derived from sql-mode


From: Tim X
Subject: Re: Trouble with quotes in comments for mode derived from sql-mode
Date: 20 Jan 2006 21:42:01 +1100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

"colin.florendo@sybase.com" <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!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]