unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hattuari <susudata@setidava.kushan.aa>
Subject: Interactive and successive completing-reads?
Date: Thu, 28 Oct 2004 09:13:44 -0400	[thread overview]
Message-ID: <l4OdndkbZvWUbB3cRVn-iQ@speakeasy.net> (raw)

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	other threads:[~2004-10-28 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-28 13:13 Hattuari [this message]
2004-10-28 16:46 ` Interactive and successive completing-reads? Kevin Rodgers
2004-10-28 22:36   ` Hattuari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=l4OdndkbZvWUbB3cRVn-iQ@speakeasy.net \
    --to=susudata@setidava.kushan.aa \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).