unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* newbie : elisp - prompt for input
@ 2006-08-28 19:17 Hadron Quark
  2006-08-28 21:07 ` Kevin Rodgers
       [not found] ` <mailman.5849.1156799345.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Hadron Quark @ 2006-08-28 19:17 UTC (permalink / raw)



Is the snippet below the best way to prompt and parse an integer value?


(defun count-words(max)
  "count words in buffer"
  (interactive "nMax words to count to:")
  (while (zerop max)
    (setq max (string-to-number(read-string "> 0 please. re-enter:"))))

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-29 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-28 19:17 newbie : elisp - prompt for input Hadron Quark
2006-08-28 21:07 ` Kevin Rodgers
     [not found] ` <mailman.5849.1156799345.9609.help-gnu-emacs@gnu.org>
2006-08-28 21:15   ` Hadron Quark
2006-08-29 19:51     ` Kevin Rodgers
2006-08-28 21:24   ` David Kastrup
2006-08-29 19:53     ` Kevin Rodgers

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).