ESS[SAS]: somebody forgot about the SUM statement (probably me)
[ess.git] / lisp / essd-sp5.el
blob3c9af34e3b8e5949808bbb39fe530d7cdf4450dc
1 ;;; essd-sp5.el --- S-plus 5 customization
3 ;; Copyright (C) 1998 A.J. Rossini
4 ;; Copyright (C) 1999--2004 A.J. Rossini, Rich M. Heiberger, Martin
5 ;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
7 ;; Original Author: A.J. Rossini <rossini@biostat.washington.edu>
8 ;; Created: 9 Nov 1998
9 ;; Maintainers: ESS-core <ESS-core@stat.math.ethz.ch>
11 ;; Keywords: start up, configuration.
13 ;; This file is part of ESS.
15 ;; This file is free software; you can redistribute it and/or modify
16 ;; it under the terms of the GNU General Public License as published by
17 ;; the Free Software Foundation; either version 2, or (at your option)
18 ;; any later version.
20 ;; This file is distributed in the hope that it will be useful,
21 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;; GNU General Public License for more details.
25 ;; You should have received a copy of the GNU General Public License
26 ;; along with GNU Emacs; see the file COPYING. If not, write to
27 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
29 ;;; Commentary:
30 ;;; AJR copied S4 to be S+5.
31 ;;; DB contributed the changes from essd-sp3.el to
32 ;;; essd-s4.el. (removed the old ugly approach).
33 ;;; This file defines Sp5 customizations for ess-mode. Lots of thanks
34 ;;; to RMH and JMC for code and suggestions
35 ;;; Thanks to MM for making this sensible.
37 ;;; Requires and Autoloads:
39 (require 'essl-s)
41 (autoload 'inferior-ess "ess-inf" "Run an ESS process.")
42 (autoload 'ess-mode "ess-mode" "Edit an ESS process.")
44 ;;; Code:
46 ;; You now need to make sure you've defined if you are running 5.0 or 5.1.
47 ;; Lots of things are broken between them, GRR...
49 (defvar S+5-dialect-name "S+5"
50 "Name of 'dialect' for S-PLUS 5.");easily changeable in a user's .emacs
52 (defvar S+5-customize-alist
53 (append
54 '((ess-local-customize-alist . 'S+5-customize-alist)
55 (ess-dialect . S+5-dialect-name)
56 (ess-loop-timeout . ess-S-loop-timeout);fixme: dialect spec.
57 (ess-object-name-db-file . "ess-sp5-namedb.el")
58 (inferior-ess-program . inferior-S+5-program-name)
59 ;;(inferior-ess-objects-pattern . ".*") ; for new s4 stuff
60 (inferior-ess-help-command . "help(\"%s\",pager=\"slynx -dump\",window=F)\n")
61 (inferior-ess-help-filetype . nil)
62 (inferior-ess-search-list-command . "searchPaths()\n")
63 (inferior-ess-start-args . inferior-Splus-args)
64 (ess-STERM . "iESS")
66 S+common-cust-alist)
68 "Variables to customize for S+5.")
71 ;; For loading up the S code required for the above.
72 ;;(add-hook 'ess-post-run-hook
73 ;; '(lambda ()
74 ;; (ess-command
75 ;; (concat
76 ;; "if(exists(\"Sversion\")) library(emacs) else source(\""
77 ;; ess-mode-run-file
78 ;; "\")\n"))
79 ;; (if ess-mode-run-file2
80 ;; (ess-command
81 ;; (concat "source(\"" ess-mode-run-file2 "\")\n")))))
84 (defun S+5 (&optional proc-name)
85 "Call 'Splus5', based on S version 4, from Bell Labs.
86 New way to do it."
87 (interactive)
88 (setq ess-customize-alist S+5-customize-alist)
89 (ess-write-to-dribble-buffer
90 (format "\n(S+5): ess-dialect=%s, buf=%s\n" ess-dialect (current-buffer)))
91 (inferior-ess)
92 (if inferior-ess-language-start
93 (ess-eval-linewise inferior-ess-language-start)))
95 (defun S+5-mode (&optional proc-name)
96 "Major mode for editing S+5 source. See `ess-mode' for more help."
97 (interactive)
98 (setq ess-customize-alist S+5-customize-alist)
99 (ess-mode S+5-customize-alist proc-name)
100 (if ess-imenu-use-S (ess-imenu-S)))
102 (defun S+5-transcript-mode ()
103 "S-PLUS 5 transcript mode."
104 (interactive)
105 (ess-transcript-mode S+5-customize-alist))
107 \f ; Provide package
109 (provide 'essd-sp5)
111 \f ; Local variables section
113 ;;; This file is automatically placed in Outline minor mode.
114 ;;; The file is structured as follows:
115 ;;; Chapters: ^L ;
116 ;;; Sections: ;;*;;
117 ;;; Subsections: ;;;*;;;
118 ;;; Components: defuns, defvars, defconsts
119 ;;; Random code beginning with a ;;;;* comment
121 ;;; Local variables:
122 ;;; mode: emacs-lisp
123 ;;; outline-minor-mode: nil
124 ;;; mode: outline-minor
125 ;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"
126 ;;; End:
128 ;;; essd-sp5.el ends here