automagic splus-version {was ess-mode 5.1.18; Splus 6.0}

Martin Maechler maechler at stat.math.ethz.ch
Fri Aug 10 14:50:00 CEST 2001


>>>>> "Jeff" == Jeff Mincy <jeff at delphioutpost.com> writes:

 Jeff> We are using Splus 6.0.
 Jeff> 
 Jeff> ess-site.el does the following:
 Jeff>       
 Jeff>   ;;; On a PC, the default is S+4.  Elsewhere (unix) the default is S+3
 Jeff>   (if (or (equal window-system 'w32) (equal window-system 'win32))
 Jeff>       (progn				; MS-Windows 9x/NT
 Jeff>         (fset 'S 'S+4)
 Jeff>         (fset 's-mode 'S+4-mode)
 Jeff>         (fset 's-transcript-mode 'S+4-transcript-mode))
 Jeff>       (progn				; Unix
 Jeff>         (fset 'S 'S+3)
 Jeff>         (fset 's-mode 'S+3-mode)
 Jeff>         (fset 's-transcript-mode 'S+3-transcript-mode)))

 Jeff> For unix, S and s-mode are set to the S+3 versions.
 Jeff> The S+5 version is not used and there is no S+6 version.

(and this is better in the current development version)

     Jeff>   ........


 Jeff>   3) should the ess Splus version be automatically selected, eg
 Jeff>   something like:

 Jeff> (defvar splus-version
 Jeff>  (let ((version (and (executable-find "Splus")
 Jeff>                      (exec-to-string "Splus VERSION"))))
 Jeff>    (if (and version (string-match 
 Jeff>         "S-PLUS Version \\([0-9]+\\)\\.\\([0-9]+\\) Release \\([0-9]+\\)"
 Jeff>                      version))
 Jeff>        (list (subseq version (match-beginning 1) (match-end 1))
 Jeff>              (subseq version (match-beginning 2) (match-end 2))
 Jeff>              (subseq version (match-beginning 3) (match-end 3))))))
 Jeff> 
 Jeff> (cond ((and splus-version (equal (car splus-version) "6"))
 Jeff>        (fset 'S 'S+6) ...)
 Jeff>       ((and splus-version (equal (car splus-version) "5"))
 Jeff>        (fset 'S 'S+5) ...)
 Jeff>       (t (fset 'S 'S+3) ...))

As I thought this was a very good idea, I started looking at it, 
and realized that unfortunately

    (exec-to-string ....)

is not existing in GNU Emacs (20.7).  So (since Jeff is using that) it's
Xemacs only. 

Any GNU emacs replacement for that?
Thanks in advance!

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the ESS-help mailing list