* Adding sql-mode hook
@ 2006-10-16 10:59 calvinkrishy
2006-10-16 13:51 ` Sam Peterson
0 siblings, 1 reply; 4+ messages in thread
From: calvinkrishy @ 2006-10-16 10:59 UTC (permalink / raw)
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.
Thanks,
Krishna
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding sql-mode hook
2006-10-16 10:59 Adding sql-mode hook calvinkrishy
@ 2006-10-16 13:51 ` Sam Peterson
2006-10-16 15:10 ` Krishna
0 siblings, 1 reply; 4+ messages in thread
From: Sam Peterson @ 2006-10-16 13:51 UTC (permalink / raw)
"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.
--
Sam Peterson
skpeterson At nospam ucdavis.edu
"if programmers were paid to remove code instead of adding it,
software would be much better" -- unknown
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding sql-mode hook
2006-10-16 13:51 ` Sam Peterson
@ 2006-10-16 15:10 ` Krishna
2006-10-16 16:40 ` Sam Peterson
0 siblings, 1 reply; 4+ messages in thread
From: Krishna @ 2006-10-16 15:10 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding sql-mode hook
2006-10-16 15:10 ` Krishna
@ 2006-10-16 16:40 ` Sam Peterson
0 siblings, 0 replies; 4+ messages in thread
From: Sam Peterson @ 2006-10-16 16:40 UTC (permalink / raw)
"Krishna" <calvinkrishy@gmail.com> writes:
> 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
>
Sound like the only other possibility is that there's a bug in how
sql-mode sets font-lock-keywords. In otherwords, it sets it after the
sql-mode-hook, which clobbers what sql-highlight-oracle-keywords does.
Might be something worth investigating.
--
Sam Peterson
skpeterson At nospam ucdavis.edu
"if programmers were paid to remove code instead of adding it,
software would be much better" -- unknown
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-16 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-16 10:59 Adding sql-mode hook calvinkrishy
2006-10-16 13:51 ` Sam Peterson
2006-10-16 15:10 ` Krishna
2006-10-16 16:40 ` Sam Peterson
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.