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

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

checking for nil argument in interactive


From: Seb
Subject: checking for nil argument in interactive
Date: Sun, 09 Nov 2008 14:57:22 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hi,

I don't understand why the following arg symbol doesn't get set to
"string":


(defun funny-function (arg)
  (interactive "sarg: ")
  (if (not arg) (setq arg "string"))
  (message "arg: %s" arg))

To test:

M-x funny-function RET RET

I've also tried (eq "" arg) for the if boolean but get the same result.
Any advice would be appreciated.


Cheers,

-- 
Seb





reply via email to

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