help-gnu-emacs
[Top][All Lists]
Advanced

[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:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

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

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 "\""
                       "\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)))





reply via email to

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