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

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

RE: Another lisp question


From: Drew Adams
Subject: RE: Another lisp question
Date: Thu, 15 Apr 2010 09:51:37 -0700

> (interactive  "sEnter number: ")

Consider using `read-number':

(interactive (list (read-number "Number: " 42)))

> When hitting <Enter> without entering anything, emacs comes 
> back to the input request. How can I find out, that nothing
> has been entered so that I can use e.g. a default value?

I don't understand how that happens to you.
It should just return the empty string, "".

M-: (defun foo (arg) (interactive "sNum: ") (message "%S" arg))
M-x foo RET RET

That returns "" for me.





reply via email to

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