all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.