(ess-r-args-get): Do not use zap-to-char within defun,
[ess.git] / lisp / essd-omg.el
blob8b47d062e030e391c5d30ddec9df9159122cc2e9
1 ;;; essd-omg.el --- Omega customization
3 ;; Copyright (C) 1999 A. J. Rossini
4 ;; Copyright (C) 2000--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: 15 August 1999
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 ;;; This file defines all the S-PLUS 3.x customizations for ess-mode.
32 ;;; Requires and Autoloads:
34 (require 'essl-omg)
36 (autoload 'inferior-ess "ess-inf" "Run an ESS process.")
37 (autoload 'ess-mode "ess-mode" "Edit an ESS process.")
39 ; Code:
41 (defvar OMG-dialect-name "OMG"
42 "Name of 'dialect' for Omega.") ;easily changeable in a user's .emacs
44 (defvar OMG-customize-alist
45 '((ess-local-customize-alist . 'OMG-customize-alist)
46 (ess-language . "OMG")
47 (ess-dialect . "omegahat")
48 (ess-suffix . "omg")
49 (ess-loop-timeout . 5000)
50 (ess-dump-filename-template . (ess-replace-regexp-in-string
51 "S$" ess-suffix ; in the one from custom:
52 ess-dump-filename-template-proto))
53 (ess-mode-editing-alist . OMG-editing-alist)
54 (ess-mode-syntax-table . OMG-syntax-table)
55 (ess-change-sp-regexp . "");fixme (if omegahat ever ..)
56 (ess-help-sec-regex . ess-help-S+-sec-regex)
57 (ess-help-sec-keys-alist . ess-help-S+sec-keys-alist)
58 (ess-object-name-db-file . "ess-omg-namedb.el" )
59 (inferior-ess-program . inferior-OMG-program-name)
60 (inferior-ess-objects-command . "objects(%d)\n")
61 (inferior-ess-help-command . "help(\"%s\",pager=\"cat\",window=F)\n")
62 (inferior-ess-exit-command . "q()\n")
63 (inferior-ess-primary-prompt . "\\[[0-9]*\\]")
64 (inferior-ess-secondary-prompt . ".. ?")
65 (comint-use-prompt-regexp-instead-of-fields . t) ;; emacs 21 and up
66 (inferior-ess-start-file . nil) ;"~/.ess-omg")
67 (inferior-ess-start-args . ""))
68 "Variables to customize for OMG (Omegahat)")
71 (defun OMG (&optional start-args) ; proc-name)
72 "Call Omegahat, from the Omega Group for Statistical Computing."
73 (interactive "P")
74 (setq ess-customize-alist OMG-customize-alist)
75 (ess-write-to-dribble-buffer
76 (format "\n(OMG): ess-dialect=%s, buf=%s\n"
77 ess-dialect
78 (current-buffer)))
79 (let ((omg-start-args
80 (concat inferior-ess-start-args
81 (if start-args (read-string
82 "Starting Args [possibly -CORBA] ? ")
83 nil))))
84 (inferior-ess omg-start-args)))
88 (fset 'omegahat 'OMG)
90 (defun OMG-mode (&optional proc-name)
91 "Major mode for editing Omegahat source. NOT EVEN STARTED."
92 (interactive)
93 (setq ess-customize-alist OMG-customize-alist)
94 (ess-mode OMG-customize-alist proc-name)
95 ;;(java-mode)
96 (setq major-mode 'OMG-mode))
98 (fset 'omegahat-mode 'OMG-mode)
100 (defun OMG-transcript-mode ()
101 "Omegahat transcript mode."
102 (interactive)
103 (ess-transcript-mode OMG-customize-alist))
105 \f ; Provide package
107 (provide 'essd-omg)
109 \f ; Local variables section
111 ;;; This file is automatically placed in Outline minor mode.
112 ;;; The file is structured as follows:
113 ;;; Chapters: ^L ;
114 ;;; Sections: ;;*;;
115 ;;; Subsections: ;;;*;;;
116 ;;; Components: defuns, defvars, defconsts
117 ;;; Random code beginning with a ;;;;* comment
119 ;;; Local variables:
120 ;;; mode: emacs-lisp
121 ;;; outline-minor-mode: nil
122 ;;; mode: outline-minor
123 ;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"
124 ;;; End:
126 ;;; essd-omg.el ends here