Initial Commit
[packages] / xemacs-packages / ess / lisp / essd-sp3.el
1 ;;; essd-sp3.el --- S-PLUS 3.x customization
2
3 ;; Copyright (C) 1997--2004 A.J. Rossini, Rich M. Heiberger, Martin
4 ;;      Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
5
6 ;; Original Author: A.J. Rossini <rossini@u.washington.edu>
7 ;; Created: 12 Jun 1997
8 ;; Maintainers: ESS-core <ESS-core@stat.math.ethz.ch>
9
10 ;; Keywords: start up, configuration.
11
12 ;; This file is part of ESS.
13
14 ;; This file is free software; you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by
16 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; any later version.
18
19 ;; This file is distributed in the hope that it will be useful,
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 ;; GNU General Public License for more details.
23
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with GNU Emacs; see the file COPYING.  If not, write to
26 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
27
28 ;;; Commentary:
29 ;;; This file defines all the S-PLUS 3.x customizations for ess-mode.
30
31 ;;; Requires and Autoloads:
32
33 (require 'essl-s)
34
35 (autoload 'inferior-ess "ess-inf" "Run an ESS process.")
36 (autoload 'ess-mode     "ess-mode" "Edit an ESS process.")
37
38 ;;; Code:
39
40 (defvar S+3-dialect-name "S+3"
41   "Name of 'dialect' for S-PLUS 3.x.");easily changeable in a user's .emacs
42
43 (defvar S+3-customize-alist
44   (append
45   '((ess-local-customize-alist     . 'S+3-customize-alist)
46     (ess-dialect                   . S+3-dialect-name)
47      (ess-loop-timeout                  . ess-S-loop-timeout);fixme: dialect spec.
48     (ess-object-name-db-file       . "ess-s+3-namedb.el" )
49     (inferior-ess-program          . inferior-S+3-program-name)
50     (inferior-ess-help-command     . "help(\"%s\",pager=\"cat\",window=F)\n")
51      (inferior-ess-search-list-command  . "search()\n")
52     (inferior-ess-start-file       . nil) ;"~/.ess-S+3")
53     (inferior-ess-start-args       . "")
54     (ess-STERM  . "iESS")
55     )
56    S+common-cust-alist)
57
58  "Variables to customize for S+3.")
59
60
61 (defun S+3 (&optional proc-name)
62   "Call 'S-PLUS 3.x', the 'Real Thing'  from StatSci."
63   (interactive)
64   (setq ess-customize-alist S+3-customize-alist)
65   (ess-write-to-dribble-buffer
66    (format "\n(S+3): ess-dialect=%s, buf=%s\n" ess-dialect (current-buffer)))
67   (inferior-ess)
68   (if inferior-ess-language-start
69       (ess-eval-linewise inferior-ess-language-start)))
70
71 (defun S+3-mode (&optional proc-name)
72   "Major mode for editing S+3 source.  See `ess-mode' for more help."
73   (interactive)
74   (setq ess-customize-alist S+3-customize-alist)
75   (ess-mode S+3-customize-alist proc-name)
76   (if ess-S-use-imenu (ess-imenu-R)))
77
78 (defun S+3-transcript-mode ()
79   "S-PLUS 3.x transcript mode."
80   (interactive)
81   (ess-transcript-mode S+3-customize-alist))
82
83
84
85 \f ; Provide package
86
87 (provide 'essd-sp3)
88
89 \f ; Local variables section
90
91 ;;; This file is automatically placed in Outline minor mode.
92 ;;; The file is structured as follows:
93 ;;; Chapters:     ^L ;
94 ;;; Sections:    ;;*;;
95 ;;; Subsections: ;;;*;;;
96 ;;; Components:  defuns, defvars, defconsts
97 ;;;              Random code beginning with a ;;;;* comment
98
99 ;;; Local variables:
100 ;;; mode: emacs-lisp
101 ;;; outline-minor-mode: nil
102 ;;; mode: outline-minor
103 ;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"
104 ;;; End:
105
106 ;;; essd-sp3.el ends here