help-gnu-emacs
[Top][All Lists]
Advanced

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

Interactive and successive completing-reads?


From: Hattuari
Subject: Interactive and successive completing-reads?
Date: Thu, 28 Oct 2004 09:13:44 -0400
User-agent: KNode/0.8.1

I can use this code to prompt the user for successive inputs:


(defun paste-gl-array(gl-type gl-order gl-vector)
  "Map OpenGL types to corresponding sufixes.(GL\'type\' )"
  (interactive "sType: \nnNumber 1 to 4: \nsVector: ")
  (message " gl-type=%s, gl-order=%d, gl-vector=%s, suffix=%s"
           gl-type gl-order gl-vector
           (assoc  gl-type gl-type-alist)))


I can uses this to prompt the user for specific strings which I provide in
gl-type-alist:

(defvar gl-type nil)

(defun gl-data-read ()
  "Read a GLdata type from the minibuffer: "
  (interactive)
  (setq gl-type (completing-read
                  "GL Data Type: "
                  gl-type-alist
                  nil t "GL"))
  (message "gl-type=%s" gl-type)
  )

I would like to do both of the above in one invocation of an interactive
command.  Can this be done by somehow integrating the two forms above? 
Should I, instead, simply evalueate successive `completing-read' forms from
one enclosing form and forget about using the first form above?
-- 
p->m == (*p).m == p[0].m


reply via email to

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