Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!im4u!rutgers!sri-spam!mordor!lll-tis!ptsfa!ihnp4!homxb!genesis!hotlg!nz From: nz@hotlg.ATT (Neal Ziring) Newsgroups: comp.emacs Subject: Re: interpreting keystrokes from emacs lisp Message-ID: <110@hotlg.ATT> Date: Fri, 12-Jun-87 13:52:27 EDT Article-I.D.: hotlg.110 Posted: Fri Jun 12 13:52:27 1987 Date-Received: Sun, 21-Jun-87 00:38:50 EDT References: <1054@theory.cs.cmu.edu> Reply-To: nz@hotlg.UUCP (Neal Ziring) Distribution: na Organization: AT&T-BL Dept. 54315 Lines: 24 In article <1054@theory.cs.cmu.edu> dld@theory.cs.cmu.edu.UUCP writes: > I would like to find out if is is possible in gnu emacs emacs lisp > call something with a string argument that will have the same effect > as if I had typed the string to the current environment. If this is a > way to do this, could someone tell me about it? > > Dave Yes, it is not only possible, but fairly easy. For instance, let's say that the variable just-built-cmd-string holds a sequence of control, escape, and regular characters: (let (tempdef) (fset tempdef just-build-cmd-string) (execute-kbd-macro def)) This is the only way of doing that I know, from Elisp. You could define an Elisp function that accepts strings, processes them in some way, then executes them using the fragment above. -- ...nz (Neal Ziring @ ATT-BL Holmdel, x2354, 3H-437) "You can fit an infinite number of wires into this junction box, but we usually don't go that far in practice." London Electric Co. Worker, 1880s