emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/comp-static-data f61a9ee8e4: Merge branch 'master' into scratch/


From: Vibhav Pant
Subject: scratch/comp-static-data f61a9ee8e4: Merge branch 'master' into scratch/comp-static-data
Date: Wed, 23 Nov 2022 12:14:37 -0500 (EST)

branch: scratch/comp-static-data
commit f61a9ee8e4b8b594c0217576d8755162bcabe291
Merge: 3ca8db68ab 5496f45437
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>

    Merge branch 'master' into scratch/comp-static-data
---
 doc/lispintro/emacs-lisp-intro.texi                |  2 +-
 doc/lispref/strings.texi                           | 32 ++++++----
 doc/misc/gnus.texi                                 |  2 +-
 etc/NEWS.24                                        |  2 +-
 lib-src/ChangeLog.1                                |  2 +-
 lisp/emacs-lisp/pcase.el                           |  2 +-
 lisp/gnus/ChangeLog.3                              |  2 +-
 lisp/gnus/gnus-art.el                              | 10 ++--
 lisp/gnus/gnus-registry.el                         |  2 +-
 lisp/gnus/gnus-search.el                           |  2 +-
 lisp/gnus/gnus-topic.el                            |  2 +-
 lisp/gnus/gnus-uu.el                               |  2 +-
 lisp/gnus/message.el                               |  2 +-
 lisp/jsonrpc.el                                    |  2 +-
 lisp/leim/quail/latin-ltx.el                       |  1 +
 lisp/mouse.el                                      |  1 +
 lisp/net/tramp-archive.el                          | 21 +++++--
 lisp/outline.el                                    | 16 +++--
 lisp/progmodes/antlr-mode.el                       |  2 +-
 lisp/progmodes/cc-engine.el                        |  6 +-
 lisp/progmodes/cc-langs.el                         |  8 +--
 lisp/progmodes/cc-mode.el                          |  4 +-
 lisp/progmodes/eglot.el                            |  4 +-
 lisp/progmodes/idlwave.el                          |  2 +-
 lisp/progmodes/java-ts-mode.el                     | 15 +++--
 lisp/progmodes/js.el                               | 69 +++++++++++++++-------
 lisp/progmodes/json-ts-mode.el                     | 32 +++++-----
 lisp/progmodes/project.el                          | 18 ++++++
 lisp/progmodes/python.el                           |  6 +-
 lisp/progmodes/sh-script.el                        | 31 +++++++---
 lisp/progmodes/ts-mode.el                          | 64 ++++++++++++--------
 lisp/progmodes/xref.el                             | 11 +++-
 lisp/textmodes/css-mode.el                         |  2 +-
 lisp/treesit.el                                    | 51 +++++++++++-----
 lisp/vc/vc.el                                      |  2 +-
 src/casefiddle.c                                   |  3 +-
 src/fns.c                                          |  3 +-
 src/treesit.c                                      | 14 ++---
 src/xdisp.c                                        |  5 +-
 src/xfns.c                                         |  6 +-
 src/xterm.c                                        | 12 ++--
 .../resources/base/netid/bouncer/barnet-drop.eld   |  2 +-
 .../erc/resources/base/netid/bouncer/barnet.eld    |  2 +-
 .../resources/erc-d/resources/dynamic-barnet.eld   |  2 +-
 .../resources/erc-d/resources/dynamic-foonet.eld   |  2 +-
 test/lisp/net/tramp-tests.el                       |  3 +
 test/lisp/vc/vc-tests.el                           |  2 +-
 47 files changed, 322 insertions(+), 166 deletions(-)

diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index df8fa2f8e7..860ef2fc78 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -7981,7 +7981,7 @@ The command \\[yank] can retrieve it from there. @dots{} "
          (progn (message "Read only text copied to kill ring") nil)
        (barf-if-buffer-read-only)
        ;; If the buffer isn't read-only, the text is.
-       (signal 'text-read-only (list (current-buffer)))))
+       (signal 'text-read-only (list (current-buffer)))))))
 @end group
 @end smallexample
 
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 4454188cc4..2f277ea73a 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -558,11 +558,13 @@ differences, like @code{char-equal} when 
@code{case-fold-search} is
 @cindex locale-dependent string equivalence
 @defun string-collate-equalp string1 string2 &optional locale ignore-case
 This function returns @code{t} if @var{string1} and @var{string2} are
-equal with respect to collation rules.  A collation rule is not only
+equal with respect to the collation rules of the specified
+@var{locale}, which defaults to your current system locale.  A
+collation rule is not only
 determined by the lexicographic order of the characters contained in
-@var{string1} and @var{string2}, but also further rules about
+@var{string1} and @var{string2}, but also by further rules about
 relations between these characters.  Usually, it is defined by the
-@var{locale} environment Emacs is running with and by the Standard C
+locale environment with which Emacs is running and by the Standard C
 library against which Emacs was linked@footnote{
 For more information about collation rules and their locale
 dependencies, see @uref{https://unicode.org/reports/tr10/, The Unicode
@@ -589,8 +591,12 @@ dependent; a @var{locale} @code{"en_US.UTF-8"} is 
applicable on POSIX
 systems, while it would be, e.g., @code{"enu_USA.1252"} on MS-Windows
 systems.
 
-If @var{ignore-case} is non-@code{nil}, characters are converted to lower-case
-before comparing them.
+If @var{ignore-case} is non-@code{nil}, characters are compared
+case-insensitively, by converting them to lower-case.  However, if the
+underlying system library doesn't provide locale-specific collation
+rules, this function falls back to @code{string-equal}, in which case
+the @var{ignore-case} argument is ignored, and the comparison will
+always be case-sensitive.
 
 @vindex w32-collate-ignore-punctuation
 To emulate Unicode-compliant collation on MS-Windows systems,
@@ -672,11 +678,13 @@ This function returns the result of comparing 
@var{string1} and
 @cindex locale-dependent string comparison
 @defun string-collate-lessp string1 string2 &optional locale ignore-case
 This function returns @code{t} if @var{string1} is less than
-@var{string2} in collation order.  A collation order is not only
+@var{string2} in collation order of the specified @var{locale}, which
+defaults to your current system locale.  A collation order is not only
 determined by the lexicographic order of the characters contained in
-@var{string1} and @var{string2}, but also further rules about
+@var{string1} and @var{string2}, but also by further rules about
 relations between these characters.  Usually, it is defined by the
-@var{locale} environment Emacs is running with.
+locale environment with which Emacs is running, and by the Standard C
+library against which Emacs was linked.
 
 For example, punctuation and whitespace characters might be ignored
 for sorting (@pxref{Sequence Functions}):
@@ -706,8 +714,12 @@ systems.  The @var{locale} value of @code{"POSIX"} or 
@code{"C"} lets
 @end group
 @end example
 
-If @var{ignore-case} is non-@code{nil}, characters are converted to lower-case
-before comparing them.
+If @var{ignore-case} is non-@code{nil}, characters are compared
+case-insensitively, by converting them to lower-case.  However, if the
+underlying system library doesn't provide locale-specific collation
+rules, this function falls back to @code{string-lessp}, in which case
+the @var{ignore-case} argument is ignored, and the comparison will
+always be case-sensitive.
 
 To emulate Unicode-compliant collation on MS-Windows systems,
 bind @code{w32-collate-ignore-punctuation} to a non-@code{nil} value, since
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index cb0d9c50da..b0fef2b5b6 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -26539,7 +26539,7 @@ keyboard shortcuts like @kbd{M M i} for Important, 
using the first
 letter.
 @end defvar
 
-@defun gnus-registry-mark-article
+@defun gnus-registry-set-article-mark
 Call this function to mark an article with a custom registry mark.  It
 will offer the available marks for completion.
 @end defun
diff --git a/etc/NEWS.24 b/etc/NEWS.24
index fab8a39b0e..8ef479ac0a 100644
--- a/etc/NEWS.24
+++ b/etc/NEWS.24
@@ -951,7 +951,7 @@ Also the following files used by the now obsolete 
otodo-mode.el:
 
 *** the old version of todo-mode.el (renamed to otodo-mode.el).
 
-*** xesam.el (owing to the cancelation of the XESAM project).
+*** xesam.el (owing to the cancellation of the XESAM project).
 
 *** yow.el; use fortune.el or cookie1.el instead.
 
diff --git a/lib-src/ChangeLog.1 b/lib-src/ChangeLog.1
index 1a9767661a..0829f50a56 100644
--- a/lib-src/ChangeLog.1
+++ b/lib-src/ChangeLog.1
@@ -5643,7 +5643,7 @@
 1998-04-06  Andreas Schwab  <schwab@gnu.org>
 
        Silence -Wimplicit:
-       * movemail.c: Move cancelations up.  Include <stdlib.h> if
+       * movemail.c: Move cancellations up.  Include <stdlib.h> if
        available.
        * fakemail.c (_XOPEN_SOURCE): Define for declaration of cuserid.
        (parse_header): Explicitly declare return type.
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 10bd4bc688..762cc8eb4f 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -395,7 +395,7 @@ how many time this CODEGEN is called."
                          (push (setq prev (list case)) seen))
                        ;; Put a counter in the cdr just so that not
                        ;; all branches look identical (to avoid things
-                       ;; like `macroexp--if' optimizing them too
+                       ;; like `macroexp-if' optimizing them too
                        ;; optimistically).
                        (let ((ph (cons 'pcase--placeholder
                                        (setq phcounter (1+ phcounter)))))
diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3
index a1ad22fd62..c55d6225e3 100644
--- a/lisp/gnus/ChangeLog.3
+++ b/lisp/gnus/ChangeLog.3
@@ -1109,7 +1109,7 @@
 
        * gnus-icalendar.el (gnus-icalendar-event:sync-to-org)
        (gnus-icalendar-event:inline-org-buttons): Allow for appointment
-       cancelations to be synced to org if the original appt has an org
+       cancellations to be synced to org if the original appt has an org
        outline.
 
 2013-11-13  Jan Tatarik  <jan.tatarik@gmail.com>
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 814d21823d..75ea34e135 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -89,8 +89,8 @@
   :group 'gnus-article)
 
 (defgroup gnus-article-emphasis nil
-  "Fontisizing articles."
-  :link '(custom-manual "(gnus)Article Fontisizing")
+  "Fontifying articles."
+  :link '(custom-manual "(gnus)Article Fontifying")
   :group 'gnus-article)
 
 (defgroup gnus-article-saving nil
@@ -2008,9 +2008,9 @@ always hide."
                    (gnus-article-hide-header "reply-to")))))
             ((eq elem 'date)
              (let ((date (with-current-buffer gnus-original-article-buffer
-                           ;; If date in `gnus-article-buffer' is localized
-                           ;; (`gnus-treat-date-user-defined'),
-                           ;; `days-between' might fail.
+                            ;; If date in `gnus-article-buffer' is localized
+                            ;; (`gnus-article-date-headers'),
+                            ;; `days-between' might fail.
                            (message-fetch-field "date"))))
                (when (and date
                           (< (days-between (current-time-string) date)
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index ceeb184854..cf5ca628cf 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -119,7 +119,7 @@
 
   "List of registry marks and their options.
 
-`gnus-registry-mark-article' will offer symbols from this list
+`gnus-registry-set-article-mark' will offer symbols from this list
 for completion.
 
 Each entry must have a character to be useful for summary mode
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 7941496be6..142070e466 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -48,7 +48,7 @@
 ;; The general flow is:
 
 ;; 1. The user calls one of `gnus-group-make-search-group' or
-;; `gnus-group-make-permanent-search-group' (or a few other entry
+;; `gnus-group-read-ephemeral-search-group' (or a few other entry
 ;; points).  These functions prompt for a search query, and collect
 ;; the groups to search, then create an nnselect group, setting an
 ;; 'nnselect-specs group parameter where 'nnselect-function is
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index 13263dddc9..1acbe0bc93 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -427,7 +427,7 @@ inheritance."
 (defun gnus-group-prepare-topics (level &optional predicate lowest
                                        regexp list-topic topic-level)
   "List all newsgroups with unread articles of level LEVEL or lower.
-Use the `gnus-group-topics' to sort the groups.
+Use the `gnus-group-prepare-topics' to sort the groups.
 If PREDICATE is a function, list groups that the function returns non-nil;
 if it is t, list groups that have no unread articles.
 If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index 9cafc78ab8..654cc1cc51 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -1622,7 +1622,7 @@ Gnus might fail to display all of it.")
     state))
 
 ;; `gnus-uu-choose-action' chooses what action to perform given the name
-;; and `gnus-uu-file-action-list'.  Returns either nil if no action is
+;; and FILE-ACTION-LIST.  Return either nil if no action is
 ;; found, or the name of the command to run if such a rule is found.
 (defun gnus-uu-choose-action (file-name file-action-list &optional no-ignore)
   (let ((action-list (copy-sequence file-action-list))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index e0677ff6be..5589908764 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -7520,7 +7520,7 @@ to match all of yours addresses."
 ;;;###autoload
 (defun message-cancel-news (&optional arg)
   "Cancel an article you posted.
-If ARG, allow editing of the cancelation message."
+If ARG, allow editing of the cancellation message."
   (interactive "P")
   (unless (message-news-p)
     (error "This is not a news article; canceling is impossible"))
diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el
index 1387fa3692..90833e1c1d 100644
--- a/lisp/jsonrpc.el
+++ b/lisp/jsonrpc.el
@@ -308,7 +308,7 @@ ignored."
                          (setq canceled t))
                        `(canceled ,cancel-on-input-retval))
                       (t (while t (accept-process-output nil 30)))))
-            ;; In normal operation, cancelation is handled by the
+            ;; In normal operation, cancellation is handled by the
             ;; timeout function and response filter, but we still have
             ;; to protect against user-quit (C-g) or the
             ;; `cancel-on-input' case.
diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el
index 1dfeb79c17..f7655d2efc 100644
--- a/lisp/leim/quail/latin-ltx.el
+++ b/lisp/leim/quail/latin-ltx.el
@@ -483,6 +483,7 @@ system, including many technical ones.  Examples:
  ("\\rhd" ?▷)
  ("\\ll" ?≪)
  ("\\llcorner" ?⌞)
+ ("\\lll" ?⋘)
  ("\\lnapprox" ?⋦)
  ("\\lneq" ?≨)
  ("\\lneqq" ?≨)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index e38a4f8a71..f72ab4fc64 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1579,6 +1579,7 @@ its value is returned."
         ;; `category' property at PT while doing the (get-char-property
         ;; pt property w)!
        (or (and str
+                 (< (cdr str) (length (car str)))
                 (get-text-property (cdr str) property (car str)))
             ;; Mouse clicks in the fringe come with a position in
             ;; (nth 5).  This is useful but is not exactly where we clicked, so
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index 5b2af7c6b2..0a8c574d84 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -183,23 +183,32 @@ It must be supported by libarchive(3).")
 ;; The definition of `tramp-archive-file-name-regexp' contains calls
 ;; to `regexp-opt', which cannot be autoloaded while loading
 ;; loaddefs.el.  So we use a macro, which is evaluated only when needed.
-;; When tramp-archive.el is unloaded and reloaded, it gripes about
-;; missing `tramp-archive{-compression]-suffixes'.  We protect this.
+;; Emacs 26 and earlier cannot use the autoload form
+;; `tramp-compat-rx'.  So we refrain from using `rx'.
 ;;;###autoload
 (progn (defmacro tramp-archive-autoload-file-name-regexp ()
   "Regular expression matching archive file names."
-  `(tramp-compat-rx
+  (if (<= emacs-major-version 26)
+  '(concat
+    "\\`" "\\(" ".+" "\\."
+      ;; Default suffixes ...
+      (regexp-opt tramp-archive-suffixes)
+      ;; ... with compression.
+      "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*"
+    "\\)" ;; \1
+    "\\(" "/" ".*" "\\)" "\\'") ;; \2
+  `(rx
     bos
     ;; This group is used in `tramp-archive-file-name-archive'.
     (group
      (+ nonl)
      ;; Default suffixes ...
-     "." ,(cons '| (bound-and-true-p tramp-archive-suffixes))
+     "." (| ,@tramp-archive-suffixes)
      ;; ... with compression.
-     (? "." ,(cons '| (bound-and-true-p tramp-archive-compression-suffixes))))
+     (? "." (| ,@tramp-archive-compression-suffixes)))
     ;; This group is used in `tramp-archive-file-name-localname'.
     (group "/" (* nonl))
-    eos)))
+    eos))))
 
 (put #'tramp-archive-autoload-file-name-regexp 'tramp-autoload t)
 
diff --git a/lisp/outline.el b/lisp/outline.el
index 2465a4963a..86ac19aa41 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1777,7 +1777,12 @@ With a prefix argument, show headings up to that LEVEL."
         (propertize (icon-string icon-name)
                     'mouse-face 'default
                     'follow-link 'mouse-face
-                    'keymap (define-keymap "<mouse-2>" #'outline-cycle)))
+                    'keymap (define-keymap
+                              "<mouse-2>" #'outline-cycle
+                              ;; Need to override the global binding
+                              ;; `mouse-appearance-menu' with <down->:
+                              "S-<down-mouse-1>" #'ignore
+                              "S-<mouse-1>" #'outline-cycle-buffer)))
       (list 'outline-open
             (if outline--use-rtl 'outline-close-rtl 'outline-close))))))
 
@@ -1805,10 +1810,11 @@ With a prefix argument, show headings up to that LEVEL."
            (overlay-put o 'mouse-face 'highlight)
            (overlay-put o 'keymap (define-keymap
                                     "RET" #'outline-cycle
-                                    "<mouse-2>" #'outline-cycle))
-           (overlay-put o 'help-echo (if (eq type 'close)
-                                         "Click to show"
-                                       "Click to hide")))
+                                    "<mouse-2>" #'outline-cycle
+                                    ;; Need to override the global binding
+                                    ;; `mouse-appearance-menu' with <down->:
+                                    "S-<down-mouse-1>" #'ignore
+                                    "S-<mouse-1>" #'outline-cycle-buffer)))
           ('in-margins
            (overlay-put o 'before-string icon)
            (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle)))
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 1aee1107e6..b722790334 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -169,7 +169,7 @@ greater than this number."
 (defcustom antlr-indent-comment 'tab
   "Non-nil, if the indentation should touch lines in block comments.
 If nil, no continuation line of a block comment is changed.  If t, they
-are changed according to `c-indentation-line'.  When not nil and not t,
+are changed according to `c-indent-line'.  When not nil and not t,
 they are only changed by \\[antlr-indent-command]."
   :type '(radio (const :tag "No" nil)
                (const :tag "Always" t)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 7e6dd43175..086166c822 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -4017,7 +4017,7 @@ initializing CC Mode.  Currently (2020-06) these are 
`js-mode' and
         (t from))))))
 
 (defun c-remove-stale-state-cache (start-point here pps-point)
-  ;; Remove stale entries from the `c-cache-state', i.e. those which will
+  ;; Remove stale entries from the `c-state-cache', i.e. those which will
   ;; not be in it when it is amended for position HERE.  This may involve
   ;; replacing a CONS element for a brace pair containing HERE with its car.
   ;; Additionally, the "outermost" open-brace entry before HERE will be
@@ -10103,7 +10103,7 @@ This function might do hidden buffer changes."
   ;;   Specifically it is nil, or a three element list (A B C) where C is t
   ;;   when context is '<> and the "identifier" is a found type, B is t when a
   ;;   `c-typedef-kwds' ("typedef") is present, and A is t when some other
-  ;;   `c-typedef-declkwds' (e.g. class, struct, enum) specifier is present.
+  ;;   `c-typedef-decl-kwds' (e.g. class, struct, enum) specifier is present.
   ;;   I.e., (some of) the declared identifier(s) are types.
   ;;
   ;;   The third element of the return value is non-nil when the declaration
@@ -15518,7 +15518,7 @@ Cannot combine absolute offsets %S and %S in `add' 
method"
 
 (defun c-get-syntactic-indentation (langelems)
   ;; Calculate the syntactic indentation from a syntactic description
-  ;; as returned by `c-guess-syntax'.
+  ;; as returned by `c-guess-basic-syntax'.
   ;;
   ;; Note that topmost-intro always has an anchor position at bol, for
   ;; historical reasons.  It's often used together with other symbols
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 561aa0f7e5..47e05438ea 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1440,7 +1440,7 @@ since CC Mode treats every identifier as an expression."
 
 (c-lang-defconst c-overloadable-operators
   "List of the operators that are overloadable, in their \"identifier
-form\".  See also `c-op-identifier-prefix'."
+form\".  See also `c-opt-op-identifier-prefix'."
   t    nil
   c++  '("new" "delete" ;; Can be followed by "[]" but we ignore that.
         "+" "-" "*" "/" "%"
@@ -2526,7 +2526,7 @@ their matching \"in\" syntactic symbols.")
            (c-lang-const c-brace-list-decl-kwds)))
 
 (c-lang-defconst c-defun-type-name-decl-key
-  ;; Regexp matching a keyword in `c-defun-name-decl-kwds'.
+  ;; Regexp matching a keyword in `c-defun-type-name-decl-kwds'.
   t (c-make-keywords-re t (c-lang-const c-defun-type-name-decl-kwds)))
 (c-lang-defvar c-defun-type-name-decl-key
   (c-lang-const c-defun-type-name-decl-key))
@@ -2620,7 +2620,7 @@ type."
 
 (c-lang-defconst c-equals-nontype-decl-key
   ;; An unadorned regular expression which matches any member of
-  ;; `c-equals-decl-kwds', or nil if such don't exist in the current language.
+  ;; `c-equals-nontype-decl-kwds', or nil if such don't exist in the current 
language.
   t (when (c-lang-const c-equals-nontype-decl-kwds)
       (c-make-keywords-re nil (c-lang-const c-equals-nontype-decl-kwds))))
 (c-lang-defvar c-equals-nontype-decl-key
@@ -4486,7 +4486,7 @@ accomplish that conveniently."
           (error
            (if current-var
                (message
-                "Eval error in the `c-lang-defvar' or `c-lang-setver' for `%s' 
(source eval): %S"
+                "Eval error in the `c-lang-defvar' or `c-lang-setvar' for `%s' 
(source eval): %S"
                 current-var err)
              (signal (car err) (cdr err)))))))
     ))
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 5a610253e0..99067e4761 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1391,7 +1391,7 @@ Note that the style variables are always made local to 
the buffer."
 (defvar c-bc-changed-stringiness nil)
 ;; Non-nil when, in a before-change function, the deletion of a range of text
 ;; will change the "stringiness" of the subsequent text.  Only used when
-;; `c-multiline-sting-start-char' is a non-nil value which isn't a character.
+;; `c-multiline-string-start-char' is a non-nil value which isn't a character.
 
 (defun c-remove-string-fences (&optional here)
   ;; The character after HERE (default point) is either a string delimiter or
@@ -1713,7 +1713,7 @@ position of `after-change-functions'.")
   ;;
   ;; This function is called exclusively as an after-change function via
   ;; `c-before-font-lock-functions'.  In C++ Mode, it should come before
-  ;; `c-after-change-unmark-raw-strings' in that lang variable.
+  ;; `c-after-change-unmark-ml-strings' in that lang variable.
   (let (lit-start                     ; Don't calculate this till we have to.
        lim)
     (when
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index bbd902c1c7..e057b12e0e 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1181,7 +1181,9 @@ Each function is passed the server as an argument")
   "Connect to MANAGED-MODES, LANGUAGE-ID, PROJECT, CLASS and CONTACT.
 This docstring appeases checkdoc, that's all."
   (let* ((default-directory (project-root project))
-         (nickname (file-name-base (directory-file-name default-directory)))
+         (nickname (if (fboundp 'project-name)
+                       (project-name project)
+                     (file-name-base (directory-file-name default-directory))))
          (readable-name (format "EGLOT (%s/%s)" nickname managed-modes))
          autostart-inferior-process
          server-info
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 81f74dc1fa..cd2fc7c707 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -266,7 +266,7 @@ extends to the end of the match for the regular expression."
   :type 'regexp)
 
 (defcustom idlwave-use-last-hang-indent nil
-  "If non-nil then use last match on line for `idlwave-indent-regexp'."
+  "If non-nil then use last match on line for `idlwave-hang-indent-regexp'."
   :group 'idlwave-code-formatting
   :type 'boolean)
 
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index e78f1b4c6e..ee2934f53c 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -134,8 +134,7 @@
    :feature 'constant
    `(((identifier) @font-lock-constant-face
       (:match "^[A-Z_][A-Z_\\d]*$" @font-lock-constant-face))
-     (true) @font-lock-constant-face
-     (false) @font-lock-constant-face)
+     [(true) (false)] @font-lock-constant-face)
    :language 'java
    :override t
    :feature 'keyword
@@ -163,8 +162,12 @@
    :override t
    :feature 'literal
    `((null_literal) @font-lock-constant-face
-     (decimal_floating_point_literal)  @font-lock-constant-face
-     (hex_floating_point_literal) @font-lock-constant-face)
+     (binary_integer_literal)  @font-lock-number-face
+     (decimal_integer_literal) @font-lock-number-face
+     (hex_integer_literal) @font-lock-number-face
+     (octal_integer_literal) @font-lock-number-face
+     (decimal_floating_point_literal) @font-lock-number-face
+     (hex_floating_point_literal) @font-lock-number-face)
    :language 'java
    :override t
    :feature 'type
@@ -314,8 +317,8 @@ the subtrees."
   ;; Font-lock.
   (setq-local treesit-font-lock-settings java-ts-mode--font-lock-settings)
   (setq-local treesit-font-lock-feature-list
-              '((comment keyword constant string)
-                (type definition expression literal annotation)
+              '((comment constant keyword string)
+                (annotation definition expression literal type)
                 (bracket delimiter operator)))
 
   ;; Imenu.
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 51d105b9d7..da05b7b364 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3465,6 +3465,13 @@ This function is intended for use in 
`after-change-functions'."
     "typeof" "var" "void" "while" "with" "yield")
   "JavaScript keywords for tree-sitter font-locking.")
 
+(defvar js--treesit-operators
+  '("=" "+=" "-=" "*=" "/=" "%=" "**=" "<<=" ">>=" ">>>=" "&=" "^="
+    "|=" "&&=" "||=" "??=" "==" "!=" "===" "!==" ">" ">=" "<" "<=" "+"
+    "-" "*" "/" "%" "++" "--" "**" "&" "|" "^" "~" "<<" ">>" ">>>"
+    "&&" "||" "!")
+  "JavaScript operators for tree-sitter font-locking.")
+
 (defvar js--treesit-font-lock-settings
   (treesit-font-lock-rules
 
@@ -3479,8 +3486,7 @@ This function is intended for use in 
`after-change-functions'."
    `(((identifier) @font-lock-constant-face
       (:match "^[A-Z_][A-Z_\\d]*$" @font-lock-constant-face))
 
-     [(true) (false) (null)] @font-lock-constant-face
-     (number) @font-lock-constant-face)
+     [(true) (false) (null)] @font-lock-constant-face)
 
    :language 'javascript
    :override t
@@ -3557,21 +3563,6 @@ This function is intended for use in 
`after-change-functions'."
              (member_expression
               property: (property_identifier) @font-lock-variable-name-face)]))
 
-   :language 'javascript
-   :override t
-   :feature 'property
-   `((pair key: (property_identifier) @font-lock-variable-name-face)
-
-     (pair value: (identifier) @font-lock-variable-name-face)
-
-     (pair
-      key: (property_identifier) @font-lock-function-name-face
-      value: [(function) (arrow_function)])
-
-     ((shorthand_property_identifier) @font-lock-variable-name-face)
-
-     ((shorthand_property_identifier_pattern) @font-lock-variable-name-face))
-
    :language 'javascript
    :override t
    :feature 'pattern
@@ -3596,7 +3587,42 @@ This function is intended for use in 
`after-change-functions'."
 
      (jsx_attribute
       (property_identifier)
-      @font-lock-constant-face)))
+      @font-lock-constant-face))
+
+   :language 'javascript
+   :feature 'number
+   `((number) @font-lock-number-face
+     ((identifier) @font-lock-number-face
+      (:match "^\\(:?NaN\\|Infinity\\)$" @font-lock-number-face)))
+
+   :language 'javascript
+   :feature 'operator
+   `([,@js--treesit-operators] @font-lock-operator-face
+     (ternary_expression ["?" ":"] @font-lock-operator-face))
+
+   :language 'javascript
+   :feature 'bracket
+   '((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
+
+   :language 'javascript
+   :feature 'delimiter
+   '((["," "." ";" ":"]) @font-lock-delimiter-face)
+
+   :language 'javascript
+   :feature 'escape-sequence
+   :override t
+   '((escape_sequence) @font-lock-escape-face)
+
+   :language 'javascript
+   :override t
+   :feature 'property
+   `((property_identifier) @font-lock-property-face
+
+     (pair value: (identifier) @font-lock-variable-name-face)
+
+     ((shorthand_property_identifier) @font-lock-property-face)
+
+     ((shorthand_property_identifier_pattern) @font-lock-property-face)))
   "Tree-sitter font-lock settings.")
 
 (defun js--fontify-template-string (node override start end &rest _)
@@ -3846,9 +3872,10 @@ Currently there are `js-mode' and `js-ts-mode'."
     ;; Fontification.
     (setq-local treesit-font-lock-settings js--treesit-font-lock-settings)
     (setq-local treesit-font-lock-feature-list
-                '((comment declaration)
-                  (string keyword identifier expression constant)
-                  (property pattern jsx )))
+                '(( comment declaration)
+                  ( constant expression identifier keyword number string)
+                  ( bracket delimiter escape-sequence jsx operator
+                    pattern property)))
     ;; Imenu
     (setq-local imenu-create-index-function
                 #'js--treesit-imenu)
diff --git a/lisp/progmodes/json-ts-mode.el b/lisp/progmodes/json-ts-mode.el
index 4ea285bd43..101e873cf6 100644
--- a/lisp/progmodes/json-ts-mode.el
+++ b/lisp/progmodes/json-ts-mode.el
@@ -74,26 +74,28 @@
 (defvar json-ts-mode--font-lock-settings
   (treesit-font-lock-rules
    :language 'json
-   :feature 'comment
-   :override t
-   '((comment) @font-lock-comment-face)
+   :feature 'bracket
+   '((["[" "]" "{" "}"]) @font-lock-bracket-face)
    :language 'json
-   :feature 'string
-   :override t
-   '((escape_sequence) @font-lock-constant-face
-     (string) @font-lock-string-face)
+   :feature 'constant
+   '([(null) (true) (false)] @font-lock-constant-face)
+   :language 'json
+   :feature 'delimiter
+   '((["," ":"]) @font-lock-delimiter-face)
    :language 'json
    :feature 'number
-   :override t
-   '((number) @font-lock-constant-face)
+   '((number) @font-lock-number-face)
    :language 'json
-   :feature 'constant
+   :feature 'string
+   '((string) @font-lock-string-face)
+   :language 'json
+   :feature 'escape-sequence
    :override t
-   '([(null) (true) (false)] @font-lock-constant-face)
+   '((escape_sequence) @font-lock-escape-face)
    :language 'json
-   :feature 'pair
+   :feature 'error
    :override t
-   `((pair key: (_) @font-lock-variable-name-face)))
+   '((ERROR) @font-lock-warning-face))
   "Font-lock settings for JSON.")
 
 (defun json-ts-mode--imenu-1 (node)
@@ -154,7 +156,9 @@ the subtrees."
   ;; Font-lock.
   (setq-local treesit-font-lock-settings json-ts-mode--font-lock-settings)
   (setq-local treesit-font-lock-feature-list
-              '((comment string number) (constant pair) ()))
+              '((constant number string)
+                (escape-sequence)
+                (bracket delimiter error)))
 
   ;; Imenu.
   (setq-local imenu-create-index-function #'json-ts-mode--imenu)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 63510e9050..c7b2c386cc 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -251,6 +251,11 @@ depending on the languages used, this list should include 
the
 headers search path, load path, class path, and so on."
   nil)
 
+(cl-defgeneric project-name (project)
+  "A human-readable name for the project.
+Nominally unique, but not enforced."
+  (file-name-base (directory-file-name (project-root project))))
+
 (cl-defgeneric project-ignores (_project _dir)
   "Return the list of glob patterns to ignore inside DIR.
 Patterns can match both regular files and directories.
@@ -390,6 +395,15 @@ you might have to restart Emacs to see the effect."
   :version "29.1"
   :safe #'booleanp)
 
+(defcustom project-vc-name nil
+  "When non-nil, the name of the current VC project.
+
+The best way to change the value a VC project reports as its
+name, is by setting this in .dir-locals.el."
+  :type 'string
+  :version "29.1"
+  :safe #'stringp)
+
 ;; FIXME: Using the current approach, major modes are supposed to set
 ;; this variable to a buffer-local value.  So we don't have access to
 ;; the "external roots" of language A from buffers of language B, which
@@ -689,6 +703,10 @@ DIRS must contain directory names."
         (push buf bufs)))
     (nreverse bufs)))
 
+(cl-defmethod project-name ((_project (head vc)))
+  (or project-vc-name
+      (cl-call-next-method)))
+
 
 ;;; Project commands
 
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index af59b8e146..18594a3e23 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -578,7 +578,7 @@ the {...} holes that appear within f-strings."
   ;; FIXME: This will fail to properly highlight strings appearing
   ;; within the {...} of an f-string.
   ;; We could presumably fix it by running
-  ;; `font-lock-fontify-syntactically-region' (as is done in
+  ;; `font-lock-default-fontify-syntactically-region' (as is done in
   ;; `sm-c--cpp-fontify-syntactically', for example) after removing
   ;; the `face' property, but I'm not sure it's worth the effort and
   ;; the risks.
@@ -1113,7 +1113,9 @@ fontified."
 
    :feature 'decorator
    :language 'python
-   '((decorator) @font-lock-type-face)
+   '((decorator "@" @font-lock-type-face)
+     (decorator (call function: (identifier) @font-lock-type-face))
+     (decorator (identifier) @font-lock-type-face))
 
    :feature 'type
    :language 'python
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 7fe31802c4..067aef8669 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1608,9 +1608,10 @@ with your script for an edit-interpret-debug cycle."
   "Major mode for editing Bash shell scripts."
   (when (treesit-ready-p 'bash)
     (setq-local treesit-font-lock-feature-list
-                '((comment function string heredoc)
-                  (variable keyword command declaration-command)
-                  (constant operator builtin-variable)))
+                '(( comment function heredoc string)
+                  ( command declaration-command keyword number variable)
+                  ( bracket builtin-variable constant delimiter
+                    misc-punctuation operator)))
     (setq-local treesit-font-lock-settings
                 sh-mode--treesit-settings)
     (treesit-major-mode-setup)))
@@ -3216,8 +3217,7 @@ member of `flymake-diagnostic-functions'."
 ;;; Tree-sitter font-lock
 
 (defvar sh-mode--treesit-operators
-  '("|" "|&" "||" "&&" ">" ">>" "<" "<<" "<<-" "<<<" "==" "!=" ";"
-    ";;" ";&" ";;&")
+  '("|" "|&" "||" "&&" ">" ">>" "<" "<<" "<<-" "<<<" "==" "!=" ";&" ";;&")
   "A list of `sh-mode' operators to fontify.")
 
 (defvar sh-mode--treesit-keywords
@@ -3312,7 +3312,7 @@ See `sh-mode--treesit-other-keywords' and
 
    :feature 'operator
    :language 'bash
-   `([ ,@sh-mode--treesit-operators ] @font-lock-builtin-face)
+   `([,@sh-mode--treesit-operators] @font-lock-operator-face)
 
    :feature 'builtin-variable
    :language 'bash
@@ -3322,7 +3322,24 @@ See `sh-mode--treesit-other-keywords' and
                   `(seq bol
                         (or ,@builtin-vars)
                         eol)))
-              @font-lock-builtin-face))))
+              @font-lock-builtin-face)))
+
+   :feature 'number
+   :language 'bash
+   `(((word) @font-lock-number-face
+      (:match "^[0-9]+$" @font-lock-number-face)))
+
+   :feature 'bracket
+   :language 'bash
+   '((["(" ")" "((" "))" "[" "]" "[[" "]]" "{" "}"]) @font-lock-bracket-face)
+
+   :feature 'delimiter
+   :language 'bash
+   '(([";" ";;"]) @font-lock-delimiter-face)
+
+   :feature 'misc-punctuation
+   :language 'bash
+   '((["$"]) @font-lock-misc-punctuation-face))
   "Tree-sitter font-lock settings for `sh-mode'.")
 
 (provide 'sh-script)
diff --git a/lisp/progmodes/ts-mode.el b/lisp/progmodes/ts-mode.el
index a91eba6501..436b198f59 100644
--- a/lisp/progmodes/ts-mode.el
+++ b/lisp/progmodes/ts-mode.el
@@ -101,6 +101,13 @@
     "while" "with" "yield")
   "TypeScript keywords for tree-sitter font-locking.")
 
+(defvar ts-mode--operators
+  '("=" "+=" "-=" "*=" "/=" "%=" "**=" "<<=" ">>=" ">>>=" "&=" "^="
+    "|=" "&&=" "||=" "??=" "==" "!=" "===" "!==" ">" ">=" "<" "<=" "+"
+    "-" "*" "/" "%" "++" "--" "**" "&" "|" "^" "~" "<<" ">>" ">>>"
+    "&&" "||" "!" "?.")
+  "TypeScript operators for tree-sitter font-locking.")
+
 (defvar ts-mode--font-lock-settings
   (treesit-font-lock-rules
    :language 'tsx
@@ -114,8 +121,7 @@
    `(((identifier) @font-lock-constant-face
       (:match "^[A-Z_][A-Z_\\d]*$" @font-lock-constant-face))
 
-     [(true) (false) (null)] @font-lock-constant-face
-     (number) @font-lock-constant-face)
+     [(true) (false) (null)] @font-lock-constant-face)
 
    :language 'tsx
    :override t
@@ -207,25 +213,6 @@
        (member_expression
         property: (property_identifier) @font-lock-function-name-face)]))
 
-   :language 'tsx
-   :override t
-   :feature 'property
-   `((pair key: (property_identifier) @font-lock-property-face)
-
-     (pair value: (identifier) @font-lock-variable-name-face)
-
-     (pair
-      key: (property_identifier) @font-lock-property-face
-      value: [(function) (arrow_function)])
-
-     (property_signature
-      name: (property_identifier) @font-lock-property-face)
-
-     ((shorthand_property_identifier) @font-lock-property-face)
-
-     ((shorthand_property_identifier_pattern)
-      @font-lock-variable-name-face))
-
    :language 'tsx
    :override t
    :feature 'pattern
@@ -250,13 +237,42 @@
       @font-lock-function-name-face)
 
      (jsx_attribute (property_identifier) @font-lock-constant-face))
+
+   :language 'tsx
+   :feature 'number
+   `((number) @font-lock-number-face
+     ((identifier) @font-lock-number-face
+      (:match "^\\(:?NaN\\|Infinity\\)$" @font-lock-number-face)))
+
+   :language 'tsx
+   :feature 'operator
+   `([,@ts-mode--operators] @font-lock-operator-face
+     (ternary_expression ["?" ":"] @font-lock-operator-face))
+
    :language 'tsx
    :feature 'bracket
    '((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
 
    :language 'tsx
    :feature 'delimiter
-   '((["," ":" ";"]) @font-lock-delimiter-face))
+   '((["," "." ";" ":"]) @font-lock-delimiter-face)
+
+   :language 'tsx
+   :feature 'escape-sequence
+   :override t
+   '((escape_sequence) @font-lock-escape-face)
+
+   :language 'tsx
+   :override t
+   :feature 'property
+   `(((property_identifier) @font-lock-property-face)
+
+     (pair value: (identifier) @font-lock-variable-name-face)
+
+     ((shorthand_property_identifier) @font-lock-property-face)
+
+     ((shorthand_property_identifier_pattern)
+      @font-lock-property-face)))
   "Tree-sitter font-lock settings.")
 
 ;;;###autoload
@@ -303,8 +319,8 @@
     (setq-local treesit-font-lock-settings ts-mode--font-lock-settings)
     (setq-local treesit-font-lock-feature-list
                 '((comment declaration)
-                  (string keyword identifier expression constant)
-                  (property pattern jsx bracket delimiter)))
+                  (constant expression identifier keyword number string)
+                  (bracket delimiter jsx pattern property)))
     ;; Imenu.
     (setq-local imenu-create-index-function #'js--treesit-imenu)
 
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 89a090ae93..139929dc8a 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -919,6 +919,8 @@ ITEMS is an xref item which " ; FIXME: Expand documentation.
     (define-key map (kbd "M-,") #'xref-quit-and-pop-marker-stack)
     map))
 
+(declare-function outline-search-text-property "outline" (property &optional 
value bound move backward looking-at))
+
 (define-derived-mode xref--xref-buffer-mode special-mode "XREF"
   "Mode for displaying cross-references."
   (setq buffer-read-only t)
@@ -927,7 +929,14 @@ ITEMS is an xref item which " ; FIXME: Expand 
documentation.
   (setq imenu-prev-index-position-function
         #'xref--imenu-prev-index-position)
   (setq imenu-extract-index-name-function
-        #'xref--imenu-extract-index-name))
+        #'xref--imenu-extract-index-name)
+  (setq-local outline-minor-mode-cycle t
+              outline-minor-mode-use-buttons t
+              outline-search-function
+              (lambda (&optional bound move backward looking-at)
+                (outline-search-text-property
+                 'xref-group nil bound move backward looking-at))
+              outline-level (lambda () 1)))
 
 (defvar xref--transient-buffer-mode-map
   (let ((map (make-sparse-keymap)))
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 4b46e5a1fb..734252ee66 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1795,7 +1795,7 @@ can also be used to fill comments.
 
 \\{css-mode-map}"
   (when (treesit-ready-p 'css)
-    ;; Borrowed from `css-native-mode'.
+    ;; Borrowed from `css-mode'.
     (add-hook 'completion-at-point-functions
               #'css-completion-at-point nil 'local)
     (setq-local fill-paragraph-function #'css-fill-paragraph)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 10c6b09322..419a705dbf 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -98,10 +98,16 @@ indent, imenu, etc."
 (defcustom treesit-max-buffer-size
   (let ((mb (* 1024 1024)))
     ;; 40MB for 64-bit systems, 15 for 32-bit.
-    (if (> most-positive-fixnum (* 4 1024 mb))
-        (* 40 mb)
-      (* 15 mb)))
-  "Maximum buffer size for enabling tree-sitter parsing (in bytes)."
+    (if (or (< most-positive-fixnum (* 2.0 1024 mb))
+            ;; 32-bit system with wide ints.
+            (string-match-p "--with-wide-int" system-configuration-options))
+        (* 15 mb)
+      (* 40 mb)))
+  "Maximum buffer size (in bytes) for enabling tree-sitter parsing.
+
+A typical tree-sitter parser needs 10 times as much memory as the
+buffer it parses.  Also, the tree-sitter library has a hard limit
+of max unsigned 32-bit value for byte offsets into buffer text."
   :type 'integer
   :version "29.1")
 
@@ -454,6 +460,15 @@ Return the merged list of ranges."
         (push range result)))
     (nreverse result)))
 
+(defun treesit--clip-ranges (ranges start end)
+  "Clip RANGES in between START and END.
+RANGES is a list of ranges of the form (BEG . END).  Ranges
+outside of the region between START and END are thrown away, and
+those inside are kept."
+  (cl-loop for range in ranges
+           if (<= start (car range) (cdr range) end)
+           collect range))
+
 (defun treesit-update-ranges (&optional beg end)
   "Update the ranges for each language in the current buffer.
 If BEG and END are non-nil, only update parser ranges in that
@@ -474,8 +489,10 @@ region."
                (old-ranges (treesit-parser-included-ranges parser))
                (new-ranges (treesit-query-range
                             host-lang query beg end))
-               (set-ranges (treesit--merge-ranges
-                            old-ranges new-ranges beg end)))
+               (set-ranges (treesit--clip-ranges
+                            (treesit--merge-ranges
+                             old-ranges new-ranges beg end)
+                            (point-min) (point-max))))
           (dolist (parser (treesit-parser-list))
             (when (eq (treesit-parser-language parser)
                       language)
@@ -593,7 +610,7 @@ to QUERY.  For example,
 For each QUERY, a :language keyword and a :feature keyword are
 required.  Each query's :feature is a symbol summarizing what the
 query fontifies.  It is used to allow users to enable/disable
-certain features.  See `treesit-font-lock-kind-list' for more.
+certain features.  See `treesit-font-lock-feature-list' for more.
 Other keywords include:
 
   KEYWORD    VALUE      DESCRIPTION
@@ -787,12 +804,14 @@ instead."
 (defun treesit--children-covering-range (node start end)
   "Return a list of children of NODE covering a range.
 The range is between START and END."
-  (let* ((child (treesit-node-first-child-for-pos node start))
-         (result (list child)))
-    (while (and (< (treesit-node-end child) end)
-                (setq child (treesit-node-next-sibling child)))
-      (push child result))
-    (nreverse result)))
+  (if-let* ((child (treesit-node-first-child-for-pos node start))
+            (result (list child)))
+      (progn
+        (while (and child (< (treesit-node-end child) end)
+                    (setq child (treesit-node-next-sibling child)))
+          (push child result))
+        (nreverse result))
+    (list node)))
 
 (defun treesit--children-covering-range-recurse (node start end threshold)
   "Return a list of children of NODE covering a range.
@@ -881,8 +900,7 @@ If LOUDLY is non-nil, display some debugging information."
                             sub-node query
                             (max (- start delta-start) (point-min))
                             (min (+ end delta-end) (point-max))))
-                 (end-time (current-time))
-                 (inhibit-point-motion-hooks t))
+                 (end-time (current-time)))
             ;; If for any query the query time is strangely long,
             ;; switch to fast mode (see comments above).
             (when (> (time-to-seconds (time-subtract end-time start-time))
@@ -1583,7 +1601,8 @@ instead of emitting a warning."
       (when (not (treesit-available-p))
         (setq msg "tree-sitter library is not compiled with Emacs")
         (throw 'term nil))
-      (when (> (buffer-size) treesit-max-buffer-size)
+      (when (> (position-bytes (max (point-min) (1- (point-max))))
+               treesit-max-buffer-size)
         (setq msg "buffer larger than `treesit-max-buffer-size'")
         (throw 'term nil))
       (dolist (lang language-list)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index fa3d58f770..328d33040d 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1561,7 +1561,7 @@ Argument BACKEND is the backend to use."
     (insert-file-contents file)
     (split-string (buffer-string) "\n" t)))
 
-;; Subroutine for `vc-git-ignore' and `vc-hg-ignore'.
+;; Subroutine for `vc-default-ignore'.
 (defun vc--add-line (string file)
   "Add STRING as a line to FILE."
   (with-current-buffer (find-file-noselect file)
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 52dacf2702..e8ae2e276f 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -559,7 +559,8 @@ casify_region (enum case_action flag, Lisp_Object b, 
Lisp_Object e)
       update_compositions (start, end, CHECK_ALL);
     }
 #ifdef HAVE_TREE_SITTER
-      treesit_record_change (start_byte, old_end_byte, CHAR_TO_BYTE (orig_end 
+ added));
+      treesit_record_change (start_byte, old_end_byte,
+                            CHAR_TO_BYTE (orig_end + added));
 #endif
 
   return orig_end + added;
diff --git a/src/fns.c b/src/fns.c
index e337c0958d..7cc6d00afe 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -644,7 +644,8 @@ bind `w32-collate-ignore-punctuation' to a non-nil value, 
since
 the codeset part of the locale cannot be \"UTF-8\" on MS-Windows.
 
 If your system does not support a locale environment, this function
-behaves like `string-equal'.
+behaves like `string-equal', and in that case the IGNORE-CASE argument
+is ignored.
 
 Do NOT use this function to compare file names for equality.  */)
   (Lisp_Object s1, Lisp_Object s2, Lisp_Object locale, Lisp_Object ignore_case)
diff --git a/src/treesit.c b/src/treesit.c
index 463e2458a6..21e1f866f7 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -295,7 +295,7 @@ init_treesit_functions (void)
      a node.  But since we can just retrieve a new node, it shouldn't
      be a limitation.
 
-   - I didn't expose setting timeout and cancelation flag for a
+   - I didn't expose setting timeout and cancellation flag for a
      parser, mainly because I don't think they are really necessary
      in Emacs's use cases.
 
@@ -840,11 +840,11 @@ treesit_ensure_position_synced (Lisp_Object parser)
 static void
 treesit_check_buffer_size (struct buffer *buffer)
 {
-  ptrdiff_t buffer_size = (BUF_Z (buffer) - BUF_BEG (buffer));
-  if (buffer_size > UINT32_MAX)
+  ptrdiff_t buffer_size_bytes = (BUF_Z_BYTE (buffer) - BUF_BEG_BYTE (buffer));
+  if (buffer_size_bytes > UINT32_MAX)
     xsignal2 (Qtreesit_buffer_too_large,
              build_pure_c_string ("Buffer size cannot be larger than 4GB"),
-             make_fixnum (buffer_size));
+             make_fixnum (buffer_size_bytes));
 }
 
 static Lisp_Object treesit_make_ranges (const TSRange *, uint32_t, struct 
buffer *);
@@ -891,7 +891,7 @@ treesit_ensure_parsed (Lisp_Object parser)
      when 1) language is not set (impossible in Emacs because the user
      has to supply a language to create a parser), 2) parse canceled
      due to timeout (impossible because we don't set a timeout), 3)
-     parse canceled due to cancelation flag (impossible because we
+     parse canceled due to cancellation flag (impossible because we
      don't set the flag).  (See comments for ts_parser_parse in
      tree_sitter/api.h.)  */
   if (new_tree == NULL)
@@ -1535,7 +1535,7 @@ positions.  PARSER is the parser issuing the 
notification.  */)
   CHECK_SYMBOL (function);
 
   Lisp_Object functions = XTS_PARSER (parser)->after_change_functions;
-  if (!Fmemq (function, functions))
+  if (NILP (Fmemq (function, functions)))
     XTS_PARSER (parser)->after_change_functions = Fcons (function, functions);
   return Qnil;
 }
@@ -1555,7 +1555,7 @@ positions.  PARSER is the parser issuing the 
notification.   */)
   CHECK_SYMBOL (function);
 
   Lisp_Object functions = XTS_PARSER (parser)->after_change_functions;
-  if (Fmemq (function, functions))
+  if (!NILP (Fmemq (function, functions)))
     XTS_PARSER (parser)->after_change_functions = Fdelq (function, functions);
   return Qnil;
 }
diff --git a/src/xdisp.c b/src/xdisp.c
index b5f013ea6a..5dcf21dc4c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -34576,8 +34576,11 @@ note_mode_line_or_margin_highlight (Lisp_Object 
window, int x, int y,
     }
 #endif /* HAVE_WINDOW_SYSTEM */
 
+  /* CHARPOS can be beyond the last position of STRING due, e.g., to
+     min-width 'display' property.  Fix that, to let all the calls to
+     get-text-property below do their thing.  */
   if (STRINGP (string))
-    pos = make_fixnum (charpos);
+    pos = make_fixnum (min (charpos, SCHARS (string) - 1));
 
   /* Set the help text and mouse pointer.  If the mouse is on a part
      of the mode line without any text (e.g. past the right edge of
diff --git a/src/xfns.c b/src/xfns.c
index 95092ce05f..fa2c0751d9 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -9728,10 +9728,12 @@ selected frame's display.  */)
   (Lisp_Object time_object, Lisp_Object terminal)
 {
   struct x_display_info *dpyinfo;
-  Time time;
+  uint32_t time;
 
+  /* time should be a 32-bit integer, regardless of what the size of
+     the X type `Time' is on this system.  */
   dpyinfo = check_x_display_info (terminal);
-  CONS_TO_INTEGER (time_object, Time, time);
+  CONS_TO_INTEGER (time_object, uint32_t, time);
 
   x_set_last_user_time_from_lisp (dpyinfo, time);
   return Qnil;
diff --git a/src/xterm.c b/src/xterm.c
index 732fbf462c..cfd8c385d1 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7749,11 +7749,6 @@ x_display_set_last_user_time (struct x_display_info 
*dpyinfo, Time time,
   old_time = dpyinfo->last_user_time;
 #endif
 
-  /* Time can be sign extended if retrieved from a client message.
-     Make sure it is always 32 bits, or systems with 64-bit longs
-     will crash after 24 days of X server uptime.  (bug#59480) */
-  time &= X_ULONG_MAX;
-
 #ifdef ENABLE_CHECKING
   eassert (time <= X_ULONG_MAX);
 #endif
@@ -18626,7 +18621,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                /* Set the provided time as the user time, which is
                   required for SetInputFocus to work correctly after
                   taking the input focus.  */
-               x_display_set_last_user_time (dpyinfo, event->xclient.data.l[1],
+
+               /* Time can be sign extended if retrieved from a client message.
+                  Make sure it is always 32 bits, or systems with 64-bit longs
+                  will crash after 24 days of X server uptime.  (bug#59480) */
+               x_display_set_last_user_time (dpyinfo, (event->xclient.data.l[1]
+                                                       & 0xffffffff),
                                              true, true);
                goto done;
               }
diff --git a/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld 
b/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld
index 2c3d297b9c..686a47f68a 100644
--- a/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld
+++ b/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld
@@ -36,6 +36,6 @@
  (0.1 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: Why, will shall break 
it; will, and nothing else.")
  (0.1 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: Yes, a dozen; and as 
many to the vantage, as would store the world they played for.")
  (0.05 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: As he regards his aged 
father's life.")
- (0.05 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonour in doing it."))
+ (0.05 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonor in doing it."))
 
 ((drop 0 DROP))
diff --git a/test/lisp/erc/resources/base/netid/bouncer/barnet.eld 
b/test/lisp/erc/resources/base/netid/bouncer/barnet.eld
index abfcc6ed48..d0fe3af8ea 100644
--- a/test/lisp/erc/resources/base/netid/bouncer/barnet.eld
+++ b/test/lisp/erc/resources/base/netid/bouncer/barnet.eld
@@ -36,6 +36,6 @@
  (0.1 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: Why, will shall break 
it; will, and nothing else.")
  (0.1 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: Yes, a dozen; and as 
many to the vantage, as would store the world they played for.")
  (0.05 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: As he regards his aged 
father's life.")
- (0.05 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonour in doing it."))
+ (0.05 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonor in doing it."))
 
 ((linger 1 LINGER))
diff --git a/test/lisp/erc/resources/erc-d/resources/dynamic-barnet.eld 
b/test/lisp/erc/resources/erc-d/resources/dynamic-barnet.eld
index 36b1cc2308..4994e9c550 100644
--- a/test/lisp/erc/resources/erc-d/resources/dynamic-barnet.eld
+++ b/test/lisp/erc/resources/erc-d/resources/dynamic-barnet.eld
@@ -30,4 +30,4 @@
  (0 ":irc.barnet.org 329 tester #chan 1620805269")
  (0.1 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: Yes, a dozen; and as 
many to the vantage, as would store the world they played for.")
  (0.05 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: As he regards his aged 
father's life.")
- (0.05 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonour in doing it."))
+ (0.05 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonor in doing it."))
diff --git a/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld 
b/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld
index 5dbea50f86..a47998e7d3 100644
--- a/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld
+++ b/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld
@@ -29,4 +29,4 @@
  (0 ":irc.foonet.org 329 tester #chan 1620805269")
  (0.1 ":alice!~u@awyxgybtkx7uq.irc PRIVMSG #chan :bob: Yes, a dozen; and as 
many to the vantage, as would store the world they played for.")
  (0.05 ":bob!~u@awyxgybtkx7uq.irc PRIVMSG #chan :alice: As he regards his aged 
father's life.")
- (0.05 ":alice!~u@awyxgybtkx7uq.irc PRIVMSG #chan :bob: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonour in doing it."))
+ (0.05 ":alice!~u@awyxgybtkx7uq.irc PRIVMSG #chan :bob: It is a rupture that 
you may easily heal; and the cure of it not only saves your brother, but keeps 
you from dishonor in doing it."))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index a5bae46a58..a79c47be72 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -7630,6 +7630,9 @@ Since it unloads Tramp, it shall be the last test to run."
          (string-prefix-p "tramp" (symbol-name x))
          ;; `tramp-completion-mode' is autoloaded in Emacs < 28.1.
          (not (eq 'tramp-completion-mode x))
+         ;; `tramp-register-archive-file-name-handler' is autoloaded
+         ;; in Emacs < 29.1.
+         (not (eq 'tramp-register-archive-file-name-handler x))
          (not (string-match-p
                (rx bol "tramp" (? "-archive") (** 1 2 "-") "test")
                (symbol-name x)))
diff --git a/test/lisp/vc/vc-tests.el b/test/lisp/vc/vc-tests.el
index 13248a3650..c54fe144b7 100644
--- a/test/lisp/vc/vc-tests.el
+++ b/test/lisp/vc/vc-tests.el
@@ -122,7 +122,7 @@
 Don't set it globally, the functions should be let-bound.")
 
 (defun vc-test--revision-granularity-function (backend)
-  "Run the `vc-revision-granularity' backend function."
+  "Run the `revision-granularity' backend function."
   (vc-call-backend backend 'revision-granularity))
 
 (defun vc-test--create-repo-function (backend)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]