~ubuntu-branches/ubuntu/wily/ess/wily

« back to all changes in this revision

Viewing changes to lisp/essd-els.el

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2013-12-07 13:26:27 UTC
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: package-import@ubuntu.com-20131207132627-mz1170cktcl0arck
Tags: upstream-13.09-1
ImportĀ upstreamĀ versionĀ 13.09-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
      (add-to-list 'ess-process-name-list
160
160
                   (list ess-current-process-name)))))
161
161
 
 
162
(defvar ess-remote nil
 
163
  "Indicator, t in ess-remote buffers.")
162
164
 
163
165
(defun ess-remote (&optional proc-name)
164
166
  "Execute this command from within a buffer running a process.  It
185
187
             (current-buffer)))
186
188
    (ess-setq-vars-local ess-customize-alist)
187
189
    (inferior-ess-mode)
 
190
    (set (make-local-variable 'ess-remote) t)
188
191
    (setq ess-local-process-name (or proc-name ess-current-process-name))
189
192
 
190
 
    (ess-process-put 'funargs-cache (make-hash-table :test 'equal))
191
 
    (ess-process-put 'funargs-pre-cache nil)
192
 
    (ess-load-extras)
193
 
 
194
193
    (goto-char (point-max))
195
 
    (when inferior-ess-language-start
196
 
        (ess-eval-linewise inferior-ess-language-start
197
 
                           nil nil nil 'wait-prompt))
198
194
 
199
 
    ;; todo: this is ugly, add to customise alist
200
195
    (when (equal ess-dialect "R")
201
 
        (ess--inject-code-from-file (format "%sESSR.R" ess-etc-directory)))
202
 
    ;; (ess-load-extras t) ;; not working
203
 
 
 
196
      ;; ugly fix for evn variable. What can we do :(
 
197
      (ess-eval-linewise (format "options(pager='%s')\n" inferior-ess-pager)
 
198
                         nil nil nil 'wait)
 
199
      (ess--R-load-ESSR))
204
200
 
205
201
    (when (equal ess-dialect "S+")
206
 
        (ess-command ess-S+--injected-code))
 
202
      (ess-command ess-S+--injected-code))
207
203
 
208
204
    (when (equal ess-language "SAS")
209
205
      (font-lock-mode 0)
210
206
      (SAS-log-mode)
211
207
      (shell-mode)
212
208
      (setq buffer-read-only nil)
213
 
      (font-lock-mode 1))))
 
209
      (font-lock-mode 1))
 
210
 
 
211
    (ess-process-put 'funargs-cache (make-hash-table :test 'equal))
 
212
    (ess-process-put 'funargs-pre-cache nil)
 
213
    (ess-process-put 'accum-buffer-name (format " *%s:accum*" ess-local-process-name))
 
214
    (ess-load-extras)
 
215
 
 
216
    (when inferior-ess-language-start
 
217
      (ess-eval-linewise inferior-ess-language-start
 
218
                         nil nil nil 'wait-prompt))))
214
219
 
215
220
 
216
221
 ; Provide package