[ESS] Syntax highlighting not working for keywords with uppercase letters in ESS[SAS]

Christian Keller christian.keller at gmx.ch
Tue Jan 6 23:19:38 CET 2009


Dear all

I recently came across a problem with syntactic highlighting in 
ESS[SAS]. As SAS programming language is not case-sensitive, keywords 
should be highlighted regardless of being written in lowercase or 
uppercase letters. However, this is not the case for GNU Emacs 22.3.1 
(i386-mingw-nt5.1.2600) with ESS 5.3.10.

Example: In ESS[SAS] the keyword %let is highlighted correctly, whereas 
%Let or %LET are not highlighted (where they should in my opinion).

Interestingly, highlighting works correctly in ESS[SAS] for the older 
emacs version GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) with ESS 5.3.10.

As far as I understood the concept of font lock, the variable 
font-lock-keywords-case-fold-search controls whether keywords are 
highlighted regardless of their case:
    Documentation:
    *Non-nil means the patterns in `font-lock-keywords'
    are case-insensitive.

For GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) with ESS 5.3.10 in ESS[SAS] 
C-h v font-lock-keywords-case-fold-search gives:
    font-lock-keywords-case-fold-search is a variable defined
    in `font-lock.el'.
    Its value is nil
    Automatically becomes buffer-local when set in any fashion.

But for older emacs version GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) 
with ESS 5.3.10:
    font-lock-keywords-case-fold-search is a variable defined
    in `font-lock.el'.
    Its value is t
    Local in buffer test.sas; global value is nil
    Automatically becomes buffer-local when set in any fashion.

Has anyone a solution to this problem in GNU Emacs 22.3 with ESS 5.3.10?

Please note that I used Emacs with the '--no-site-file' startup option 
for all my tests and my .emacs contains only the line
    (require 'ess-site)


Best regards
Christian




More information about the ESS-help mailing list