1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Merge from savannah/emacs-30

e6c72aec9d ; Fix typos
9ffa38d392 Eglot: fix completion highlighting (bug#72824)
d6880bc24d ; * admin/make-tarball.txt: Document gotcha.
afee71273b Discuss commit log messages on feature branches
77302ccb6a * admin/authors.el (authors-fixed-entries): Update docstr...
3a4839d142 More consistent treesit-forward-sexp around comments (bug...
3129315587 Improve php-ts-mode font lock and support latest grammar ...
b8c05d73a1 Fix tree-sitter local parser overlay cleanup routine
aa6ed7f67e Fix copyright years by hand (Bug#72809)
This commit is contained in:
Po Lu 2024-08-29 08:53:52 +08:00
commit 413489fe80
18 changed files with 397 additions and 275 deletions

File diff suppressed because it is too large Load Diff

View File

@ -910,8 +910,11 @@ Changes to files in this list are not listed.")
("Garrett Wollman" :changed "sendmail.el")
("Dale R. Worley" :changed "mail-extr.el")
("Jamie Zawinski" :changed "bytecode.c" :wrote "tar-mode.el"
:cowrote "disass.el"))
"Actions taken from the original, manually (un)maintained AUTHORS file.")
:cowrote "disass.el")
("Andrea Corallo" :wrote "comp.c"))
"Manual fixes to the list of actions taken.
These are mostly taken from the original, manually (un)maintained
AUTHORS file. There are also some more recent manual additions.")
(defconst authors-valid-file-names

View File

@ -1685,3 +1685,62 @@ argument \\='general-category, is Decimal_Numbers (Nd). It returns
("ro" :default "Continuare de pe pagina precedentă")
("ro" :default "Continuare pe pagina următoare")
;; avk@rtsg.mot.com (Andrew V. Klein) for a Dired tip.
Mitchell, Gergely Nagy, Michael Olson, Per Persson, Jorgen Sch@"afer,
Fran@,{c}ois Pinard, Greg McGary, and Bruno Haible wrote @file{po.el},
Pieri, Fred Pierresteguy, Fran@,{c}ois Pinard, Daniel Pittman, Christian
Timo Savola, Jorgen Sch@"afer, Holger Schauer, William Schelter, Ralph
f9832e80b89 ; * lisp/textmodes/ispell.el (ispell-message): Add commen...
0bebd0e5f09 ; Remove 'build-module' and 'html-manual' directories fro...
1014bcc8e32 Fix fontification of method-invocations in js-ts-mode (bu...
1b9812af80b ; * etc/PROBLEMS: Document problem with GnuPG 2.4.1. (Bu...
1fb2fb501f3 typescript-ts-mode, tsx-ts-mode: Fix syntax properties fo...
399433cc2b9 * lisp/progmodes/project.el: Filter out empty strings fro...
46fe7a17f53 Fix dragging mode line on text terminals with a mouse (bu...
4bf7cb71edc Fix go-ts-mode indentation and set indent offset to 8 (Bu...
527eb11de20 * lisp/minibuffer.el (completions-group-separator): Rever...
5b34fc07085 * lisp/treesit.el (treesit-node-at): Update docstring (bu...
5cf1de683b2 Fix python-fill-paragraph problems on filling strings (bu...
7678b7e46f2 Eglot: check server capability before sending didSave (bu...
7678b7e46f2 Eglot: check server capability before sending didSave (bu...
9ac12592781 Fix display of menu-bar bindings of commands in *Help* bu...
9ac12592781 Fix display of menu-bar bindings of commands in *Help* bu...
9e105d483fa Fix c-ts-mode indentation for statement after preproc (bu...
When running emacs in a terminal (or at least, in iTerm), keys are not
b464e6c490b Make last change of w32 GUI dialogs conditional and rever...
b916ec88b2f Make eglot-ensure's post-command-hook run a bit later (bu...
e551dd72f79 * etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bu...
ed4cd3eddf7 dockerfile-ts-mode: Prevent empty categories in imenu (Bu...
edd36786e1e ; * lisp/bookmark.el (bookmark-bmenu-locate): Doc fix (bu...
f102145d381 ; * etc/PROBLEMS: Describe problems with MuPDF 1.21. (Bu...
f49fe936abd * etc/NEWS: Note dotimes loop variable scoping change (bu...
performance reasons. Fix a bug that could cause ghost (mis)matches
2023-03-02 Sebastian Tennant <sdt@sebyte.me> (tiny change)
2023-03-26 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-01 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-09 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-11 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-12 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-14 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-15 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-17 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-18 Andrew G Cohen <cohen@andy.bu.edu>
2023-04-30 Andrew G Cohen <cohen@andy.bu.edu>
2023-05-06 Andrew G Cohen <cohen@andy.bu.edu>
2023-06-20 Andrew G Cohen <cohen@andy.bu.edu>
2023-07-05 Andrew G Cohen <cohen@andy.bu.edu>
2024-05-10 Andrew G Cohen <cohen@andy.bu.edu>
ce0ebb91f25 Improve documentation of read syntax and printed represen...
e110312ad95 ; * doc/lispref/minibuf.texi (Text from Minibuffer): Ment...
2023-07-08 Vladimir Sedach <vas@oneofus.la>
90fc6b987ad * lisp/savehist.el (savehist-save): Preserve shared struc...
ed3bab3cc72 Revert 'forward-sentence-default-function' to return poin...
b3e930d328e Revert inadvertent change to lisp/icomplete.el in previou...
973c1d24c6a ruby-ts-mode: Also don't reindent 'identifier' when insid...
973c1d24c6a ruby-ts-mode: Also don't reindent 'identifier' when insid...
e444115d026 Improve keymap-global-set and keymap-local-set interactiv...
8e9783b4ce4 Rebind in read-regexp-map M-c to M-s c compatible wit...
f12f72b0e09 ; * lisp/simple.el (primitive-undo): Clarify error messag...
cf327766226 ; * doc/lispref/parsing.texi (Using Parser): Remove delet...
b211a63455c Make tab-bar-tab-group-format-function also handle curren...
a3c310c11a Create new "use-package" themse and use it for :custom wit...
2a85d81c47 Add support for gathering statistics on use-package declar...

View File

@ -1,4 +1,5 @@
acknowledgements
adviced
advices
afile
ake
@ -9,6 +10,8 @@ blocs
callint
checkin
clen
clos
configury
debbugs
dedented
dependant

View File

@ -210,7 +210,10 @@ General steps (for each step, check for possible errors):
should be committed separately, as described in step 3 above, to
avoid them being merged to master. The lisp/ldefs-boot.el file
should not be merged to master either, so it could be added to the
same commit or committed separately.
same commit or committed separately. To make sure the changes to
ChangeLog.N and etc/AUTHORS are _not_ skipped, do NOT describe their
updates as "regenerate" or "re-generate", since gitmerge.el by
default skips such commits; instead, use "update" or some such.
The easiest way of doing that is "C-x v d ROOT-DIR RET", then go
to the first modified file, press 'M' to mark all modified files,

View File

@ -138,6 +138,20 @@ When everything's done, look hard at the resulting merge. Skipping
commits requires separate merges, so don't be surprised to see more
than one merge commit. If you're happy, push.
Long-lived feature branches
===========================
The conventions for formatting commit log messages set out in CONTRIBUTE
don't apply to commits made to feature branches.
Thus, feel free to commit little and often, with short and simple commit
messages. This practice can ease development by making 'git bisect' and
'git revert' more effective.
The commit merging the feature branch to master, on the other hand,
should follow the usual commit log message conventions.
Warnings about X11 forwarding
=============================

View File

@ -7655,8 +7655,7 @@ send your change to bug-gnu-emacs@gnu.org])])])
AH_TOP([/* GNU Emacs site configuration template file.
Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2021
Free Software Foundation, Inc.
Copyright (C) 1988-2024 Free Software Foundation, Inc.
This file is part of GNU Emacs.

View File

@ -1057,7 +1057,7 @@ explains these conventions, starting with an example:
@group
;;; foo.el --- Support for the Foo programming language -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Your Name
;; Copyright (C) 2010-2024 Your Name
@end group
;; Author: Your Name <yourname@@example.com>

View File

@ -22355,7 +22355,7 @@ calling @code{nnmairix-search} with @samp{f:From}.
@item G G o
@kindex G G o @r{(Summary)}
@findex nnmairix-goto-original-article
(Only in @code{nnmairix} groups!) Tries determine the group this article
(Only in @code{nnmairix} groups!) Tries to determine the group this article
originally came from and displays the article in this group, so that,
e.g., replying to this article the correct posting styles/group
parameters are applied (@code{nnmairix-goto-original-article}). This

View File

@ -31,7 +31,7 @@ their copyright assignment included the icons.
The following icons are converted from the Insight Windows style icon
set in src/gdb/gdbtk/library/images2.
Copyright (C) 2002-2021 Free Software Foundation, Inc.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
cont.pbm and cont.xpm were converted from continue.gif
@ -47,7 +47,7 @@ License: GNU General Public License version 3 or later (see COPYING)
The following icons are created from the Insight Windows style icon
set in src/gdb/gdbtk/library/images2.
Copyright (C) 2002-2021 Free Software Foundation, Inc.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
rcont.xpm rfinish.xpm

View File

@ -3253,7 +3253,7 @@ for which LSP on-type-formatting should be requested."
(try-completion pattern (funcall proxies)))
((eq action t) ; all-completions
(let ((comps (funcall proxies)))
(dolist (c comps) (eglot--dumb-flex pattern c t))
(dolist (c comps) (eglot--dumb-flex pattern c completion-ignore-case))
(all-completions
""
comps

View File

@ -504,7 +504,7 @@ not be enclosed in { } or ( )."
;; ------------------------------------------------------------
;; The following configurable variables are used in the
;; up-to-date overview .
;; up-to-date overview.
;; The standard configuration assumes that your `make' program
;; can be run in question/query mode using the `-q' option, this
;; means that the command
@ -514,12 +514,12 @@ not be enclosed in { } or ( )."
;; should return an exit status of zero if the target `foo' is
;; up to date and a nonzero exit status otherwise.
;; Many makes can do this although the docs/manpages do not mention
;; it. Try it with your favorite one. GNU make, System V make, and
;; it. Try it with your favorite one. GNU make, System V make, and
;; Dennis Vadura's DMake have no problems.
;; Set the variable `makefile-brave-make' to the name of the
;; make utility that does this on your system.
;; To understand what this is all about see the function definition
;; of `makefile-query-by-make-minus-q' .
;; of `makefile-query-by-make-minus-q'.
;; ------------------------------------------------------------
(defcustom makefile-brave-make "make"
@ -787,7 +787,7 @@ Makefile mode can be configured by modifying the following variables:
to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\".
`makefile-special-targets-list':
List of special targets. You will be offered to complete
List of special targets. You will be offered to complete
on one of those in the minibuffer whenever you enter a `.'.
at the beginning of a line in Makefile mode."
(add-hook 'completion-at-point-functions
@ -1583,7 +1583,7 @@ and generates the overview, one line per target name."
(goto-char (point-min))
(if (re-search-forward "^\\(\t+$\\| +\t\\)" nil t)
(not (y-or-n-p
(format "Suspicious line %d. Save anyway? "
(format "Suspicious line %d. Save anyway?"
(count-lines (point-min) (point)))))))))
(defun makefile-warn-continuations ()
@ -1592,7 +1592,7 @@ and generates the overview, one line per target name."
(goto-char (point-min))
(if (re-search-forward "\\\\[ \t]+$" nil t)
(not (y-or-n-p
(format "Suspicious continuation in line %d. Save anyway? "
(format "Suspicious continuation in line %d. Save anyway?"
(count-lines (point-min) (point)))))))))

View File

@ -83,7 +83,7 @@
;;; Install treesitter language parsers
(defvar php-ts-mode--language-source-alist
'((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.22.5"))
'((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.22.8" "php/src"))
(phpdoc . ("https://github.com/claytonrcarter/tree-sitter-phpdoc"))
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.20.3"))
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.21.2"))
@ -509,7 +509,7 @@ characters of the current line."
(if (search-forward "</html>" end-html t 1)
0
(+ (point) php-ts-mode-indent-offset))))
;; Maybe it's better to use bol, read the documentation!!!
;; Maybe it's better to use bol?
(treesit-node-start parent))))
(defun php-ts-mode--array-element-heuristic (_node parent _bol &rest _)
@ -728,7 +728,7 @@ characters of the current line."
'("abstract" "and" "array" "as" "break" "callable" "case" "catch"
"class" "clone" "const" "continue" "declare" "default" "do" "echo"
"else" "elseif" "enddeclare" "endfor" "endforeach" "endif"
"endswitch" "endwhile" "enum" "extends" "final" "finally" "fn"
"endswitch" "endwhile" "enum" "exit" "extends" "final" "finally" "fn"
"for" "foreach" "from" "function" "global" "goto" "if" "implements"
"include" "include_once" "instanceof" "insteadof" "interface"
"list" "match" "namespace" "new" "null" "or" "print" "private"
@ -762,6 +762,12 @@ characters of the current line."
"E_COMPILE_WARNING" "E_USER_ERROR" "E_USER_WARNING"
"E_USER_NOTICE" "E_DEPRECATED" "E_USER_DEPRECATED"
"E_ALL" "E_STRICT"
;; math constant
"M_PI" "M_E" "M_LOG2E" "M_LOG10E" "M_LN2" "M_LN10" "M_PI_2"
"M_PI_4" "M_1_PI" "M_2_PI" "M_SQRTPI" "M_2_SQRTPI" "M_SQRT2"
"M_SQRT3" "M_SQRT1_2" "M_LNPI" "M_EULER" "PHP_ROUND_HALF_UP"
"PHP_ROUND_HALF_DOWN" "PHP_ROUND_HALF_EVEN" "PHP_ROUND_HALF_ODD"
"NAN" "INF"
;; magic constant
"__COMPILER_HALT_OFFSET__" "__CLASS__" "__DIR__" "__FILE__"
"__FUNCTION__" "__LINE__" "__METHOD__" "__NAMESPACE__" "__TRAIT__")
@ -785,26 +791,23 @@ characters of the current line."
:feature 'constant
`((boolean) @font-lock-constant-face
(null) @font-lock-constant-face
;; predefined constant or built in constant
;; predefined constant or built in constant (part of PHP core)
((name) @font-lock-builtin-face
(:match ,(rx-to-string
`(: bos (or ,@php-ts-mode--predefined-constant) eos))
@font-lock-builtin-face))
;; user defined constant
((name) @font-lock-constant-face
(:match "\\`_?[A-Z][0-9A-Z_]+\\'" @font-lock-constant-face))
(:match "\\`_*[A-Z][0-9A-Z_]+\\'" @font-lock-constant-face))
(const_declaration
(const_element (name) @font-lock-constant-face))
(relative_scope "self") @font-lock-builtin-face
;; declare directive
(declare_directive ["strict_types" "encoding" "ticks"] @font-lock-constant-face))
:language 'php
:feature 'name
`((goto_statement (name) @font-lock-constant-face)
(named_label_statement (name) @font-lock-constant-face)
(expression_statement (name) @font-lock-keyword-face
(:equal "exit" @font-lock-keyword-face)))
'((goto_statement (name) @font-lock-constant-face)
(named_label_statement (name) @font-lock-constant-face))
:language 'php
;;:override t
@ -813,19 +816,21 @@ characters of the current line."
:language 'php
:feature 'operator
`([,@php-ts-mode--operators] @font-lock-operator-face)
`((error_suppression_expression "@" @font-lock-keyword-face)
[,@php-ts-mode--operators] @font-lock-operator-face)
:language 'php
:feature 'variable-name
:override t
`(((name) @font-lock-keyword-face (:equal "this" @font-lock-keyword-face))
'(((name) @font-lock-keyword-face (:equal "this" @font-lock-keyword-face))
(variable_name (name) @font-lock-variable-name-face)
(relative_scope ["parent" "self" "static"] @font-lock-builtin-face)
(relative_scope) @font-lock-constant-face
(dynamic_variable_name (name) @font-lock-variable-name-face)
(member_access_expression
name: (_) @font-lock-variable-name-face)
(scoped_property_access_expression
scope: (name) @font-lock-constant-face)
(error_suppression_expression (name) @font-lock-variable-name-face))
scope: (name) @font-lock-constant-face))
:language 'php
:feature 'string
@ -850,7 +855,8 @@ characters of the current line."
:language 'php
:feature 'type
:override t
'((union_type) @font-lock-type-face
'((union_type "|" @font-lock-operator-face)
(union_type) @font-lock-type-face
(bottom_type) @font-lock-type-face
(primitive_type) @font-lock-type-face
(cast_type) @font-lock-type-face
@ -883,17 +889,18 @@ characters of the current line."
("=>") @font-lock-keyword-face
(object_creation_expression
(name) @font-lock-type-face)
(namespace_name_as_prefix "\\" @font-lock-delimiter-face)
(namespace_name_as_prefix (namespace_name (name)) @font-lock-type-face)
(namespace_use_clause (name) @font-lock-property-use-face)
(namespace_aliasing_clause (name) @font-lock-type-face)
(namespace_name "\\" @font-lock-delimiter-face)
(namespace_name (name) @font-lock-type-face)
(use_declaration (name) @font-lock-property-use-face))
:language 'php
:feature 'function-scope
:override t
'((relative_scope) @font-lock-constant-face
(scoped_call_expression
'((scoped_call_expression
scope: (name) @font-lock-constant-face)
(class_constant_access_expression (name) @font-lock-constant-face))

View File

@ -689,32 +689,55 @@ PARSER."
(push (if with-host (cons parser host-parser) parser) res))))
(nreverse res)))
(defun treesit--cleanup-local-range-overlays (modified-tick beg end)
"Cleanup overlays used to mark local parsers between BEG and END.
For every local parser overlay between BEG and END, if its
`treesit-parser-ov-timestamp' is smaller than MODIFIED-TICK, delete
it."
(dolist (ov (overlays-in beg end))
(when-let ((ov-timestamp
(overlay-get ov 'treesit-parser-ov-timestamp)))
(when (< ov-timestamp modified-tick)
(when-let ((local-parser (overlay-get ov 'treesit-parser)))
(treesit-parser-delete local-parser))
(delete-overlay ov)))))
(defun treesit--update-ranges-local
(query embedded-lang &optional beg end)
(query embedded-lang modified-tick &optional beg end)
"Update range for local parsers between BEG and END.
Use QUERY to get the ranges, and make sure each range has a local
parser for EMBEDDED-LANG."
;; Clean up.
(dolist (ov (overlays-in (or beg (point-min)) (or end (point-max))))
(when-let ((parser (overlay-get ov 'treesit-parser)))
(when (eq (overlay-start ov) (overlay-end ov))
(delete-overlay ov)
(treesit-parser-delete parser))))
parser for EMBEDDED-LANG.
The local parser is stored in an overlay, in the `treesit-parser'
property, the host parser is stored in the `treesit-host-parser'
property.
When this function touches an overlay, it sets the
`treesit-parser-ov-timestamp' property of the overlay to
MODIFIED-TICK. This will help Emacs garbage-collect overlays that
aren't in use anymore."
;; Update range.
(let* ((host-lang (treesit-query-language query))
(host-parser (treesit-parser-create host-lang))
(ranges (treesit-query-range host-parser query beg end)))
(pcase-dolist (`(,beg . ,end) ranges)
(let ((has-parser nil))
(dolist (ov (overlays-in beg end))
;; Update range of local parser.
(let ((embedded-parser (overlay-get ov 'treesit-parser)))
(when (and (treesit-parser-p embedded-parser)
(eq (treesit-parser-language embedded-parser)
embedded-lang))
(treesit-parser-set-included-ranges
embedded-parser `((,beg . ,end)))
(setq has-parser t))))
(setq
has-parser
(catch 'done
(dolist (ov (overlays-in beg end) nil)
;; Update range of local parser.
(when-let* ((embedded-parser (overlay-get ov 'treesit-parser))
(parser-lang (treesit-parser-language
embedded-parser)))
(when (eq parser-lang embedded-lang)
(treesit-parser-set-included-ranges
embedded-parser `((,beg . ,end)))
(move-overlay ov beg end)
(overlay-put ov 'treesit-parser-ov-timestamp
modified-tick)
(throw 'done t))))))
;; Create overlay and local parser.
(when (not has-parser)
(let ((embedded-parser (treesit-parser-create
@ -722,6 +745,8 @@ parser for EMBEDDED-LANG."
(ov (make-overlay beg end nil nil t)))
(overlay-put ov 'treesit-parser embedded-parser)
(overlay-put ov 'treesit-host-parser host-parser)
(overlay-put ov 'treesit-parser-ov-timestamp
modified-tick)
(treesit-parser-set-included-ranges
embedded-parser `((,beg . ,end)))))))))
@ -729,40 +754,44 @@ parser for EMBEDDED-LANG."
"Update the ranges for each language in the current buffer.
If BEG and END are non-nil, only update parser ranges in that
region."
;; When updating ranges, we want to avoid querying the whole buffer
;; which could be slow in very large buffers. Instead, we only
;; query for nodes that intersect with the region between BEG and
;; END. Also, we only update the ranges intersecting BEG and END;
;; outside of that region we inherit old ranges.
(dolist (setting treesit-range-settings)
(let ((query (nth 0 setting))
(language (nth 1 setting))
(local (nth 2 setting))
(offset (nth 3 setting))
(beg (or beg (point-min)))
(end (or end (point-max))))
(cond
((functionp query) (funcall query beg end))
(local
(treesit--update-ranges-local query language beg end))
(t
(let* ((host-lang (treesit-query-language query))
(parser (treesit-parser-create language))
(old-ranges (treesit-parser-included-ranges parser))
(new-ranges (treesit-query-range
host-lang query beg end offset))
(set-ranges (treesit--clip-ranges
(treesit--merge-ranges
old-ranges new-ranges beg end)
(point-min) (point-max))))
(dolist (parser (treesit-parser-list nil language))
(let ((modified-tick (buffer-chars-modified-tick))
(beg (or beg (point-min)))
(end (or end (point-max))))
;; When updating ranges, we want to avoid querying the whole buffer
;; which could be slow in very large buffers. Instead, we only
;; query for nodes that intersect with the region between BEG and
;; END. Also, we only update the ranges intersecting BEG and END;
;; outside of that region we inherit old ranges.
(dolist (setting treesit-range-settings)
(let ((query (nth 0 setting))
(language (nth 1 setting))
(local (nth 2 setting))
(offset (nth 3 setting)))
(cond
((functionp query) (funcall query beg end))
(local
(treesit--update-ranges-local
query language modified-tick beg end))
(t
(let* ((host-lang (treesit-query-language query))
(parser (treesit-parser-create language))
(old-ranges (treesit-parser-included-ranges parser))
(new-ranges (treesit-query-range
host-lang query beg end offset))
(set-ranges (treesit--clip-ranges
(treesit--merge-ranges
old-ranges new-ranges beg end)
(point-min) (point-max))))
(dolist (parser (treesit-parser-list nil language))
(treesit-parser-set-included-ranges
parser (or set-ranges
;; When there's no range for the embedded
;; language, set it's range to a dummy (1
;; . 1), otherwise it would be set to the
;; whole buffer, which is not what we want.
`((,(point-min) . ,(point-min))))))))))))
`((,(point-min) . ,(point-min)))))))))))
(treesit--cleanup-local-range-overlays modified-tick beg end)))
(defun treesit-parser-range-on (parser beg &optional end)
"Check if PARSER's range covers the portion between BEG and END.
@ -2214,8 +2243,15 @@ What constitutes as text and source code sexp is determined
by `text' and `sexp' in `treesit-thing-settings'."
(interactive "^p")
(let ((arg (or arg 1))
(pred (or treesit-sexp-type-regexp 'sexp)))
(or (when (treesit-node-match-p (treesit-node-at (point)) 'text t)
(pred (or treesit-sexp-type-regexp 'sexp))
(node-at-point
(treesit-node-at (point) (treesit-language-at (point)))))
(or (when (and node-at-point
;; Make sure point is strictly inside node.
(< (treesit-node-start node-at-point)
(point)
(treesit-node-end node-at-point))
(treesit-node-match-p node-at-point 'text t))
(forward-sexp-default-function arg)
t)
(if (> arg 0)

View File

@ -13,7 +13,7 @@
@SET_MAKE@
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
# Copyright (C) 2002-2024 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -36,7 +36,7 @@
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
# Copyright (C) 2002-2024 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -31,7 +31,7 @@ BEGIN
VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0"
VALUE "FileVersion", "@comma_space_version@\0"
VALUE "InternalName", "Emacs\0"
VALUE "LegalCopyright", "Copyright (C) 2001-2021\0"
VALUE "LegalCopyright", "Copyright (C) 2001-2024\0"
VALUE "OriginalFilename", "emacs.exe"
VALUE "ProductName", "Emacs\0"
VALUE "ProductVersion", "@comma_space_version@\0"

View File

@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0"
VALUE "FileVersion", "@comma_space_version@\0"
VALUE "InternalName", "EmacsClient\0"
VALUE "LegalCopyright", "Copyright (C) 2001-2021\0"
VALUE "LegalCopyright", "Copyright (C) 2001-2024\0"
VALUE "OriginalFilename", "emacsclientw.exe"
VALUE "ProductName", "EmacsClient\0"
VALUE "ProductVersion", "@comma_space_version@\0"

View File

@ -1,6 +1,6 @@
;;; which-key-tests.el --- Tests for which-key.el -*- lexical-binding: t; -*-
;; Copyright (C) 2017-2021 Free Software Foundation, Inc.
;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
;; Author: Justin Burkett <justin@burkett.cc>
;; Maintainer: Justin Burkett <justin@burkett.cc>