[comp.emacs] use of 'interactive'

drw@cullvax.UUCP (Dale Worley) (08/04/87)

mayer@hplabsz.hpl.hp.com writes:
>How can I fool interactive "f" to give me "/dev/" as the default-directory,
>instead of using the buffer-local default-directory?

The online documentation for 'interactive' includes the note:

If the argument is not a string, it is evaluated to get a list of
arguments to pass to the function.

Thus, you can write:

	(interactive (list (read-file-name "prompt:" "/directory/")))

I've tried this sort of thing; it works.

Dale
-- 
Dale Worley	Cullinet Software		ARPA: cullvax!drw@eddie.mit.edu
UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw
From the Temple of St. Cathode of Vidicon: