~ubuntu-branches/ubuntu/edgy/ess/edgy

« back to all changes in this revision

Viewing changes to lisp/ess-site.el

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2005-03-22 13:48:07 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050322134807-9mpmbb799jugf248
Tags: 5.2.6-1
* New upstream release
* chmod -R u+w on orig source

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
;;; ess-site.el --- user customization of ess-mode
 
1
;;; ess-site.el --- user customization of ESS
2
2
 
3
3
;; Copyright (C) 1993 David M. Smith
4
 
;; Copyright (C) 1997--2001 A.J. Rossini, R.M. Heiberger, Martin
5
 
;; Maechler, Kurt Hornik, Rodney Sparapani.
 
4
;; Copyright (C) 1997--2004 A.J. Rossini, Rich M. Heiberger, Martin
 
5
;;      Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
6
6
 
7
 
;; Author: David Smith <D.M.Smith@lancaster.ac.uk>
8
 
;; Maintainer: A.J. Rossini <rossini@biostat.washington.edu>
 
7
;; Original Author: David Smith <D.M.Smith@lancaster.ac.uk>
9
8
;; Created: 12 Nov 1993
10
 
;; Modified: $Date: 2002/01/21 03:21:26 $
11
 
;; Version: $Revision: 5.86 $
12
 
;; RCS: $Id: ess-site.el,v 5.86 2002/01/21 03:21:26 rmh Exp $
13
 
;;
 
9
;; Maintainers: ESS-core <ESS-core@stat.math.ethz.ch>
 
10
 
14
11
;; Keywords: start up, configuration.
15
12
 
16
13
;; This file is part of ESS
37
34
;;; directory location of this file must be supplied in
38
35
;;; ess-lisp-directory.  The editing of remaining sections is
39
36
;;; optional.  It should then be byte-compiled, and users who wish to
40
 
;;; use ess-mode should add the line:
 
37
;;; use ESS should add the line:
41
38
;;;    (load "/PATH/TO/THIS/FILE/ess-site")
42
39
;;; (where /PATH/TO/THIS/FILE is the path to ess-site.elc: i.e. the
43
40
;;; value of ess-lisp-directory, below) to their .emacs file.
48
45
;;; will work.
49
46
;;;
50
47
;;; with XEmacs, this is simply:
51
 
;;;      (add-path "/path/to/ess/lisp-directory")
 
48
;;;      (add-path "/path/to/ess/lisp-directory")
52
49
;;; with Emacs (and in general):
53
 
;;;      (setq load-path (cons "/path/to/ess/lisp-directory" load-path)
 
50
;;;      (setq load-path (cons "/path/to/ess/lisp-directory" load-path)
54
51
;;;
55
52
 
56
53
;; provide here; otherwise we'll get infinite loops of (require ..):
77
74
  ;; WARNING: with Emacs 20.2 (and 20.3 in one case),
78
75
  ;; =======  MUST USE ONE OF THE NON-DEFAULT SETTINGS BELOW
79
76
 
 
77
  ;; NOTE again: MOST people should NOT change anything here !!!
 
78
  ;; ====        ====        ================
 
79
 
80
80
  ;; A nice default
81
81
  (defvar ess-lisp-directory
82
82
    (if (and (boundp 'load-file-name) load-file-name)
123
123
        ;; we use functions not in 19.28, so include them
124
124
        (load-file (concat ess-lisp-directory "/19.29/extras.el"))
125
125
        (load-file (concat ess-lisp-directory "/19.29/easymenu.el"))
126
 
;;      (if window-system  ;;  essl-sas wants these even without window-system
 
126
;;      (if window-system  ;;  essl-sas wants these even without window-system
127
127
            (progn
128
128
              ;; comment and reference faces
129
129
              (load-file (concat ess-lisp-directory
147
147
                (if (setq directory (file-name-directory filename))
148
148
                    (expand-file-name (substring file 0 (match-beginning 0))
149
149
                                      directory)
150
 
                  (substring file 0 (match-beginning 0)))
 
150
                  (substring file 0 (match-beginning 0)))
151
151
              filename)))))
152
152
 
153
 
  (add-to-list 'load-path ess-lisp-directory)
 
153
  (add-to-list 'load-path (file-name-as-directory ess-lisp-directory))
154
154
 
155
155
  ;; Need these as early as here [also in ./ess-comp.el] :
156
156
  (if (not (boundp 'ess-show-load-messages))
170
170
;;; The following require sets the following ess-local-custom-available to
171
171
;;; true if custom is provided at this point.  If we think it will be,
172
172
;;; then we can use the following (uncommented out) to make sure that
173
 
;;; it will be.  (AJR).
 
173
;;; it will be.  (AJR).
174
174
(require 'ess-emcs)
175
175
;; This will override what Emacs thinks it can detect.
176
176
;;(setq ess-local-custom-available t); if custom is available, uncomment
177
177
 
178
 
 
179
 
;;; (1.2) Uncomment the following 4 lines to fix the infopath, if needed.
180
 
;;(defun add-info-path (newpath)
181
 
;;  (setq Info-default-directory-list
182
 
;;      (cons (expand-file-name newpath) Info-default-directory-list)))
183
 
;;(add-info-path (concat ess-lisp-directory "/../doc/"))
184
 
 
 
178
;; SJE Thu 13 May 2004
 
179
;; Maybe ess-etc-directory should not be defcustom, since its value
 
180
;; depends on ess-lisp-directory, and is needed by other modes that are
 
181
;; loaded before the custom code.
 
182
(defvar ess-etc-directory nil
 
183
  "*Location of the ESS etc/ directory.
 
184
The ESS etc directory stores various auxillary files that are useful
 
185
for ESS, such as icons.")
 
186
 
 
187
(defvar ess-etc-directory-list
 
188
  '("../etc/" "../etc/ess/" "../../etc/ess/" "./etc/")
 
189
  "*List of directories, relative to `ess-lisp-directory', to search for etc.")
 
190
 
 
191
(while (and (listp ess-etc-directory-list) (consp ess-etc-directory-list))
 
192
  (setq ess-etc-directory
 
193
        (expand-file-name (concat ess-lisp-directory "/"
 
194
                                  (car ess-etc-directory-list))))
 
195
  (if (file-directory-p ess-etc-directory)
 
196
      (setq ess-etc-directory-list nil)
 
197
    (setq ess-etc-directory nil)
 
198
    (setq ess-etc-directory-list (cdr ess-etc-directory-list))
 
199
    (when (null ess-etc-directory-list)
 
200
      (beep 0) (beep 0)
 
201
      (message (concat
 
202
                "ERROR:ess-site.el:ess-etc-directory\n"
 
203
                "Relative to ess-lisp-directory\n"
 
204
                "At least one of ../etc, ../etc/ess, ../../etc/ess must exist!"))
 
205
      (sit-for 4))))
 
206
 
 
207
(defvar ess-info-directory nil
 
208
  "*Location of the ESS info/ directory.
 
209
The ESS info directory stores the ESS info files.")
 
210
 
 
211
;;(1.2) If ess.info is not found, then ess-lisp-directory/../doc/info is added
 
212
;; resurrecting Stephen's version with a bug-fix & xemacs compatibility
 
213
(unless
 
214
    (member t
 
215
        (mapcar 'file-exists-p
 
216
            (mapcar '(lambda (x) (concat (file-name-as-directory x) "ess.info"))
 
217
                (if (featurep 'xemacs)
 
218
                    Info-directory-list Info-default-directory-list))))
 
219
    (add-to-list (if (featurep 'xemacs)
 
220
                     'Info-directory-list 'Info-default-directory-list)
 
221
                     (expand-file-name
 
222
                         (concat ess-lisp-directory "/../doc/info/"))))
185
223
 
186
224
;;; (1.3) Files ending in .q and .S are considered to be S source files
187
225
;;; Files ending in .St are considered to be S transcript files
 
226
;;;
188
227
;;; NB: in standard Emacs, files ending in .s are assembler files.  If you
189
 
;;; want to use assembler, comment the appropriate
190
 
;;; line below.
 
228
;;; want to use assembler, you can comment the appropriate line below.  Of
 
229
;;; course, different users will want different modes.  If a user wants to
 
230
;;; restore default the default modes for assembly file extensions, the
 
231
;;; following can go into ~/.emacs:
 
232
;;;
 
233
;;;  (add-hook 'ess-mode-hook 'ess-restore-asm-extns)
 
234
;;;  (add-hook 'inferior-ess-mode-hook 'ess-restore-asm-extns)
191
235
 
192
236
(autoload 'Rd-mode "essddr" "Major mode for editing R documentation." t)
193
237
 
194
 
;; This fails in Emacs.  How can it be done simply?  Should it be
195
 
;; done?  It works in XEmacs.
196
 
;;    ;; get rid of assembler mode.
197
 
;;    (set auto-mode-alist (remassoc "\\.[sS]\\'" auto-mode-alist))
198
 
;; Our current solution is as follows.
 
238
;; This is thanks to  Ed L Cashin <ecashin@uga.edu>, 03 Mar 2004 :
 
239
(defun ess-restore-asm-extns ()
 
240
  "take away the S-Plus mode association for .s and .S files added by ESS
 
241
Putting the following in ~/.emacs restores emacs' default association
 
242
between .s or .S files and assembly mode.
 
243
 
 
244
  (add-hook 'ess-mode-hook 'ess-restore-asm-extns)
 
245
  (add-hook 'inferior-ess-mode-hook 'ess-restore-asm-extns)
 
246
"
 
247
  (interactive)
 
248
  (if (assoc "\\.[qsS]\\'" auto-mode-alist)
 
249
      (progn
 
250
        (setq auto-mode-alist
 
251
              (remassoc "\\.[qsS]\\'" auto-mode-alist))
 
252
        ;; put .q extention back
 
253
        ;; (add-to-list is in xemacs and GNU emacs)
 
254
        (add-to-list 'auto-mode-alist '("\\.q\\'" . S-mode)))))
199
255
 
200
256
;; Be careful when editing the following. MISTAKES WILL RESULT IN
201
257
;; *.sty BEING TREATED AS ESS[S], rather than LaTeX-mode!
203
259
(if (assoc "\\.[rR]\\'" auto-mode-alist) nil
204
260
  (setq auto-mode-alist
205
261
        (append
206
 
         '(("\\.sp\\'"    . S-mode) ;; re: Don MacQueen <macq@llnl.gov>
207
 
           ("\\.[qsS]\\'" . S-mode) ;; q,s,S
208
 
           ("\\.ssc\\'"   . S-mode) ;; Splus 4.x script files.
209
 
           ("\\.[rR]\\'"  . R-mode)
 
262
         '(("\\.sp\\'"          . S-mode) ;; re: Don MacQueen <macq@llnl.gov>
 
263
           ("\\.[qsS]\\'"       . S-mode) ;; q,s,S [see ess-restore-asm-extns above!]
 
264
           ("\\.ssc\\'"         . S-mode) ;; Splus 4.x script files.
 
265
           ("\\.[rR]\\'"        . R-mode)
 
266
           ("\\.[rR]nw\\'"      . Rnw-mode)
210
267
           ("\\.[rR]profile\\'" . R-mode)
 
268
           ("NAMESPACE\\'"      . R-mode)
211
269
           ("\\.omg\\'"         . omegahat-mode)
212
270
           ("\\.hat\\'"         . omegahat-mode) ;; Duncan's pref'd...
213
271
           ("\\.lsp\\'"         . XLS-mode)
214
272
           ("\\.do\\'"          . STA-mode)
215
273
           ("\\.ado\\'"         . STA-mode)
216
 
           ("\\.sas\\'"         . SAS-mode)
217
 
           ("\\.SAS\\'"         . SAS-mode)
218
 
           ;;("\\.lst\\'"               . SAS-listing-mode);sasl
219
 
           ;; Too many *.log files, not only SAS :
220
 
           ;;("\\.log\\'"       . SAS-log-mode);sasl
 
274
           ("\\.[Ss][Aa][Ss]\\'"        . SAS-mode)
 
275
           ;; Many .log/.lst files, not just SAS
 
276
           ;;("\\.log\\'"       . SAS-log-mode)
 
277
           ;;("\\.lst\\'"       . SAS-listing-mode)
221
278
           ("\\.[Ss]t\\'"       . S-transcript-mode)
222
279
           ("\\.[Ss]out"        . S-transcript-mode)
223
280
           ("\\.[Rr]t\\'"       . R-transcript-mode)
252
309
;;(setq-default inferior-S+6-program-name "Splus6")
253
310
;;(setq-default inferior-R-program-name "R")      ; unix systems
254
311
;;(setq-default inferior-R-program-name "Rterm")  ; msdos systems
 
312
;;(setq-default inferior-R-program-name "C:\\Program Files\\R\rw1081\\bin\\Rterm.exe")  ; msdos systems
255
313
;;(setq-default inferior-XLS-program-name "xlispstat")
256
314
;;(setq-default inferior-ARC-program-name "arc")
257
315
;;(setq-default inferior-VST-program-name "vista")
288
346
;;; These commands are for running the PC version of Sqpe of S+4 and
289
347
;;; S+6 in an emacs buffer, using the same technology as ESS uses for
290
348
;;; Unix S-Plus.  Interactive graphics are unavailable in this mode.
291
 
;;; See essd-sp4.el or essdsp6w.el
 
349
;;; See essd-sp4.el or essd-sp6w.el
292
350
 
293
351
;;; These are the defaults.  Change them here if the defaults don't work.
294
352
;;; Use the 8.3 version of the pathname because embedded blanks will cause
302
360
;;(setq-default inferior-Sqpe+6-SHOME-name "c:/progra~1/Insightful/SPLUS6")
303
361
;;(setq-default inferior-Sqpe+6-program-name "c:/progra~1/Insightful/SPLUS6/cmd/Sqpe.exe")
304
362
 
305
 
;;; These ddeclient values will be buffer-local on WS-Windows 9x/NT
 
363
;;; These ddeclient values will be buffer-local on MS-Windows 9x/NT
306
364
(setq-default inferior-ess-ddeclient         "Initial")
307
365
(setq-default inferior-ess-client-name       "Initial")
308
366
(setq-default inferior-ess-client-command    "Initial")
309
367
 
 
368
;;; S-Plus 6 for Windows startup time depends on the amount of RAM and
 
369
;;; the processor speed.  ESS needs to build a delay into the M-x S+6
 
370
;;; sequence to allow time for S-Plus 6 to open the Commands window.
 
371
;;; We then send several lines to the Commands window before returning
 
372
;;; control to the user.  On a 300 MHz machine with 96MB of RAM the
 
373
;;; delay is 60 seconds.  On a ???? MHz machine with 523MB the delay is
 
374
;;; 10 seconds.  The user may need to adjust this number.
 
375
(defvar ess-S+6-startup-delay 15 ;; <- 2005-01-03; MM
 
376
"*Number of seconds to wait for the Commands window to appear before
 
377
sending `inferior-ess-language-start' to S-Plus.")
310
378
 
311
379
 
312
380
;;; see essd-els.el
325
393
 
326
394
 
327
395
;; (1.5) Require the needed dialects for your setup.
328
 
(if (< max-specpdl-size 700)     ;;; ESS won't load at the default of 600
 
396
(if (< max-specpdl-size 700)     ;;; ESS won't load at the default of 600
329
397
    (setq max-specpdl-size 700))
330
398
 
331
399
(ess-message "[ess-site:] Before requiring dialect 'essd-** ....")
332
400
(ess-message "[ess-site:] require 'essd-r ...")
333
 
(require 'essd-r)    ;; S and common variants
334
 
(ess-message "[ess-site:] require 'essd-s4 ...")
335
 
(require 'essd-s4)
 
401
(require 'essd-r)    ;; R
 
402
;; (ess-message "[ess-site:] require 'essd-s4 ...")
 
403
;; (require 'essd-s4) ; has become VERY RARE ..
 
404
 
336
405
;;(ess-message "[ess-site:] require 'essd-s3 ...")
337
406
;;(require 'essd-s3)  ; THIS IS RARE.  You probably do not have this.
 
407
 
 
408
;; "sp" refers to S-PLUS (MathSoft/StatSci/Insightful):
338
409
(ess-message "[ess-site:] require 'essd-sp3 ...")
339
 
(require 'essd-sp3)  ;; "sp" refers to S-PLUS (MathSoft/StatSci).
 
410
(require 'essd-sp3)
340
411
 
341
412
(if ess-microsoft-p
342
413
    (progn
343
414
      (ess-message "[ess-site:] require 'essd-sp4 ...")
344
415
      (require 'essd-sp4)
345
 
      (ess-message "[ess-site:] require 'essdsp6w ...")
346
 
      (require 'essdsp6w))
 
416
      (ess-message "[ess-site:] require 'essd-sp6w ...")
 
417
      (require 'essd-sp6w))
 
418
  ;; else: decent OS
347
419
  (ess-message "[ess-site:] require 'essd-sp5 ...")
348
420
  (require 'essd-sp5)
349
421
  (ess-message "[ess-site:] require 'essd-sp6 ...")
359
431
(require 'essd-arc)  ;; Arc
360
432
(ess-message "[ess-site:] require 'essd-sas ...")
361
433
(require 'essd-sas)
362
 
(save-excursion                           ;;workaround for ess-smart-underscore
363
 
  (switch-to-buffer "unlikely-name.sas")  ;;workaround for ess-smart-underscore
364
 
  (sas-mode)                              ;;workaround for ess-smart-underscore
365
 
  (define-key sas-mode-local-map "_" nil) ;;workaround for ess-smart-underscore
366
 
  (kill-buffer "unlikely-name.sas"))      ;;workaround for ess-smart-underscore
367
434
(ess-message "[ess-site:] require 'essd-els ...")
368
435
(require 'essd-els)  ;; S-elsewhere, on another machine by telnet
369
436
(ess-message "[ess-site:] require 'essd-omg ...")
376
443
           ess-customize-alist))
377
444
 
378
445
;;; (1.7) Literate Data Analysis
379
 
;(require 'ess-noweb)
380
 
;(setq auto-mode-alist
381
 
;      (append
382
 
;       '(("\\.nw\\'"          . noweb-mode)) ;; Literate Data Analysis
383
 
;       auto-mode-alist))
 
446
(require 'ess-noweb)
384
447
 
385
448
;; ALWAYS:
386
 
(require 'ess)
 
449
(require 'ess); -> loads ess-cust.el and more
387
450
 
388
451
(ess-write-to-dribble-buffer
389
452
   (format "[ess-site.el _2_]: ess-customize-alist=%s \n"
390
453
           ess-customize-alist))
391
454
 
392
 
 
393
455
;; (1.8) Speedbar and mouse
394
456
 
395
457
(require 'ess-menu)
396
458
(require 'ess-mous)
397
459
 
 
460
;; (1.9) Toolbar support
 
461
 
 
462
;; To remove toolbar support under ESS, either comment-out
 
463
;; (require 'ess-toolbar) below, or add "(setq ess-use-toolbar nil)"
 
464
;; to your .emacs before (require 'ess-site).
 
465
(require 'ess-toolbar)
398
466
 
399
467
;;; 2. Site Specific setup
400
468
;;;; ===============================================
416
484
(autoload 'ess-transcript-mode "ess-trns"
417
485
  "Major mode for editing S transcript files." t)
418
486
 
419
 
;;; On a PC, the default is S+6.  
 
487
(autoload 'ess-rdired "ess-rdired"
 
488
  "View *R* objects in a dired-like buffer." t)
 
489
 
 
490
;;; On a PC, the default is S+6.
420
491
;; Elsewhere (unix and linux) the default is S+6
421
492
(cond (ess-microsoft-p ; MS-Windows
422
493
       (fset 'S 'S+6)
432
503
      (t                                ; Other Unixen
433
504
       (fset 'S 'S+6)
434
505
       (fset 's-mode 'S+6-mode)
435
 
       (fset 's-transcript-mode 'S+6-transcript-mode))
436
 
)
437
 
 
 
506
       (fset 's-transcript-mode 'S+6-transcript-mode)))
438
507
 
439
508
 
440
509
;;;;* Alias S-mode to s-mode
448
517
(fset 'S-transcript-mode 's-transcript-mode)
449
518
(fset 'S-mode 's-mode)
450
519
 
451
 
 
 
520
;;; Create functions for calling older versions of R and Sqpe.
 
521
(let ( (ess-sqpe-versions-created)
 
522
       (ess-rterm-versions-created)
 
523
       (ess-r-versions-created)
 
524
       (ess-versions-created)
 
525
       )
 
526
  (if ess-microsoft-p
 
527
      (progn
 
528
        (setq ess-sqpe-versions-created
 
529
              (ess-sqpe-versions-create))   ;; use ess-SHOME-versions
 
530
        (setq ess-rterm-versions (ess-find-rterm))
 
531
        (setq ess-rterm-versions-created
 
532
              (ess-rterm-versions-create))) ;; use ess-rterm-versions
 
533
    (setq ess-r-versions-created
 
534
          (ess-r-versions-create)))         ;; use ess-r-versions
 
535
 
 
536
  ;; Add the new defuns, if any, to the menu.
 
537
  ;; Check that each variable exists, before adding.
 
538
  ;; e.g. ess-sqpe-versions-created will not be created on Unix.
 
539
  (setq ess-versions-created
 
540
        (ess-flatten-list
 
541
         (mapcar (lambda(x) (if (boundp x) (symbol-value x) nil))
 
542
                 '(ess-r-versions-created
 
543
                   ess-rterm-versions-created ess-sqpe-versions-created))))
 
544
 
 
545
  (when ess-versions-created
 
546
    ;; new-menu will be a list of 3-vectors, of the form:
 
547
    ;; ["R-1.8.1" R-1.8.1 t]
 
548
    (let (( new-menu (mapcar '(lambda(x) (vector x (intern x) t))
 
549
                             ess-versions-created)))
 
550
    (easy-menu-add-item ess-mode-menu '("Start Process")
 
551
                        (cons "Other" new-menu)))))
452
552
 
453
553
 
454
554
;;; 3. Customization (and commented out examples) for your site
460
560
;;; process.  To number all processes, uncomment the next line.
461
561
;;(setq ess-plain-first-buffername nil)
462
562
 
463
 
 
464
 
 
465
563
;;; (3.1) Font-lock
466
564
;; The following two expressions automatically enable font-lock-mode
467
565
;; for ess-mode and inferior-ess-mode buffers.
468
566
 
469
 
;; XEmacs has font-lock for ttys, as well.  So we need a better check!
 
567
;; FIXME: XEmacs and Emacs 21.x has font-lock for ttys, as well.
 
568
;; So we need a better check! [or do this unconditionally -working everywhere ??]
470
569
(if window-system
471
570
    (progn
472
571
      (add-hook 'ess-mode-hook 'turn-on-font-lock t)
510
609
;;; (3.4) ess-ask-for-ess-directory
511
610
;;; If t, will ask for the directory to use.  If nil, assumes the
512
611
;;; default (usually, the users home directory...).
513
 
(setq ess-ask-for-ess-directory t)
 
612
;;now rather in ./ess-cust.el : (setq ess-ask-for-ess-directory t)
514
613
 
515
614
;;; (3.5) ess-directory default  (correlated with above)
516
615
;;; The default location for running the subprocess is configurable.
558
657
;;; There are two sets of alternatives.
559
658
;;;   1. Editing SAS-mode files.
560
659
;;;   1a. Default: TAB is bound to sas-indent-line.
561
 
;;;       Current line is correctly indented as SAS code.  Equivalent to
562
 
;;;(setq ess-sas-edit-keys-toggle 0) ;; default TAB in sas-mode
 
660
;;;       Current line is correctly indented as SAS code.  Equivalent to
 
661
;;;(setq ess-sas-edit-keys-toggle nil) ;; default TAB in sas-mode
563
662
;;;   1b. Optional: TAB is bound to tab-to-tab-stop and inserts up to 4
564
 
;;;       columns at a time.  C-TAB moves backwards and deletes characters
565
 
;;;       up to 4 columns at a time.
566
 
;;;       Uncomment the following line for the optional behavior.
567
 
;;;(setq ess-sas-edit-keys-toggle 1)   ;; optional TAB and C-TAB in sas-mode
568
 
;;;   Use the function call (ess-sas-edit-keys-toggle 0)
569
 
;;;   or                    (ess-sas-edit-keys-toggle 1)
 
663
;;;       columns at a time.  C-TAB moves backwards and deletes characters
 
664
;;;       up to 4 columns at a time.
 
665
;;;       Uncomment the following line for the optional behavior.
 
666
;;;(setq ess-sas-edit-keys-toggle t)   ;; optional TAB and C-TAB in sas-mode
 
667
;;;   Use the function call (ess-sas-edit-keys-toggle)
570
668
;;;   to change the setting after the first SAS-mode buffer has been created.
571
669
;;;   1c. You can also define C-TAB in all modes by specifying either
572
670
;;;(setq ess-sas-global-unix-keys t) ;; optional C-TAB bound in all modes
573
671
;;;(setq ess-sas-global-pc-keys t)   ;; optional C-TAB bound in all modes
574
 
;;;       See below. 
 
672
;;;       See below.
575
673
;;;
576
674
;;;   2. Managing submitted SAS jobs with function keys.
577
675
;;;   2a. Default: Function keys retain their global bindings.
582
680
;;;(setq ess-sas-global-pc-keys t)   ;; [f2]--[f8] bound in all modes
583
681
;;;
584
682
;;;   3. If it is more convenient to have "*Async Shell Command*"
585
 
;;;      in same-window-buffer-names, then uncomment the following line
 
683
;;;      in same-window-buffer-names, then uncomment the following line
586
684
;;;(ess-same-window-async)
587
685
;;;
588
 
;;;   4. As of 5.1.19, a new and improved syntax highlighting scheme for .sas and .log 
589
 
;;;      files is available (press f10 to toggle between modes in .log).  If you are
590
 
;;;      using XEmacs v. 20.x, then you need this as well, since it works around a 
591
 
;;;      problem with make-regexp.el.  Uncomment the next line for this feature:
592
 
;;;(setq ess-sas-run-make-regexp nil)
593
 
 
594
 
 
595
 
;(defvar sas-require-confirmation t
596
 
;  "*Require confirmation when revisiting sas-output which has changed on disk.")
597
 
;;; added sas-program 4/29/94.  user can specify a different version of sas.
598
686
;;;(defvar sas-program "sas" "*Name of program which runs sas.")
599
 
;;(defvar sas-pre-run-hook nil
600
 
;;  "Hook to execute prior to running SAS vis submit-sas.")
601
 
;;(defvar sas-options-string ""
602
 
;;  "*Options to be passed to sas as if typed on the command line.")
603
 
;;(defvar sas-indent-width 4 "*Amount to indent sas statements")
604
 
;;(defvar sas-notify t "*Beep and display message when job is done?")  ;; added 4/7/94
605
 
;;(defvar sas-error-notify t
606
 
;;  "*If sas-notify is t, then indicate errors in log file upon completion")
607
 
;;;; added 5/2/94
608
 
;;(defvar sas-get-options nil "Options to be passed to SAS in sas-get-dataset")
609
 
;;(defvar sas-get-options-history nil "History list of Options passed to SAS in sas-get-dataset")
610
 
;;(defvar sas-page-number-max-line 3
611
 
;;  "*Number of lines from the page break in which to search for the page number")
612
 
;;(defvar sas-indent-ignore-comment "*"
613
 
;;  "*Comments with start with this string are ignored in indentation.")
614
 
;;(defvar sas-notify-popup nil
615
 
;;  "*If t (and sas-notify is also t), causes emacs to create a
616
 
;;popup window when the SAS job is finished.")
617
 
;;(defvar sas-tmp-libname "_tmp_" "*Libname to use for sas-get-dataset.")
618
 
 
619
 
;;; 5.0 Noweb and Literate Data Analysis configuration
620
 
 
621
 
;; already above [1.7]: (require 'ess-noweb)
 
687
;;;
 
688
;;;(defvar sas-indent-width 4 "*Amount to indent sas statements")
622
689
 
623
690
 ; Local variables section
624
691