Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!rutgers!njin!princeton!phoenix!eliot From: eliot@phoenix.Princeton.EDU (Eliot Handelman) Newsgroups: comp.emacs Subject: Re: Two GNU Emacs questions. Message-ID: <6374@phoenix.Princeton.EDU> Date: 14 Feb 89 07:21:59 GMT References: Reply-To: eliot@phoenix.Princeton.EDU (Eliot Handelman) Distribution: usa Organization: Princeton University, NJ Lines: 24 In article ljz@fx.com (Lloyd Zusman) writes: >I'm running GNU Emacs 18.52 under SunOS 3.5 on a network of Sun 3/xxx's, and >I have a couple of questions: [I don't know the answer to your first question] >2) My next question involves the following Elisp code fragment: > Is there any way, through macros, obscure functions, or whatever, > for me to do something to "my-variable" so that its function > gets evaluated when I type its name without the enclosing > parentheses? I don't know that much about Emacs Lisp but in most lisps you would have to do redefine the read-eval-print loop. Essentially what you would then want would be a global variable onto which you could push variables that were meant to be called as functions. Your loop would then have to check if the expression were an atom, and if so it would look for membership in your global var. If found, you could then funcall it. All of this is easy in Common Lisp, I don't know how much of a pain it would be in Elisp. Basically, it's easier to type the parens. Also you wouldn't be able to pass parameters to functions that were meant to be run in this way. Seems to me that your best bet is just to bind some key to your function.