unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Invalid Function while using setq
@ 2008-01-12 17:58 sapsi
  2008-01-12 21:12 ` Lennart Borgman (gmail)
  2008-01-14 17:16 ` Joel J. Adamson
  0 siblings, 2 replies; 3+ messages in thread
From: sapsi @ 2008-01-12 17:58 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-14 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 17:58 Invalid Function while using setq sapsi
2008-01-12 21:12 ` Lennart Borgman (gmail)
2008-01-14 17:16 ` Joel J. Adamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).