[ESS] add a keyword to font-lock-keywords

Martin Maechler maechler at stat.math.ethz.ch
Sat Aug 20 14:30:05 CEST 2005


>>>>> "RoSp" == Rodney Sparapani <rsparapa at mcw.edu>
>>>>>     on Thu, 18 Aug 2005 09:59:27 -0500 writes:

    RoSp> Hi Gerhard: This should have nothing to do with
    RoSp> keywords per se.  Comments are handled in the grammar.
    RoSp> Take a look at modify-syntax-entry.

Indeed.

Gerard, could you try the following -- which I just now have
added to lisp/essl-sta.el :

  (cond
   ;; XEmacs 19, 20, 21
   ((memq '8-bit c-emacs-features)
    (modify-syntax-entry ?/  ". 1456" STA-syntax-table)
    (modify-syntax-entry ?*  ". 23"   STA-syntax-table))
   ;; Emacs 19, 20, 21
   ((memq '1-bit c-emacs-features)
    (modify-syntax-entry ?/  ". 124b" STA-syntax-table)
    (modify-syntax-entry ?*  ". 23"   STA-syntax-table))
   ;; incompatible
   (t (error "CC Mode is incompatible with this version of Emacs"))
   )
  (modify-syntax-entry ?\n "> b"  STA-syntax-table)
  ;; Give CR the same syntax as newline, for selective-display
  (modify-syntax-entry ?\^m "> b" STA-syntax-table)

----

If you (or anyone else) can confirm that this enables the "//"
for comments in stata-mode,
this will be in the upcoming 5.2.9 version of ESS.

Martin




More information about the ESS-help mailing list