]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Fix command repetition with lexical-binding (Bug#29334)"
authorNoam Postavsky <npostavs@gmail.com>
Sun, 7 Jan 2018 02:16:33 +0000 (21:16 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 7 Jan 2018 02:22:24 +0000 (21:22 -0500)
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.

lisp/emacs-lisp/bytecomp.el
src/callint.c

index 564aac2fc6a526b5a74a16bd22a95ab8b7ed5208..cc3a24e3d51a87e5dc7832cf5664fb019a267d41 100644 (file)
@@ -2839,7 +2839,12 @@ for symbols generated by the byte compiler itself."
                 (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)
index dcda0bcf7a0272a297c160a74a9ba3c312d09a5e..c713e08d4d4d595507170ce61fda957db35417aa 100644 (file)
@@ -357,9 +357,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
       /* 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.  */