aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2018-01-06 21:16:33 -0500
committerNoam Postavsky2018-01-06 21:22:24 -0500
commit5f720046783c5b29fad3765303c1ad57aba167ce (patch)
tree2e2e05d977b762fe05edac7bd521e3b551ab6e6d
parent15cd18991c1d9a9bafeef7bf9b4dad91ecc0332a (diff)
downloademacs-5f720046783c5b29fad3765303c1ad57aba167ce.tar.gz
emacs-5f720046783c5b29fad3765303c1ad57aba167ce.zip
Revert "Fix command repetition with lexical-binding (Bug#29334)"
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.
-rw-r--r--lisp/emacs-lisp/bytecomp.el7
-rw-r--r--src/callint.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 564aac2fc6a..cc3a24e3d51 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2839,7 +2839,12 @@ for symbols generated by the byte compiler itself."
2839 (while (consp (cdr form)) 2839 (while (consp (cdr form))
2840 (setq form (cdr form))) 2840 (setq form (cdr form)))
2841 (setq form (car form))) 2841 (setq form (car form)))
2842 (if (eq (car-safe form) 'list) 2842 (if (and (eq (car-safe form) 'list)
2843 ;; For code using lexical-binding, form is not
2844 ;; valid lisp, but rather an intermediate form
2845 ;; which may include "calls" to
2846 ;; internal-make-closure (Bug#29988).
2847 (not lexical-binding))
2843 nil 2848 nil
2844 (setq int `(interactive ,newform))))) 2849 (setq int `(interactive ,newform)))))
2845 ((cdr int) 2850 ((cdr int)
diff --git a/src/callint.c b/src/callint.c
index dcda0bcf7a0..c713e08d4d4 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -357,9 +357,7 @@ invoke it. If KEYS is omitted or nil, the return value of
357 /* Compute the arg values using the user's expression. */ 357 /* Compute the arg values using the user's expression. */
358 specs = Feval (specs, 358 specs = Feval (specs,
359 CONSP (funval) && EQ (Qclosure, XCAR (funval)) 359 CONSP (funval) && EQ (Qclosure, XCAR (funval))
360 ? CAR_SAFE (XCDR (funval)) 360 ? CAR_SAFE (XCDR (funval)) : Qnil);
361 : COMPILEDP (funval) && INTEGERP (AREF (funval, COMPILED_ARGLIST))
362 ? Qt : Qnil);
363 if (events != num_input_events || !NILP (record_flag)) 361 if (events != num_input_events || !NILP (record_flag))
364 { 362 {
365 /* We should record this command on the command history. */ 363 /* We should record this command on the command history. */