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

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

bug#17446: 24.4.50; What is the situation around `called-interactively-p


From: Stefan Monnier
Subject: bug#17446: 24.4.50; What is the situation around `called-interactively-p'?
Date: Fri, 09 May 2014 18:39:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> How 'bout the patch below,

BTW, for older Emacsen, you can probably use a hack along the lines of
the guaranteed 100% untested code below:

   (defun funcall-interactively (fun &rest args)
     (call-interactively
       (cond
        ((consp fun)
         (mapcar (lambda (x)
                   (if (eq (car-safe x) 'interactive))
                     `(interactive ',args) x)
                 fun))
        ((byte-code-function-p)
         (apply #'make-byte-code
                (aref 0 fun)
                (aref 1 fun)
                (aref 2 fun)
                (aref 3 fun)
                (aref 4 fun)
                `',args)))))

-- Stefan





reply via email to

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