Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!hplabs!hplabsz!mayer From: mayer@hplabsz.HPL.HP.COM (Niels Mayer) Newsgroups: comp.emacs Subject: question on using "interactive" declaration in GnuEmacs Message-ID: <599@hplabsz.HPL.HP.COM> Date: Sat, 1-Aug-87 23:40:17 EDT Article-I.D.: hplabsz.599 Posted: Sat Aug 1 23:40:17 1987 Date-Received: Sun, 2-Aug-87 23:42:27 EDT Reply-To: mayer@hplabsz.UUCP (Niels Mayer) Organization: Hewlett-Packard Laboratories Lines: 26 Consider the following function that prompts for a device file with name completion: (defun frob-device (path) (interactive "fEnter device-name: ") ) How can I fool interactive "f" to give me "/dev/" as the default-directory, instead of using the buffer-local default-directory? I can certainly get the needed prompting functionality by using the read-file-name function, however, if I do so, I will need an interactive function frob-device of no arguments which calls read-file-name and then passes the path onto the non-interactive function frob-device-aux. Frob-device-aux would also be the programmatic interface to frob-device that people could call from ~/.emacs, for example. --> YUK Ideally, interactive would provide extended prompt reading functionality by allowing users to pass it a function to read every argument. In my case, I'd want something like: (interactive "(read-file-name \"Enter device-name: \" \"/dev/\")"). -- Niels. (mayer@hplabs.hp.com) (hplabs!mayer)