;;; ess-sp5-d.el --- S-plus 5 customization12;; Copyright (C) 1998 A.J. Rossini3;; Copyright (C) 1999--2004 A.J. Rossini, Richard M. Heiberger, Martin4;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.56;; Author: A.J. Rossini <[email protected]>7;; Created: 9 Nov 19988;; Maintainer: ESS-core <[email protected]>910;; Keywords: languages1112;; This file is part of ESS.1314;; This file is free software; you can redistribute it and/or modify15;; it under the terms of the GNU General Public License as published by16;; the Free Software Foundation; either version 2, or (at your option)17;; any later version.1819;; This file is distributed in the hope that it will be useful,20;; but WITHOUT ANY WARRANTY; without even the implied warranty of21;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22;; GNU General Public License for more details.2324;; A copy of the GNU General Public License is available at25;; http://www.r-project.org/Licenses/2627;;; Commentary:2829;; AJR copied S4 to be S+5.30;; DB contributed the changes from ess-sp3-d.el to31;; ess-s4-d.el. (removed the old ugly approach).32;; This file defines Sp5 customizations for ess-mode. Lots of thanks33;; to RMH and JMC for code and suggestions34;; Thanks to MM for making this sensible.3536;;; Code:3738(autoload 'inferior-ess "ess-inf" "Run an ESS process.")39(autoload 'ess-mode "ess-mode" "Edit an ESS process.")4041(require 'ess-s-l)4243;; You now need to make sure you've defined if you are running 5.0 or 5.1.44;; Lots of things are broken between them, GRR...4546(defvar S+5-dialect-name "S+5"47"Name of 'dialect' for S-PLUS 5.");easily changeable in a user's .emacs4849(defvar S+5-customize-alist50(append51'((ess-local-customize-alist . 'S+5-customize-alist)52(ess-dialect . S+5-dialect-name)53(ess-loop-timeout . ess-S-loop-timeout);fixme: dialect spec.54(ess-object-name-db-file . "ess-sp5-namedb.el")55(inferior-ess-program . inferior-S+5-program-name)56;;(inferior-ess-objects-pattern . ".*") ; for new s4 stuff57(inferior-ess-help-command . "help(\"%s\", pager=\"slynx -dump\", window=FALSE)\n")58(inferior-ess-help-filetype . nil)59(inferior-ess-search-list-command . "searchPaths()\n")60(inferior-ess-start-args . inferior-S+-start-args)61(ess-STERM . "iESS")62)63S+common-cust-alist)6465"Variables to customize for S+5.")666768;; For loading up the S code required for the above.69;;(add-hook 'ess-post-run-hook70;; (lambda ()71;; (ess-command72;; (concat73;; "if(exists(\"Sversion\")) library(emacs) else source(\""74;; ess-mode-run-file75;; "\")\n"))76;; (if ess-mode-run-file277;; (ess-command78;; (concat "source(\"" ess-mode-run-file2 "\")\n")))))798081(defun S+5 (&optional proc-name)82"Call 'Splus5', based on S version 4, from Bell Labs.83New way to do it."84(interactive)85(setq ess-customize-alist S+5-customize-alist)86(ess-write-to-dribble-buffer87(format "\n(S+5): ess-dialect=%s, buf=%s\n" ess-dialect (current-buffer)))88(inferior-ess)89(if inferior-ess-language-start90(ess-eval-linewise inferior-ess-language-start)))9192(defun S+5-mode (&optional proc-name)93"Major mode for editing S+5 source. See `ess-mode' for more help."94(interactive)95(setq ess-customize-alist S+5-customize-alist)96(ess-mode S+5-customize-alist proc-name)97(if ess-imenu-use-S (ess-imenu-S)))9899(defun S+5-transcript-mode ()100"S-PLUS 5 transcript mode."101(interactive)102(ess-transcript-mode S+5-customize-alist))103104; Provide package105106(provide 'ess-sp5-d)107108; Local variables section109110;;; This file is automatically placed in Outline minor mode.111;;; The file is structured as follows:112;;; Chapters: ^L ;113;;; Sections: ;;*;;114;;; Subsections: ;;;*;;;115;;; Components: defuns, defvars, defconsts116;;; Random code beginning with a ;;;;* comment117118;;; Local variables:119;;; mode: emacs-lisp120;;; outline-minor-mode: nil121;;; mode: outline-minor122;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"123;;; End:124125;;; ess-sp5-d.el ends here126127128