]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 weeks ago* lisp/treesit.el: Use forward-list-default-function for C-M-n
Juri Linkov [Mon, 6 Jan 2025 18:02:18 +0000 (20:02 +0200)]
* lisp/treesit.el: Use forward-list-default-function for C-M-n

(treesit--forward-list-with-default): New internal function
with body from 'treesit-forward-sexp-list' (bug#73404).
(treesit-forward-sexp-list, treesit-forward-list):
Replace body with a call to the shared implementation
'treesit--forward-list-with-default' using the
corresponding default function as an argument.

(cherry picked from commit 997b9b8d38fd8a770fb1e0b3c85abae2c0d6cdd3)

6 weeks agoEglot: new eglot--format to fix quote substitution woes (bug#73472)
João Távora [Mon, 6 Jan 2025 10:47:13 +0000 (10:47 +0000)]
Eglot: new eglot--format to fix quote substitution woes (bug#73472)

* lisp/progmodes/eglot.el (eglot--guess-contact): Use eglot--format.
(eglot--format): New helper.
(eglot--error, eglot--message, eglot--warn)
(eglot--apply-text-edits, eglot-rename): Use eglot--format.

(cherry picked from commit c3ec174a6c2d1118e82aecceb203634f7b567e20)

6 weeks agoImprove integer file mode options docstrings
Stefan Kangas [Mon, 6 Jan 2025 10:07:09 +0000 (11:07 +0100)]
Improve integer file mode options docstrings

* lisp/eshell/esh-util.el (eshell-private-file-modes)
(eshell-private-directory-modes):
* lisp/gnus/mail-source.el (mail-source-default-file-modes):
* lisp/printing.el (pr-file-modes):
* lisp/gnus/mm-decode.el (mm-attachment-file-modes):
* lisp/gnus/nnmail.el (nnmail-default-file-modes):
* lisp/recentf.el (recentf-save-file-modes):
* lisp/vc/ediff-init.el (ediff-temp-file-mode):
* lisp/vc/emerge.el (emerge-temp-file-mode): Better document the fact
that these are integer and not octal values.

* lisp/epg.el (epg--start):
* lisp/emacs-lisp/package.el (package-import-keyring): Use octal values
to make the code more self-documenting.

(cherry picked from commit da5df90fadbec9db692ff34abcd28ce5a5b29c2a)

6 weeks agoTry harder to stabilize dired-test-bug27243-02
Peter Oliver [Tue, 16 Jul 2024 23:06:02 +0000 (00:06 +0100)]
Try harder to stabilize dired-test-bug27243-02

* test/lisp/dired-tests.el (dired-test-bug27243-02): Don't rely on the
expected point, since columns will move if the size of the parent directory
changes order of magnitude.  (Bug#72120)

(cherry picked from commit 6a389d5be47d1c143054a69e7302371d3889d658)

6 weeks ago; Silence byte-compiler
Stefan Kangas [Mon, 6 Jan 2025 09:06:17 +0000 (10:06 +0100)]
; Silence byte-compiler

* test/lisp/net/browse-url-tests.el
(browse-url-tests-delete-temp-file): Suppress warning.

(cherry picked from commit f652566af51079428526a3312512214b82ed8728)

6 weeks agoImprove Commentary in man.el
Stefan Kangas [Mon, 6 Jan 2025 05:33:19 +0000 (06:33 +0100)]
Improve Commentary in man.el

* lisp/man.el (Commentary): Move "Features" above "Credits and History".
The former is more likely to be relevant.

(cherry picked from commit 1096d9afaa19799fade32ebada5b16add593511f)

6 weeks ago; Quote function symbols in man.el
Stefan Kangas [Mon, 6 Jan 2025 05:40:12 +0000 (06:40 +0100)]
; Quote function symbols in man.el

* lisp/man.el (Man-init-defvars, Man-translate-references)
(Man-highlight-references, Man-page-from-arguments)
(Man-follow-manual-reference): Quote function symbols.

(cherry picked from commit fe6a28acaca4bc24883dff04aec0f9e6097b7466)

6 weeks agoEglot: fix signature precedence based on provenance (bug#74914)
João Távora [Sun, 5 Jan 2025 20:39:51 +0000 (20:39 +0000)]
Eglot: fix signature precedence based on provenance (bug#74914)

* lisp/progmodes/eglot.el (eglot--sig-info): Reverse order of
activeParameter and sig-active.

(cherry picked from commit 04a8faef0948f46b16172855ee337f59819f22a7)

6 weeks ago(hack-one-local-variable): Fix bug#74964
Stefan Monnier [Sun, 5 Jan 2025 15:03:40 +0000 (10:03 -0500)]
(hack-one-local-variable): Fix bug#74964

* lisp/files.el (hack-local-variables--inhibit): New var.
(hack-one-local-variable): Use it to avoid infinite recursion in a more
targeted manner.

(cherry picked from commit 127fc983080a3b9a607fa693bacfcf02f19ce0b7)

6 weeks ago* lisp/net/tramp-sh.el (tramp-get-remote-pipe-buf): Make it more robust.
Michael Albinus [Sun, 5 Jan 2025 14:24:21 +0000 (15:24 +0100)]
* lisp/net/tramp-sh.el (tramp-get-remote-pipe-buf): Make it more robust.

(cherry picked from commit 672a5f2b82c3c57b753902f2bdf5c970f3fc63a9)

6 weeks agoFix bug in 'rng-valid' that unnecessarily marks buffer as modified
viliaapro [Tue, 31 Dec 2024 12:07:43 +0000 (14:07 +0200)]
Fix bug in 'rng-valid' that unnecessarily marks buffer as modified

* lisp/nxml/rng-valid.el (rng-do-some-validation-1): Use
'with-silent-modifications'.  (Bug#75224)

Copyright-paperwork-exempt: yes
(cherry picked from commit bc1a544b524f0c11a131f34a81a11fc59b1fdd1e)

6 weeks ago; * admin/authors.el (authors-aliases): Add William O'Brien.
Eli Zaretskii [Sun, 5 Jan 2025 12:41:43 +0000 (14:41 +0200)]
; * admin/authors.el (authors-aliases): Add William O'Brien.

(cherry picked from commit c6d0c2eec389fb140ba01f4a821315375d3f662f)

6 weeks agoEnable extra flags in 'go-ts-mode' test commands
w08r [Thu, 19 Dec 2024 09:53:02 +0000 (09:53 +0000)]
Enable extra flags in 'go-ts-mode' test commands

* lisp/progmodes/go-ts-mode.el (go-ts-mode-test-flags):
(go-ts-mode--get-test-flags): New custom variable and function
for controlling test behaviour.
(go-ts-mode--compile-test): Updated to use new test flags
variable for passing extra information to the go test command
line.
(go-ts-mode-test-this-package): Updated to use new test flags
variable for passing extra information to the go test command
line.  Removed incorrect use of -run flag.

* etc/NEWS: Announce the new user option.  (Bug#74786)

(cherry picked from commit ac3b67860761f0b80e6fd4071d1ec868a9f6b083)

6 weeks ago; * lisp/tty-tip.el: Remove local variable 'symbol-packages'
Eshel Yaron [Wed, 8 Jan 2025 08:17:58 +0000 (09:17 +0100)]
; * lisp/tty-tip.el: Remove local variable 'symbol-packages'

6 weeks ago; * lisp/transient.el (transient-infix-read): Fix warning.
Eshel Yaron [Tue, 7 Jan 2025 19:22:10 +0000 (20:22 +0100)]
; * lisp/transient.el (transient-infix-read): Fix warning.

6 weeks agoUse 'alist-set' where appropriate
Eshel Yaron [Tue, 7 Jan 2025 19:06:17 +0000 (20:06 +0100)]
Use 'alist-set' where appropriate

6 weeks agoscope.el: improve handling of gv-define-*
Eshel Yaron [Mon, 6 Jan 2025 12:27:01 +0000 (13:27 +0100)]
scope.el: improve handling of gv-define-*

7 weeks agoTurn alist-set into a macro
Eshel Yaron [Sun, 5 Jan 2025 12:17:02 +0000 (13:17 +0100)]
Turn alist-set into a macro

7 weeks agoGo back to remapping 'header-line' face
Eshel Yaron [Sun, 5 Jan 2025 12:16:32 +0000 (13:16 +0100)]
Go back to remapping 'header-line' face

7 weeks agoAllow to remap 'header-line' face
Eli Zaretskii [Sun, 5 Jan 2025 10:40:39 +0000 (12:40 +0200)]
Allow to remap 'header-line' face

* src/xfaces.c (realize_basic_faces): Bind 'face-remapping-alist'
to nil while realizing basic faces.
(lookup_basic_face): Force realizing a face whose 'inherit'
attribute is non-nil.  (Bug#73862)

(cherry picked from commit dc41ddb4d6bd7dc45cb9c37bc89c8c08f256baec)

7 weeks ago; Fix warnings in a tty-only build on MS-Windows
Eli Zaretskii [Sun, 5 Jan 2025 09:03:07 +0000 (11:03 +0200)]
; Fix warnings in a tty-only build on MS-Windows

* lisp/org/org.el (dnd-open-local-file):
* lisp/dired.el (tool-bar--image-expression):
* lisp/term/android-win.el (x-handle-args): Declare.
* lisp/w32-fns.el (w32-system-shells):
(w32-allow-system-shell):
* lisp/net/shr.el (image-scaling-factor):
* lisp/net/eww.el (image-scaling-factor):
* lisp/image.el (image-scaling-factor): Defvar.
(image-recompute-map-p): Move to before the first use.
Reported by Angelo Graziosi <angelo.g0@libero.it>.

(cherry picked from commit 7eb8596ff5f1964f91664a6b7cac3199a5af5ba7)

7 weeks ago* lisp/treesit.el: Fix treesit-show-paren-data (bug#75198)
Juri Linkov [Sun, 5 Jan 2025 07:43:22 +0000 (09:43 +0200)]
* lisp/treesit.el: Fix treesit-show-paren-data (bug#75198)

(treesit-show-paren-data--categorize): Use 'treesit-thing-defined-p'
to check if the thing exists for the language at POS before calling
'treesit-parent-until' that raises an error for an undefined thing.
(treesit-thing-defined-p): Add the alias signature to the docstring.

(cherry picked from commit 47ff8ab307da2a1ccfe3e701db871f47c1d3b380)

7 weeks agoFix setup of coding-systems on MS-Windows
Eli Zaretskii [Sun, 5 Jan 2025 05:56:27 +0000 (07:56 +0200)]
Fix setup of coding-systems on MS-Windows

* src/emacs.c (main) [HAVE_PDUMPER] [WINDOWSNT]: Call
'w32_init_file_name_codepage' again after loading the pdumper
file.
* src/w32.c (w32_init_file_name_codepage) [HAVE_PDUMPER]:
Reinitialize additional variables.  (Bug#75207)

(cherry picked from commit cc5cd4de93d1e5ba205cbf0c370aef4559bc342b)

7 weeks agoDelete duplicate note on ancient platforms
Stefan Kangas [Sun, 5 Jan 2025 04:26:52 +0000 (05:26 +0100)]
Delete duplicate note on ancient platforms

* etc/MACHINES: Delete note on platforms removed in Emacs 23.1 from the
introduction, since it is duplicated again at the end of the file.

(cherry picked from commit 441788e06d87c8cbd5efc9f2e00ba9072a824c55)

7 weeks ago; Update lisp/ldef-boot.el
Eshel Yaron [Sun, 5 Jan 2025 11:49:17 +0000 (12:49 +0100)]
; Update lisp/ldef-boot.el

7 weeks agoFix tsx-ts-mode syntax propertize function (bug#73978)
Yuan Fu [Sat, 4 Jan 2025 19:53:39 +0000 (11:53 -0800)]
Fix tsx-ts-mode syntax propertize function (bug#73978)

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts--syntax-propertize-captures): Apply punctuation syntax
on balanced pairs, instead of using string syntax.

(cherry picked from commit 87f83f1c1771ad3ca4d84bf2fc7a337e241952be)

7 weeks ago* lisp/treesit.el (treesit-transpose-sexps): Improve (bug#60655).
Juri Linkov [Sat, 4 Jan 2025 18:30:07 +0000 (20:30 +0200)]
* lisp/treesit.el (treesit-transpose-sexps): Improve (bug#60655).

Use 'treesit-thing-next' and 'treesit-thing-prev' with
'treesit-node-named' to transpose named siblings that leaves the right
punctuation in anonymous nodes between named siblings.  Fall back
to 'transpose-sexps-default-function' inside strings and comments.
(treesit-node-named): New helper function.

(cherry picked from commit d9a0e781978725953ab44556f5222b1be32df7a7)

7 weeks agoUpdate doc string of 'insert'
Ulrich Müller [Sat, 4 Jan 2025 09:37:59 +0000 (10:37 +0100)]
Update doc string of 'insert'

* src/editfns.c (Finsert): Mention 'decode-coding-string' instead
of the obsolete 'string-as-multibyte' in doc string.  (Bug#75345)

(cherry picked from commit 6468c3f7a74133b130d15172d770c8b7eebfeac5)

7 weeks agoDon't always enable xterm-mouse-mode (bug#74833)
Jared Finder [Thu, 2 Jan 2025 06:36:25 +0000 (22:36 -0800)]
Don't always enable xterm-mouse-mode (bug#74833)

Many terminals set the environment variable TERM to "xterm" even when they
don't support all functionality in xterm.  This means that enabling
xterm-mouse-mode can break critical editing workflows like copy/paste.  This
adds checks for the specific terminal Emacs is run in and only enables
xterm-mouse-mode on terminals knows to support all critical editing workflows.

* etc/NEWS: Update announcement
* lisp/term/xterm.el (xterm--auto-xt-mouse-allowed-names)
(xterm--auto-xt-mouse-allowed-types): New variables to control
what terminals automatically enable xterm-mouse-mode.
(xterm--report-background-handler, xterm--version-handler): Use
xterm--read-string.
(xterm--read-string, xterm--query-name-and-version): New
function.
(xterm--init): Check what terminal is running and if
xterm-mouse-mode was manually called.
* lisp/xt-mouse.el (xterm-mouse-mode-called): New variable.
(xterm-mouse-mode): Set xterm-mouse-mode-called.  Mention
automatic call by xterm--init.  Delete outdated comment text.

(cherry picked from commit ba6429081a8560979136cf6fa40ff3f3c4859a53)

7 weeks agoUpdate eln-cache when --init-directory is used
Eli Zaretskii [Sat, 4 Jan 2025 12:44:10 +0000 (14:44 +0200)]
Update eln-cache when --init-directory is used

* lisp/startup.el (normal-top-level): Update eln-cache after
'user-emacs-directory' is set by --init-directory.  Patch by
Jordan Isaacs <jordan@snowytrees.dev>.  (Bug#75022)

(cherry picked from commit b63ba892f9b28062a4ece9db7e4abd79a88ceea6)

7 weeks ago* lisp/vc/ediff-util.el: Loop the ediff-session-registry instead of buffers
Lin Sun [Sun, 29 Dec 2024 06:55:01 +0000 (06:55 +0000)]
* lisp/vc/ediff-util.el: Loop the ediff-session-registry instead of buffers

This avoids aborting the loop if an error happens in some buffer.
(Bug#74881)

(cherry picked from commit 5fe7f86367c95dbc65dfed5acb34f8dca2b40fe9)

7 weeks agoUse `keymap*-set' over `global-set-key'/`define-key' in elisp intro
Hong Xu [Thu, 19 Dec 2024 22:33:35 +0000 (14:33 -0800)]
Use `keymap*-set' over `global-set-key'/`define-key' in elisp intro

* doc/lispintro/emacs-lisp-intro.texi (Key Bindings): Since
`global-set-key' and `define-key' are considered legacy, we encourage
`keymap-global-set' and `keymap-set' now.  (Bug#74999)

(cherry picked from commit 6d8c3c0cbe42c4b288679456f0eec9a78593e2a5)

7 weeks agoFix documentation and prompt in 'package-isolate'
Eli Zaretskii [Sat, 4 Jan 2025 12:18:54 +0000 (14:18 +0200)]
Fix documentation and prompt in 'package-isolate'

* lisp/emacs-lisp/package.el (package-isolate): Fix doc string and
the prompt.  (Bug#75163)

(cherry picked from commit 4b2bb63b7ac386daabb0bbd2dc00fb542a9bcc21)

7 weeks agoFix mouse clicks on characters with parenthesis syntax
Eli Zaretskii [Sat, 4 Jan 2025 10:51:40 +0000 (12:51 +0200)]
Fix mouse clicks on characters with parenthesis syntax

* lisp/mouse.el (context-menu-region, mouse-skip-word)
(mouse-start-end): Use 'syntax-after' instead of 'char-syntax', to
pay attention to 'syntax-table' text properties.  (Bug#74415)

(cherry picked from commit 742b792175bd7149b1401a45aae1af83798bf188)

7 weeks agoImprove doxygen font-lock rules in c-ts-mode (bug#75012)
Filippo Argiolas [Thu, 26 Dec 2024 07:06:55 +0000 (08:06 +0100)]
Improve doxygen font-lock rules in c-ts-mode (bug#75012)

And also c++-ts-mode.

* lisp/progmodes/c-ts-common.el:
(c-ts-mode-doxygen-comment-font-lock-settings): Add rules for type,
storageclass and note/warning/error tags.

Copyright-paperwork-exempt: yes
(cherry picked from commit 752ba27425db5332fc18e962117f24b9300ccf78)

7 weeks ago; Minor change in treesit-admin--generate-compatibility-report
Yuan Fu [Sat, 4 Jan 2025 07:34:50 +0000 (23:34 -0800)]
; Minor change in treesit-admin--generate-compatibility-report

* admin/tree-sitter/treesit-admin.el:
(treesit-admin--generate-compatibility-report): Use th for
languages.

(cherry picked from commit a9c1620809e1613606829585a3a733366256cdd0)

7 weeks ago; Minor rephrasing in treesit-admin--verify-major-mode-queries
Yuan Fu [Mon, 30 Dec 2024 08:28:48 +0000 (00:28 -0800)]
; Minor rephrasing in treesit-admin--verify-major-mode-queries

* admin/tree-sitter/treesit-admin.el:
(treesit-admin--verify-major-mode-queries): Minor rephrase.

(cherry picked from commit d32f3eed991b0fa8def484787d95852fd9c10972)

7 weeks ago; Fix typo in treesit-explore-mode
Yuan Fu [Sat, 4 Jan 2025 05:39:32 +0000 (21:39 -0800)]
; Fix typo in treesit-explore-mode

* lisp/treesit.el (treesit-explore-mode): We added the hook to
kill-buffer-hook, so make sure to remove it from
kill-buffer-hook, not post-command-hook.

(cherry picked from commit 55f43f5b220ed3cc49141257918e51e403dd85ac)

7 weeks agoAutomatically redraw frames for filtered faces
Daniel Colascione [Sat, 4 Jan 2025 04:36:55 +0000 (23:36 -0500)]
Automatically redraw frames for filtered faces

Automatically redraw frames when we detect that a window
parameter used in a face filter is changed.  (Bug#75291)

* src/window.c (Fset_window_parameter): redraw window, actually
whole frame in this implementation, on face-relevant parameter
change
(syms_of_window): add window_auto_redraw_on_parameter_change
* src/xfaces.c (evaluate_face_filter): record properties

(cherry picked from commit b828d36deded145ebbd3419f618cf52f7862c4c8)

7 weeks agoExtract new function man--maybe-fontify-manpage
Stefan Kangas [Fri, 3 Jan 2025 21:06:43 +0000 (22:06 +0100)]
Extract new function man--maybe-fontify-manpage

* lisp/man.el (man--maybe-fontify-manpage): Extract function from...
(Man-getpage-in-background, Man-update-manpage)
(Man-bgproc-filter): ...here.

(cherry picked from commit 8e9317a1de66314dee96266863827c00cdefde2f)

7 weeks ago; Fix indentation
Stefan Kangas [Fri, 3 Jan 2025 20:32:16 +0000 (21:32 +0100)]
; Fix indentation

(cherry picked from commit e825502ded0d526716e0f22704f7ebef7720deb5)

7 weeks agoUpdate to Transient v0.8.3-2-gf0478b29
Jonas Bernoulli [Fri, 3 Jan 2025 18:51:08 +0000 (19:51 +0100)]
Update to Transient v0.8.3-2-gf0478b29

(cherry picked from commit 58df9e272b9a13f954990af9da66c11e5d141a05)

7 weeks ago(mpc-cmd-find): Try and fix bug#41493
Stefan Monnier [Fri, 3 Jan 2025 18:24:26 +0000 (13:24 -0500)]
(mpc-cmd-find): Try and fix bug#41493

* lisp/mpc.el (mpc--proc-alist-to-alists): Don't presume that we
have either `directory` or `file` entries, instead allow both at
the same time.
(mpc-cmd-find) <Directory>: Don't presume that `directory`
entries have no associated data, so throw them away only after
having parsed them with `mpc--proc-alist-to-alists`.

(cherry picked from commit 3740d9c83825546e0fbde05492777fff221e9fbd)

7 weeks agoAdd more text-based browser alternatives
Stefan Kangas [Fri, 3 Jan 2025 16:32:58 +0000 (17:32 +0100)]
Add more text-based browser alternatives

* lisp/net/browse-url.el (browse-url-text-browser): Add more
alternatives.

(cherry picked from commit e0b4e9ece907ca86410835d2cd374917830eabae)

7 weeks agoUpdate fontification for attribute values in heex-ts-mode
Wilhelm Kirschbaum [Mon, 30 Dec 2024 10:56:40 +0000 (12:56 +0200)]
Update fontification for attribute values in heex-ts-mode

Attribute values are strings as with html-ts-mode.

* lisp/progmodes/heex-ts-mode.el (heex-ts--font-lock-settings):
Change to attribute value to @font-lock-string-face.  (Bug#75192)

(cherry picked from commit 921f454f5087f16d9afc5574525baa92df91b8d0)

7 weeks agoAdd expression handling to heex-ts-mode
Wilhelm Kirschbaum [Mon, 30 Dec 2024 10:45:08 +0000 (12:45 +0200)]
Add expression handling to heex-ts-mode

On the latest update of the grammar expressions were added and won't be
seen as directives anymore.

* lisp/progmodes/heex-ts-mode.el
(heex-ts--sexp-regexp): Match on expression as well.
(heex-ts--indent-rules): Indent on expression end.  (Bug#75191)
* test/lisp/progmodes/heex-ts-mode-resources/indent.erts: Add expression
indent test.

(cherry picked from commit ae2589ea7a59ac3bde19b025ba4a7968c77208d7)

7 weeks ago; * etc/NEWS: Document change of 'make-cursor-line-fully-visible'.
Eli Zaretskii [Fri, 3 Jan 2025 08:27:46 +0000 (10:27 +0200)]
; * etc/NEWS: Document change of 'make-cursor-line-fully-visible'.

Bug#65214, bug#74430.

(cherry picked from commit 0cacf8063910ac2409641109ec7b3af24437fd2c)

7 weeks agoImprove temporary file handling in browse-url
Stefan Kangas [Fri, 3 Jan 2025 06:50:07 +0000 (07:50 +0100)]
Improve temporary file handling in browse-url

* lisp/net/browse-url.el (browse-url-delete-temp-file): Don't add
to kill-buffer-hook on top level.
(browse-url--temp-file-setup): New macro to set 'kill-buffer-hook'
buffer-locally to above function when creating a temporary file.  Use
stricter permissions to protect user privacy on multi-user systems.
(browse-url-of-file, browse-url-of-buffer): Use above new macro.

(browse-url-delete-temp-file): Simplify calling convention by removing
unused argument.

(cherry picked from commit 279a7d950ffff1b4f4a420848502a018b3998ee1)

7 weeks ago; * exec/configure.ac (config-mips.m4): Fix typo.
Po Lu [Fri, 3 Jan 2025 05:04:05 +0000 (13:04 +0800)]
; * exec/configure.ac (config-mips.m4): Fix typo.

(cherry picked from commit b683280f87bb039a7fcf41d03cf1766e980fa378)

7 weeks agoRemove gnudoit support from browse-url.el
Stefan Kangas [Fri, 3 Jan 2025 03:08:44 +0000 (04:08 +0100)]
Remove gnudoit support from browse-url.el

* lisp/net/browse-url.el (browse-url-gnudoit-program)
(browse-url-gnudoit-args, browse-url-w3-gnudoit): Remove support
for gnudoit, obsolete since Emacs 25.1.

(cherry picked from commit 597161fe1e4a62bd8a2c7b80b7219529ec5bc16d)

7 weeks ago* lisp/man.el (Man-mode): Improve docstring.
Stefan Kangas [Fri, 3 Jan 2025 02:36:38 +0000 (03:36 +0100)]
* lisp/man.el (Man-mode): Improve docstring.

(cherry picked from commit f47a29da5c4dd490a6de78da84f0fc272bb82993)

7 weeks ago; Skip commit 004a48b3d46af169cbc1c9a690de7ad71483862c
Eshel Yaron [Sat, 4 Jan 2025 20:55:45 +0000 (21:55 +0100)]
; Skip commit 004a48b3d46af169cbc1c9a690de7ad71483862c

7 weeks agoNew defgroup man-faces
Stefan Kangas [Thu, 2 Jan 2025 20:33:52 +0000 (21:33 +0100)]
New defgroup man-faces

* lisp/man.el: Delete redundant option :group specifiers.
(man-imenu-title): New defgroup.
(Man-overstrike, Man-underline, Man-reverse): Add faces to above
new defgroup.

(cherry picked from commit 58c95e9bab21b313661503f0499f14e1e0ad038d)

7 weeks agoRespect 'manual-program' variable
Stefan Kangas [Thu, 2 Jan 2025 19:19:24 +0000 (20:19 +0100)]
Respect 'manual-program' variable

* lisp/man.el (Man-man-k-flags): Respect 'manual-program'
variable.

(cherry picked from commit ca79916179ffb5ddc801e1ccb12c5ff72f6516d8)

7 weeks ago(describe-variable): Fix bug#73872
Stefan Monnier [Thu, 2 Jan 2025 19:58:10 +0000 (14:58 -0500)]
(describe-variable): Fix bug#73872

* lisp/help-fns.el (describe-variable): Put a `syntax-table` property
on the printed value for better navigation.  Remove `set-syntax-table`
since `lisp-data-mode` already did it.
(describe-variable): Remove `set-syntax-table`, not needed any more.

* lisp/help-mode.el (help-mode-syntax-table): `;` shouldn't start a comment.
(help-make-xrefs): Use `with-syntax-table`.

(cherry picked from commit 8f81c2b02ff98a69c7c5025881063ae85ee5b1d3)

7 weeks agoadmin/merge-gnulib now warns if module lists change
Paul Eggert [Thu, 2 Jan 2025 19:29:26 +0000 (11:29 -0800)]
admin/merge-gnulib now warns if module lists change

From suggestions by Eli Zaretski and Stefan Kangas in:
https://lists.gnu.org/r/emacs-devel/2025-01/msg00036.html
https://lists.gnu.org/r/emacs-devel/2025-01/msg00037.html
* admin/merge-gnulib: For style consistency,
prefer ‘[ EXPR ]’ to ‘test EXPR’ and prefer -e to -f.
Fix bug that forgot to clean lib directory if it’s ./lib.
Check for lib/gnulib.mk.in, which we used directly, not ‘configure’.
(LC_ALL): Set to C.
(autogen): New function, to make it clearer to user when
commands are operating in some other directory.
(get_module_list): New function.
(old_modules, new_modules): New vars.
If they differ, issue a warning.

(cherry picked from commit f65520cad46273967da2343feeb2201363c190e0)

7 weeks agoPrefer `%S` format over `%s` for non strings
Stefan Monnier [Thu, 2 Jan 2025 19:29:49 +0000 (14:29 -0500)]
Prefer `%S` format over `%s` for non strings

* lisp/reveal.el (reveal-open-new-overlays, reveal-close-old-overlays):
* lisp/gnus/nnimap.el (nnimap-header-parameters)
(nnimap-make-process-buffer):
* lisp/gnus/nntp.el (nntp-make-process-buffer):
* lisp/progmodes/flymake.el (flymake--disable-backend):
* lisp/simple.el (next-error-internal):
Prefer `%S` format over `%s` for non strings.

(cherry picked from commit fba3c7ff3f68f05d32541440e0a22ec667c0ad66)

7 weeks ago; Skip commit cd6e2a082854fb3e73ad98d1d2b945ae482ca4ac
Eshel Yaron [Sat, 4 Jan 2025 20:43:18 +0000 (21:43 +0100)]
; Skip commit cd6e2a082854fb3e73ad98d1d2b945ae482ca4ac

7 weeks ago; Skip commit 7fa975adbce3f2ce4ba40ea52110b992a52262b6
Eshel Yaron [Sat, 4 Jan 2025 20:43:09 +0000 (21:43 +0100)]
; Skip commit 7fa975adbce3f2ce4ba40ea52110b992a52262b6

7 weeks ago[project-vc]: Make project-buffers more consistent with project-files
Dmitry Gutov [Thu, 2 Jan 2025 16:58:40 +0000 (18:58 +0200)]
[project-vc]: Make project-buffers more consistent with project-files

* lisp/progmodes/project.el (project-buffers):
Catch 'file-missing' error to continue anyway if .git does not
exist (bug#74826).

(cherry picked from commit afe776051ec84c4bb37fc20b8dcfff3b1c81018e)

7 weeks ago(elisp-flymake-byte-compile): Improve UX with `debug-on-error`
Stefan Monnier [Thu, 2 Jan 2025 15:51:38 +0000 (10:51 -0500)]
(elisp-flymake-byte-compile): Improve UX with `debug-on-error`

* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile): Don't jump
into the debugger just because the content is not trusted.

(cherry picked from commit a720458fdd0283e3b7457632070504ff8962be86)

7 weeks agoFix NEWS entries for BibTeX mode.
Roland Winkler [Thu, 2 Jan 2025 15:11:04 +0000 (09:11 -0600)]
Fix NEWS entries for BibTeX mode.

(cherry picked from commit 2a5725b99a7b8034ac51b603c1bd9c8099e4adb0)

7 weeks ago; Fix the MS-DOS build
Po Lu [Thu, 2 Jan 2025 12:29:12 +0000 (20:29 +0800)]
; Fix the MS-DOS build

* msdos/sedlibmk.inp: Adapt to new GNulib module names.

(cherry picked from commit 1bc8412ecbf58a16efc4e9ddb0d46ef25ce7c14f)

7 weeks agoFix volatile Android build
Po Lu [Thu, 2 Jan 2025 12:26:43 +0000 (20:26 +0800)]
Fix volatile Android build

* exec/Makefile.in (config-mips.m4): Call config.status in
builddir.

(cherry picked from commit be9577d4a1e0308a066f50140662a1f04b7a6c16)

7 weeks agoAdjust nt/gnulib-cfg.mk to recent Gnulib import
Eli Zaretskii [Thu, 2 Jan 2025 07:44:44 +0000 (09:44 +0200)]
Adjust nt/gnulib-cfg.mk to recent Gnulib import

* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_dirent-h)
(OMIT_GNULIB_MODULE_inttypes-h-incomplete)
(OMIT_GNULIB_MODULE_stdio-h, OMIT_GNULIB_MODULE_stdlib-h)
(OMIT_GNULIB_MODULE_sys_select-h, OMIT_GNULIB_MODULE_sys_stat-h)
(OMIT_GNULIB_MODULE_sys_time-h, OMIT_GNULIB_MODULE_sys_types-h)
(OMIT_GNULIB_MODULE_unistd-h): Rename to follow Gnulib renaming
the modules from "FOO" to "FOO-h".

(cherry picked from commit d0b9d35fbf733adf747df7eb55d4e9f35b53bdbe)

7 weeks ago; Fix recent changes in bibtex.el documentation
Eli Zaretskii [Thu, 2 Jan 2025 07:44:09 +0000 (09:44 +0200)]
; Fix recent changes in bibtex.el documentation

* lisp/textmodes/bibtex.el (bibtex-BibTeX-entry-alist)
(bibtex-BibTeX-field-alist): Doc fixes.

* etc/NEWS: Fix format of a new bibtex entry.

(cherry picked from commit b082a8d9510a0fbbc0b92538e87252e6786b9e61)

7 weeks agoProvide more flexibility for definition of BibTeX entries.
Roland Winkler [Thu, 2 Jan 2025 05:09:58 +0000 (23:09 -0600)]
Provide more flexibility for definition of BibTeX entries.

* lisp/textmodes/bibtex.el (bibtex-aux-opt-alist): Rename from
bibtex-user-optional-fields.
(bibtex-BibTeX-entry-alist, bibtex-biblatex-entry-alist): Permit
aliases that inherit their definition from another entry.
(bibtex-BibTeX-aux-entry-alist, bibtex-biblatex-aux-entry-alist)
(bibtex-BibTeX-aux-opt-alist, bibtex-biblatex-aux-opt-alist): New
user variables.
(bibtex-entry-alist): Honor these new variables.
(bibtex-field-alist): New function.
(bibtex-include-OPTkey): Default changed to nil, declared
obsolete.  Use bibtex-aux-opt-alist instead.
(bibtex-set-dialect): Use cl-flet and bibtex-field-alist.
(bibtex-dialect-select-map): New variable.
(bibtex-init-dialect): New function.
(bibtex-field-list): Simplify.
(bibtex-print-help-message): Bug fix.

(cherry picked from commit b26418694e8a573cd500d71029c0e8f53598ea3c)

7 weeks ago* lisp/progmodes/grep.el (grep-mode-map): Improve docstring.
Stefan Kangas [Thu, 2 Jan 2025 01:48:36 +0000 (02:48 +0100)]
* lisp/progmodes/grep.el (grep-mode-map): Improve docstring.

(cherry picked from commit fec6078f62c717edfe6ad5fe87f531ccbbd8e08f)

7 weeks agoPrefer defvar-keymap in grep.el
Stefan Kangas [Thu, 2 Jan 2025 01:46:39 +0000 (02:46 +0100)]
Prefer defvar-keymap in grep.el

* lisp/progmodes/grep.el (grep-mode-map, grep-edit-mode-map):
Prefer defvar-keymap.

(cherry picked from commit 885f6993b72a7eccb012a1b5be16210351d02d53)

7 weeks ago; Update missed copyright year
Stefan Kangas [Thu, 2 Jan 2025 01:41:06 +0000 (02:41 +0100)]
; Update missed copyright year

(cherry picked from commit 21c7c594e8ef04da11ba796a18e7c63da359a7ad)

7 weeks agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Wed, 1 Jan 2025 23:18:19 +0000 (15:18 -0800)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 3adf3f546e1ccd9c178dec2710f8e6e3e529373a)

7 weeks agoAdjust to Gnulib’s recent module renaming
Paul Eggert [Wed, 1 Jan 2025 23:17:45 +0000 (15:17 -0800)]
Adjust to Gnulib’s recent module renaming

* admin/merge-gnulib (GNULIB_MODULES, AVOIDED_MODULES):
Change to match Gnulib’s current module names.

(cherry picked from commit bdb13a0e5c5bab0300b1dc2e18956b15f8f59c13)

7 weeks ago; Skip commit 78bc5949db489b143f7424540d6cc56fc529c9ea
Eshel Yaron [Sat, 4 Jan 2025 20:40:33 +0000 (21:40 +0100)]
; Skip commit 78bc5949db489b143f7424540d6cc56fc529c9ea

7 weeks agoFix copyright years by hand
Paul Eggert [Wed, 1 Jan 2025 07:41:51 +0000 (07:41 +0000)]
Fix copyright years by hand

These are dates that admin/update-copyright did not update.

(cherry picked from commit b36b1be491e0b19062fa38ee197aa3daeba96415)

7 weeks agoUpdate copyright year to 2025
Paul Eggert [Wed, 1 Jan 2025 07:39:17 +0000 (07:39 +0000)]
Update copyright year to 2025

Run "TZ=UTC0 admin/update-copyright".

(cherry picked from commit 4da38c632161867e914b3a13dc760f8019255f94)

7 weeks agoSync build-aux/update-copyright from Gnulib
Paul Eggert [Wed, 1 Jan 2025 07:34:51 +0000 (07:34 +0000)]
Sync build-aux/update-copyright from Gnulib

* build-aux/update-copyright: Copy from Gnulib.
This should simplify this year's updating.

(cherry picked from commit 5d70928f2afea5ee4e1aa117aa9cfded56193b56)

7 weeks agoCC Mode: Fix various minor indentation bugs
Alan Mackenzie [Tue, 31 Dec 2024 18:39:57 +0000 (18:39 +0000)]
CC Mode: Fix various minor indentation bugs

As part of this, introduce a second anchor point to the
syntactic symbols brace-list-intro and enum-intro, the position
of the opening brace.

* lisp/progmodes/cc-align.el
(c-lineup-item-after-paren-at-boi): New function.

* /lisp/progmodes/cc-engine.el
(c-foreign-truncate-lit-pos-cache)
(c-foreign-init-lit-pos-cache): Use
c-truncate-lit-pos/state-cache in place of an older function.
(c-no-bracelist-cache): Update its definition to exclude
conses.
(c-strip-conses): New function.
(c-inside-bracelist-p): Use c-strip-conses.
(c-add-stmt-syntax): In the "go out a block" loop, go out of a
brace at BOI when there's non-whitespace text after it.
Refactor an `if' form containing a cond form into a cond form.
Add the new second second anchor point into syntactic contexts
with brace-list-intro and enum-intro.  Anchor brace-list-close
and enum-close elements on the individual declarations in
struct, etc., variable declarations.
(c-guess-basic-syntax, CASE 20): Use the new constraint-cont
syntactic symbol.
(c-guess-basic-syntax, CASE 9B): Anchor brace-list-close and
enum-close elements on the individual declarations in struct,
etc., variable declarations.
(c-guess-basic-syntax, CASEs 9C, 9D): Add the new second anchor
point into brace-list-intro and enum-intro syntactic contexts.

* lisp/progmodes/cc-mode.el (c-locate-first-punctuation-prop):
New function.
(c-depropertize-CPP): Use c-locate-first-punctuation-prop.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Amend the
entries for constraint-cont, brace-list-intro, and enum-intro,
using c-lineup-item-after-paren-at-boi.

* doc/misc/cc-mode.texi (List Line-Up): Add a description of
c-lineup-item-after-paren-at-boi.

(cherry picked from commit 643e32340d1342cee8af3f1f604ea1c1ad12837a)

7 weeks ago; * src/doc.c (store_function_docstring): Fix typo.
Pip Cet [Mon, 30 Dec 2024 21:55:38 +0000 (21:55 +0000)]
; * src/doc.c (store_function_docstring): Fix typo.

(cherry picked from commit 2f1052d9b0de551dc3a463ed54e21c63517497ab)

7 weeks agoImprove treesit-forward-sexp-list, treesit-down-list, treesit-up-list
Juri Linkov [Mon, 30 Dec 2024 18:07:40 +0000 (20:07 +0200)]
Improve treesit-forward-sexp-list, treesit-down-list, treesit-up-list

* lisp/treesit.el (treesit-forward-sexp-list): Rewrite to support
the value of ARG more than 1.  In this case every step moves forward
either over the next treesit-based list or over the syntax-based symbol.
(treesit-down-list, treesit-up-list): Rewrite to support the fallback
to the syntax-based navigation while inside the treesit-based list.
Also use a loop for ARG more than 1 (bug#73404).

(cherry picked from commit 687ff86e802c9883f292f58a890178d08311a821)

7 weeks ago* lisp/treesit.el (treesit-show-paren-data--categorize): Fix it.
Juri Linkov [Mon, 30 Dec 2024 17:54:39 +0000 (19:54 +0200)]
* lisp/treesit.el (treesit-show-paren-data--categorize): Fix it.

Copy the implementation of treesit-parent-until here, and call
its treesit-node-match-p with the argument IGNORE-MISSING set to t
that causes it to fail silently instead of raising an error when
the predicate 'sexp-list' is not defined in an embedded language.
(treesit-major-mode-setup): Set show-paren-data-function to
treesit-show-paren-data only when 'sexp-list' thing is defined
that is used by treesit-show-paren-data--categorize (bug#75198).

(cherry picked from commit 4068948a74586056cf03a22cae2448d7b4e4a7bd)

7 weeks ago; * doc/lispref/modes.texi (Customizing Keywords): Fix typo (bug#75193).
Kohei Tsuruta [Sun, 29 Dec 2024 22:47:10 +0000 (14:47 -0800)]
; * doc/lispref/modes.texi (Customizing Keywords): Fix typo (bug#75193).

(cherry picked from commit 7acfea19358da3a02e5884f5e7d56c87d7b16616)

7 weeks ago; Minor Tramp changes
Michael Albinus [Mon, 30 Dec 2024 11:42:00 +0000 (12:42 +0100)]
; Minor Tramp changes

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process):
Don't use connection property "remote-command", it's superfluous.

* lisp/net/tramp-archive.el (tramp-archive-local-file-name):
Add `tramp-archive-method' to `tramp-methods' temporarily.

(cherry picked from commit 7671d50b149edd9e19c29f5fa8ee71c01e2f583d)

7 weeks agoMake typescript-ts-mode work with latest grammar
Yuan Fu [Mon, 30 Dec 2024 08:21:55 +0000 (00:21 -0800)]
Make typescript-ts-mode work with latest grammar

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts-mode--font-lock-compatibility-bb1f97b): Return dummy
query when neither query works.  In latest grammar, neither will
work, because typescript grammar doesn't include jsx grammar
anymore.

(cherry picked from commit ec3f9434c7d615dc37ba444a2200f13c84984299)

7 weeks agoAdd verified grammar version comment for tree-sitter modes
Yuan Fu [Mon, 30 Dec 2024 08:21:46 +0000 (00:21 -0800)]
Add verified grammar version comment for tree-sitter modes

* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/elixir-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/heex-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/lua-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/html-ts-mode.el: Add comments.

(cherry picked from commit 732a1108b0b553028ada334172635f039012a7f7)

7 weeks agoGenerate compatibility report for multiple Emacs versions
Yuan Fu [Mon, 30 Dec 2024 08:14:37 +0000 (00:14 -0800)]
Generate compatibility report for multiple Emacs versions

* admin/tree-sitter/compat-template.html: Update template.
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--builtin-language-sources): Add sources.
(treesit-admin--builtin-modes): New variable.
(treesit-admin--verify-major-mode-queries): Don't need to pass
LANGS argument anymore.
(treesit-admin-verify-major-mode-queries): Move, and use
treesit-admin--builtin-modes.
(treesit-admin--mode-languages): Set some variables so it gets
all the languages.
(treesit-admin--find-latest-compatible-revision): Also return
commit timestamp.
(treesit-admin--generate-compatibility-report): New parameter
EMACS-EXECUTABLES.  Support generating report for multiple Emacs
versions.
* lisp/treesit.el (treesit--language-git-timestamp): New function.

(cherry picked from commit 0b1986ba5243b150bf6891f51827a4dae28447b0)

7 weeks agoAdd treesit-admin-generate-compatibility-report
Yuan Fu [Sun, 29 Dec 2024 08:31:37 +0000 (00:31 -0800)]
Add treesit-admin-generate-compatibility-report

This function can generate a HTML report on latest compatible
grammar versions for each major mode.

* admin/tree-sitter/compat-template.html: Update.
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--validate-mode-lang): Change so that emacs 30 can
also run it.
(treesit-admin--find-latest-compatible-revision): Support
running checks with a different Emacs executable.
(treesit-admin--generate-compatibility-report): New function.

(cherry picked from commit d9cfe1fe92ffda7e52dcb434e34bfdd1258f2688)

7 weeks ago; Move treesit-admin into tree-sitter directory
Yuan Fu [Sun, 29 Dec 2024 07:08:43 +0000 (23:08 -0800)]
; Move treesit-admin into tree-sitter directory

* admin/tree-sitter/compat-template.html: New file.
* admin/tree-sitter/treesit-admin.el: Move.

(cherry picked from commit 5ec170985f4a9b2facc5ac883d0312f9cd270034)

7 weeks agoAdd treesit-admin--last-compatible-grammar-for-modes
Yuan Fu [Sun, 29 Dec 2024 07:06:52 +0000 (23:06 -0800)]
Add treesit-admin--last-compatible-grammar-for-modes

This function computes the latest compatible grammar version for
each major mode.

* admin/treesit-admin.el (treesit-admin-file-name): Move.
(treesit-admin--compat-template-file-name): New variable.
(treesit-admin--mode-languages): New function.
(treesit-admin--find-latest-compatible-revision): Return a plist
instead.
(treesit-admin--last-compatible-grammar-for-modes): New function.

(cherry picked from commit c9624c21117f7bece4d5a8271888155de5d086a2)

7 weeks agoAdd treesit-admin--find-latest-compatible-revision
Yuan Fu [Sun, 29 Dec 2024 02:36:59 +0000 (18:36 -0800)]
Add treesit-admin--find-latest-compatible-revision

This function can find the last grammar revision that is
compatible with a major mode.

* admin/treesit-admin.el (treesit-admin-file-name): New
variable.
(treesit-admin--validate-mode-lang):
(treesit-admin--find-latest-compatible-revision): New functions.

(cherry picked from commit d5ad51f25fba84ac9fad7baf8781a761d1cead24)

7 weeks agoRefactor treesit-admin--verify-major-mode-queries
Yuan Fu [Sat, 28 Dec 2024 22:54:17 +0000 (14:54 -0800)]
Refactor treesit-admin--verify-major-mode-queries

Make treesit-admin--verify-major-mode-queries use
treesit--install-language-grammar-1, rathre than the interactive
command treesit-install-language-grammar.

* admin/treesit-admin.el:
(treesit-admin--verify-major-mode-queries): Add parameter
SOURCE-ALIST.  Use treesit--install-language-grammar-1.
(treesit-admin-verify-major-mode-queries): Pass
treesit-admin--builtin-language-sources to
treesit-admin--verify-major-mode-queries.

* lisp/treesit.el (treesit-install-language-grammar): Don't
return revision of the git repo.

(cherry picked from commit 9e1e9fdff44f047489d45ba4a73776cb0298574f)

7 weeks agoRefactor treesit--install-language-grammar-1
Yuan Fu [Sat, 28 Dec 2024 22:41:55 +0000 (14:41 -0800)]
Refactor treesit--install-language-grammar-1

Separate treesit--install-language-grammar-1 into two functions,
one clones the repository, the other builds and installs the
grammar.

* lisp/treesit.el (treesit--install-language-grammar-1):
Refactor out treesit--build-grammar.
(treesit--build-grammar): New function.
(treesit--language-git-revision): Now takes REPO-DIR as an
argument.

(cherry picked from commit e2f791715299d97f401a38c75fa11bb51fdb8292)

7 weeks agoSupport COMMIT in treesit-language-source-alist
Yuan Fu [Sat, 28 Dec 2024 21:57:50 +0000 (13:57 -0800)]
Support COMMIT in treesit-language-source-alist

* lisp/treesit.el (treesit-language-source-alist): Add COMMIT
field.
(treesit--install-language-grammar-1): Support COMMIT.

(cherry picked from commit a22730f4d788d6476d5f3c6717ba8a3d4046e819)

7 weeks ago* lisp/treesit.el (treesit-show-paren-data--categorize): Improve.
Juri Linkov [Mon, 30 Dec 2024 07:23:05 +0000 (09:23 +0200)]
* lisp/treesit.el (treesit-show-paren-data--categorize): Improve.

Instead of using only the immediate parent, try to search more levels
using 'treesit-parent-until' (bug#75122).

(cherry picked from commit dc653bf0636d481303f558e2034550648ee58947)

7 weeks ago; * etc/NEWS: Improve recently added entries for tree-sitter.
Eli Zaretskii [Sun, 29 Dec 2024 19:54:59 +0000 (21:54 +0200)]
; * etc/NEWS: Improve recently added entries for tree-sitter.

(cherry picked from commit ce74534ef8cc46fd9fbdc9363da5994b1ae1cf58)

7 weeks ago; * etc/NEWS: Improve last change.
Eli Zaretskii [Sun, 29 Dec 2024 19:44:58 +0000 (21:44 +0200)]
; * etc/NEWS: Improve last change.

(cherry picked from commit 2e8f875067bc7068f79cb3e249de9da68c54d210)

7 weeks ago; * etc/NEWS: Remove implementation details of 'treesit-show-paren-data'
Juri Linkov [Sun, 29 Dec 2024 19:15:07 +0000 (21:15 +0200)]
; * etc/NEWS: Remove implementation details of 'treesit-show-paren-data'

(cherry picked from commit d2c05c219ed1abbbda34f68489d21a0b2cd513e1)

7 weeks agoTreesit support for show-paren-mode (bug#75122)
Juri Linkov [Sun, 29 Dec 2024 18:08:11 +0000 (20:08 +0200)]
Treesit support for show-paren-mode (bug#75122)

* lisp/treesit.el (treesit-show-paren-data--categorize):
New internal function.
(treesit-show-paren-data): New function.
(treesit-major-mode-setup): Set 'show-paren-data-function' to
'treesit-show-paren-data'.

(cherry picked from commit 1addae07be1982a6cafc0e0b3955b59bd1fb481c)

7 weeks agoAdd new variable 'up-list-function' for 'treesit-up-list'
Juri Linkov [Sun, 29 Dec 2024 17:57:28 +0000 (19:57 +0200)]
Add new variable 'up-list-function' for 'treesit-up-list'

* lisp/emacs-lisp/lisp.el (up-list-function): New variable (bug#73404).
(up-list-default-function): New function.
(up-list): Split part to 'up-list-default-function'.

* lisp/treesit.el (treesit-up-list): New function.
(treesit-major-mode-setup): Set 'up-list-function' to
'treesit-up-list'.

(cherry picked from commit ec8dd27f008bca810209354a189d241479fe4d32)

7 weeks agoAdd new variable 'down-list-function' for 'treesit-down-list'
Juri Linkov [Sun, 29 Dec 2024 17:51:18 +0000 (19:51 +0200)]
Add new variable 'down-list-function' for 'treesit-down-list'

* lisp/emacs-lisp/lisp.el (down-list-default-function): New function.
(down-list-function): New variable (bug#73404).
(down-list): Move meat to 'down-list-default-function',
and call 'down-list-function' when non-nil.  Don't raise an error
in strings or comments when 'down-list-function' is non-nil.

* lisp/treesit.el (treesit--scan-error): New internal function.
(treesit-forward-sexp, treesit-forward-list): Use 'treesit--scan-error'.
(treesit-down-list): New function.
(treesit-major-mode-setup): Set 'down-list-function' to
'treesit-down-list'.

(cherry picked from commit 3c50edb2b500c6ac18696e99c3f8df597dea54d4)

7 weeks agoAdd new variable 'forward-list-function' for 'treesit-forward-list'
Juri Linkov [Sun, 29 Dec 2024 17:42:40 +0000 (19:42 +0200)]
Add new variable 'forward-list-function' for 'treesit-forward-list'

* lisp/emacs-lisp/lisp.el (forward-list-default-function): New function.
(forward-list-function): New variable (bug#73404).
(forward-list): Move meat to 'forward-list-default-function',
and call 'forward-list-function' when non-nil.

* lisp/treesit.el (treesit-forward-list): Rewrite to not rely on
'treesit-forward-sexp'.
(treesit-major-mode-setup): Set 'forward-list-function' to
'treesit-forward-list'.

(cherry picked from commit 3db984c72b8609c84f06a0fd62e59b4823ea0876)