[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invalid Function while using setq

From: Lennart Borgman (gmail)
Subject: Re: Invalid Function while using setq
Date: Sat, 12 Jan 2008 22:12:28 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

sapsi wrote:
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))(

Remove the last ( above.

                (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)

reply via email to

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