[Top][All Lists]

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

Re: Another lisp question

From: Klaus Jantzen
Subject: Re: Another lisp question
Date: Fri, 16 Apr 2010 18:31:59 +0200
User-agent: Mozilla-Thunderbird (X11/20090707)

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.


reply via email to

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