*** empty log message ***
[ess.git] / lisp / ess-send2.el
blob462b4a46bcf6dffd2d0910bf7a5fb94f10ef6ac0
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."
8 (interactive)
9 (if mark-active
10 (buffer-substring-no-properties (region-beginning) (region-end))
11 (word-at-point)))
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"
19 (interactive)
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)
26 tail)
27 commands-buffer))
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)'."
33 ;; (interactive)
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
40 ;; to be displayed.
41 ;;
42 ;; popup menu items:
43 ;; summary
44 ;; print
45 ;; show
46 ;; help
47 ;; dump to buffer
48 ;; Edit.data (with optional location: window/buffer/frame)
49 ;; drilldown
50 ;; place in quotes (needed to get help on "[[" for example)
51 ;; browser on
52 ;; browser off
53 ;; browser popup menu
54 ;; add your own item to this menu