Article View: gnu.emacs.help
Article #189750Wierdness with command argument?
From: Generic User
Date: Fri, 30 Nov 1990 03:43
Date: Fri, 30 Nov 1990 03:43
21 lines
1081 bytes
1081 bytes
Would someone explain this to me:
-----copied from *scratch*-----
(defun test (arg)
"Echoes arg. If no arg, echoes nil."
(interactive "p")
(if (null arg)
(message "arg is nil")
(message "arg is %d" arg)))
test
(test nil)
"arg is nil"
(command-execute 'test)
"arg is 1"
-----end-----
Shouldn't a command called with no prefix have a null argument, rather
than 1? Typing M-x test gives me the same result.
--
Jason Merrill jmerrill@jarthur.claremont.edu
Technical Details
Message-ID:
<JMERRILL.90Nov29194325@fenris.claremont.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!jarthur!jmerrillShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,e3dd406c1062efca,start X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1990-11-29 19:43:25 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!jarthur!jmerrill From: jmerrill@jarthur.claremont.edu (Generic User) Newsgroups: gnu.emacs.help Subject: Wierdness with command argument? Message-ID: <JMERRILL.90Nov29194325@fenris.claremont.edu> Date: 30 Nov 90 03:43:25 GMT Sender: news@jarthur.Claremont.EDU Distribution: gnu Organization: M.Y.T.H. Inc. Lines: 21 Posted: Fri Nov 30 04:43:25 1990