Simplify effect-free code elimination

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Simplify overly defensive code.  This does not affect code generation.
This commit is contained in:
Mattias Engdegård 2023-03-01 13:37:06 +01:00
parent 522b82118d
commit 42f4691388

View file

@ -515,9 +515,7 @@ for speeding up processing.")
form)
nil)))))
(byte-compile-log " %s called for effect; deleted" fn)
;; appending a nil here might not be necessary, but it can't hurt.
(byte-optimize-form
(cons 'progn (append (cdr form) '(nil))) t))
(byte-optimize-form (cons 'progn (cdr form)) t))
(_
;; Otherwise, no args can be considered to be for-effect,