|
From: | Suvayu Ali |
Subject: | Re: Another lisp question |
Date: | Fri, 16 Apr 2010 10:58:22 -0700 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Lightning/1.0b2pre Thunderbird/3.0.4 |
On Friday 16 April 2010 09:31 AM, Klaus Jantzen wrote:
Drew Adams wrote:(defun mytest (n) " Test" ; (interactive "nEnter number: ") (interactive (list (read-number "Enter number: "))) (message "%d was entered" n)) With both versions of the interactive statement I have the same effect: the prompt comes back as long as I do not enter anything. I am running emacs22 on Debian lenny. Do I need a special setting to achive what I want? You said you wanted to use the default value if the user hit Return with typing anything first. For that, use (read-number "Number: " MY-DEFAULT), as I suggested before.OK; I did not really understand why you had that 42 in your code. It works. Thank you.
I believe its the answer to the ultimate question? ;) -- Suvayu Open source is the future. It sets us free.
[Prev in Thread] | Current Thread | [Next in Thread] |