[ESS] SAS mode font-lock-mode problem

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Sat Feb 4 17:00:41 CET 2006


Dear Scott,

 > I have been using ESS off and on for several years, orignally with
 > Xemacs and more recently with GNU Emacs ... but always in X.
 > 
 > Now, i am using Emacs via PuTTY from Windows :(
 > 
 > When I open a SAS file, I get this this Lisp error:
 > wrong-type-argument symbolp ""
 > 
 > If  I try to open the file a second time, it opens, but font-locking
 > isn't enabled. Any idea how to handle this?

Including the backtrace made debugging this fairly easy, thanks!  It
looks like you have font lock turned on all in all buffers.  I can
replicate your problem on an xterm in unix by "emacs -nw"
and then visiting  baseball.sas and trying M-x
font-lock-fontify-buffer.

The problem is that for non-windowed systems (such as your putty
connection and emacs -nw), window-system is nil and so essl-sas.el has:

  (defvar SAS-mode-font-lock-keywords "") ;; empty if not window-system

A temporary fix might be to change "" above to nil.  But this
conditioning upon window-system might need closer inspection, since
Emacs 21.3 can do font locking within an xterm.

Rodney: does the value of SAS-mode-font-lock-keywords need to be
conditioned upon window-system?

Stephen




More information about the ESS-help mailing list