[Top][All Lists]

[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

I have the following function in my .emacs (or rather Preferences.el
on Aquamacs)

 (defun send-to-R-app ()
  "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 "\""
                       "end tell"
                ) ))
  (global-set-key (kbd "A-r")

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)

Could someone help me out on this?
Thank you

reply via email to

[Prev in Thread] Current Thread [Next in Thread]