Merge from origin/emacs-29

de2239a584 Revert "alist-get testfn argument evaluation correction"
856d889f3a Revert "Elide broken but unnecessary `if` optimisations"
8e42e20ed7 Revert "Use equal and member instead of eq and memq"
This commit is contained in:
Stefan Kangas 2022-12-19 04:42:18 +01:00
commit d468cf91b9
9 changed files with 18 additions and 16 deletions

View file

@ -1298,8 +1298,11 @@ See Info node `(elisp) Integer Basics'."
(if else
`(progn ,condition ,@else)
condition))
;; (if X t) -> (not (not X))
((and (eq then t) (null else))
;; (if X nil t) -> (not X)
((and (eq then nil) (eq else '(t)))
`(not ,condition))
;; (if X t [nil]) -> (not (not X))
((and (eq then t) (or (null else) (eq else '(nil))))
`(not ,(byte-opt--negate condition)))
;; (if VAR VAR X...) -> (or VAR (progn X...))
((and (symbolp condition) (eq condition then))