[ESS] File mode specification error: (void-function run-mode-hook)

Martin Maechler maechler at stat.math.ethz.ch
Thu Jan 22 09:55:09 CET 2009


>>>>> "RoSp" == Rodney Sparapani <rsparapa at mcw.edu>
>>>>>     on Wed, 21 Jan 2009 09:19:58 -0600 writes:

    RoSp> Jianjie Ma wrote:
    >> HI,
    >> 
    >> I am new to ESS and Emacs.
    >> 
    >> Here is my problem.
    >> 
    >> The ESS is put in the directory ~/ess/ess-5.3.10
    >> 
    >> In my ~/.emacs file, I added (load
    >> "~/ess/ess-5.3.10/lisp/ess-site").
    >> 
    >> R is installed in ~/Rlang, the version is 2.8.1.
    >> 
    >> Emacs is version21.3.1.
    >> 
    >> ESS works and loaded. It works fine for programming and
    >> running, that is I can start with M-x R and M-x SAS and
    >> then program and evaluate codes.
    >> 
    >> The problem is when using the auto-mode of Emacs.
    >> 
    >> When I open a file, for example, ~/test.R, the R-mode
    >> should be automatically selected since the "ess-site.el
    >> "specified the auto R-mode for files with suffix
    >> ".R". However I got the error "File mode specification
    >> error: (void-function run-mode-hook)" though the file can
    >> be opened and I can still evaluate the R code.
    >> 
    >> And also, the highlighting and fonting features are not
    >> shown.
    >> 
    >> Same Error happened when I tried to open files with
    >> suffix ".sas".
    >> 
    >> Thanks for your help


    RoSp> Hi Jianjie:

    RoSp> The function run-mode-hook does not exist and also,
    RoSp> does not appear anywhere in the ESS sources that I can
    RoSp> find.  The function name is run-mode-hooks.  

Yes indeed.

    RoSp>   But, the error must be some where in the lisp files
    RoSp> distributed with the version of Emacs that you use.

well, he said he used (GNU) Emacs 21.3  and indeed, that does
*NOT* yet have run-mode-hooks.

    RoSp> Try upgrading Emacs.  Hope this helps.

yes that will help.

However, I think we should ESS keep running with Emacs 21.x for
a little while.
ESS core *had* decided to no longer support Emacs 20 or earlier, but
we have kept 21.x in the list of supported Emacsen.

After a short look at the definition of run-mode-hooks (in Emacs 22.3)
I think it should not be hard to make ESS workable again for
Emacs 21.x,  if necessary just by making it a no-op for 21.x

Martin Maechler, ETH Zurich




More information about the ESS-help mailing list