]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 weeks agoRevert addition of electric-block-comment-mode & follow-up commits
Sean Whitton [Tue, 22 Apr 2025 12:42:45 +0000 (20:42 +0800)]
Revert addition of electric-block-comment-mode & follow-up commits

As presently under discussion in bug#77823, the intended new
functionality is not really about comments at all.
Remove it for now to allow us to redesign from a clean slate,
and to deal with the regression reported in bug#77823.

This reverts the following three changesets:

Author:     Elías Gabriel Pérez <eg642616@gmail.com>
AuthorDate: Mon Mar 17 12:56:52 2025 -0600

  New minor mode: `electric-block-comment-mode'

Author:     Elías Gabriel Pérez <eg642616@gmail.com>
AuthorDate: Mon Mar 31 17:58:16 2025 -0600

  Add block-comment-start and block-comment-end to supported modes

Author:     Elías Gabriel Pérez <eg642616@gmail.com>
AuthorDate: Sun Apr 13 12:26:08 2025 -0600

  Add block-comment variables to cc-mode

(cherry picked from commit 4808f785ccb0166a87983405c6317ab2a4d6dfde)

5 weeks agoRealloc less often in adjust_glyph_matrix (bug#77961)
Gerd Möllmann [Tue, 22 Apr 2025 09:35:12 +0000 (11:35 +0200)]
Realloc less often in adjust_glyph_matrix (bug#77961)

* src/dispnew.c (adjust_glyph_matrix): Only xnrealloc when the
glyph matrix got wider or taller.

(cherry picked from commit 871ec9615a949e967bf7d19466eb9c56ed80ff7e)

5 weeks agoFix tree-sitter ABI version incompatibility in rust-ts-mode
Juri Linkov [Tue, 22 Apr 2025 06:47:30 +0000 (09:47 +0300)]
Fix tree-sitter ABI version incompatibility in rust-ts-mode

* lisp/progmodes/rust-ts-mode.el (treesit-language-source-alist):
For ABI version 15 add the recommended version "v0.24.0".

(cherry picked from commit 6f30b9584f7feec395e4b6806ec2eda542639e98)

5 weeks agoMake `man' more portable
Michael Albinus [Tue, 22 Apr 2025 06:45:34 +0000 (08:45 +0200)]
Make `man' more portable

* lisp/man.el (Man-init-defvars): Use [:cntrl:].  Character ranges
with octal numbers aren't portable enough.  (Bug#77944)

(cherry picked from commit fc5e905dc90e21b1a381bde42e22c06f45c17e16)

5 weeks ago; Fix thinko in recent commit
Stefan Kangas [Tue, 22 Apr 2025 03:53:35 +0000 (05:53 +0200)]
; Fix thinko in recent commit

(cherry picked from commit 45e849bddc1c7777628d3f42557ddbd8a6ba96b7)

5 weeks agoFix Flymake breakage following recent changes
Eshel Yaron [Tue, 22 Apr 2025 17:56:09 +0000 (19:56 +0200)]
Fix Flymake breakage following recent changes

5 weeks ago; Skip commit 649bb9dcd9518a273f99fd56e40d921f6191cb69
Eshel Yaron [Tue, 22 Apr 2025 17:27:01 +0000 (19:27 +0200)]
; Skip commit 649bb9dcd9518a273f99fd56e40d921f6191cb69

5 weeks ago; Skip commit 23583bb3a140883edda4ca8958f0447da75e0eea
Eshel Yaron [Tue, 22 Apr 2025 17:26:56 +0000 (19:26 +0200)]
; Skip commit 23583bb3a140883edda4ca8958f0447da75e0eea

5 weeks agoRender lib/getloadavg.c patches more permanent
Po Lu [Mon, 21 Apr 2025 01:37:55 +0000 (09:37 +0800)]
Render lib/getloadavg.c patches more permanent

* admin/gnulib-patches/lib/getloadavg.c.diff: New file.

* admin/merge-gnulib (GNULIB_TOOL_FLAGS): Set --local-dir to
admin/gnulib-patches.

* lib/gnulib.mk.in: Update from Gnulib.

(cherry picked from commit a84a934a4481d35ab2200f8dedc9ed3af6a5571d)

5 weeks agoEglot: use richer diagnostic-making capability of Flymake 1.4.0
João Távora [Fri, 18 Apr 2025 18:45:54 +0000 (19:45 +0100)]
Eglot: use richer diagnostic-making capability of Flymake 1.4.0

* lisp/progmodes/eglot.el (Package-Requires): Require Flymake
1.4.0.
(eglot-handle-notification): Tweak.

(cherry picked from commit 7ac6b33560a0449eb4b69664790f97124bfc2933)

5 weeks ago; Skip commit 64f4fbde8ae84c10f9e86ad1293c67ff78e867f0
Eshel Yaron [Tue, 22 Apr 2025 17:24:33 +0000 (19:24 +0200)]
; Skip commit 64f4fbde8ae84c10f9e86ad1293c67ff78e867f0

5 weeks ago; Skip commit 3001d50d9ae6e41b3f1d8e576b13a85198f60da9
Eshel Yaron [Tue, 22 Apr 2025 17:23:59 +0000 (19:23 +0200)]
; Skip commit 3001d50d9ae6e41b3f1d8e576b13a85198f60da9

5 weeks ago; Skip commit 77cd3a406b500f4106dde4b925fe4fec30b4a2fb
Eshel Yaron [Tue, 22 Apr 2025 17:21:15 +0000 (19:21 +0200)]
; Skip commit 77cd3a406b500f4106dde4b925fe4fec30b4a2fb

5 weeks ago; Skip commit 53d732d775fb416f6a412c2a87f12beed682c96c
Eshel Yaron [Tue, 22 Apr 2025 17:20:49 +0000 (19:20 +0200)]
; Skip commit 53d732d775fb416f6a412c2a87f12beed682c96c

5 weeks agoFlymake: new flymake-diagnostic-format-alist (bug#77439, bug#77480)
João Távora [Fri, 18 Apr 2025 18:43:45 +0000 (19:43 +0100)]
Flymake: new flymake-diagnostic-format-alist (bug#77439, bug#77480)

* lisp/progmodes/flymake.el (flymake-diagnostic-text): Overhaul.
(flymake-diagnostic-format-alist): New defcustom.
(flymake--diagnostic-format): New util.
(flymake--eol-overlay-summary)
(flymake--highlight-line)
(flymake-eldoc-function): Use flymake--diagnostic-format.
(flymake--tabulated-diagnostic-origin): New helper.
(flymake--tabulated-entries-1): Use flymake--tabulated-diagnostic-origin.
(flymake--diagnostics-base-tabulated-list-format): "Backend" -> "Origin"

* doc/misc/flymake.texi (Customizable variable): Mention new variable.

(cherry picked from commit ed1311a62a4e02817e548b0873ab21114047c076)

5 weeks agoFlymake: more powerful flymake-make-diagnostic and rework manual
João Távora [Thu, 17 Apr 2025 21:00:39 +0000 (22:00 +0100)]
Flymake: more powerful flymake-make-diagnostic and rework manual

Flymake backends may now explicitly specify an origin and a code for a
diagnostic in addition to the textual description.  This change lays
groundwork for richer diagnostic listings and user options for
summarizing diagnostics, addressing bug#77439 and bug#77480.

* doc/misc/flymake.texi (Flymake API): Rename from "Extending
Flymake".  Rework.
(Inspecting diagnostics): New section.

* lisp/progmodes/flymake.el (flymake--diag): Add origin, code and
message.  Remove text.
(flymake-make-diagnostic): Support new origin, code and message.
(flymake-diagnostic-text): Rework.

(cherry picked from commit 0fe05a920adc457d6f4adca71979059b8e2d0253)

5 weeks ago* lisp/treesit.el (treesit-show-paren-data--categorize): Fix off-by-one error.
Juri Linkov [Sun, 20 Apr 2025 18:29:36 +0000 (21:29 +0300)]
* lisp/treesit.el (treesit-show-paren-data--categorize): Fix off-by-one error.

(bug#77906)

(cherry picked from commit b38fd553eb3291f140801ca158f6ab245496fa69)

5 weeks ago* lisp/treesit.el (treesit-cycle-sexp-type): Add optional arg 'interactive'.
Juri Linkov [Sun, 20 Apr 2025 17:46:31 +0000 (20:46 +0300)]
* lisp/treesit.el (treesit-cycle-sexp-type): Add optional arg 'interactive'.

Display the message only for interactive usage.

(cherry picked from commit d7b56fc2ee9d32f6fd9f3b6e8d3772fb714f0f32)

5 weeks ago; * test/infra/Dockerfile.emba: Add cmake/markdown/php/phpdoc/toml/yaml.
Juri Linkov [Sun, 20 Apr 2025 17:43:53 +0000 (20:43 +0300)]
; * test/infra/Dockerfile.emba: Add cmake/markdown/php/phpdoc/toml/yaml.

(cherry picked from commit 4151a44f605631d8d4028e1c2458a0a8c206a64d)

5 weeks agoFix indentation test failure for elixir-ts--indent-rules
Juri Linkov [Sun, 20 Apr 2025 17:39:41 +0000 (20:39 +0300)]
Fix indentation test failure for elixir-ts--indent-rules

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--indent-rules):
Add query for Elixir embedded in Heex (bug#76788).

* lisp/progmodes/heex-ts-mode.el (heex-ts-mode): Append
treesit-simple-indent-rules to elixir-ts--indent-rules.

(cherry picked from commit 25854625332b0f751e0cea3e4d598023cbfc2781)

5 weeks agoFix emerge.el for remote files
Michael Albinus [Sun, 20 Apr 2025 16:16:14 +0000 (18:16 +0200)]
Fix emerge.el for remote files

* lisp/vc/emerge.el (emerge-make-diff-list)
(emerge-make-diff3-list): Set proper `default-directory' in order
to support remote files.  (Bug#6850, Bug#74352)

* test/lisp/vc/emerge-tests.el: New file.

(cherry picked from commit 8c04396b198e81c1467314e44b720e3322ca8643)

5 weeks ago; Skip commit 2f2fbae88280a460d2750ee685351475145e9d55
Eshel Yaron [Mon, 21 Apr 2025 20:42:03 +0000 (22:42 +0200)]
; Skip commit 2f2fbae88280a460d2750ee685351475145e9d55

5 weeks ago; Pacify free variable warning in vc-git.el
Gerd Möllmann [Sun, 20 Apr 2025 13:06:13 +0000 (15:06 +0200)]
; Pacify free variable warning in vc-git.el

* lisp/vc/vc-git.el (log-edit-font-lock-keywords): Defvar.

(cherry picked from commit 6fb2a4691f4d53473c0a326d3a6c23df9008b6e8)

5 weeks agoTemporary fix for compilation on Android API levels <= 13
Po Lu [Sun, 20 Apr 2025 12:49:24 +0000 (20:49 +0800)]
Temporary fix for compilation on Android API levels <= 13

* lib/getloadavg.c (getloadavg): Don't use sysinfo on Android
API levels <= 13.  This will be resolved in Gnulib shortly, with
any luck.

(cherry picked from commit 57966a3350e17b449697638d6adb1ed1d63bf8d5)

5 weeks agoFix indentation of "{" on a new line of a function declaration
Vincenzo Pupillo [Sat, 19 Apr 2025 20:58:39 +0000 (22:58 +0200)]
Fix indentation of "{" on a new line of a function declaration

* lisp/progmodes/js.el (js--treesit-switch-body-helper): New
anchor helper function for the switch_body.
(js--treesit-member-chained-expression-helper): New anchor
helper function for chained calls in member_expression.
(js--treesit-arrow-function-helper): New anchor helper
function for arrow_function.
(js--treesit-indent-rules): Fix rule for the indentation of
"{" when of a new line of a function declaration.  (Bug#76704)
Fix the indentation of the parent of arrow_function, member_expression,
switch_body, ternary_expression and sequence_expression.

(cherry picked from commit 4428077c2bea73570cfe9f9d6b40809aeda7f5c9)

5 weeks agoOmit trailing white space in one line
Paul Eggert [Sun, 20 Apr 2025 05:50:28 +0000 (22:50 -0700)]
Omit trailing white space in one line

* oldXMenu/Recomp.c: Omit trailing spaces in C source code line.
This was the only such line found by this command:
grep '[  ]$' $(git ls-files | grep '\.[chmy]$')

(cherry picked from commit 372ce97180930b63fdd15d1d89fb1a519d4cf85f)

5 weeks agoUse -Wtrailing-whitespace when warning
Paul Eggert [Sun, 20 Apr 2025 02:29:05 +0000 (19:29 -0700)]
Use -Wtrailing-whitespace when warning

* configure.ac: When enabling GCC warnings, enable GCC 15’s new
-Wtrailing-whitespace option if available, as that’s the Emacs style.

(cherry picked from commit 589f596c96964ecf5e736a4b3b674ede4b193910)

5 weeks agoPacify GCC 15 -Wunterminated-string-initialization
Paul Eggert [Sun, 20 Apr 2025 02:22:37 +0000 (19:22 -0700)]
Pacify GCC 15 -Wunterminated-string-initialization

* src/fns.c (hexbuf_digest):
* src/json.c (json_out_string):
Add ATTRIBUTE_NONSTRING to character arrays that are not strings.

(cherry picked from commit e2fb12a40ca2b90dfedbfe916ed8a87345ca89f1)

5 weeks agoPacify GCC 15 -Wanalyzer-null-dereference
Paul Eggert [Sun, 20 Apr 2025 02:21:15 +0000 (19:21 -0700)]
Pacify GCC 15 -Wanalyzer-null-dereference

* src/emacs.c (find_emacs_executable): Add an eassume.
This pacifies -Wanalyzer-null-dereference with gcc (GCC) 15.0.1
20250329 (Red Hat 15.0.1-0).

(cherry picked from commit 67ae1790088616777b352acffc63aeeb7ee50cb6)

5 weeks agoAvoid name clashes with static GnuTLS
Paul Eggert [Sun, 20 Apr 2025 01:44:52 +0000 (18:44 -0700)]
Avoid name clashes with static GnuTLS

Work around a bug in GnuTLS 3.7.11 and earlier: when built
statically, its mistakenly exports symbols hash_lookup and
hash_string, which collide with Emacs symbols of the same name,
preventing temacs from linking statically.  Problem reported by
Greg A. Woods (Bug#77476).

Because GnuTLS never uses hash_lookup or hash_string this issue
ordinarily doesn’t seem to prevent temacs from linking to GnuTLS
on GNU/Linux, as it’s linked dynamically and the dynamic linker
never needs to resolve references to either symbol.  However, I
suppose a clash or bug could occur even with dynamic linking if
Emacs later loads a module that uses either symbol.

Although GnuTLS should be fixed, Emacs should link statically to
current and older GnuTLS versions in the meantime, and it should
avoid potential problems with dynamic linking.  Renaming the two
clashing names is an easy way to do this.  For consistency with
the new name for hash_lookup, also rename hash_lookup_with_hash
and hash_lookup_get_hash.

* src/fns.c (hash_find_with_hash): Rename from hash_lookup_with_hash.
(hash_find): Rename from hash_lookup.
(hash_find_get_hash): Rename from hash_lookup_get_hash.
(hash_char_array): Rename from hash_string.
All uses changed.

(cherry picked from commit c8eed90eb4d0583dc3463edfad176b9d3f98d11f)

5 weeks agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 19 Apr 2025 19:18:28 +0000 (12:18 -0700)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 71ee484cac3e0e5b68f006b4cca81c13ca6ce11e)

5 weeks agoDon’t use Gnulib’s locale-h module
Paul Eggert [Sat, 19 Apr 2025 19:15:51 +0000 (12:15 -0700)]
Don’t use Gnulib’s locale-h module

* admin/merge-gnulib (AVOIDED_MODULES):
Add locale-h, as Emacs should’t need this Gnulib module.
This change is needed for when we next run admin/merge-gnulib,
as some Gnulib dependencies changed recently.

(cherry picked from commit 30335bb73483fce9d4204f1e18618fe777d0f45e)

5 weeks agoPacify "statement not reached" in value_cmp
Paul Eggert [Sat, 19 Apr 2025 18:58:34 +0000 (11:58 -0700)]
Pacify "statement not reached" in value_cmp

Problem found by Oracle Developer Studio 12.6.
* src/fns.c (value_cmp): Omit unnecessary goto.

(cherry picked from commit 4fa10b5760c7ded3cc18d0da614a5f0cd38edfef)

5 weeks agoFix libsrc assumption in src/Makefile.in
Paul Eggert [Sat, 19 Apr 2025 16:58:10 +0000 (09:58 -0700)]
Fix libsrc assumption in src/Makefile.in

* src/Makefile.in (ETAGS): Don’t assume $(libsrc) = ../lib-src.

(cherry picked from commit 03a1df37990049c2ad9491b150a8983355a213f8)

5 weeks agovc-user-edit-command: Add trailing space to initial input
Sean Whitton [Sun, 20 Apr 2025 01:40:12 +0000 (09:40 +0800)]
vc-user-edit-command: Add trailing space to initial input

* lisp/vc/vc-dispatcher.el (vc-user-edit-command): Add trailing
space to initial input to ease adding additional flags.

(cherry picked from commit 45232485aef3e44e9106f605ecf155de8f707edb)

5 weeks agoFix seccomp-filter for newer Linux kernels
Werner Fink [Mon, 7 Apr 2025 11:51:07 +0000 (13:51 +0200)]
Fix seccomp-filter for newer Linux kernels

* lib-src/seccomp-filter.c (MAP_DROPPABLE): Define if undefined.
(main): Use MAP_DROPPABLE flag.  Allow `tcgetattr' call of glibc
on physical terminal devices.  (Bug#77232)

(cherry picked from commit 8abd2ee0526ba576aefefa51870443ef01a4b2dd)

5 weeks agoFix 'rfc6068-parse-mailto-url' with 'inhibit-eol-conversion'
Kazuhiro Ito [Sun, 13 Apr 2025 11:00:44 +0000 (20:00 +0900)]
Fix 'rfc6068-parse-mailto-url' with 'inhibit-eol-conversion'

* lisp/mail/rfc6068.el (rfc6068-parse-mailto-url): Fix EOL type to
CRLF and never inhibit EOL conversion in decoding.  (Bug#77776)

(cherry picked from commit 2cf545f47dc945b8ebff641af7e15798ddd419c2)

5 weeks ago; Skip commit 6b901a8e85987940738b21032b035ba4e8f7379b
Eshel Yaron [Mon, 21 Apr 2025 20:40:10 +0000 (22:40 +0200)]
; Skip commit 6b901a8e85987940738b21032b035ba4e8f7379b

5 weeks ago; Skip commit fe8e88a1df593ec1cb0b96cbeb9f0ca832686258
Eshel Yaron [Mon, 21 Apr 2025 20:39:30 +0000 (22:39 +0200)]
; Skip commit fe8e88a1df593ec1cb0b96cbeb9f0ca832686258

5 weeks agoTweak AppStream metadata to satisfy `appstream-util validate'
Peter Oliver [Wed, 2 Apr 2025 14:15:02 +0000 (15:15 +0100)]
Tweak AppStream metadata to satisfy `appstream-util validate'

* etc/emacs.metainfo.xml: `appstream-util validate' suggests that
screenshot height and width attributes should match the actual size of
the image, and that captions be no longer than 50 chars and do not end
in `.'.  Follow those rules.

(cherry picked from commit b3fb93e0e88bb06c1bfdfa6a0c35ec5e146d94e5)

5 weeks agoAdd AppStream metadata about supported and recommended hardware
Peter Oliver [Wed, 2 Apr 2025 14:06:05 +0000 (15:06 +0100)]
Add AppStream metadata about supported and recommended hardware

* etc/emacs.metainfo.xml: Note that Emacs is best with a keyboard, but
other forms of input are possible.  Also note that Emacs can access the
Internet.  A modestly sized display is sufficient.

(cherry picked from commit 4f3188a88c04602d151585dce3e93a5cff38a967)

5 weeks ago; Fix failing diff-mode tests
Stefan Kangas [Sat, 19 Apr 2025 08:35:59 +0000 (10:35 +0200)]
; Fix failing diff-mode tests

* test/lisp/vc/diff-mode-resources/git.patch: Delete file, moving
its contents to...
* test/lisp/vc/diff-mode-tests.el (diff-mode-tests--git-patch):
...this new variable.  Git merges kept deleting a trailing
whitespace in the patch signature, so let's do this instead.
(diff-mode-test-git-patch)
(diff-mode-test-git-patch/before-first-hunk)
(diff-mode-test-git-patch/signature): Use above new variable.

(cherry picked from commit 87d615e26cc565cd49be79d08116354341d1af93)

5 weeks ago; Delete superfluous comments explaining config.h
Stefan Kangas [Sat, 19 Apr 2025 06:51:09 +0000 (08:51 +0200)]
; Delete superfluous comments explaining config.h

* src/pgtkfns.c:
* src/pgtkim.c:
* src/pgtkmenu.c:
* src/pgtkselect.c:
* src/pgtkterm.c:
* src/termcap.c:
* src/tparam.c: Delete superfluous comments explaining config.h.

(cherry picked from commit fa4e686148de22cee0b1671fd6b3241212c110a6)

5 weeks agoxterm.c: Move GTK3-specific variables into narrower scopes
Stefan Kangas [Sat, 19 Apr 2025 06:48:17 +0000 (08:48 +0200)]
xterm.c: Move GTK3-specific variables into narrower scopes

Avoid declaring GTK3-specific variables in larger-than-necessary scopes,
especially under #ifdefs.  Instead, declare them where used.  This improves
readability and reduces #ifdef clutter without changing behavior.

* src/xterm.c: [HAVE_GTK3] (x_update_opaque_region):
(XTframe_up_to_date, x_new_focus_frame, handle_one_xevent)
(x_ignore_errors_for_next_request, x_stop_ignoring_errors): Clean up
variable declarations.

(cherry picked from commit 177accc53d7ed2afc5768ae117fc6a19749e8fb6)

5 weeks ago* lisp/progmodes/heex-ts-mode.el (heex-ts): Fix :group name.
Michael Albinus [Sat, 19 Apr 2025 07:41:58 +0000 (09:41 +0200)]
* lisp/progmodes/heex-ts-mode.el (heex-ts): Fix :group name.

(cherry picked from commit 2a45f0bceba4f39fdc354e46ad686040f474e0e4)

5 weeks ago; Improve the documentation of a recent commit
Eli Zaretskii [Sat, 19 Apr 2025 06:11:57 +0000 (09:11 +0300)]
; Improve the documentation of a recent commit

* etc/NEWS:
* doc/lispref/frames.texi (Deleting Frames): Improve documentation
of 'frame-deletable-p'.

(cherry picked from commit 37b2c2fcdd9344f33f843d3fd5f9129babdf172f)

5 weeks ago; Fix typos in last change.
Eli Zaretskii [Sat, 19 Apr 2025 05:59:06 +0000 (08:59 +0300)]
; Fix typos in last change.

(cherry picked from commit f200b3c91060afe559945e8128a021d5b3aa3ee1)

5 weeks agoRename 'treesit-auto-install' to 'treesit-auto-install-grammar'
Eli Zaretskii [Sat, 19 Apr 2025 05:56:21 +0000 (08:56 +0300)]
Rename 'treesit-auto-install' to 'treesit-auto-install-grammar'

* etc/NEWS:
* lisp/treesit.el (treesit-auto-install-grammar): Rename from
'treesit-auto-install'; all users changed.  Doc fix.
(treesit-ensure-installed): Doc fix.

(cherry picked from commit 5ec6613f13f414702d88eddbb3a510f3b8da4dd3)

5 weeks agoFix typescript-ts-mode indentation (bug#77803)
Konstantin Kharlamov [Tue, 15 Apr 2025 14:34:11 +0000 (17:34 +0300)]
Fix typescript-ts-mode indentation (bug#77803)

Don't align variable names to their declaratory expression.

Before this commit in code like:

    const a = 1,
          b = 2;

the b would get indented to `const'.  Similarly for `var' and
`let'. The expected behavior instead is getting indented to
`typescript-ts-mode-indent-offset'.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Indent identifiers declarations to
`typescript-ts-mode-indent-offset'.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
(Lexical and variable declarations): Update test accordingly.

(cherry picked from commit 9750333dde9d23510341632d1c9a950d9c67415c)

5 weeks ago; Skip commit ef8bfe90b7201f9f42484219267cec9d79d5b938
Eshel Yaron [Mon, 21 Apr 2025 20:38:17 +0000 (22:38 +0200)]
; Skip commit ef8bfe90b7201f9f42484219267cec9d79d5b938

5 weeks agoFix parens inside links in markdown-ts--treesit-settings.
Juri Linkov [Fri, 18 Apr 2025 17:15:40 +0000 (20:15 +0300)]
Fix parens inside links in markdown-ts--treesit-settings.

* lisp/textmodes/markdown-ts-mode.el (markdown-ts--treesit-settings):
Override paren delimiter inside inline link.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00655.html

(cherry picked from commit 80e74dc832bd8683133d61ac34cce3c71bb38e13)

5 weeks agoEmbed elixir in heex as well as elixir->heex->elixir (bug#76788).
Juri Linkov [Fri, 18 Apr 2025 16:52:19 +0000 (19:52 +0300)]
Embed elixir in heex as well as elixir->heex->elixir (bug#76788).

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--range-rules):
Rename to a shorter name from 'elixir-ts--treesit-range-rules'.
(elixir-ts--font-lock-feature-list, elixir-ts--thing-settings)
(elixir-ts--range-rules): New variables with default values
extracted from 'elixir-ts-mode'.
(elixir-ts-mode): Use 'elixir-ts--font-lock-feature-list',
'elixir-ts--thing-settings', 'elixir-ts--range-rules'
and 'heex-ts--range-rules'.
Use 'treesit-merge-font-lock-feature-list' to merge
'heex-ts--font-lock-feature-list'.

* lisp/progmodes/heex-ts-mode.el
(heex-ts--font-lock-feature-list, heex-ts--range-rules):
New variables.
(heex-ts-mode): Use 'heex-ts--font-lock-feature-list',
'heex-ts--range-rules'.  Merge 'elixir-ts--font-lock-settings',
'elixir-ts--font-lock-feature-list', 'elixir-ts--thing-settings'
for embedding elixir in heex.  Enable the 'sexp' navigation
by default with 'treesit-cycle-sexp-type'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode): Append
'treesit-range-rules' to possibly already existing list in
'treesit-range-settings'.

* lisp/treesit.el (treesit-language-at-point-default):
Optimize to use 'when-let*'.

(cherry picked from commit d56e37c83c721c5bcffcf434138b27482b7e3fa6)

5 weeks agoLock tree-sitter language grammars to verified versions.
Juri Linkov [Fri, 18 Apr 2025 16:22:50 +0000 (19:22 +0300)]
Lock tree-sitter language grammars to verified versions.

* admin/notes/tree-sitter/build-module/build.sh:
Update org for toml/yaml.

* admin/tree-sitter/treesit-admin.el
(treesit-admin--builtin-language-sources):
Add verified versions.

* lisp/progmodes/c-ts-mode.el:
Append language source to treesit-language-source-alist.
(c-ts-mode, c++-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/cmake-ts-mode.el:
Append language source to treesit-language-source-alist.
(cmake-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/csharp-mode.el:
Append language source to treesit-language-source-alist.
(csharp-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/dockerfile-ts-mode.el:
Append language source to treesit-language-source-alist.
(dockerfile-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/elixir-ts-mode.el:
Append language source to treesit-language-source-alist.
(elixir-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/go-ts-mode.el:
Append language source to treesit-language-source-alist.
(go-ts-mode, go-mod-ts-mode, go-work-ts-mode):
Use treesit-ensure-installed.

* lisp/progmodes/heex-ts-mode.el:
Append language source to treesit-language-source-alist.
(heex-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/java-ts-mode.el:
Append language source to treesit-language-source-alist.
(java-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/js.el:
Append language source to treesit-language-source-alist.
(js-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/json-ts-mode.el:
Append language source to treesit-language-source-alist.
(json-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/lua-ts-mode.el:
Append language source to treesit-language-source-alist.
(lua-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist):
Update versions from comments in ts-modes.
Append to treesit-language-source-alist.
(php-ts-mode-install-parsers):
Use treesit-language-source-alist directly.
(php-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/ruby-ts-mode.el:
Append language source to treesit-language-source-alist.
(ruby-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/rust-ts-mode.el:
Append language source to treesit-language-source-alist.
(rust-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/sh-script.el:
Append language source to treesit-language-source-alist.
(bash-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/typescript-ts-mode.el:
Append language source to treesit-language-source-alist.
(typescript-ts-mode, tsx-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/css-mode.el:
Append language source to treesit-language-source-alist.
(css-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/html-ts-mode.el:
Append language source to treesit-language-source-alist.
(html-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/markdown-ts-mode.el:
Append language source to treesit-language-source-alist.
(markdown-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/mhtml-ts-mode.el
(mhtml-ts-mode--language-source-alist):
Append to treesit-language-source-alist.
(mhtml-ts-mode-install-parsers):
Use treesit-language-source-alist directly.
(mhtml-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/toml-ts-mode.el:
Append language source to treesit-language-source-alist.
(toml-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/yaml-ts-mode.el:
Append language source to treesit-language-source-alist.
(yaml-ts-mode): Use treesit-ensure-installed.

* test/infra/Dockerfile.emba: Add verified versions
to treesit-language-source-alist.

(cherry picked from commit 3d3be6dd0eb320e73d59ad6958e7c6e2c1b6a434)

5 weeks ago* lisp/treesit.el (treesit-auto-install): New defcustom.
Juri Linkov [Fri, 18 Apr 2025 16:17:39 +0000 (19:17 +0300)]
* lisp/treesit.el (treesit-auto-install): New defcustom.

(treesit-ensure-installed): New function.

(cherry picked from commit c9b6be7d27299093d16d592f1ffe0a731136beb2)

5 weeks agoMatch mail headers case-insensitively when encoding
Robert Pluim [Thu, 17 Apr 2025 14:08:53 +0000 (16:08 +0200)]
Match mail headers case-insensitively when encoding

* lisp/mail/rfc2047.el (rfc2047-encode-message-header): Bind
'case-fold-search' to t when looking up the encoding method,
otherwise a header spelled "CC" is encoded using the wrong
method.  (Bug#77866)

(cherry picked from commit 7d886f214e165d84d3fdbe14b3766d9e88056529)

5 weeks ago(tab-bar-tests-quit-restore-window): Try and clarify the skip
Stefan Monnier [Fri, 18 Apr 2025 13:35:14 +0000 (09:35 -0400)]
(tab-bar-tests-quit-restore-window): Try and clarify the skip

* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Rewrite the `skip-unless` based on the code's history because
I found the current code quite confusing.

(cherry picked from commit f5e6f284e9f970cdbdfb25c8ae8308165f3ce5c5)

5 weeks ago; Improve doc string of 'insert-char'
Eli Zaretskii [Fri, 18 Apr 2025 11:10:19 +0000 (14:10 +0300)]
; Improve doc string of 'insert-char'

* src/editfns.c (Finsert_char): Doc fix.  Suggested by Lactose ‎
<lactose@allthingslinux.org> (bug#77889).

(cherry picked from commit 01d4eb3dd427feb3439378eab573d685daf47bb7)

5 weeks ago; Skip commit 9f0c43a3d1b38c93bf21bf25db0f5dd489338d7c
Eshel Yaron [Mon, 21 Apr 2025 20:33:46 +0000 (22:33 +0200)]
; Skip commit 9f0c43a3d1b38c93bf21bf25db0f5dd489338d7c

5 weeks ago; Skip commit 20b919cfb1b5861a91a57b5f0c27e6c6fc03aff5
Eshel Yaron [Mon, 21 Apr 2025 20:33:43 +0000 (22:33 +0200)]
; Skip commit 20b919cfb1b5861a91a57b5f0c27e6c6fc03aff5

5 weeks ago* admin/notes/emba: Fix docker build instruction.
Michael Albinus [Fri, 18 Apr 2025 07:31:54 +0000 (09:31 +0200)]
* admin/notes/emba: Fix docker build instruction.

(cherry picked from commit 93ad8407ed82c27835cf27b15ee2637a2ebba482)

5 weeks ago; * test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window): Comment.
Juri Linkov [Fri, 18 Apr 2025 06:42:31 +0000 (09:42 +0300)]
; * test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window): Comment.

(cherry picked from commit a731dd63fb259758fb52630f4f499357cbc727c0)

5 weeks ago* doc/lispref/text.texi (Margins): Grammar fix.
Sean Whitton [Fri, 18 Apr 2025 06:31:50 +0000 (14:31 +0800)]
* doc/lispref/text.texi (Margins): Grammar fix.

Author:
(cherry picked from commit b901290ae7f2e45a80a1d24a1b8d65f94e58b3ca)

5 weeks ago; Skip commit 275712a18c7e5ce38831721936fd9fb3ed3adb00
Eshel Yaron [Mon, 21 Apr 2025 20:33:25 +0000 (22:33 +0200)]
; Skip commit 275712a18c7e5ce38831721936fd9fb3ed3adb00

5 weeks agoBackport: Fix tree-sitter tests on Emba
Michael Albinus [Tue, 15 Apr 2025 12:17:25 +0000 (14:17 +0200)]
Backport: Fix tree-sitter tests on Emba

* test/infra/Dockerfile.emba: Use tree-sitter-rust v0.23.3 in
order to match ABI version of libtree-sitter0.

(cherry picked from commit 788c9cfb62c7fd50b171a9209dd7453bd03f14bf)
(cherry picked from commit 8792d3431b15d83c5ec7f7706d3989eb036c0b98)

5 weeks ago; Improve documentation of some functions in files-x.el
Eli Zaretskii [Tue, 15 Apr 2025 13:58:50 +0000 (16:58 +0300)]
; Improve documentation of some functions in files-x.el

* lisp/files-x.el (modify-file-local-variable)
(modify-file-local-variable-prop-line)
(add-file-local-variable-prop-line)
(delete-file-local-variable-prop-line, add-file-local-variable)
(delete-file-local-variable): Document the effect of INTERACTIVE
argument.

(cherry picked from commit 2b535a9c7719a13ab19884cca754024003875c88)

5 weeks agoFix deleting the first line of calc trail
Wojciech Siewierski [Mon, 14 Apr 2025 16:57:28 +0000 (18:57 +0200)]
Fix deleting the first line of calc trail

* lisp/calc/calc-trail.el (calc-trail-kill): Remove the check
preventing the removal of the first trail line, which is no
longer relevant since commit 8e1376a3912.  (Bug#77816)

(cherry picked from commit 45cf832ac75f8d6fb41a4856d1987062e81dcddb)

5 weeks ago; Skip commit 74e25c9413b9a9b824bb07b7b5ced9be18c45936
Eshel Yaron [Mon, 21 Apr 2025 20:32:18 +0000 (22:32 +0200)]
; Skip commit 74e25c9413b9a9b824bb07b7b5ced9be18c45936

5 weeks ago; Skip commit 17418125353ce998580ba8f0928ffd2c47af7df3
Eshel Yaron [Mon, 21 Apr 2025 20:31:51 +0000 (22:31 +0200)]
; Skip commit 17418125353ce998580ba8f0928ffd2c47af7df3

5 weeks ago; Allow a tab-bar test on MS-Windows
Eli Zaretskii [Fri, 18 Apr 2025 05:11:47 +0000 (08:11 +0300)]
; Allow a tab-bar test on MS-Windows

* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Allow this test on MS-Windows in interactive sessions.

(cherry picked from commit 58ff10138060df71fd3158159382c5dd93440a3e)

5 weeks agoAdd guard in treesit-language-at-point-default (bug#77870)
Yuan Fu [Thu, 17 Apr 2025 23:56:07 +0000 (16:56 -0700)]
Add guard in treesit-language-at-point-default (bug#77870)

* lisp/treesit.el (treesit-language-at-point-default): Return
nil if there's no parser in the buffer.
(treesit-parsers-at): Add docstring for parser order.

(cherry picked from commit f728aa72c047ff8485bce08a6effb1c7790bce9f)

5 weeks agoAdd missing OFFSET arg to treesit--update-ranges-local (bug#77848)
Yuan Fu [Thu, 17 Apr 2025 23:42:07 +0000 (16:42 -0700)]
Add missing OFFSET arg to treesit--update-ranges-local (bug#77848)

* lisp/treesit.el (treesit--update-ranges-local):
(treesit--update-range-1): Add missing OFFSET arg.

(cherry picked from commit 4f80a116f53c2d8dc58301630f6dc7de6e0e346e)

5 weeks agoMake sure prog-fill-reindent-defun work for strings too
Yuan Fu [Thu, 17 Apr 2025 23:17:12 +0000 (16:17 -0700)]
Make sure prog-fill-reindent-defun work for strings too

My previous commit foolishly excluded strings from the
condition, now add them back.

* lisp/progmodes/prog-mode.el (prog-fill-reindent-defun):
Include strings.

(cherry picked from commit b75c18f3c6c8d347d4f1a9cce746e673d91997a9)

5 weeks agopgtk: Make x-display-grayscale-p return Qt
Stefan Kangas [Thu, 17 Apr 2025 22:42:52 +0000 (00:42 +0200)]
pgtk: Make x-display-grayscale-p return Qt

We already unconditionally claim that `xw-display-color-p`, which,
according to the docstring of this function, implies that we handle
grayscale too.

* src/pgtkfns.c (Fx_display_grayscale_p): Return Qt unconditionally.

(cherry picked from commit 6702a448c1c2500abb4f393da29edc31acd5e058)

5 weeks ago* src/pgtkfns.c (Fx_gtk_launch_uri): Improve docstring.
Stefan Kangas [Thu, 17 Apr 2025 21:51:26 +0000 (23:51 +0200)]
* src/pgtkfns.c (Fx_gtk_launch_uri): Improve docstring.

(cherry picked from commit b05da1c3fc611417ace0af3860a93fb878f72f4d)

5 weeks agoDon't switch to another frame if window is not on the selected frame.
Juri Linkov [Thu, 17 Apr 2025 18:21:29 +0000 (21:21 +0300)]
Don't switch to another frame if window is not on the selected frame.

* lisp/window.el (window--quit-restore-select-window):
Add optional arg 'frame'.  Don't switch to another frame
if window is not on the selected frame (bug#71386).
(quit-restore-window): Provide the 'frame' arg
to 'window--quit-restore-select-window' calls.
Patch by martin rudalics <rudalics@gmx.at>.

* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
No need to reselect the frame after 'quit-window'.

(cherry picked from commit 9f4347e00c02c3aa436118425a0cda2bc7f69d51)

5 weeks agoAdapt tab-bar-tests-quit-restore-window for emba.
Juri Linkov [Thu, 17 Apr 2025 18:04:02 +0000 (21:04 +0300)]
Adapt tab-bar-tests-quit-restore-window for emba.

* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Skip unless system-type is 'gnu/linux' and "TERM" is non-nil
that is nil on emba.

(cherry picked from commit 054a181d2d0890b7c299c0279d0c16e25130ef7e)

5 weeks ago* lisp/treesit.el (treesit-parsers-at): Fix for 'with-host' arg.
Juri Linkov [Thu, 17 Apr 2025 17:21:16 +0000 (20:21 +0300)]
* lisp/treesit.el (treesit-parsers-at): Fix for 'with-host' arg.

Don't add the primary parser or the first of treesit-parser-list
when non-nil 'with-host' is provided since there is no host
for the primary parser (bug#76788).

(cherry picked from commit 2808bef2522481b3b3e6a7f2739ae8dbd02c13f5)

5 weeks agoDisable echo back instead of setting tty to raw in Inferior Python
kobarity [Thu, 20 Mar 2025 10:03:33 +0000 (19:03 +0900)]
Disable echo back instead of setting tty to raw in Inferior Python

* lisp/progmodes/python.el (python-shell-setup-code): Change the
Python setup code.  (Bug#76943)

(cherry picked from commit 4c5c20ddc2cdde570ccf54c4aa60644828ee213d)

5 weeks agoUpdate modus-themes to their 4.7.0 version
Protesilaos Stavrou [Thu, 17 Apr 2025 07:33:43 +0000 (10:33 +0300)]
Update modus-themes to their 4.7.0 version

* doc/misc/modus-themes.org: Update the manual to document how
  'modus-themes-list-colors' has changed. Make other minor changes.
* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-operandi-tritanopia-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el:
* etc/themes/modus-vivendi-tritanopia-theme.el: Make stylistic refinements.
* etc/themes/modus-themes.el: Make refinements to supported
  faces, add support for more faces, and the like.

Release notes: <https://protesilaos.com/codelog/2025-04-17-emacs-modus-themes-4-7-0/>.

(cherry picked from commit 1e4ce136036e1ff43fcc436114e66ce48f33ea01)

6 weeks ago(auth-source-search): Avoid obsolete EIEIO convention
Eshel Yaron [Thu, 17 Apr 2025 19:31:07 +0000 (21:31 +0200)]
(auth-source-search): Avoid obsolete EIEIO convention

6 weeks ago(get-scratch-buffer-create): Don't set 'trusted-content'
Eshel Yaron [Thu, 17 Apr 2025 08:04:00 +0000 (10:04 +0200)]
(get-scratch-buffer-create): Don't set 'trusted-content'

6 weeks agoUse the first parser from 'treesit-parser-list' to fix tests.
Juri Linkov [Thu, 17 Apr 2025 06:49:04 +0000 (09:49 +0300)]
Use the first parser from 'treesit-parser-list' to fix tests.

* lisp/treesit.el (treesit-parsers-at): Add treesit-primary-parser
only when it's non-nil.  When the result list is still empty,
add the first parser from 'treesit-parser-list'.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00627.html

* test/src/treesit-tests.el (treesit-node-supplemental)
(treesit-node-at, treesit-node-check)
(treesit-search-subtree-forward-1)
(treesit-search-subtree-backward-1): Wrap test body in 'with-temp-buffer'.

(cherry picked from commit ee46b6c4e67aa52b4ef683c5c16f64638e369cd3)

6 weeks agoDon't override 'revert-buffer-function' globally in 'eww-buffers-mode'
Eli Zaretskii [Thu, 17 Apr 2025 06:25:09 +0000 (09:25 +0300)]
Don't override 'revert-buffer-function' globally in 'eww-buffers-mode'

* lisp/net/eww.el (eww-buffers-mode): Set 'revert-buffer-function'
buffer-locally.  (Bug#77854)

(cherry picked from commit 2925ff6c5383408fa6ad780066469970aa833d38)

6 weeks agoDelete duplicate docstrings in PGTK build
Stefan Kangas [Thu, 17 Apr 2025 05:56:55 +0000 (07:56 +0200)]
Delete duplicate docstrings in PGTK build

* src/pgtkfns.c (Fx_export_frames, Fx_create_frame)
(Fx_server_max_request_size, Fx_display_screens, Fx_display_mm_height)
(Fx_display_mm_width, Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_save_under, Fx_open_connection, Fx_close_connection)
(Fx_display_list, Fxw_color_defined_p, Fxw_color_values)
(Fxw_display_color_p, Fx_display_grayscale_p, Fx_display_pixel_width)
(Fx_display_pixel_height, Fx_display_planes, Fx_display_color_cells)
(Fx_show_tip, Fx_hide_tip, Fx_file_dialog, Fx_select_font): Replace
duplicate docstrings with "SKIP" marker.  See the comment in doc.c.
* src/xfns.c (Fx_server_max_request_size, Fx_display_screens)
(Fx_display_backing_store, Fx_display_visual_class, Fx_file_dialog):
Update docstrings with details about the PGTK build.

(cherry picked from commit 4fcba8456e897cc77d1825e696aacb446ce45405)

6 weeks agoRemove treesit.el dependency from prog-mode.el
Yuan Fu [Thu, 17 Apr 2025 05:50:56 +0000 (22:50 -0700)]
Remove treesit.el dependency from prog-mode.el

prog-mode.el doens't need treesit.el dependency.  And it
shouldn't depend on it.  In principle, treesit.el should
integrate into various parts of Emacs through standard hooks and
variables.

* lisp/progmodes/prog-mode.el:
(prog-fill-reindent-defun): Remove treesit.el functions.  Use
generic functions to check whether the current line has
comments, and make the test more comprehensive.

(cherry picked from commit 79814379d646e507c1af8ab26e300ac43d036664)

6 weeks agoFix c-ts-common--fill-paragraph for non-rust modes (bug#77727)
Yuan Fu [Wed, 16 Apr 2025 00:28:32 +0000 (17:28 -0700)]
Fix c-ts-common--fill-paragraph for non-rust modes (bug#77727)

* lisp/progmodes/c-ts-common.el:
(c-ts-common--comment-regexp): Add // and /* to regexp for Rust.
(c-ts-common--line-comment-p): Extract out into new function,
add a check that the parent node is a comment node.
(c-ts-common--fill-paragraph): Extract some code out.

(cherry picked from commit 9d43715baa5da4a644e180c7fb4550be0eb69be4)

6 weeks ago(eieio-backward-compatibility): Set to `warn` (bug#77612)
Stefan Monnier [Thu, 17 Apr 2025 04:03:43 +0000 (00:03 -0400)]
(eieio-backward-compatibility): Set to `warn` (bug#77612)

* lisp/emacs-lisp/eieio-base.el (make-instance) <eieio-named>:
Really skip backward compatibility when `eieio-backward-compatibility`
is nil and emit message if it's `warn`.
(eieio-persistent-make-instance): Warn when an obsolete name is used.

* lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility):
Change default to `warn`.
(eieio-defclass-internal): Warn when the *-list-p function is called
(eieio--slot-name-index): Warn when a initarg is used to access a slot.

* lisp/emacs-lisp/eieio.el (defclass): Warn when a class-slot is
accessed via the obsolete method.
(make-instance, clone) <eieio-default-superclass>: Really skip backward
compatibility when `eieio-backward-compatibility` is nil and emit
message if it's `warn`.

(cherry picked from commit ae1d01328f260f1a9891280c96139494629a83e8)

6 weeks agoPrevent unrelocated symbols with position from being dumped
Po Lu [Thu, 17 Apr 2025 01:33:06 +0000 (09:33 +0800)]
Prevent unrelocated symbols with position from being dumped

* src/pdumper.c (dump_builtin_symbol_p): Test BARE_SYMBOL_P
\(object) rather than SYMBOLP to avoid depending on the value of
symbols_with_pos_enabled or depositing non-relocated references
to vectorlikes in the dump file.  Clarify commentary.

(cherry picked from commit 0fc2fc9a4de3855cf14b6e1f548795831099981b)

6 weeks agoDon't round-trip auto-reconnect probe in ERC
F. Jason Park [Wed, 9 Apr 2025 06:17:21 +0000 (23:17 -0700)]
Don't round-trip auto-reconnect probe in ERC

* lisp/erc/erc-backend.el (erc-server--reconnect-opened)
(erc--server-reconnect-opened): Rename former to latter.  Restore
original buffer-local value of session connector for Emacs 29 and below.
(erc--server-reconnect-timeout-check)
(erc--server-reconnect-timeout-scale-function): Change from buffer-local
to normal variables, which they should have been originally.
(erc--recon-probe-reschedule): Ensure `erc-server-reconnect-timeout' is
always non-nil to avoid seeing format specifier in admin message.  Use
current buffer when `proc' argument is nil.  Perform cleanup when `proc'
and `erc-server-process' differ.
(erc-server-delayed-check-reconnect-reuse-process-p): New variable.
(erc--recon-probe-sentinel): Run `erc--server-reconnect-opened'
immediately because sending a speculative PING doesn't work on all
servers and proxies, most crucially on ZNC, which replies with an error
only after an extended timeout.
(erc--recon-probe-filter): Remove unused function.
(erc--recon-probe-check) Rework to not use fixed periodic timer, change
second parameter to a Lisp time object.
(erc-server-delayed-check-reconnect): Use realistic name when reusing
process so that the session's process isn't "*erc-connectivity-check*".
Set filter to `ignore'.  Always run `erc--recon-probe-sentinel' when
status is `open' or something other than `connect', but don't bother
spawning a `erc--recon-probe-check' task as well because any problems
creating the process should already be known.  Handle quits during
connect functions that perform blocking I/O, such as
`socks-open-network-stream'.
(erc-schedule-reconnect): Don't bother setting filter to nil.
* test/lisp/erc/erc-scenarios-base-auto-recon.el
(erc-scenarios-base-auto-recon-unavailable)
(erc-scenarios-base-auto-recon-check/no-reuse): Rename former to latter.
(erc-scenarios-base-auto-recon-no-proto)
(erc-scenarios-base-auto-recon-check/reuse): Rename former to latter and
rewrite not to expect a PING.
* test/lisp/erc/resources/erc-d/erc-d.el (erc-d--forget-process): New
function.
(erc-d--process-sentinel): Stop serving when all dialogs have been
exhausted.  (Bug#62044)

(cherry picked from commit c0cb59578b5aeb75b4856dda518d80cd015caa7d)

6 weeks ago; Skip commit 8f18b398a57f2f1bbef28260740e139b0494927b
Eshel Yaron [Thu, 17 Apr 2025 07:18:12 +0000 (09:18 +0200)]
; Skip commit 8f18b398a57f2f1bbef28260740e139b0494927b

6 weeks agoEglot: be aware of LSP version of contextual diagnostics
João Távora [Wed, 16 Apr 2025 23:31:07 +0000 (00:31 +0100)]
Eglot: be aware of LSP version of contextual diagnostics

In certain situations, Eglot has to report to the server parts
of the diagnostics that it itself sent us.  The server may use
this as context to compute code actions, for example.  Eglot
selects diagnostics by asking Flymake, looking for the ones that
contain Eglot-specific cookies.

But when doing so, it is important to also be aware of the LSP
document version these each of these diagnostics pertain to,
since if a diagonstic in the buffer pertains to an older version
of the LSP document (because Flymake fired or the server hasn't
pushed a new set), that diagnostics 'eglot-lsp-data' cookie is
invalid and possibly harmful.

An example is when a diagnostic extends all the way to the end
of the buffer.  If we attempt to fix by shortening the buffer,
an Eldoc-started code actions request may be sent to the server
considering the soon-to-be-deleted Flymake diagnostic as
context.  But that diagnostic's 'eglot-lsp-data' cookie is no
longer valid and when processing that context we try to go past
point-max and burp an annoying error.

Best to check the version of the diagnostic (if we have it) and
ignore the ones that don't match the document version.

* lisp/progmodes/eglot.el (eglot--versioned-identifier): Move up.
(eglot--flymake-diagnostics, eglot--diag-to-lsp-diag): New helpers.
(eglot-handle-notification): Record LSP doc version in diagnostics.
(eglot--code-action-bounds)
(eglot--code-action-params): Use eglot--flymake-diagnostics.

(cherry picked from commit c5b97b7b321c873dbe8a36d27781435ba10a2278)

6 weeks ago; Skip commit 2330e7b6d676761b60c3247f53224815512a9a58
Eshel Yaron [Thu, 17 Apr 2025 07:14:00 +0000 (09:14 +0200)]
; Skip commit 2330e7b6d676761b60c3247f53224815512a9a58

6 weeks agosavehist: Take care not to set nil
Eshel Yaron [Thu, 17 Apr 2025 07:13:37 +0000 (09:13 +0200)]
savehist: Take care not to set nil

6 weeks ago* lisp/textmodes/markdown-ts-mode.el: More ts-modes for code blocks.
Juri Linkov [Wed, 16 Apr 2025 18:45:40 +0000 (21:45 +0300)]
* lisp/textmodes/markdown-ts-mode.el: More ts-modes for code blocks.

(markdown-ts--code-block-language-map): Add more aliases.
(markdown-ts-code-block-source-mode-map): Add more mappings
for existing core ts-modes.
(markdown-ts--convert-code-block-language):
Check 'lang-string' with 'symbolp'.  Check 'mode' with 'fboundp'.

(cherry picked from commit f68482cbc047925d22acf687b814cb94dd7b5bf0)

6 weeks agoChange the default navigation sexp-type in 'elixir-ts-mode'.
Juri Linkov [Wed, 16 Apr 2025 17:32:54 +0000 (20:32 +0300)]
Change the default navigation sexp-type in 'elixir-ts-mode'.

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode):
Call 'treesit-cycle-sexp-type' at the end to enable navigation across
nodes defined by the tree-sitter thing 'sexp' by default (bug#76788).

(cherry picked from commit a6d746400cdf237b58c60920f4cb9a38db12951d)

6 weeks agoNew hook 'outline-after-change-functions' (bug#77256).
Juri Linkov [Wed, 16 Apr 2025 17:11:34 +0000 (20:11 +0300)]
New hook 'outline-after-change-functions' (bug#77256).

* lisp/outline.el (outline-after-change-functions): New variable.
(outline--fix-buttons-after-change):
Run hook 'outline-after-change-functions'.

* lisp/treesit.el (treesit--after-change): Improve docstring.
(treesit-major-mode-setup): Simplify to just add
'treesit--after-change' to 'outline-after-change-functions' hook.

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode): Add explicit
'treesit-outline-predicate' that is like
'treesit-simple-imenu-settings', but also adds "trait_item".

(cherry picked from commit 7574eb82c5cd150a0706a81e9f8555962a1e2167)

6 weeks agoAdd 'treesit-language-at-point-default' (bug#77256).
Juri Linkov [Wed, 16 Apr 2025 17:00:56 +0000 (20:00 +0300)]
Add 'treesit-language-at-point-default' (bug#77256).

* lisp/treesit.el (treesit-language-at-point-function):
Change the default value from nil to 'treesit-language-at-point-default'.
(treesit-language-at): Funcall 'treesit-language-at-point-function'
unconditionally.
(treesit-language-at-point-default): New function with body from
'treesit-language-at'.
(treesit-node-at): Simplify by replacing duplicate code
with the call to 'treesit-parsers-at'.

(cherry picked from commit 77bf9d33ee42d90e86d9cc5d3a67356b19ca2f6b)

6 weeks ago(Freplace_region_contents): Treat point as insert-before marker
Stefan Monnier [Wed, 16 Apr 2025 14:15:16 +0000 (10:15 -0400)]
(Freplace_region_contents): Treat point as insert-before marker

Experience suggests that it's more often useful to keep point
at the end of the replacement than it is to keep point at the
beginning of the replacement.
This also aligns the behavior of `replace-region-contents` with
that of `insert`.

* src/insdel.c (replace_range): Treat PT like an insert-before marker.
* src/editfns.c (Freplace_region_contents): Adjust docstring accordingly.

(cherry picked from commit 4532fbefece210061d01ab9523f3054aadb1c45a)

6 weeks ago; Improve documentation of 'help-fns-edit-variable'
Eli Zaretskii [Wed, 16 Apr 2025 08:13:41 +0000 (11:13 +0300)]
; Improve documentation of 'help-fns-edit-variable'

* lisp/help-fns.el (help-fns-edit-variable)
(help-enable-variable-value-editing): Doc fixes.

(cherry picked from commit bf737dc42a70fd8665b7c5ad506249a6119ec4c4)

6 weeks ago; Fix documentation of a recent commit
Eli Zaretskii [Wed, 16 Apr 2025 07:17:30 +0000 (10:17 +0300)]
; Fix documentation of a recent commit

* lisp/textmodes/markdown-ts-mode.el (markdown-ts-delimiter)
(markdown-ts-heading-1, markdown-ts-setext-heading)
(markdown-ts-heading-2, markdown-ts-heading-3)
(markdown-ts-heading-4, markdown-ts-heading-5)
(markdown-ts-heading-6, markdown-ts-list-marker)
(markdown-ts-block-quote, markdown-ts-language-keyword)
(markdown-ts--configured-languages): Doc fixes.

(cherry picked from commit 179c6931c57700d842179eb193369de1587287ee)