From 0b4e003766f15225dede9bdba4ead33e493856e2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 26 Jun 2019 10:24:59 -0400 Subject: Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo" This reverts commit 698ff554ac2699ec48fefc85a1307cbc4a183b0d. --- lisp/emacs-lisp/bytecomp.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index d8ea33a160d..431525431a4 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2981,7 +2981,7 @@ for symbols generated by the byte compiler itself." lexenv reserved-csts) ;; OUTPUT-TYPE advises about how form is expected to be used: ;; 'eval or nil -> a single form, - ;; t -> a list of forms, + ;; 'progn or t -> a list of forms, ;; 'lambda -> body of a lambda, ;; 'file -> used at file-level. (let ((byte-compile--for-effect for-effect) @@ -3044,19 +3044,21 @@ for symbols generated by the byte compiler itself." ;; a single atom, but that causes confusion if the docstring ;; uses the (file . pos) syntax. Besides, now that we have ;; the Lisp_Compiled type, the compiled form is faster. - ;; eval/nil-> atom, quote or (function atom atom atom) - ;; t -> as <> or (progn <> atom) + ;; eval -> atom, quote or (function atom atom atom) + ;; progn -> as <> or (progn <> atom) ;; file -> as progn, but takes both quotes and atoms, and longer forms. - (let (body tmp) + (let (rest + (maycall (not (eq output-type 'lambda))) ; t if we may make a funcall. + tmp body) (cond ;; #### This should be split out into byte-compile-nontrivial-function-p. ((or (eq output-type 'lambda) (nthcdr (if (eq output-type 'file) 50 8) byte-compile-output) (assq 'TAG byte-compile-output) ; Not necessary, but speeds up a bit. (not (setq tmp (assq 'byte-return byte-compile-output))) - (let ((maycall t) ; t if we may make a funcall. - (rest (nreverse - (cdr (memq tmp (reverse byte-compile-output)))))) + (progn + (setq rest (nreverse + (cdr (memq tmp (reverse byte-compile-output))))) (while (cond ((memq (car (car rest)) '(byte-varref byte-constant)) @@ -3065,7 +3067,7 @@ for symbols generated by the byte compiler itself." (or (consp tmp) (and (symbolp tmp) (not (macroexp--const-symbol-p tmp))))) - (if maycall ;;Why? --Stef + (if maycall (setq body (cons (list 'quote tmp) body))) (setq body (cons tmp body)))) ((and maycall @@ -3073,7 +3075,7 @@ for symbols generated by the byte compiler itself." (null (nthcdr 3 rest)) (setq tmp (get (car (car rest)) 'byte-opcode-invert)) (or (null (cdr rest)) - (and (memq output-type '(file t)) + (and (memq output-type '(file progn t)) (cdr (cdr rest)) (eq (car (nth 1 rest)) 'byte-discard) (progn (setq rest (cdr rest)) t)))) -- cgit v1.2.3