]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from origin/emacs-29
authorEli Zaretskii <eliz@gnu.org>
Sat, 9 Sep 2023 08:32:45 +0000 (04:32 -0400)
committerEli Zaretskii <eliz@gnu.org>
Sat, 9 Sep 2023 08:32:45 +0000 (04:32 -0400)
bc56da92d8d ; Fix error in 'tex-recenter-output-buffer'
d17c5adc057 Fix regexp for recognizing PBM images
9e9f61866e7 Improve wording in ELisp manual
7427efa033b Fix typo (Bug#65764)
59c66244080 ; * lisp/ido.el (ido-completion-buffer): Fix :type (bug#6...
4ec4b18c2a0 Fix libgccjit build on Haiku
80bdcf8f351 (regexp-tests-backtrack-optimization): Mark it as failing
8a9e653cc82 ; Add regression test for bug#65726
6fad73d7cc5 * src/regex-emacs.c (mutually_exclusive_p): Fix inf-loop ...
1d3d4196073 ; * lisp/files.el (save-some-buffers-functions): Doc fix ...
42b14c6e5bb Bump seq version to 2.24
ff5190a174f Add note on ELPA to admin/notes/bug-triage
f1e4cbe72aa ; * etc/PROBLEMS: Minor wording fix.
fd5593c7f25 * etc/PROBLEMS: Mention bug#65432 and its remedy.
dd896ea1e62 Ignore errors when checking for object initializers (bug#...
3550f44c17c ; Fix typos
5b246b9b817 * CONTRIBUTE: Document making ChangeLogs with Magit.
0bd46619413 Doc fixes for obsolete functions and variables
524c0c34f24 ; * lisp/ffap.el (ffap-rfs-regexp): Fix :type (bug#65698).
f48dccc4675 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
71a85e22668 A revision to the Widget manual
dbbcf4a6599 Fix fontification of " in edit-kbd-macro

# Conflicts:
# test/src/regex-emacs-tests.el

21 files changed:
1  2 
CONTRIBUTE
configure.ac
doc/lispref/objects.texi
doc/misc/gnus.texi
etc/PROBLEMS
lisp/align.el
lisp/emacs-lisp/eieio.el
lisp/emacs-lisp/seq.el
lisp/ffap.el
lisp/files.el
lisp/ido.el
lisp/image.el
lisp/progmodes/csharp-mode.el
lisp/progmodes/perl-mode.el
lisp/subr.el
lisp/textmodes/ispell.el
lisp/textmodes/tex-mode.el
src/buffer.h
src/data.c
src/regex-emacs.c
test/src/regex-emacs-tests.el

diff --cc CONTRIBUTE
Simple merge
diff --cc configure.ac
Simple merge
Simple merge
Simple merge
diff --cc etc/PROBLEMS
Simple merge
diff --cc lisp/align.el
Simple merge
Simple merge
Simple merge
diff --cc lisp/ffap.el
Simple merge
diff --cc lisp/files.el
Simple merge
diff --cc lisp/ido.el
Simple merge
diff --cc lisp/image.el
Simple merge
Simple merge
Simple merge
diff --cc lisp/subr.el
Simple merge
Simple merge
Simple merge
diff --cc src/buffer.h
Simple merge
diff --cc src/data.c
Simple merge
Simple merge
index 4e2c0f67a448cd2d14ed42357ebe679cb9db3bb4,195b3c9f8c0f1aa66301211c26fa83b6ad5be312..60c19f1ab2d981d57049bd956a53663e6b34273d
@@@ -883,86 -884,8 +884,90 @@@ This evaluates the TESTS test cases fro
      (should (looking-at "x*\\(=\\|:\\)*"))
      (should (looking-at "x*=*?"))))
  
 +(ert-deftest regexp-tests-zero-width-assertion-repetition ()
 +  ;; Check compatibility behaviour with repetition operators after
 +  ;; certain zero-width assertions (bug#64128).
 +
 +  ;; This function is just to hide ugly regexps from relint so that it
 +  ;; doesn't complain about them.
 +  (cl-flet ((smatch (re str) (string-match re str)))
 +    ;; Postfix operators after ^ and \` become literals, for historical
 +    ;; compatibility.  Only the first character of a lazy operator (like *?)
 +    ;; becomes a literal.
 +    (should (equal (smatch "^*a" "x\n*a") 2))
 +    (should (equal (smatch "^*?a" "x\n*a") 2))
 +    (should (equal (smatch "^*?a" "x\na") 2))
 +    (should (equal (smatch "^*?a" "x\n**a") nil))
 +
 +    (should (equal (smatch "\\`*a" "*a") 0))
 +    (should (equal (smatch "\\`*?a" "*a") 0))
 +    (should (equal (smatch "\\`*?a" "a") 0))
 +    (should (equal (smatch "\\`*?a" "**a") nil))
 +
 +    ;; Other zero-width assertions are treated as normal elements, so postfix
 +    ;; operators apply to them alone (which is pointless but valid).
 +    (should (equal (smatch "\\b*!" "*!") 1))
 +    (should (equal (smatch "!\\b+;" "!;") nil))
 +    (should (equal (smatch "!\\b+a" "!a") 0))
 +
 +    (should (equal (smatch "\\B*!" "*!") 1))
 +    (should (equal (smatch "!\\B+;" "!;") 0))
 +    (should (equal (smatch "!\\B+a" "!a") nil))
 +
 +    (should (equal (smatch "\\<*b" "*b") 1))
 +    (should (equal (smatch "a\\<*b" "ab") 0))
 +    (should (equal (smatch ";\\<*b" ";b") 0))
 +    (should (equal (smatch "a\\<+b" "ab") nil))
 +    (should (equal (smatch ";\\<+b" ";b") 0))
 +
 +    (should (equal (smatch "\\>*;" "*;") 1))
 +    (should (equal (smatch "a\\>*b" "ab") 0))
 +    (should (equal (smatch "a\\>*;" "a;") 0))
 +    (should (equal (smatch "a\\>+b" "ab") nil))
 +    (should (equal (smatch "a\\>+;" "a;") 0))
 +
 +    (should (equal (smatch "a\\'" "ab") nil))
 +    (should (equal (smatch "b\\'" "ab") 1))
 +    (should (equal (smatch "a\\'*b" "ab") 0))
 +    (should (equal (smatch "a\\'+" "ab") nil))
 +    (should (equal (smatch "b\\'+" "ab") 1))
 +    (should (equal (smatch "\\'+" "+") 1))
 +
 +    (should (equal (smatch "\\_<*b" "*b") 1))
 +    (should (equal (smatch "a\\_<*b" "ab") 0))
 +    (should (equal (smatch " \\_<*b" " b") 0))
 +    (should (equal (smatch "a\\_<+b" "ab") nil))
 +    (should (equal (smatch " \\_<+b" " b") 0))
 +
 +    (should (equal (smatch "\\_>*;" "*;") 1))
 +    (should (equal (smatch "a\\_>*b" "ab") 0))
 +    (should (equal (smatch "a\\_>* " "a ") 0))
 +    (should (equal (smatch "a\\_>+b" "ab") nil))
 +    (should (equal (smatch "a\\_>+ " "a ") 0))
 +
 +    (should (equal (smatch "\\=*b" "*b") 1))
 +    (should (equal (smatch "a\\=*b" "a*b") nil))
 +    (should (equal (smatch "a\\=*b" "ab") 0))
 +    ))
 +
 +(ert-deftest regex-emacs-syntax-properties ()
 +  ;; Verify absence of character class syntax property ghost matching bug.
 +  (let ((re "\\s-[[:space:]]")
 +        (s (concat "a"
 +                (propertize "b" 'syntax-table '(0))  ; whitespace
 +                "éz"))
 +        (parse-sexp-lookup-properties t))
 +    ;; Test matching in a string...
 +    (should (equal (string-match re s) nil))
 +    ;; ... and in a buffer.
 +    (should (equal (with-temp-buffer
 +                     (insert s)
 +                     (goto-char (point-min))
 +                     (re-search-forward re nil t))
 +                   nil))))
 +
+ (ert-deftest regex-tests-mutual-exclusive-inf-rec ()
+   ;; Regression test for bug#65726, where this crashed Emacs.
+   (should (equal (string-match "a*\\(?:c\\|b*\\)*" "a") 0)))
  ;;; regex-emacs-tests.el ends here