[Top][All Lists]

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

`call-interactively' and prefix args

From: Thorsten Jolitz
Subject: `call-interactively' and prefix args
Date: Tue, 03 Jun 2014 14:46:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi List, 

| (call-interactively FUNCTION &optional RECORD-FLAG KEYS)

does not have an (optional) ARG argument for passing prefix args to the
called command.

#+BEGIN_SRC emacs-lisp
(defun foo (&optional arg)
  (interactive "P")
  (print arg))

: foo

#+begin_src emacs-lisp :results output
 (call-interactively 'foo )

Evaluated with C-u C-c C-c the code block actually results in 

: (4)

otherwise in nil.

So, when I have an (interactive) command cmd1 that calls a
non-interactive function fun that calls another (interactive "P")
command cmd2 with `call-interactively' - can I assume that a prefix arg
(e.g. by C-u) given before calling cmd1 will be transferred to cmd2?


reply via email to

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