diff options
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 431525431a4..d8ea33a160d 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, - ;; 'progn or t -> a list of forms, + ;; t -> a list of forms, ;; 'lambda -> body of a lambda, ;; 'file -> used at file-level. (let ((byte-compile--for-effect for-effect) @@ -3044,21 +3044,19 @@ 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 -> atom, quote or (function atom atom atom) - ;; progn -> as <<same-as-eval>> or (progn <<same-as-eval>> atom) + ;; eval/nil-> atom, quote or (function atom atom atom) + ;; t -> as <<same-as-eval>> or (progn <<same-as-eval>> atom) ;; file -> as progn, but takes both quotes and atoms, and longer forms. - (let (rest - (maycall (not (eq output-type 'lambda))) ; t if we may make a funcall. - tmp body) + (let (body tmp) (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))) - (progn - (setq rest (nreverse - (cdr (memq tmp (reverse byte-compile-output))))) + (let ((maycall t) ; t if we may make a funcall. + (rest (nreverse + (cdr (memq tmp (reverse byte-compile-output)))))) (while (cond ((memq (car (car rest)) '(byte-varref byte-constant)) @@ -3067,7 +3065,7 @@ for symbols generated by the byte compiler itself." (or (consp tmp) (and (symbolp tmp) (not (macroexp--const-symbol-p tmp))))) - (if maycall + (if maycall ;;Why? --Stef (setq body (cons (list 'quote tmp) body))) (setq body (cons tmp body)))) ((and maycall @@ -3075,7 +3073,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 progn t)) + (and (memq output-type '(file t)) (cdr (cdr rest)) (eq (car (nth 1 rest)) 'byte-discard) (progn (setq rest (cdr rest)) t)))) |