It does not work with more complicated interactive forms, because
byte-compile-lambda actually receives an intermediate form of code
rather than valid lisp source (Bug#29988).
* src/callint.c (Fcall_interactively):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Revert previous
change, and update commentary.
(while (consp (cdr form))
(setq form (cdr form)))
(setq form (car form)))
- (if (eq (car-safe form) 'list)
+ (if (and (eq (car-safe form) 'list)
+ ;; For code using lexical-binding, form is not
+ ;; valid lisp, but rather an intermediate form
+ ;; which may include "calls" to
+ ;; internal-make-closure (Bug#29988).
+ (not lexical-binding))
nil
(setq int `(interactive ,newform)))))
((cdr int)
/* Compute the arg values using the user's expression. */
specs = Feval (specs,
CONSP (funval) && EQ (Qclosure, XCAR (funval))
- ? CAR_SAFE (XCDR (funval))
- : COMPILEDP (funval) && INTEGERP (AREF (funval, COMPILED_ARGLIST))
- ? Qt : Qnil);
+ ? CAR_SAFE (XCDR (funval)) : Qnil);
if (events != num_input_events || !NILP (record_flag))
{
/* We should record this command on the command history. */