[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: tab completion for a custom function.

From: Drew Adams
Subject: RE: tab completion for a custom function.
Date: Tue, 3 Feb 2009 07:09:17 -0800

> i have a custom function that gets input a project name then
> it opens projects main file and two terminal's in to project 
> directories. i get the input using (interactive "sProject: ")
> i want to use tab completion for project names. instead of
> typing the whole name. can i supply a list of names to the
> interactive function?

No. But you can use Lisp code other than a string in the argument to
`interactive'. The code should return the list of the arguments. The code can
call `completing-read' to read user input with completion.

  (list (completing-read "Project: " (my-list-of-projects) ...)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]