Better handling of w32-shell-execute.
[ess.git] / lisp / essd-sp5.el
blob29cc46dd8fb3366a660f65c6ea0ad858fd039ce5
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-search-list-command . "searchPaths()\n")
62 (inferior-ess-start-args . inferior-Splus-args)
63 (ess-STERM . "iESS")
65 S+common-cust-alist)
67 "Variables to customize for S+5.")
70 ;; For loading up the S code required for the above.
71 ;;(add-hook 'ess-post-run-hook
72 ;; '(lambda ()
73 ;; (ess-command
74 ;; (concat
75 ;; "if(exists(\"Sversion\")) library(emacs) else source(\""
76 ;; ess-mode-run-file
77 ;; "\")\n"))
78 ;; (if ess-mode-run-file2
79 ;; (ess-command
80 ;; (concat "source(\"" ess-mode-run-file2 "\")\n")))))
83 (defun S+5 (&optional proc-name)
84 "Call 'Splus5', based on S version 4, from Bell Labs.
85 New way to do it."
86 (interactive)
87 (setq ess-customize-alist S+5-customize-alist)
88 (ess-write-to-dribble-buffer
89 (format "\n(S+5): ess-dialect=%s, buf=%s\n" ess-dialect (current-buffer)))
90 (inferior-ess)
91 (if inferior-ess-language-start
92 (ess-eval-linewise inferior-ess-language-start)))
94 (defun S+5-mode (&optional proc-name)
95 "Major mode for editing S+5 source. See `ess-mode' for more help."
96 (interactive)
97 (setq ess-customize-alist S+5-customize-alist)
98 (ess-mode S+5-customize-alist proc-name)
99 (if ess-imenu-use-S (ess-imenu-S)))
101 (defun S+5-transcript-mode ()
102 "S-PLUS 5 transcript mode."
103 (interactive)
104 (ess-transcript-mode S+5-customize-alist))
106 \f ; Provide package
108 (provide 'essd-sp5)
110 \f ; Local variables section
112 ;;; This file is automatically placed in Outline minor mode.
113 ;;; The file is structured as follows:
114 ;;; Chapters: ^L ;
115 ;;; Sections: ;;*;;
116 ;;; Subsections: ;;;*;;;
117 ;;; Components: defuns, defvars, defconsts
118 ;;; Random code beginning with a ;;;;* comment
120 ;;; Local variables:
121 ;;; mode: emacs-lisp
122 ;;; outline-minor-mode: nil
123 ;;; mode: outline-minor
124 ;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"
125 ;;; End:
127 ;;; essd-sp5.el ends here