all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.