summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-opt.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2023-03-01 13:37:06 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2023-03-01 13:37:06 +0100
commit42f46913884c5e431a0e6cc80b1808fc0ca636cf (patch)
treecde7032e831bb484fbf72842f66df3bc9827ef30 /lisp/emacs-lisp/byte-opt.el
parent522b82118de77e33bd701853b6aa7dfda19b11fc (diff)
downloademacs-42f46913884c5e431a0e6cc80b1808fc0ca636cf.tar.gz
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.
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r--lisp/emacs-lisp/byte-opt.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 12aa8fb3982..0ae4c452c73 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -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,