1 ;;(defun ess-eval-string (string) "" body)
2 ;;(defun ess-eval-string-popup (string) "" body)
3 ;;(defun ess-eval-string-buffer (string) "" body)
5 (defun ess-region-or-word-at-point ()
6 "If the region is active, return the contents of the region.
7 If the region is not active, return the word-at-point."
10 (buffer-substring-no-properties (region-beginning) (region-end))
14 (defun ess-eval-expanded (&optional head tail commands-buffer
)
15 "Send the expanded region or word-at-point to the inferior-ess
16 process after first concating the head and tail. If the region is
17 active, the function uses the current region. If the region is not
18 active, the function uses the word-at-point"
20 (if (not head
) (setq head
"summary("))
21 (if (not tail
) (setq tail
")"))
22 (if (not commands-buffer
) (setq commands-buffer
23 (get-buffer-create "tmp-buffer")))
24 (ess-command (concat head
25 (ess-region-or-word-at-point)
28 (define-key ess-mode-map
"\C-c\C-w" 'ess-eval-expanded
)
30 ;; (defun ess-expand-string (string &optional head tail)
31 ;; "Expand the STRING by concating the HEAD and TAIL.
32 ;; Default result is 'summary(string)'."
34 ;; (if (not head) (setq head "summary("))
35 ;; (if (not tail) (setq tail ")"))
36 ;; (concat head string tail))
39 ;; Write a popup Edit-data-menubar that will allow attributes and components
48 ;; Edit.data (with optional location: window/buffer/frame)
50 ;; place in quotes (needed to get help on "[[" for example)
54 ;; add your own item to this menu