aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2022-12-19 04:42:18 +0100
committerStefan Kangas2022-12-19 04:42:18 +0100
commitd468cf91b9fbcd915644246f27dbaa87e23c7e7b (patch)
treec88c14f5372b67e3f02bcb16359b99256d9f2800
parent9a633dce63904b54738a63eb5007869fd851419a (diff)
parentde2239a584ab9b3bcdea2379f2c54ea3d20d596f (diff)
downloademacs-d468cf91b9fbcd915644246f27dbaa87e23c7e7b.tar.gz
emacs-d468cf91b9fbcd915644246f27dbaa87e23c7e7b.zip
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"
-rw-r--r--lisp/cedet/semantic/complete.el2
-rw-r--r--lisp/descr-text.el2
-rw-r--r--lisp/emacs-lisp/byte-opt.el7
-rw-r--r--lisp/emacs-lisp/gv.el6
-rw-r--r--lisp/emulation/viper-cmd.el6
-rw-r--r--lisp/mh-e/mh-identity.el2
-rw-r--r--lisp/transient.el4
-rw-r--r--lisp/vc/vc-git.el3
-rw-r--r--test/lisp/emacs-lisp/cl-lib-tests.el2
9 files changed, 18 insertions, 16 deletions
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 1f372804dcc..00fe081acb5 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.")
1731 ;; Add any tail info. 1731 ;; Add any tail info.
1732 (setq msg (concat msg msg-tail)) 1732 (setq msg (concat msg msg-tail))
1733 ;; Display tooltip. 1733 ;; Display tooltip.
1734 (when (not (equal msg "")) 1734 (when (not (eq msg ""))
1735 (semantic-displayer-tooltip-show msg))))) 1735 (semantic-displayer-tooltip-show msg)))))
1736 1736
1737;;; Compatibility 1737;;; Compatibility
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index f105f292448..f2ffddcf702 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'."
366;; description is added to the category name as a tooltip 366;; description is added to the category name as a tooltip
367(defsubst describe-char-categories (category-set) 367(defsubst describe-char-categories (category-set)
368 (let ((mnemonics (category-set-mnemonics category-set))) 368 (let ((mnemonics (category-set-mnemonics category-set)))
369 (unless (equal mnemonics "") 369 (unless (eq mnemonics "")
370 (list (mapconcat 370 (list (mapconcat
371 (lambda (x) 371 (lambda (x)
372 (let* ((c (category-docstring x)) 372 (let* ((c (category-docstring x))
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 898dfffef63..55b68c58438 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'."
1298 (if else 1298 (if else
1299 `(progn ,condition ,@else) 1299 `(progn ,condition ,@else)
1300 condition)) 1300 condition))
1301 ;; (if X t) -> (not (not X)) 1301 ;; (if X nil t) -> (not X)
1302 ((and (eq then t) (null else)) 1302 ((and (eq then nil) (eq else '(t)))
1303 `(not ,condition))
1304 ;; (if X t [nil]) -> (not (not X))
1305 ((and (eq then t) (or (null else) (eq else '(nil))))
1303 `(not ,(byte-opt--negate condition))) 1306 `(not ,(byte-opt--negate condition)))
1304 ;; (if VAR VAR X...) -> (or VAR (progn X...)) 1307 ;; (if VAR VAR X...) -> (or VAR (progn X...))
1305 ((and (symbolp condition) (eq condition then)) 1308 ((and (symbolp condition) (eq condition then))
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 48bc0269f36..11251d7a963 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.
417 (lambda (do key alist &optional default remove testfn) 417 (lambda (do key alist &optional default remove testfn)
418 (macroexp-let2 macroexp-copyable-p k key 418 (macroexp-let2 macroexp-copyable-p k key
419 (gv-letplace (getter setter) alist 419 (gv-letplace (getter setter) alist
420 (macroexp-let2 nil p (if (member testfn '(nil 'eq #'eq)) 420 (macroexp-let2 nil p `(if (and ,testfn (not (eq ,testfn 'eq)))
421 `(assq ,k ,getter) 421 (assoc ,k ,getter ,testfn)
422 `(assoc ,k ,getter ,testfn)) 422 (assq ,k ,getter))
423 (funcall do (if (null default) `(cdr ,p) 423 (funcall do (if (null default) `(cdr ,p)
424 `(if ,p (cdr ,p) ,default)) 424 `(if ,p (cdr ,p) ,default))
425 (lambda (v) 425 (lambda (v)
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 3b3caaf3e3c..26793989d05 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -194,9 +194,9 @@
194 viper-delete-backward-char 194 viper-delete-backward-char
195 viper-join-lines 195 viper-join-lines
196 viper-delete-char)) 196 viper-delete-char))
197 (member (viper-event-key last-command-event) 197 (memq (viper-event-key last-command-event)
198 '(up down left right (meta f) (meta b) 198 '(up down left right (meta f) (meta b)
199 (control n) (control p) (control f) (control b))))) 199 (control n) (control p) (control f) (control b)))))
200 200
201(defsubst viper-insert-state-pre-command-sentinel () 201(defsubst viper-insert-state-pre-command-sentinel ()
202 (or (viper-preserve-cursor-color) 202 (or (viper-preserve-cursor-color)
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el
index 2507c677462..bcdf91299be 100644
--- a/lisp/mh-e/mh-identity.el
+++ b/lisp/mh-e/mh-identity.el
@@ -141,7 +141,7 @@ See `mh-identity-list'."
141 (cons '("None") 141 (cons '("None")
142 (mapcar #'list (mapcar #'car mh-identity-list))) 142 (mapcar #'list (mapcar #'car mh-identity-list)))
143 nil t default nil default)) 143 nil t default nil default))
144 (if (equal identity "None") 144 (if (eq identity "None")
145 nil 145 nil
146 identity))) 146 identity)))
147 147
diff --git a/lisp/transient.el b/lisp/transient.el
index 01c492c68c1..1cab697eecb 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2203,7 +2203,7 @@ value. Otherwise return CHILDREN as is."
2203 (unless abort-only 2203 (unless abort-only
2204 (setq post-command 2204 (setq post-command
2205 (lambda () "@transient--delay-post-command" 2205 (lambda () "@transient--delay-post-command"
2206 (let ((act (and (not (equal (this-command-keys-vector) [])) 2206 (let ((act (and (not (eq (this-command-keys-vector) []))
2207 (or (eq this-command command) 2207 (or (eq this-command command)
2208 ;; `execute-extended-command' was 2208 ;; `execute-extended-command' was
2209 ;; used to call another command 2209 ;; used to call another command
@@ -2241,7 +2241,7 @@ value. Otherwise return CHILDREN as is."
2241 (transient--debug 'post-command) 2241 (transient--debug 'post-command)
2242 (transient--with-emergency-exit 2242 (transient--with-emergency-exit
2243 (cond 2243 (cond
2244 ((and (equal (this-command-keys-vector) []) 2244 ((and (eq (this-command-keys-vector) [])
2245 (= (minibuffer-depth) 2245 (= (minibuffer-depth)
2246 (1+ transient--minibuffer-depth))) 2246 (1+ transient--minibuffer-depth)))
2247 (transient--suspend-override) 2247 (transient--suspend-override)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 9f27f759d35..2876a983fb0 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\"."
1674 (if branchp "branch" "tag")))) 1674 (if branchp "branch" "tag"))))
1675 (if branchp 1675 (if branchp
1676 (vc-git-command nil 0 nil "checkout" "-b" name 1676 (vc-git-command nil 0 nil "checkout" "-b" name
1677 (when (and start-point 1677 (when (and start-point (not (eq start-point "")))
1678 (not (equal start-point "")))
1679 start-point)) 1678 start-point))
1680 (vc-git-command nil 0 nil "tag" name))))) 1679 (vc-git-command nil 0 nil "tag" name)))))
1681 1680
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el
index 759138569e4..4ec24e51e06 100644
--- a/test/lisp/emacs-lisp/cl-lib-tests.el
+++ b/test/lisp/emacs-lisp/cl-lib-tests.el
@@ -404,7 +404,7 @@
404(ert-deftest cl-lib-nth-value-test-multiple-values () 404(ert-deftest cl-lib-nth-value-test-multiple-values ()
405 "While CL multiple values are an alias to list, these won't work." 405 "While CL multiple values are an alias to list, these won't work."
406 :expected-result :failed 406 :expected-result :failed
407 (should (equal (cl-nth-value 0 '(2 3)) '(2 3))) 407 (should (eq (cl-nth-value 0 '(2 3)) '(2 3)))
408 (should (= (cl-nth-value 0 1) 1)) 408 (should (= (cl-nth-value 0 1) 1))
409 (should (null (cl-nth-value 1 1))) 409 (should (null (cl-nth-value 1 1)))
410 (should-error (cl-nth-value -1 (cl-values 2 3)) :type 'args-out-of-range) 410 (should-error (cl-nth-value -1 (cl-values 2 3)) :type 'args-out-of-range)