[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding sql-mode hook
From: |
Krishna |
Subject: |
Re: Adding sql-mode hook |
Date: |
16 Oct 2006 08:10:18 -0700 |
User-agent: |
G2/1.0 |
Sam Peterson wrote:
> "calvinkrishy@gmail.com" <calvinkrishy@gmail.com> writes:
>
> > Am trying to add a sql-mode hook with
> >
> > (add-hook 'sql-mode-hook 'sql-highlight-oracle-keywords)
> >
> > in my .emacs but none of the oracle keywords are highlighted when I
> > enter SQL mode. Only invoking the sql-highlight-oracle-keywords
> > function seems to highlight them. What is it that I am missing? Why
> > don't the keywords get highlighted as soon as I open a SQL file?
> >
> > Emacs version 21.3.1 on Windows 2000.
>
> Out of curiosity, does sql-highlight-oracle-keywords toggle the
> feature? From the help:
>
> ---------------------------------------------------------------------
> |sql-highlight-oracle-keywords is an interactive compiled Lisp
> |function in `sql'. (sql-highlight-oracle-keywords)
> |
> |Highlight Oracle keywords.
> |Basically, this just sets `font-lock-keywords' appropriately.
> ---------------------------------------------------------------------
>
> It doesn't look like it does. There doesn't appear to be an autoload
> for the function however. Try putting (require 'sql) before the
> add-hook line. Not sure if that'll help, just a thought.
Thanks. but that still doesn't highlight the keywords.
But as I said doing a 'M-x sql-highlight-oracle-keywords' has the
desired effect of highlighting the key words. Would be nice if I could
get that as soon as I open a sql file.
Krishna
>
> --
> Sam Peterson
> skpeterson At nospam ucdavis.edu
> "if programmers were paid to remove code instead of adding it,
> software would be much better" -- unknown