]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify effect-free code elimination
authorMattias Engdegård <mattiase@acm.org>
Wed, 1 Mar 2023 12:37:06 +0000 (13:37 +0100)
committerMattias Engdegård <mattiase@acm.org>
Wed, 1 Mar 2023 12:37:06 +0000 (13:37 +0100)
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Simplify overly defensive code.  This does not affect code generation.

lisp/emacs-lisp/byte-opt.el

index 12aa8fb3982b54f2d8737708a00fd8dc3806b233..0ae4c452c73e8cbc2e95318924ec6425d3a9360f 100644 (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,