Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site topaz.ARPA Path: utzoo!watmath!clyde!cbosgd!cbdkc1!desoto!packard!topaz!gallaher From: gallaher@topaz.ARPA (Mike Gallaher) Newsgroups: net.emacs Subject: Re: Mlisp function gone astray. Message-ID: <1004@topaz.ARPA> Date: Mon, 18-Mar-85 23:31:38 EST Article-I.D.: topaz.1004 Posted: Mon Mar 18 23:31:38 1985 Date-Received: Tue, 19-Mar-85 07:54:07 EST References: <456@cadovax.UUCP> Organization: MamaLiz's Soup Kitchen Lines: 20 The problem is that the strings that are being pushed back need a terminator, just as when you are really typing them in. The string that Emacs sees in the example given is \ex\exuse-global-map ¤t-keymap The second \e is taken to be the terminator for the command, and the rest is just seen as text to be inserted. The corrected code fragment is (push-back-string "use-global-map ¤t-keymap\e") (push-back-string "\e\ex") (push-back-string command) (push-back-string "\ex") You can also do fun things like this by using the fact that keymaps can be executed as if they were functions -- after all, a keymap is considered a macro; that's why keymaps appear in the list generated by ESC-x? Anything that can be bound to a key can be executed. Mike Gallaher