unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Evaluating a variable under point?
@ 2010-06-30 14:33 Elena
       [not found] ` <877hlgtwhb.fsf@fh-trier.de>
  0 siblings, 1 reply; 3+ messages in thread
From: Elena @ 2010-06-30 14:33 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm trying to write an interactive function which evaluates variable
at point, unless region is active. Currently it looks like this:

(defun smart-eval ()
	(interactive)
	(if mark-active
		(eval-region)
		(case (char-syntax  (char-after))
		  ((?w ?_)
		   (eval-expression (string (thing-at-point 'symbol))))
		  (t
		   (message "Nothing to evaluate.")))))

However, I'm not getting results. What's wrong?

Thanks.


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

end of thread, other threads:[~2010-06-30 19:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 14:33 Evaluating a variable under point? Elena
     [not found] ` <877hlgtwhb.fsf@fh-trier.de>
2010-06-30 15:07   ` Elena
2010-06-30 19:18     ` Andreas Politz

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