Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
2701 views
1
;;; ess-omg-d.el --- Omega customization
2
3
;; Copyright (C) 1999 A. J. Rossini
4
;; Copyright (C) 2000--2004 A.J. Rossini, Richard M. Heiberger, Martin
5
;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
6
7
;; Author: A.J. Rossini <[email protected]>
8
;; Created: 15 August 1999
9
;; Maintainer: ESS-core <[email protected]>
10
11
;; Keywords: languages
12
13
;; This file is part of ESS.
14
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.
19
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.
24
25
;; A copy of the GNU General Public License is available at
26
;; http://www.r-project.org/Licenses/
27
28
;;; Commentary:
29
30
;; This file defines all the S-PLUS 3.x customizations for ess-mode.
31
32
;;; Code:
33
34
;;; Requires and Autoloads:
35
36
(require 'ess-omg-l)
37
38
(autoload 'inferior-ess "ess-inf" "Run an ESS process.")
39
(autoload 'ess-mode "ess-mode" "Edit an ESS process.")
40
41
(defvar OMG-dialect-name "OMG"
42
"Name of 'dialect' for Omega.") ;easily changeable in a user's .emacs
43
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 . t)
66
(inferior-ess-start-file . nil) ;"~/.ess-omg")
67
(inferior-ess-start-args . ""))
68
"Variables to customize for OMG (Omegahat)")
69
70
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)))
85
86
87
88
(fset 'omegahat 'OMG)
89
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))
97
98
(fset 'omegahat-mode 'OMG-mode)
99
100
(defun OMG-transcript-mode ()
101
"Omegahat transcript mode."
102
(interactive)
103
(ess-transcript-mode OMG-customize-alist))
104
105
; Provide package
106
107
(provide 'ess-omg-d)
108
109
; Local variables section
110
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
118
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:
125
126
;;; ess-omg-d.el ends here
127
128