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

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

newbie : elisp - prompt for input


From: Hadron Quark
Subject: newbie : elisp - prompt for input
Date: Mon, 28 Aug 2006 21:17:57 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

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:"))))


reply via email to

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