aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-05-31 10:16:06 +0800
committerPo Lu2023-05-31 10:16:06 +0800
commit822463ea5adae0f17bde4246e320800ee02f592d (patch)
treed2b2c769a397edca17dd0beda9c8c6b22b85a642
parent57903519eb61632c4a85fbaf420109892955079a (diff)
parentecc1d990d9e9d006838ca514213ea5e46a459363 (diff)
downloademacs-822463ea5adae0f17bde4246e320800ee02f592d.tar.gz
emacs-822463ea5adae0f17bde4246e320800ee02f592d.zip
Merge remote-tracking branch 'origin/master' into feature/android
-rw-r--r--admin/admin.el3
-rw-r--r--admin/cus-test.el2
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/edmacro.el8
-rw-r--r--lisp/emacs-lisp/byte-opt.el29
-rw-r--r--lisp/emacs-lisp/bytecomp.el31
-rw-r--r--lisp/erc/erc.el6
-rw-r--r--lisp/help-fns.el6
-rw-r--r--lisp/org/org.el6
-rw-r--r--lisp/progmodes/scheme.el2
-rw-r--r--lisp/subr.el40
-rw-r--r--lisp/xml.el3
-rw-r--r--test/lisp/dnd-tests.el2
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el8
-rw-r--r--test/lisp/find-cmd-tests.el2
15 files changed, 104 insertions, 49 deletions
diff --git a/admin/admin.el b/admin/admin.el
index 90f810b79c6..1f4c6986b0e 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -1038,8 +1038,7 @@ If optional argument OLD is non-nil, also scan for `defvar's."
1038 (and grp 1038 (and grp
1039 (setq grp (car (cdr-safe grp))) ; (quote foo) -> foo 1039 (setq grp (car (cdr-safe grp))) ; (quote foo) -> foo
1040 (setq ver (assq grp glist)))) 1040 (setq ver (assq grp glist))))
1041 (setq alist (cons (cons var ver) alist)))) 1041 (setq alist (cons (cons var ver) alist)))))))
1042 (if form (format-message "Malformed defcustom: `%s'" form)))))
1043 (message "%sdone" m) 1042 (message "%sdone" m)
1044 alist)) 1043 alist))
1045 1044
diff --git a/admin/cus-test.el b/admin/cus-test.el
index f07019bb52c..c833ddacd84 100644
--- a/admin/cus-test.el
+++ b/admin/cus-test.el
@@ -221,8 +221,6 @@ The detected problematic options are stored in `cus-test-errors'."
221 221
222 ;; Check the values 222 ;; Check the values
223 (mapc (lambda (value) 223 (mapc (lambda (value)
224 ;; TODO for booleans, check for values that can be
225 ;; evaluated and are not t or nil. Usually a bug.
226 (unless (widget-apply conv :match value) 224 (unless (widget-apply conv :match value)
227 (let ((err (list symbol :type-error value type))) 225 (let ((err (list symbol :type-error value type)))
228 (unless (member err cus-test-errors) 226 (unless (member err cus-test-errors)
diff --git a/etc/NEWS b/etc/NEWS
index c19e1658a01..4bc25eaffd8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -36,6 +36,11 @@ See the file 'java/INSTALL' for more details.
36 36
37* Changes in Emacs 30.1 37* Changes in Emacs 30.1
38 38
39** Help
40** 'describe-function' shows function inferred type when available.
41For native compiled Lisp functions 'describe-function' prints (after
42the signature) the automatically inferred function type as well.
43
39--- 44---
40** New user option 'describe-bindings-outline-rules'. 45** New user option 'describe-bindings-outline-rules'.
41This user option controls outline visibility in the output buffer of 46This user option controls outline visibility in the output buffer of
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index 8734f7cbebe..69d20d2bad3 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -91,17 +91,17 @@ Default nil means to write characters above \\177 in octal notation."
91 `((,(rx bol (group (or "Command" "Key" "Macro") ":")) 0 'edmacro-label) 91 `((,(rx bol (group (or "Command" "Key" "Macro") ":")) 0 'edmacro-label)
92 (,(rx bol 92 (,(rx bol
93 (group ";; Keyboard Macro Editor. Press ") 93 (group ";; Keyboard Macro Editor. Press ")
94 (group (*? any)) 94 (group (*? nonl))
95 (group " to finish; press ")) 95 (group " to finish; press "))
96 (1 'font-lock-comment-face) 96 (1 'font-lock-comment-face)
97 (2 'help-key-binding) 97 (2 'help-key-binding)
98 (3 'font-lock-comment-face) 98 (3 'font-lock-comment-face)
99 (,(rx (group (*? any)) 99 (,(rx (group (*? nonl))
100 (group " to cancel" (* any))) 100 (group " to cancel" (* nonl)))
101 nil nil 101 nil nil
102 (1 'help-key-binding) 102 (1 'help-key-binding)
103 (2 'font-lock-comment-face))) 103 (2 'font-lock-comment-face)))
104 (,(rx (one-or-more ";") (zero-or-more any)) 0 'font-lock-comment-face))) 104 (,(rx (one-or-more ";") (zero-or-more nonl)) 0 'font-lock-comment-face)))
105 105
106(defvar edmacro-store-hook) 106(defvar edmacro-store-hook)
107(defvar edmacro-finish-hook) 107(defvar edmacro-finish-hook)
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 8fe5066c49e..562f21aa751 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1685,7 +1685,8 @@ See Info node `(elisp) Integer Basics'."
1685 category-docstring category-set-mnemonics char-category-set 1685 category-docstring category-set-mnemonics char-category-set
1686 copy-category-table get-unused-category make-category-set 1686 copy-category-table get-unused-category make-category-set
1687 ;; character.c 1687 ;; character.c
1688 char-width multibyte-char-to-unibyte string unibyte-char-to-multibyte 1688 char-width get-byte multibyte-char-to-unibyte string string-width
1689 unibyte-char-to-multibyte unibyte-string
1689 ;; charset.c 1690 ;; charset.c
1690 decode-char encode-char 1691 decode-char encode-char
1691 ;; chartab.c 1692 ;; chartab.c
@@ -1715,6 +1716,8 @@ See Info node `(elisp) Integer Basics'."
1715 line-beginning-position line-end-position ngettext pos-bol pos-eol 1716 line-beginning-position line-end-position ngettext pos-bol pos-eol
1716 propertize region-beginning region-end string-to-char 1717 propertize region-beginning region-end string-to-char
1717 user-full-name user-login-name 1718 user-full-name user-login-name
1719 ;; eval.c
1720 special-variable-p
1718 ;; fileio.c 1721 ;; fileio.c
1719 car-less-than-car directory-name-p file-directory-p file-exists-p 1722 car-less-than-car directory-name-p file-directory-p file-exists-p
1720 file-name-absolute-p file-name-concat file-newer-than-file-p 1723 file-name-absolute-p file-name-concat file-newer-than-file-p
@@ -1723,23 +1726,28 @@ See Info node `(elisp) Integer Basics'."
1723 file-locked-p 1726 file-locked-p
1724 ;; floatfns.c 1727 ;; floatfns.c
1725 abs acos asin atan ceiling copysign cos exp expt fceiling ffloor 1728 abs acos asin atan ceiling copysign cos exp expt fceiling ffloor
1726 float floor fround ftruncate isnan ldexp log logb round sin sqrt tan 1729 float floor frexp fround ftruncate isnan ldexp log logb round
1730 sin sqrt tan
1727 truncate 1731 truncate
1728 ;; fns.c 1732 ;; fns.c
1729 append assq 1733 append assq
1730 base64-decode-string base64-encode-string base64url-encode-string 1734 base64-decode-string base64-encode-string base64url-encode-string
1735 buffer-hash buffer-line-statistics
1731 compare-strings concat copy-alist copy-hash-table copy-sequence elt 1736 compare-strings concat copy-alist copy-hash-table copy-sequence elt
1732 featurep get 1737 featurep get
1733 gethash hash-table-count hash-table-rehash-size 1738 gethash hash-table-count hash-table-rehash-size
1734 hash-table-rehash-threshold hash-table-size hash-table-test 1739 hash-table-rehash-threshold hash-table-size hash-table-test
1735 hash-table-weakness 1740 hash-table-weakness
1736 length length< length= length> 1741 length length< length= length>
1737 line-number-at-pos locale-info make-hash-table 1742 line-number-at-pos load-average locale-info make-hash-table md5
1738 member memq memql nth nthcdr 1743 member memq memql nth nthcdr
1739 object-intervals rassoc rassq reverse 1744 object-intervals rassoc rassq reverse secure-hash
1740 string-as-multibyte string-as-unibyte string-bytes string-distance 1745 string-as-multibyte string-as-unibyte string-bytes
1746 string-collate-equalp string-collate-lessp string-distance
1741 string-equal string-lessp string-make-multibyte string-make-unibyte 1747 string-equal string-lessp string-make-multibyte string-make-unibyte
1742 string-search string-to-multibyte substring substring-no-properties 1748 string-search string-to-multibyte string-to-unibyte
1749 string-version-lessp
1750 substring substring-no-properties
1743 sxhash-eq sxhash-eql sxhash-equal sxhash-equal-including-properties 1751 sxhash-eq sxhash-eql sxhash-equal sxhash-equal-including-properties
1744 take vconcat 1752 take vconcat
1745 ;; frame.c 1753 ;; frame.c
@@ -1799,6 +1807,7 @@ See Info node `(elisp) Integer Basics'."
1799 all-threads condition-mutex condition-name mutex-name thread-live-p 1807 all-threads condition-mutex condition-name mutex-name thread-live-p
1800 thread-name 1808 thread-name
1801 ;; timefns.c 1809 ;; timefns.c
1810 current-cpu-time
1802 current-time-string current-time-zone decode-time encode-time 1811 current-time-string current-time-zone decode-time encode-time
1803 float-time format-time-string time-add time-convert time-equal-p 1812 float-time format-time-string time-add time-convert time-equal-p
1804 time-less-p time-subtract 1813 time-less-p time-subtract
@@ -1858,7 +1867,8 @@ See Info node `(elisp) Integer Basics'."
1858 ;; fileio.c 1867 ;; fileio.c
1859 default-file-modes 1868 default-file-modes
1860 ;; fns.c 1869 ;; fns.c
1861 eql equal hash-table-p identity proper-list-p safe-length 1870 eql equal equal-including-properties
1871 hash-table-p identity proper-list-p safe-length
1862 secure-hash-algorithms 1872 secure-hash-algorithms
1863 ;; frame.c 1873 ;; frame.c
1864 frame-list frame-live-p framep last-nonminibuffer-frame 1874 frame-list frame-live-p framep last-nonminibuffer-frame
@@ -1936,10 +1946,11 @@ See Info node `(elisp) Integer Basics'."
1936 isnan ldexp logb round sqrt truncate 1946 isnan ldexp logb round sqrt truncate
1937 ;; fns.c 1947 ;; fns.c
1938 assq base64-decode-string base64-encode-string base64url-encode-string 1948 assq base64-decode-string base64-encode-string base64url-encode-string
1939 concat elt eql equal hash-table-p identity length length< length= 1949 concat elt eql equal equal-including-properties
1950 hash-table-p identity length length< length=
1940 length> member memq memql nth nthcdr proper-list-p rassoc rassq 1951 length> member memq memql nth nthcdr proper-list-p rassoc rassq
1941 safe-length string-bytes string-distance string-equal string-lessp 1952 safe-length string-bytes string-distance string-equal string-lessp
1942 string-search take 1953 string-search string-version-lessp take
1943 ;; search.c 1954 ;; search.c
1944 regexp-quote 1955 regexp-quote
1945 ;; syntax.c 1956 ;; syntax.c
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index ac040799a22..b7ae45a0610 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1619,21 +1619,20 @@ extra args."
1619(dolist (elt '(format message format-message error)) 1619(dolist (elt '(format message format-message error))
1620 (put elt 'byte-compile-format-like t)) 1620 (put elt 'byte-compile-format-like t))
1621 1621
1622(defun byte-compile--suspicious-defcustom-choice (type) 1622(defun byte-compile--defcustom-type-quoted (type)
1623 "Say whether defcustom TYPE looks odd." 1623 "Whether defcustom TYPE contains an accidentally quoted value."
1624 ;; Check whether there's anything like (choice (const :tag "foo" ;; 'bar)). 1624 ;; Detect mistakes such as (const 'abc).
1625 ;; We don't actually follow the syntax for defcustom types, but this 1625 ;; We don't actually follow the syntax for defcustom types, but this
1626 ;; should be good enough. 1626 ;; should be good enough.
1627 (catch 'found 1627 (and (consp type)
1628 (if (and (consp type) 1628 (proper-list-p type)
1629 (proper-list-p type)) 1629 (if (memq (car type) '(const other))
1630 (if (memq (car type) '(const other)) 1630 (assq 'quote type)
1631 (when (assq 'quote type) 1631 (let ((elts (cdr type)))
1632 (throw 'found t)) 1632 (while (and elts (not (byte-compile--defcustom-type-quoted
1633 (when (memq t (mapcar #'byte-compile--suspicious-defcustom-choice 1633 (car elts))))
1634 type)) 1634 (setq elts (cdr elts)))
1635 (throw 'found t))) 1635 elts))))
1636 nil)))
1637 1636
1638;; Warn if a custom definition fails to specify :group, or :type. 1637;; Warn if a custom definition fails to specify :group, or :type.
1639(defun byte-compile-nogroup-warn (form) 1638(defun byte-compile-nogroup-warn (form)
@@ -1647,10 +1646,10 @@ extra args."
1647 (byte-compile-warn-x (cadr name) 1646 (byte-compile-warn-x (cadr name)
1648 "defcustom for `%s' fails to specify type" 1647 "defcustom for `%s' fails to specify type"
1649 (cadr name))) 1648 (cadr name)))
1650 ((byte-compile--suspicious-defcustom-choice type) 1649 ((byte-compile--defcustom-type-quoted type)
1651 (byte-compile-warn-x 1650 (byte-compile-warn-x
1652 (cadr name) 1651 (cadr name)
1653 "defcustom for `%s' has syntactically odd type `%s'" 1652 "defcustom for `%s' may have accidentally quoted value in type `%s'"
1654 (cadr name) type))))) 1653 (cadr name) type)))))
1655 (if (and (memq (car form) '(custom-declare-face custom-declare-variable)) 1654 (if (and (memq (car form) '(custom-declare-face custom-declare-variable))
1656 byte-compile-current-group) 1655 byte-compile-current-group)
@@ -3567,6 +3566,8 @@ lambda-expression."
3567 ;; when used on arrays, but most calls pass lists. 3566 ;; when used on arrays, but most calls pass lists.
3568 nreverse sort 3567 nreverse sort
3569 3568
3569 match-data
3570
3570 ;; Adding these functions causes many warnings; 3571 ;; Adding these functions causes many warnings;
3571 ;; evaluate how many of them are false first. 3572 ;; evaluate how many of them are false first.
3572 delq delete 3573 delq delete
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 5a91285c1d1..2c2df81fa6d 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2398,9 +2398,9 @@ parameters SERVER and NICK."
2398 2398
2399(defun erc--ensure-url (input) 2399(defun erc--ensure-url (input)
2400 (unless (string-match (rx bot "irc" (? "6") (? "s") "://") input) 2400 (unless (string-match (rx bot "irc" (? "6") (? "s") "://") input)
2401 (when (and (string-match (rx (? (+ any) "@") 2401 (when (and (string-match (rx (? (+ nonl) "@")
2402 (or (group (* (not "[")) ":" (* any)) 2402 (or (group (* (not "[")) ":" (* nonl))
2403 (+ any)) 2403 (+ nonl))
2404 ":" (+ (not (any ":]"))) eot) 2404 ":" (+ (not (any ":]"))) eot)
2405 input) 2405 input)
2406 (match-beginning 1)) 2406 (match-beginning 1))
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 1966193d1a7..c4e09e48bea 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -710,7 +710,11 @@ the C sources, too."
710 (high-doc (cdr high))) 710 (high-doc (cdr high)))
711 (unless (and (symbolp function) 711 (unless (and (symbolp function)
712 (get function 'reader-construct)) 712 (get function 'reader-construct))
713 (insert high-usage "\n")) 713 (insert high-usage "\n")
714 (when (and (featurep 'native-compile)
715 (subr-native-elisp-p (symbol-function function))
716 (subr-type (symbol-function function)))
717 (insert (format "\nInferred type: %s\n" (subr-type (symbol-function function))))))
714 (fill-region fill-begin (point)) 718 (fill-region fill-begin (point))
715 high-doc))))) 719 high-doc)))))
716 720
diff --git a/lisp/org/org.el b/lisp/org/org.el
index e42704778bd..b81630fdc07 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -5374,7 +5374,7 @@ by a #."
5374 (zero-or-more (any " \t")) 5374 (zero-or-more (any " \t"))
5375 (group (group (zero-or-more (not (any " \t\n")))) 5375 (group (group (zero-or-more (not (any " \t\n"))))
5376 (zero-or-more (any " \t")) 5376 (zero-or-more (any " \t"))
5377 (group (zero-or-more any))))) 5377 (group (zero-or-more nonl)))))
5378 limit t) 5378 limit t)
5379 (let ((beg (match-beginning 0)) 5379 (let ((beg (match-beginning 0))
5380 (end-of-beginline (match-end 0)) 5380 (end-of-beginline (match-end 0))
@@ -5400,7 +5400,7 @@ by a #."
5400 "#+end" 5400 "#+end"
5401 ,(match-string 4) 5401 ,(match-string 4)
5402 word-end 5402 word-end
5403 (zero-or-more any))))) 5403 (zero-or-more nonl)))))
5404 ;; We look further than LIMIT on purpose. 5404 ;; We look further than LIMIT on purpose.
5405 nil t) 5405 nil t)
5406 ;; We do have a matching #+end line. 5406 ;; We do have a matching #+end line.
@@ -5473,7 +5473,7 @@ by a #."
5473 (beginning-of-line) 5473 (beginning-of-line)
5474 (looking-at (rx (group (zero-or-more (any " \t")) 5474 (looking-at (rx (group (zero-or-more (any " \t"))
5475 "#+caption" 5475 "#+caption"
5476 (optional "[" (zero-or-more any) "]") 5476 (optional "[" (zero-or-more nonl) "]")
5477 ":") 5477 ":")
5478 (zero-or-more (any " \t"))))) 5478 (zero-or-more (any " \t")))))
5479 (add-text-properties (line-beginning-position) (match-end 1) 5479 (add-text-properties (line-beginning-position) (match-end 1)
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 38cb19f5a12..e6fcc684729 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -155,7 +155,7 @@
155 ,(rx bol (zero-or-more space) 155 ,(rx bol (zero-or-more space)
156 "(define-module" 156 "(define-module"
157 (one-or-more space) 157 (one-or-more space)
158 (group "(" (one-or-more any) ")")) 158 (group "(" (one-or-more nonl) ")"))
159 1) 159 1)
160 ("Macros" 160 ("Macros"
161 ,(rx bol (zero-or-more space) "(" 161 ,(rx bol (zero-or-more space) "("
diff --git a/lisp/subr.el b/lisp/subr.el
index b5c59023f8e..69f58a8c827 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -205,6 +205,7 @@ buffer-local wherever it is set."
205(defun buffer-local-boundp (symbol buffer) 205(defun buffer-local-boundp (symbol buffer)
206 "Return non-nil if SYMBOL is bound in BUFFER. 206 "Return non-nil if SYMBOL is bound in BUFFER.
207Also see `local-variable-p'." 207Also see `local-variable-p'."
208 (declare (side-effect-free t))
208 (condition-case nil 209 (condition-case nil
209 (buffer-local-value symbol buffer) 210 (buffer-local-value symbol buffer)
210 (:success t) 211 (:success t)
@@ -298,6 +299,7 @@ value of last one, or nil if there are none."
298 299
299(defsubst subr-primitive-p (object) 300(defsubst subr-primitive-p (object)
300 "Return t if OBJECT is a built-in primitive function." 301 "Return t if OBJECT is a built-in primitive function."
302 (declare (side-effect-free error-free))
301 (and (subrp object) 303 (and (subrp object)
302 (not (subr-native-elisp-p object)))) 304 (not (subr-native-elisp-p object))))
303 305
@@ -415,6 +417,7 @@ The CONDITION argument is not evaluated. Do not quote it."
415 "Return a new uninterned symbol. 417 "Return a new uninterned symbol.
416The name is made by appending `gensym-counter' to PREFIX. 418The name is made by appending `gensym-counter' to PREFIX.
417PREFIX is a string, and defaults to \"g\"." 419PREFIX is a string, and defaults to \"g\"."
420 (declare (important-return-value t))
418 (let ((num (prog1 gensym-counter 421 (let ((num (prog1 gensym-counter
419 (setq gensym-counter (1+ gensym-counter))))) 422 (setq gensym-counter (1+ gensym-counter)))))
420 (make-symbol (format "%s%d" (or prefix "g") num)))) 423 (make-symbol (format "%s%d" (or prefix "g") num))))
@@ -497,6 +500,7 @@ Defaults to `error'."
497 "Return non-nil if OBJECT seems to be a frame configuration. 500 "Return non-nil if OBJECT seems to be a frame configuration.
498Any list whose car is `frame-configuration' is assumed to be a frame 501Any list whose car is `frame-configuration' is assumed to be a frame
499configuration." 502configuration."
503 (declare (pure t) (side-effect-free error-free))
500 (and (consp object) 504 (and (consp object)
501 (eq (car object) 'frame-configuration))) 505 (eq (car object) 'frame-configuration)))
502 506
@@ -506,6 +510,7 @@ ARGS is a list of the first N arguments to pass to FUN.
506The result is a new function which does the same as FUN, except that 510The result is a new function which does the same as FUN, except that
507the first N arguments are fixed at the values with which this function 511the first N arguments are fixed at the values with which this function
508was called." 512was called."
513 (declare (side-effect-free error-free))
509 (lambda (&rest args2) 514 (lambda (&rest args2)
510 (apply fun (append args args2)))) 515 (apply fun (append args args2))))
511 516
@@ -1076,6 +1081,7 @@ any corresponding binding in PARENT, but it does not override corresponding
1076bindings in other keymaps of MAPS. 1081bindings in other keymaps of MAPS.
1077MAPS can be a list of keymaps or a single keymap. 1082MAPS can be a list of keymaps or a single keymap.
1078PARENT if non-nil should be a keymap." 1083PARENT if non-nil should be a keymap."
1084 (declare (side-effect-free t))
1079 `(keymap 1085 `(keymap
1080 ,@(if (keymapp maps) (list maps) maps) 1086 ,@(if (keymapp maps) (list maps) maps)
1081 ,@parent)) 1087 ,@parent))
@@ -1216,6 +1222,7 @@ This resolves inheritance and redefinitions. The returned keymap
1216should behave identically to a copy of KEYMAP w.r.t `lookup-key' 1222should behave identically to a copy of KEYMAP w.r.t `lookup-key'
1217and use in active keymaps and menus. 1223and use in active keymaps and menus.
1218Subkeymaps may be modified but are not canonicalized." 1224Subkeymaps may be modified but are not canonicalized."
1225 (declare (important-return-value t))
1219 ;; FIXME: Problem with the difference between a nil binding 1226 ;; FIXME: Problem with the difference between a nil binding
1220 ;; that hides a binding in an inherited map and a nil binding that's ignored 1227 ;; that hides a binding in an inherited map and a nil binding that's ignored
1221 ;; to let some further binding visible. Currently a nil binding hides all. 1228 ;; to let some further binding visible. Currently a nil binding hides all.
@@ -1538,6 +1545,7 @@ See also `current-global-map'.")
1538 1545
1539(defun listify-key-sequence (key) 1546(defun listify-key-sequence (key)
1540 "Convert a key sequence to a list of events." 1547 "Convert a key sequence to a list of events."
1548 (declare (side-effect-free t))
1541 (if (vectorp key) 1549 (if (vectorp key)
1542 (append key nil) 1550 (append key nil)
1543 (mapcar (lambda (c) 1551 (mapcar (lambda (c)
@@ -1565,6 +1573,7 @@ EVENT may be an event or an event type. If EVENT is a symbol
1565that has never been used in an event that has been read as input 1573that has never been used in an event that has been read as input
1566in the current Emacs session, then this function may fail to include 1574in the current Emacs session, then this function may fail to include
1567the `click' modifier." 1575the `click' modifier."
1576 (declare (side-effect-free t))
1568 (unless (stringp event) 1577 (unless (stringp event)
1569 (let ((type event)) 1578 (let ((type event))
1570 (if (listp type) 1579 (if (listp type)
@@ -1598,6 +1607,7 @@ The value is a printing character (not upper case) or a symbol.
1598EVENT may be an event or an event type. If EVENT is a symbol 1607EVENT may be an event or an event type. If EVENT is a symbol
1599that has never been used in an event that has been read as input 1608that has never been used in an event that has been read as input
1600in the current Emacs session, then this function may return nil." 1609in the current Emacs session, then this function may return nil."
1610 (declare (side-effect-free t))
1601 (unless (stringp event) 1611 (unless (stringp event)
1602 (if (consp event) 1612 (if (consp event)
1603 (setq event (car event))) 1613 (setq event (car event)))
@@ -1618,6 +1628,7 @@ in the current Emacs session, then this function may return nil."
1618 1628
1619(defun mouse-event-p (object) 1629(defun mouse-event-p (object)
1620 "Return non-nil if OBJECT is a mouse click event." 1630 "Return non-nil if OBJECT is a mouse click event."
1631 (declare (side-effect-free t))
1621 ;; is this really correct? maybe remove mouse-movement? 1632 ;; is this really correct? maybe remove mouse-movement?
1622 (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement))) 1633 (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement)))
1623 1634
@@ -1663,6 +1674,7 @@ nil or (STRING . POSITION)'.
1663`posn-timestamp': The time the event occurred, in milliseconds. 1674`posn-timestamp': The time the event occurred, in milliseconds.
1664 1675
1665For more information, see Info node `(elisp)Click Events'." 1676For more information, see Info node `(elisp)Click Events'."
1677 (declare (side-effect-free t))
1666 (or (and (consp event) 1678 (or (and (consp event)
1667 ;; Ignore touchscreen events. They store the posn in a 1679 ;; Ignore touchscreen events. They store the posn in a
1668 ;; different format, and can have multiple posns. 1680 ;; different format, and can have multiple posns.
@@ -1677,6 +1689,7 @@ For more information, see Info node `(elisp)Click Events'."
1677EVENT should be a click, drag, or key press event. 1689EVENT should be a click, drag, or key press event.
1678 1690
1679See `event-start' for a description of the value returned." 1691See `event-start' for a description of the value returned."
1692 (declare (side-effect-free t))
1680 (or (and (consp event) 1693 (or (and (consp event)
1681 (not (memq (car event) '(touchscreen-begin 1694 (not (memq (car event) '(touchscreen-begin
1682 touchscreen-update 1695 touchscreen-update
@@ -1687,11 +1700,13 @@ See `event-start' for a description of the value returned."
1687(defsubst event-click-count (event) 1700(defsubst event-click-count (event)
1688 "Return the multi-click count of EVENT, a click or drag event. 1701 "Return the multi-click count of EVENT, a click or drag event.
1689The return value is a positive integer." 1702The return value is a positive integer."
1703 (declare (side-effect-free t))
1690 (if (and (consp event) (integerp (nth 2 event))) (nth 2 event) 1)) 1704 (if (and (consp event) (integerp (nth 2 event))) (nth 2 event) 1))
1691 1705
1692(defsubst event-line-count (event) 1706(defsubst event-line-count (event)
1693 "Return the line count of EVENT, a mousewheel event. 1707 "Return the line count of EVENT, a mousewheel event.
1694The return value is a positive integer." 1708The return value is a positive integer."
1709 (declare (side-effect-free t))
1695 (if (and (consp event) (integerp (nth 3 event))) (nth 3 event) 1)) 1710 (if (and (consp event) (integerp (nth 3 event))) (nth 3 event) 1))
1696 1711
1697;;;; Extracting fields of the positions in an event. 1712;;;; Extracting fields of the positions in an event.
@@ -1701,6 +1716,7 @@ The return value is a positive integer."
1701A `posn' object is returned from functions such as `event-start'. 1716A `posn' object is returned from functions such as `event-start'.
1702If OBJ is a valid `posn' object, but specifies a frame rather 1717If OBJ is a valid `posn' object, but specifies a frame rather
1703than a window, return nil." 1718than a window, return nil."
1719 (declare (side-effect-free error-free))
1704 ;; FIXME: Correct the behavior of this function so that all valid 1720 ;; FIXME: Correct the behavior of this function so that all valid
1705 ;; `posn' objects are recognized, after updating other code that 1721 ;; `posn' objects are recognized, after updating other code that
1706 ;; depends on its present behavior. 1722 ;; depends on its present behavior.
@@ -1714,12 +1730,14 @@ than a window, return nil."
1714If POSITION is outside the frame where the event was initiated, 1730If POSITION is outside the frame where the event was initiated,
1715return that frame instead. POSITION should be a list of the form 1731return that frame instead. POSITION should be a list of the form
1716returned by the `event-start' and `event-end' functions." 1732returned by the `event-start' and `event-end' functions."
1733 (declare (side-effect-free t))
1717 (nth 0 position)) 1734 (nth 0 position))
1718 1735
1719(defsubst posn-area (position) 1736(defsubst posn-area (position)
1720 "Return the window area recorded in POSITION, or nil for the text area. 1737 "Return the window area recorded in POSITION, or nil for the text area.
1721POSITION should be a list of the form returned by the `event-start' 1738POSITION should be a list of the form returned by the `event-start'
1722and `event-end' functions." 1739and `event-end' functions."
1740 (declare (side-effect-free t))
1723 (let ((area (if (consp (nth 1 position)) 1741 (let ((area (if (consp (nth 1 position))
1724 (car (nth 1 position)) 1742 (car (nth 1 position))
1725 (nth 1 position)))) 1743 (nth 1 position))))
@@ -1731,6 +1749,7 @@ POSITION should be a list of the form returned by the `event-start'
1731and `event-end' functions. 1749and `event-end' functions.
1732Returns nil if POSITION does not correspond to any buffer location (e.g. 1750Returns nil if POSITION does not correspond to any buffer location (e.g.
1733a click on a scroll bar)." 1751a click on a scroll bar)."
1752 (declare (side-effect-free t))
1734 (or (nth 5 position) 1753 (or (nth 5 position)
1735 (let ((pt (nth 1 position))) 1754 (let ((pt (nth 1 position)))
1736 (or (car-safe pt) 1755 (or (car-safe pt)
@@ -1756,6 +1775,7 @@ Select the corresponding window as well."
1756The return value has the form (X . Y), where X and Y are given in 1775The return value has the form (X . Y), where X and Y are given in
1757pixels. POSITION should be a list of the form returned by 1776pixels. POSITION should be a list of the form returned by
1758`event-start' and `event-end'." 1777`event-start' and `event-end'."
1778 (declare (side-effect-free t))
1759 (nth 2 position)) 1779 (nth 2 position))
1760 1780
1761(declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) 1781(declare-function scroll-bar-scale "scroll-bar" (num-denom whole))
@@ -1775,6 +1795,7 @@ corresponds to the vertical position of the click in the scroll bar.
1775 1795
1776POSITION should be a list of the form returned by the `event-start' 1796POSITION should be a list of the form returned by the `event-start'
1777and `event-end' functions." 1797and `event-end' functions."
1798 (declare (side-effect-free t))
1778 (let* ((pair (posn-x-y position)) 1799 (let* ((pair (posn-x-y position))
1779 (frame-or-window (posn-window position)) 1800 (frame-or-window (posn-window position))
1780 (frame (if (framep frame-or-window) 1801 (frame (if (framep frame-or-window)
@@ -1820,12 +1841,14 @@ This function does not account for the width on display, like the
1820number of visual columns taken by a TAB or image. If you need 1841number of visual columns taken by a TAB or image. If you need
1821the coordinates of POSITION in character units, you should use 1842the coordinates of POSITION in character units, you should use
1822`posn-col-row', not this function." 1843`posn-col-row', not this function."
1844 (declare (side-effect-free t))
1823 (nth 6 position)) 1845 (nth 6 position))
1824 1846
1825(defsubst posn-timestamp (position) 1847(defsubst posn-timestamp (position)
1826 "Return the timestamp of POSITION. 1848 "Return the timestamp of POSITION.
1827POSITION should be a list of the form returned by the `event-start' 1849POSITION should be a list of the form returned by the `event-start'
1828and `event-end' functions." 1850and `event-end' functions."
1851 (declare (side-effect-free t))
1829 (nth 3 position)) 1852 (nth 3 position))
1830 1853
1831(defun posn-string (position) 1854(defun posn-string (position)
@@ -1833,6 +1856,7 @@ and `event-end' functions."
1833Value is a cons (STRING . STRING-POS), or nil if not a string. 1856Value is a cons (STRING . STRING-POS), or nil if not a string.
1834POSITION should be a list of the form returned by the `event-start' 1857POSITION should be a list of the form returned by the `event-start'
1835and `event-end' functions." 1858and `event-end' functions."
1859 (declare (side-effect-free t))
1836 (let ((x (nth 4 position))) 1860 (let ((x (nth 4 position)))
1837 ;; Apparently this can also be `handle' or `below-handle' (bug#13979). 1861 ;; Apparently this can also be `handle' or `below-handle' (bug#13979).
1838 (when (consp x) x))) 1862 (when (consp x) x)))
@@ -1842,6 +1866,7 @@ and `event-end' functions."
1842Value is a list (image ...), or nil if not an image. 1866Value is a list (image ...), or nil if not an image.
1843POSITION should be a list of the form returned by the `event-start' 1867POSITION should be a list of the form returned by the `event-start'
1844and `event-end' functions." 1868and `event-end' functions."
1869 (declare (side-effect-free t))
1845 (nth 7 position)) 1870 (nth 7 position))
1846 1871
1847(defsubst posn-object (position) 1872(defsubst posn-object (position)
@@ -1850,6 +1875,7 @@ Value is a list (image ...) for an image object, a cons cell
1850\(STRING . STRING-POS) for a string object, and nil for a buffer position. 1875\(STRING . STRING-POS) for a string object, and nil for a buffer position.
1851POSITION should be a list of the form returned by the `event-start' 1876POSITION should be a list of the form returned by the `event-start'
1852and `event-end' functions." 1877and `event-end' functions."
1878 (declare (side-effect-free t))
1853 (or (posn-image position) (posn-string position))) 1879 (or (posn-image position) (posn-string position)))
1854 1880
1855(defsubst posn-object-x-y (position) 1881(defsubst posn-object-x-y (position)
@@ -1858,12 +1884,14 @@ The return value has the form (DX . DY), where DX and DY are
1858given in pixels, and they are relative to the top-left corner of 1884given in pixels, and they are relative to the top-left corner of
1859the clicked glyph of object at POSITION. POSITION should be a 1885the clicked glyph of object at POSITION. POSITION should be a
1860list of the form returned by `event-start' and `event-end'." 1886list of the form returned by `event-start' and `event-end'."
1887 (declare (side-effect-free t))
1861 (nth 8 position)) 1888 (nth 8 position))
1862 1889
1863(defsubst posn-object-width-height (position) 1890(defsubst posn-object-width-height (position)
1864 "Return the pixel width and height of the object of POSITION. 1891 "Return the pixel width and height of the object of POSITION.
1865The return value has the form (WIDTH . HEIGHT). POSITION should 1892The return value has the form (WIDTH . HEIGHT). POSITION should
1866be a list of the form returned by `event-start' and `event-end'." 1893be a list of the form returned by `event-start' and `event-end'."
1894 (declare (side-effect-free t))
1867 (nth 9 position)) 1895 (nth 9 position))
1868 1896
1869(defun values--store-value (value) 1897(defun values--store-value (value)
@@ -2624,6 +2652,7 @@ The variable list SPEC is the same as in `if-let*'."
2624Uses the `derived-mode-parent' property of the symbol to trace backwards. 2652Uses the `derived-mode-parent' property of the symbol to trace backwards.
2625If you just want to check `major-mode', use `derived-mode-p'." 2653If you just want to check `major-mode', use `derived-mode-p'."
2626 ;; If MODE is an alias, then look up the real mode function first. 2654 ;; If MODE is an alias, then look up the real mode function first.
2655 (declare (side-effect-free t))
2627 (when-let ((alias (symbol-function mode))) 2656 (when-let ((alias (symbol-function mode)))
2628 (when (symbolp alias) 2657 (when (symbolp alias)
2629 (setq mode alias))) 2658 (setq mode alias)))
@@ -2638,6 +2667,7 @@ If you just want to check `major-mode', use `derived-mode-p'."
2638(defun derived-mode-p (&rest modes) 2667(defun derived-mode-p (&rest modes)
2639 "Non-nil if the current major mode is derived from one of MODES. 2668 "Non-nil if the current major mode is derived from one of MODES.
2640Uses the `derived-mode-parent' property of the symbol to trace backwards." 2669Uses the `derived-mode-parent' property of the symbol to trace backwards."
2670 (declare (side-effect-free t))
2641 (apply #'provided-mode-derived-p major-mode modes)) 2671 (apply #'provided-mode-derived-p major-mode modes))
2642 2672
2643(defvar-local major-mode--suspended nil) 2673(defvar-local major-mode--suspended nil)
@@ -2761,6 +2791,7 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label."
2761 2791
2762(defsubst autoloadp (object) 2792(defsubst autoloadp (object)
2763 "Non-nil if OBJECT is an autoload." 2793 "Non-nil if OBJECT is an autoload."
2794 (declare (side-effect-free error-free))
2764 (eq 'autoload (car-safe object))) 2795 (eq 'autoload (car-safe object)))
2765 2796
2766;; (defun autoload-type (object) 2797;; (defun autoload-type (object)
@@ -2805,6 +2836,7 @@ This is to `put' what `defalias' is to `fset'."
2805(defun locate-eln-file (eln-file) 2836(defun locate-eln-file (eln-file)
2806 "Locate a natively-compiled ELN-FILE by searching its load path. 2837 "Locate a natively-compiled ELN-FILE by searching its load path.
2807This function looks in directories named by `native-comp-eln-load-path'." 2838This function looks in directories named by `native-comp-eln-load-path'."
2839 (declare (important-return-value t))
2808 (or (locate-file-internal (concat comp-native-version-dir "/" eln-file) 2840 (or (locate-file-internal (concat comp-native-version-dir "/" eln-file)
2809 native-comp-eln-load-path) 2841 native-comp-eln-load-path)
2810 (locate-file-internal 2842 (locate-file-internal
@@ -2836,6 +2868,7 @@ instead.
2836This function only works for symbols defined in Lisp files. For 2868This function only works for symbols defined in Lisp files. For
2837symbols that are defined in C files, use `help-C-file-name' 2869symbols that are defined in C files, use `help-C-file-name'
2838instead." 2870instead."
2871 (declare (important-return-value t))
2839 (if (and (or (null type) (eq type 'defun)) 2872 (if (and (or (null type) (eq type 'defun))
2840 (symbolp symbol) 2873 (symbolp symbol)
2841 (autoloadp (symbol-function symbol))) 2874 (autoloadp (symbol-function symbol)))
@@ -2962,6 +2995,7 @@ argument, which will be called with the exit status of the
2962program before the output is collected. If STATUS-HANDLER is 2995program before the output is collected. If STATUS-HANDLER is
2963nil, an error is signaled if the program returns with a non-zero 2996nil, an error is signaled if the program returns with a non-zero
2964exit status." 2997exit status."
2998 (declare (important-return-value t))
2965 (with-temp-buffer 2999 (with-temp-buffer
2966 (let ((status (apply #'call-process program nil (current-buffer) nil args))) 3000 (let ((status (apply #'call-process program nil (current-buffer) nil args)))
2967 (if status-handler 3001 (if status-handler
@@ -2982,12 +3016,14 @@ exit status."
2982 "Execute PROGRAM with ARGS, returning its output as a list of lines. 3016 "Execute PROGRAM with ARGS, returning its output as a list of lines.
2983Signal an error if the program returns with a non-zero exit status. 3017Signal an error if the program returns with a non-zero exit status.
2984Also see `process-lines-ignore-status'." 3018Also see `process-lines-ignore-status'."
3019 (declare (important-return-value t))
2985 (apply #'process-lines-handling-status program nil args)) 3020 (apply #'process-lines-handling-status program nil args))
2986 3021
2987(defun process-lines-ignore-status (program &rest args) 3022(defun process-lines-ignore-status (program &rest args)
2988 "Execute PROGRAM with ARGS, returning its output as a list of lines. 3023 "Execute PROGRAM with ARGS, returning its output as a list of lines.
2989The exit status of the program is ignored. 3024The exit status of the program is ignored.
2990Also see `process-lines'." 3025Also see `process-lines'."
3026 (declare (important-return-value t))
2991 (apply #'process-lines-handling-status program #'ignore args)) 3027 (apply #'process-lines-handling-status program #'ignore args))
2992 3028
2993(defun process-live-p (process) 3029(defun process-live-p (process)
@@ -3016,6 +3052,7 @@ process."
3016(defun process-get (process propname) 3052(defun process-get (process propname)
3017 "Return the value of PROCESS' PROPNAME property. 3053 "Return the value of PROCESS' PROPNAME property.
3018This is the last value stored with `(process-put PROCESS PROPNAME VALUE)'." 3054This is the last value stored with `(process-put PROCESS PROPNAME VALUE)'."
3055 (declare (side-effect-free t))
3019 (plist-get (process-plist process) propname)) 3056 (plist-get (process-plist process) propname))
3020 3057
3021(defun process-put (process propname value) 3058(defun process-put (process propname value)
@@ -3962,6 +3999,7 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
3962 3999
3963(defun copy-overlay (o) 4000(defun copy-overlay (o)
3964 "Return a copy of overlay O." 4001 "Return a copy of overlay O."
4002 (declare (important-return-value t))
3965 (let ((o1 (if (overlay-buffer o) 4003 (let ((o1 (if (overlay-buffer o)
3966 (make-overlay (overlay-start o) (overlay-end o) 4004 (make-overlay (overlay-start o) (overlay-end o)
3967 ;; FIXME: there's no easy way to find the 4005 ;; FIXME: there's no easy way to find the
@@ -4171,6 +4209,7 @@ See Info node `(elisp)Security Considerations'.
4171If the optional POSIX argument is non-nil, ARGUMENT is quoted 4209If the optional POSIX argument is non-nil, ARGUMENT is quoted
4172according to POSIX shell quoting rules, regardless of the 4210according to POSIX shell quoting rules, regardless of the
4173system's shell." 4211system's shell."
4212 (declare (important-return-value t))
4174 (cond 4213 (cond
4175 ((and (not posix) (eq system-type 'ms-dos)) 4214 ((and (not posix) (eq system-type 'ms-dos))
4176 ;; Quote using double quotes, but escape any existing quotes in 4215 ;; Quote using double quotes, but escape any existing quotes in
@@ -4288,6 +4327,7 @@ or byte-code."
4288 4327
4289(defun field-at-pos (pos) 4328(defun field-at-pos (pos)
4290 "Return the field at position POS, taking stickiness etc into account." 4329 "Return the field at position POS, taking stickiness etc into account."
4330 (declare (important-return-value t))
4291 (let ((raw-field (get-char-property (field-beginning pos) 'field))) 4331 (let ((raw-field (get-char-property (field-beginning pos) 'field)))
4292 (if (eq raw-field 'boundary) 4332 (if (eq raw-field 'boundary)
4293 (get-char-property (1- (field-end pos)) 'field) 4333 (get-char-property (1- (field-end pos)) 'field)
diff --git a/lisp/xml.el b/lisp/xml.el
index 58d17a4b340..9095653416e 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -669,10 +669,7 @@ Leave point at the first non-blank character after the tag."
669 (if (assoc name attlist) 669 (if (assoc name attlist)
670 (error "XML: (Not Well-Formed) Each attribute must be unique within an element")) 670 (error "XML: (Not Well-Formed) Each attribute must be unique within an element"))
671 671
672 ;; Multiple whitespace characters should be replaced with a single one
673 ;; in the attributes
674 (let ((string (match-string-no-properties 1))) 672 (let ((string (match-string-no-properties 1)))
675 (replace-regexp-in-string "\\s-\\{2,\\}" " " string)
676 (let ((expansion (xml-substitute-special string))) 673 (let ((expansion (xml-substitute-special string)))
677 (unless (stringp expansion) 674 (unless (stringp expansion)
678 ;; We say this is the constraint. It is actually that 675 ;; We say this is the constraint. It is actually that
diff --git a/test/lisp/dnd-tests.el b/test/lisp/dnd-tests.el
index a603f29eb6d..9f97d739cec 100644
--- a/test/lisp/dnd-tests.el
+++ b/test/lisp/dnd-tests.el
@@ -172,7 +172,7 @@ This function only tries to handle strings."
172 (extracted-1 (dnd-tests-extract-selection-data string-data-1 t)) 172 (extracted-1 (dnd-tests-extract-selection-data string-data-1 t))
173 (extracted (dnd-tests-extract-selection-data string-data t))) 173 (extracted (dnd-tests-extract-selection-data string-data t)))
174 (should (and (stringp extracted) (stringp extracted-1))) 174 (should (and (stringp extracted) (stringp extracted-1)))
175 (should (equal extracted extracted))) 175 (should (equal extracted extracted-1)))
176 ;; Now check text/plain. 176 ;; Now check text/plain.
177 (let ((string-data (dnd-tests-verify-selection-data 177 (let ((string-data (dnd-tests-verify-selection-data
178 'text/plain))) 178 'text/plain)))
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index a8809bda81c..963ea9abe0c 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -1799,11 +1799,11 @@ EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode python-mode)) \
1799(TEST-IN-COMMENTS t) (TEST-IN-STRINGS t) (TEST-IN-CODE t) \ 1799(TEST-IN-COMMENTS t) (TEST-IN-STRINGS t) (TEST-IN-CODE t) \
1800(FIXTURE-FN \\='#\\='electric-pair-mode))" fill-column))) 1800(FIXTURE-FN \\='#\\='electric-pair-mode))" fill-column)))
1801 1801
1802(defun test-bytecomp-defgroup-choice () 1802(ert-deftest bytecomp-test-defcustom-type-quoted ()
1803 (should-not (byte-compile--suspicious-defcustom-choice 'integer)) 1803 (should-not (byte-compile--defcustom-type-quoted 'integer))
1804 (should-not (byte-compile--suspicious-defcustom-choice 1804 (should-not (byte-compile--defcustom-type-quoted
1805 '(choice (const :tag "foo" bar)))) 1805 '(choice (const :tag "foo" bar))))
1806 (should (byte-compile--suspicious-defcustom-choice 1806 (should (byte-compile--defcustom-type-quoted
1807 '(choice (const :tag "foo" 'bar))))) 1807 '(choice (const :tag "foo" 'bar)))))
1808 1808
1809(ert-deftest bytecomp-function-attributes () 1809(ert-deftest bytecomp-function-attributes ()
diff --git a/test/lisp/find-cmd-tests.el b/test/lisp/find-cmd-tests.el
index a0b9a80ef47..3fbd0fc4ea3 100644
--- a/test/lisp/find-cmd-tests.el
+++ b/test/lisp/find-cmd-tests.el
@@ -25,7 +25,7 @@
25(ert-deftest find-cmd-test-find-cmd () 25(ert-deftest find-cmd-test-find-cmd ()
26 (should 26 (should
27 (string-match 27 (string-match
28 (rx "find " (+ any) 28 (rx "find " (+ nonl)
29 " \\( \\( -name .svn -or -name .git -or -name .CVS \\)" 29 " \\( \\( -name .svn -or -name .git -or -name .CVS \\)"
30 " -prune -or -true \\)" 30 " -prune -or -true \\)"
31 " \\( \\( \\(" " -name \\*.pl -or -name \\*.pm -or -name \\*.t \\)" 31 " \\( \\( \\(" " -name \\*.pl -or -name \\*.pm -or -name \\*.t \\)"