[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Invalid Function while using setq
From: |
sapsi |
Subject: |
Invalid Function while using setq |
Date: |
Sat, 12 Jan 2008 09:58:59 -0800 (PST) |
User-agent: |
G2/1.0 |
Hello,
I have the following function in my .emacs (or rather Preferences.el
on Aquamacs)
(defun send-to-R-app ()
(interactive)
"Sends the selection to R.App"
(let ( (myStr2 nil) (mystr nil))(
(setq mystr (buffer-substring-no-properties (mark) (point)))
(setq myStr2 (replace-regexp-in-string "\"" "'" mystr ) )
(do-applescript (concat "tell application \"R\" \r"
"cmd "
"\"" myStr2 "\""
"\r"
"end tell"
))
) ))
(global-set-key (kbd "A-r")
'send-to-R-app)
When i start emacs, i get this error
`(setq mystr (buffer-substring-no-properties (mark) (point)))' is a
malformed function.
I have no idea why, also if select the code fragement and type M-x
eval-region and then select some code and type M-x send-to-R-app, i
get a similar error
Invalid function setq mystr (buffer-substring-no-properties (mark)
(point)))
Could someone help me out on this?
Thank you
Saptarshi
- Invalid Function while using setq,
sapsi <=