[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d468cf91b9 3/8: Merge from origin/emacs-29
From: |
Stefan Kangas |
Subject: |
master d468cf91b9 3/8: Merge from origin/emacs-29 |
Date: |
Sun, 18 Dec 2022 23:01:24 -0500 (EST) |
branch: master
commit d468cf91b9fbcd915644246f27dbaa87e23c7e7b
Merge: 9a633dce63 de2239a584
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Merge from origin/emacs-29
de2239a584a Revert "alist-get testfn argument evaluation correction"
856d889f3a8 Revert "Elide broken but unnecessary `if` optimisations"
8e42e20ed7f Revert "Use equal and member instead of eq and memq"
---
lisp/cedet/semantic/complete.el | 2 +-
lisp/descr-text.el | 2 +-
lisp/emacs-lisp/byte-opt.el | 7 +++++--
lisp/emacs-lisp/gv.el | 6 +++---
lisp/emulation/viper-cmd.el | 6 +++---
lisp/mh-e/mh-identity.el | 2 +-
lisp/transient.el | 4 ++--
lisp/vc/vc-git.el | 3 +--
test/lisp/emacs-lisp/cl-lib-tests.el | 2 +-
9 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 1f372804dc..00fe081acb 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -1731,7 +1731,7 @@ Display mechanism using tooltip for a list of possible
completions.")
;; Add any tail info.
(setq msg (concat msg msg-tail))
;; Display tooltip.
- (when (not (equal msg ""))
+ (when (not (eq msg ""))
(semantic-displayer-tooltip-show msg)))))
;;; Compatibility
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index f105f29244..f2ffddcf70 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -366,7 +366,7 @@ This function is semi-obsolete. Use
`get-char-code-property'."
;; description is added to the category name as a tooltip
(defsubst describe-char-categories (category-set)
(let ((mnemonics (category-set-mnemonics category-set)))
- (unless (equal mnemonics "")
+ (unless (eq mnemonics "")
(list (mapconcat
(lambda (x)
(let* ((c (category-docstring x))
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 898dfffef6..55b68c5843 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -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))
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 48bc0269f3..11251d7a96 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -417,9 +417,9 @@ The return value is the last VAL in the list.
(lambda (do key alist &optional default remove testfn)
(macroexp-let2 macroexp-copyable-p k key
(gv-letplace (getter setter) alist
- (macroexp-let2 nil p (if (member testfn '(nil 'eq #'eq))
- `(assq ,k ,getter)
- `(assoc ,k ,getter ,testfn))
+ (macroexp-let2 nil p `(if (and ,testfn (not (eq ,testfn 'eq)))
+ (assoc ,k ,getter ,testfn)
+ (assq ,k ,getter))
(funcall do (if (null default) `(cdr ,p)
`(if ,p (cdr ,p) ,default))
(lambda (v)
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 3b3caaf3e3..26793989d0 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -194,9 +194,9 @@
viper-delete-backward-char
viper-join-lines
viper-delete-char))
- (member (viper-event-key last-command-event)
- '(up down left right (meta f) (meta b)
- (control n) (control p) (control f) (control b)))))
+ (memq (viper-event-key last-command-event)
+ '(up down left right (meta f) (meta b)
+ (control n) (control p) (control f) (control b)))))
(defsubst viper-insert-state-pre-command-sentinel ()
(or (viper-preserve-cursor-color)
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el
index 2507c67746..bcdf91299b 100644
--- a/lisp/mh-e/mh-identity.el
+++ b/lisp/mh-e/mh-identity.el
@@ -141,7 +141,7 @@ See `mh-identity-list'."
(cons '("None")
(mapcar #'list (mapcar #'car mh-identity-list)))
nil t default nil default))
- (if (equal identity "None")
+ (if (eq identity "None")
nil
identity)))
diff --git a/lisp/transient.el b/lisp/transient.el
index 01c492c68c..1cab697eec 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2203,7 +2203,7 @@ value. Otherwise return CHILDREN as is."
(unless abort-only
(setq post-command
(lambda () "@transient--delay-post-command"
- (let ((act (and (not (equal (this-command-keys-vector) []))
+ (let ((act (and (not (eq (this-command-keys-vector) []))
(or (eq this-command command)
;; `execute-extended-command' was
;; used to call another command
@@ -2241,7 +2241,7 @@ value. Otherwise return CHILDREN as is."
(transient--debug 'post-command)
(transient--with-emergency-exit
(cond
- ((and (equal (this-command-keys-vector) [])
+ ((and (eq (this-command-keys-vector) [])
(= (minibuffer-depth)
(1+ transient--minibuffer-depth)))
(transient--suspend-override)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 9f27f759d3..2876a983fb 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1674,8 +1674,7 @@ This requires git 1.8.4 or later, for the \"-L\" option
of \"git log\"."
(if branchp "branch" "tag"))))
(if branchp
(vc-git-command nil 0 nil "checkout" "-b" name
- (when (and start-point
- (not (equal start-point "")))
+ (when (and start-point (not (eq start-point "")))
start-point))
(vc-git-command nil 0 nil "tag" name)))))
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el
b/test/lisp/emacs-lisp/cl-lib-tests.el
index 759138569e..4ec24e51e0 100644
--- a/test/lisp/emacs-lisp/cl-lib-tests.el
+++ b/test/lisp/emacs-lisp/cl-lib-tests.el
@@ -404,7 +404,7 @@
(ert-deftest cl-lib-nth-value-test-multiple-values ()
"While CL multiple values are an alias to list, these won't work."
:expected-result :failed
- (should (equal (cl-nth-value 0 '(2 3)) '(2 3)))
+ (should (eq (cl-nth-value 0 '(2 3)) '(2 3)))
(should (= (cl-nth-value 0 1) 1))
(should (null (cl-nth-value 1 1)))
(should-error (cl-nth-value -1 (cl-values 2 3)) :type 'args-out-of-range)
- master updated (03648965a0 -> 6c842ef81c), Stefan Kangas, 2022/12/18
- master d468cf91b9 3/8: Merge from origin/emacs-29,
Stefan Kangas <=
- master 2f93334968 4/8: ; Merge from origin/emacs-29, Stefan Kangas, 2022/12/18
- master 690724f0f1 5/8: Merge from origin/emacs-29, Stefan Kangas, 2022/12/18
- master 0ef6d4c34f 6/8: ; Merge from origin/emacs-29, Stefan Kangas, 2022/12/18
- master 9a58585668 1/8: Merge from origin/emacs-29, Stefan Kangas, 2022/12/18
- master 9a633dce63 2/8: ; Merge from origin/emacs-29, Stefan Kangas, 2022/12/18
- master 6c540e38f4 7/8: Merge from origin/emacs-29, Stefan Kangas, 2022/12/18
- master 6c842ef81c 8/8: ; Fix merge errors in etc/NEWS, Stefan Kangas, 2022/12/18