Commit graph

182272 commits

Author SHA1 Message Date
Aaron Jensen
2727a6f4e8 ; Document problems caused by validation of *.eln files on macOS
* etc/PROBLEMS: Document slowdown on macOS caused by the OS
validation of *.eln files.
2026-05-31 12:34:51 +03:00
Eli Zaretskii
f1dd84bec9 ; * lisp/play/doctor.el (doctor-death): Fix Samaritans URL (bug#81155). 2026-05-31 12:29:50 +03:00
Kyle Meyer
0bfbe06090 Update to Org 9.8.5 2026-05-31 01:42:27 -04:00
João Távora
aac5e0457a Eglot: replace eglot-prefer-plaintext with eglot-documentation-renderer
The old boolean 'eglot-prefer-plaintext' is replaced by the more
expressive 'eglot-documentation-renderer', which can hold a major-mode
symbol, t (plain text), or nil (auto-detect each time).  By selecting a
renderer once at startup the repeated per-request lookups are avoided,
which helps with the slowness reported in bug#81150.

* lisp/progmodes/eglot.el (eglot-prefer-plaintext): Declare obsolete
alias to 'eglot-documentation-renderer'.
(eglot-documentation-renderer): New defcustom, reworked from from
eglot-prefer-plaintext.
(eglot--accepted-formats): Use new variable.
(eglot--format-markup): Use new variable.

* etc/EGLOT-NEWS: Announce change.

* doc/misc/eglot.texi (Customization Variables): Document
  eglot-documentation-renderer.
2026-05-30 18:22:54 +01:00
Amin Bandali
ec3d662de0 Make HTML button elements tab-stoppable in eww (bug#81107)
* lisp/net/eww.el (eww-form-submit): Call put-text-property to
add help-echo and shr-tab-stop properties.
(eww-tag-input): Exclude inputs with type="submit" when adding
the help-echo and shr-tab-stop properties, since that's now done
in eww-form-submit, called earlier for type="submit".
2026-05-30 10:12:12 -04:00
Eli Zaretskii
72d890c43e ; Update the documentation of 'debug' 2026-05-30 13:41:22 +03:00
Eli Zaretskii
69fd4b87f4 Don't make buffer read-only when reverting if 'view-mode' was disabled
* lisp/view.el (view--disable): Reset 'read-only-mode--state'.
(Bug#81149)
2026-05-30 13:17:00 +03:00
Eli Zaretskii
2955b51e80 ; * etc/NEWS: Document the change in mode-line faces. 2026-05-30 11:13:08 +03:00
Augusto Stoffel
2487984685 * lisp/shell.el (shell): Fix typo: use process-live-p (bug#81145). 2026-05-29 10:57:39 +01:00
David Ponce
545bbc6ebe widget-image-find: Use 'image-load-path' (bug#81140)
* lisp/wid-edit.el (widget-image-find): Use 'image-load-path' (bug#81140).
2026-05-28 12:29:54 +01:00
Sean Whitton
69286be27d ; Fix an overwide docstring line. 2026-05-28 10:19:02 +01:00
Po Lu
d8933b9f07 Fix the MSDOS build
* msdos/sedlibmk.inp (GL_GNULIB_MEMEQ, GL_GNULIB_STREQ)
(GL_GNULIB_STRNUL): New substitutions, replacing that of
GL_GNULIB_STRINGEQ.

* src/term.c (init_tty) [MSDOS]: Assign appropriate value to
tty->TN_max_colors.

Do not merge to master.
2026-05-28 13:07:32 +08:00
Zhengyi Fu
c3babe4b89 Fix lax whitespace highlight during query-replace
* lisp/replace.el (query-replace-read-args): Add :lax-whitespace to
minibuffer-lazy-highlight-setup, so lazy highlight during
query-replace respects replace-lax-whitespace and
replace-regexp-lax-whitespace (bug#81131).

Copyright-paperwork-exempt: yes
2026-05-27 18:37:04 +03:00
Juri Linkov
2e70b88623 Fix fill-paragraph combining text with preceding comment
* lisp/textmodes/fill.el (fill-paragraph): Handle the case
when a non-comment line follows a comment line with
non-nil 'fill-paragraph-handle-comment' (bug#80449).
Skip such a comment line before filling a non-comment line.

* test/lisp/textmodes/fill-tests.el
(fill-test-fill-paragraph-handle-comment): Add new test.

* test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts:
New file.
2026-05-27 18:32:40 +03:00
Sean Whitton
ea54c33950 ; * etc/PROBLEMS: Link to bug#81124. 2026-05-27 13:16:12 +01:00
Paul Eggert
02897e208d emacsclient quote_argument is void
* lib-src/emacsclient.c (quote_argument):
Don’t use ‘return E;’ in a function returning void.
Problem found by Oracle Developer Studio 12.6.
2026-05-26 19:36:00 -07:00
Michael Albinus
c618178066 ; Mark process-test-stderr-buffer as :unstable when running on emba
* test/src/process-tests.el (process-test-stderr-buffer): Mark as
:unstable when running on emba.  (Bug#80166)
2026-05-25 08:44:42 +02:00
Eli Zaretskii
2c1b45f5c5 ; Improve documentation of 'vc-dir-auto-hide-up-to-date'
* lisp/vc/vc-dir.el (vc-dir-auto-hide-up-to-date): Doc fix.

* doc/emacs/maintaining.texi (VC Directory Buffer): Document
'vc-dir-auto-hide-up-to-date'.  (Bug#81033)
2026-05-24 14:44:07 +03:00
Sean Whitton
768c8bf004 Revert "* admin/notes/documentation: Recommend not using "it's"." 2026-05-24 11:49:50 +01:00
Sean Whitton
a7414f1859 native--compile-skip-on-battery-p: Try to fix ?b, ?B conditions
* lisp/emacs-lisp/comp-run.el
(native--compile-skip-on-battery-p): Don't skip charging because
the battery is charging, and don't look for "discharging", at
least for now (bug#80922).  Thanks to David Koppelman
<koppel@ece.lsu.edu> for the report.
2026-05-24 11:46:47 +01:00
Zhengyi Fu
7cee526a8c Save and restore original local keymap in grep-edit-mode
* lisp/progmodes/grep.el (grep-edit-original-mode-map): New
variable.
(grep-change-to-grep-edit-mode): Save the current local map
before switching to grep-edit-mode-map.
(grep-edit-save-changes): Restore the saved local map instead of
assuming grep-mode-map (bug#81090).

Copyright-paperwork-exempt: yes
2026-05-24 11:18:29 +01:00
Eli Zaretskii
4d87d203cf Fix display of inline SVG images in Rmail
* lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Support
Content-type of "svg+xml" if SVG images are supported,
2026-05-24 09:41:26 +03:00
Yuan Fu
4c55d04ebe
Add treesit-ready-p check back to tree-sitter major modes (bug#80909)
* lisp/progmodes/c-ts-mode.el (c-ts-mode):
(c++-ts-mode):
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode):
* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode):
* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode):
* lisp/progmodes/go-ts-mode.el (go-ts-mode):
(go-mod-ts-mode):
(go-work-ts-mode):
* lisp/progmodes/heex-ts-mode.el (heex-ts-mode):
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode):
* lisp/progmodes/python.el (python-ts-mode):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
* lisp/progmodes/sh-script.el (bash-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode):
(tsx-ts-mode):
* lisp/textmodes/css-mode.el (css-ts-mode):
* lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode):
* lisp/textmodes/toml-ts-mode.el (toml-ts-mode):
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode):
* lisp/treesit-x.el (treesit-generic-mode-setup): Add the check.
2026-05-23 22:10:34 -07:00
João Távora
7892ae5eaf Fix pathological slowness in flex completion
The 'completion-regexp-list' optimization in
completion--flex-all-completions-1, a cheap pre-filter via a trivial
regexp, performs very poorly for longer patterns and strings, so drop
it.  That alone recovers fairly decent performance for the flex
completion when compared to the 'hotfuzz' point of reference.

We then recover the cheap rejection with an O(N+M) pre-check in the
Fcompletion__flex_cost_gotoh C scorer.  This kicks in the common case
(completion-ignore-case is nil) and pays off especially when the table
is already a list and 'all-completions' needn't cons.

See:
  https://lists.gnu.org/archive/html/emacs-devel/2026-04/msg01081.html
  https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00519.html

* lisp/minibuffer.el (completion--flex-all-completions-1): Remove
regexp pre-filter.

* src/minibuf.c (Fcompletion__flex_cost_gotoh): Add subsequence
pre-check.
2026-05-24 04:23:51 +01:00
Amin Bandali
12eec781ed No longer raise error on HTTP 402 (Payment Required) (bug#81101)
* lisp/url/url-http.el (url-http-parse-headers): Return t instead of
raising an error, to give the user a chance to interact with the page.
2026-05-23 13:27:22 -04:00
Thomas Mühlbacher
1800350b18 Avoid compilation-mode matching rust as gnu
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Put 'rust' before 'gnu'
to avoid a mismatch since the " |" has become optional (bug#81075).

Copyright-paperwork-exempt: yes
2026-05-23 17:53:49 +01:00
Sean Whitton
4f13f52a3a * build-aux/git-hooks/commit-msg: Replace Markdown-style quotation. 2026-05-23 17:25:07 +01:00
Sean Whitton
dd42133315 vc-test--rename-file: Disable part of test for SCCS
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file):
Disable part of test for SCCS.
2026-05-23 16:53:36 +01:00
Rahul Martim Juliato
eb653865c3 markdown-ts-mode: Don't enable unconditionally by default
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode-maybe):
New function.
(auto-mode-alist): Bind ".md", ".markdown", and ".mdx" to
'markdown-ts-mode-maybe' instead of 'markdown-ts-mode'.
* etc/NEWS: Update the 'markdown-ts-mode' entry.
2026-05-23 16:25:09 +01:00
Manuel Giraud
7a17f97baa Prettify special glyphs
* lisp/disp-table.el (prettify-special-glyphs-mode): New mode to
display nicer special glyphs.
(special-glyphs): New face for displaying special glyphs when
the minor mode is active.
(prettify-special-glyphs-saved-truncation)
(prettify-special-glyphs-saved-continuation): Internal variables
to save previous special glyphs.
* etc/NEWS: Announce the change.  (Bug#80628)
2026-05-23 14:12:19 +03:00
Eli Zaretskii
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather than a symbol constituent"
This reverts commit b3c0aee42b.
It caused regressions in 'sh-script', see bug#80794 and
bug#80854.
2026-05-23 13:27:49 +03:00
Richard Lawrence
70b79b3ed8 Rename `icalendar-recur' type and related functions
More context in Bug#80786 and:
https://lists.gnu.org/archive/html/emacs-orgmode/2026-03/msg00286.html

`icalendar-recur' as a type name for RRULE values was confusing and made
the accessors for this type difficult to discover, because `icalendar-recur-'
is also used as a prefix in icalendar-recur.el.  This change renames the
`icalendar-recur' type to `icalendar-rrule-value' and renames the
accessor functions for these values appropriately.

* lisp/calendar/icalendar-parser.el:  Rename symbols as follows:
(icalendar-recur): `icalendar-rrule-value'
(icalendar-read-recur-rule-part): `icalendar-read-rrule-part'
(icalendar-print-recur-rule-part): `icalendar-print-rrule-part'
(icalendar-recur-rule-part): `icalendar-rrule-part'
(icalendar-read-recur): `icalendar-read-rrule-value'
(icalendar-print-recur): `icalendar-print-rrule-value'
(icalendar--recur-value-types): `icalendar--rrule-value-types'
(icalendar-recur-value-p): `icalendar-rrule-value-p'
(icalendar-recur-freq): `icalendar-rrule-freq'
(icalendar-recur-interval-size): `icalendar-rrule-interval-size'
(icalendar-recur-until): `icalendar-rrule-until'
(icalendar-recur-count): `icalendar-rrule-count'
(icalendar-recur-weekstart): `icalendar-rrule-weekstart'
(icalendar-recur-by*): `icalendar-rrule-by*'.
(icalendar-rrule):
(icalendar-index-insert):
(icalendar-index-get): Update references.
* lisp/calendar/icalendar-recur.el (icalendar-recur-find-interval):
(icalendar-recur-nth-interval):
(icalendar-recur-next-interval):
(icalendar-recur-previous-interval):
(icalendar-recur-refine-from-clauses):
(icalendar-recur-recurrences-in-interval):
(icalendar-recur-recurrences-in-window):
(icalendar-recur-recurrences-to-count):
(icalendar-recur-tz-observance-on): Update references.
* lisp/calendar/diary-icalendar.el: Update references.
* lisp/calendar/icalendar-shortdoc.el (icalendar): Update shortdoc examples.
* lisp/gnus/gnus-icalendar.el: Update references.
* test/lisp/calendar/diary-icalendar-tests.el:
* test/lisp/calendar/icalendar-parser-tests.el:
* test/lisp/calendar/icalendar-recur-tests.el: Update references in tests.
2026-05-23 13:25:19 +03:00
Michael Albinus
3d2bb233f2 ; Minor Tramp changes
* doc/misc/tramp.texi (Frequently Asked Questions):
google-drive has been disabled in GNOME 50.

* lisp/net/tramp-cmds.el (tramp-enable-method): Upcase prompt.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-sh-handle-process-file): Improve setting of environment variables.

* test/lisp/net/tramp-tests.el (tramp-methods) <mock>:
Add `tramp-tmpdir'.  Adapt `tramp-login-program'.
(ert-remote-temporary-file-directory): Improve expansion.
(tramp-test35-remote-path): Adapt test.
2026-05-23 10:25:46 +02:00
Eli Zaretskii
f6281d757d ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'. 2026-05-23 09:35:24 +03:00
Jacek Migacz
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
* lisp/gnus/gnus-msg.el (gnus-inews-make-draft-meta-information):
Escape the group name with prin1-to-string to prevent arbitrary
Lisp injection through crafted group names.  The unescaped group
name was embedded into a Lisp-readable string, parsed back with
read-from-string in gnus-draft-setup, and eventually eval'd via
message-do-actions, allowing code execution when a draft was sent.
2026-05-22 11:59:43 -07:00
Martin Rudalics
d6f7b2d99b Save/restore old_buffer slot via window configurations (Bug#81097)
With Emacs 31 the old_buffer slot of a window gets overwritten
with the buffer unshown in that window when that window is
deleted.  Fset_window_configuration triggers that when calling
delete_all_child_windows.  If a window configuration gets saved
and restored in one and the same redisplay cycle, the change
time stamps of the window and its frame will be equal and
'window-buffer-change-functions' may wrongly decide that the
window's buffer has not changed because its buffer and
old_buffer slots refer to the same buffer (Bug#81097).  Fix that
by saving and restoring the old_buffer slot.

* src/window.c (struct saved_window): Add 'old_buffer' slot.
(Fset_window_configuration): Restore old_buffer slot.
(save_window_save): Save old_buffer slot.
2026-05-22 19:33:57 +02:00
Michael Albinus
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
* lisp/emacs-lisp/ert-x.el (tramp-default-remote-shell)
(tramp-encoding-shell): Declare.
(tramp-methods) <mock>: Add `tramp-tmpdir'.  Adapt
`tramp-login-program' and `tramp-remote-shell'.
2026-05-22 18:37:36 +02:00
Eli Zaretskii
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-mode--initialize): Tweak the warning message when
Tree-sitter is not available.  (Bug#81100)
2026-05-22 19:12:12 +03:00
Eli Zaretskii
7df8604ea6 ; Improve documentation of lazy-highlight in search and replace commands
* lisp/isearch.el (lazy-highlight, lazy-highlight-initial-delay)
(lazy-highlight-buffer, isearch-lazy-highlight, isearch-forward):
* lisp/replace.el (query-replace, query-replace-lazy-highlight)
(query-replace, query-replace-regexp): Doc fixes.

* doc/emacs/search.texi (Search Customizations): Document
'lazy-highlight-buffer' and 'lazy-highlight-buffer-max-at-a-time'.
Use @vtable to avoid the need of indexing each variable
separately.
2026-05-22 14:46:13 +03:00
Dmitry Gutov
2936b36164 Fix "assertion 'GTK_IS_WINDOW (window)' failed"
* src/gtkutil.c (xg_frame_set_size_and_position): Remove a
gtk_window_resize call which used a wrong value type
(GdkX11Window instead of GtkWindow).  The original motivation
for that line seems to be fixed by later changes (bug#80662).
2026-05-22 06:46:47 +03:00
Dmitry Gutov
98348a0bdc [Xt] Fix child frame resizing glitch
* src/widget.c (EmacsFrameResize): Exit early for child frames
(bug#81077).
2026-05-22 01:50:03 +03:00
João Távora
13b29eebc1 Eglot: use standard face for completion annotations (bug#81088)
* lisp/progmodes/eglot.el (eglot-completion-at-point): Use
completions-annotations face, not font-lock-function-name-face.
2026-05-21 10:33:37 +01:00
Juri Linkov
655302cc21 Fix 'shr-outline-search' (bug#81073)
* lisp/net/shr.el (shr-outline-search):
Don't check for the beginning of the line.
Suggested by Omar Antolín Camarena <omar@im.unam.mx>.
Confirmed by Rahguzar <rahguzar@mailbox.org>.
2026-05-20 18:41:59 +03:00
Michael Albinus
1754015c60 Improve auth-source-backend-parse
* lisp/auth-source.el (auth-source-backend-parse): Use `run-hook-wrapped'.
Suggested by Augusto Stoffel <arstoffel@gmail.com>.
Transform a warning into a debug message.
2026-05-20 10:10:30 +02:00
João Távora
8f31ccbf82 Eglot: announce markdown support for completion docs
No reason not to.  Tested with gfm-view-mode and markdown-ts-mode

* lisp/progmodes/eglot.el (eglot-client-capabilities): Annouce
markdown support for completion docs.
2026-05-20 00:51:57 +01:00
Rahul Martim Juliato
aad170d1ed markdown-ts-mode: hide fence lines in view-mode (bug#81081)
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--fontify-delimiter): When `markdown-ts-hide-markup'
is enabled in `markdown-ts-view-mode', also hide the whole line
containing a `fenced_code_block_delimiter' (including its
terminating newline) so Eldoc/LSP markdown snippets render
without stray blank lines around the code block.  Scoped to
view-mode and to fenced delimiters on purpose: the same handler
is shared by inline delimiters (emphasis, code span, link
brackets) where munching surrounding whitespace would collapse
word separators, and tuning rendering for
hide-markup-while-editing is not a goal.
2026-05-20 00:35:49 +01:00
João Távora
133d1d591c markdown-ts-mode: align default face definitions with markdown-mode
Match the out-of-the-box appearance of markdown-ts-mode to the
non-tree-sitter markdown-mode package, making switching between modes
less jarring.

* lisp/textmodes/markdown-ts-mode.el (markdown-ts-delimiter)
(markdown-ts-heading-1, markdown-ts-heading-2, markdown-ts-heading-3)
(markdown-ts-heading-4, markdown-ts-heading-5, markdown-ts-heading-6)
(markdown-ts-block-quote, markdown-ts-code-block, markdown-ts-code-span)
(markdown-ts-indented-code-block, markdown-ts-html-tag)
(markdown-ts-html-block, markdown-ts-thematic-break)
(markdown-ts-entity-reference, markdown-ts-numeric-character-reference)
(markdown-ts-table, markdown-ts-table-header, markdown-ts-table-cell)
(markdown-ts-table-delimiter-cell, markdown-ts-language-keyword)
(markdown-ts-list-marker, markdown-ts-hard-line-break-backslash)
(markdown-ts-hard-line-break-backslash-hidden)
(markdown-ts-hard-line-break-space-hidden)
(markdown-ts-task-unchecked, markdown-ts-task-checked): Tweak.
2026-05-20 00:35:39 +01:00
Stéphane Marks
e0aeee2dc5 Fix markdown-ts-mode atx_heading face computation (bug#81042)
The grammar reports leading spaces as part of the atx_heading "marker"
and we cannot use the length of the marker as a result.  Instead, count
the number of consecutive # after any blanks to determine its "level."

* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--fontify-atx-heading): Count the octothorpes rather
than using the length of the marker node's text.
2026-05-20 00:35:16 +01:00
Stéphane Marks
997fc2cef7 Allow markdown-ts--run-command-in-code-block to ignore output (bug#81041)
Do not assume every command run in
'markdown-ts--run-command-in-code-block' produces output that needs to
be merged from the temp/work buffer into the source buffer.  One example
is 'xref-find-definitions', the temp buffer of which is unrelated to the
source buffer.

* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-code-block-commands): Add 'complete-symbol'.
(markdown-ts-code-block-ignore-output-commands): New defvar.
(markdown-ts--run-command-in-code-block): Ignore command output
when necessary.
2026-05-20 00:34:39 +01:00
Lin Sun
7d84e69a34 hideshow: Menu entry for 'hs-toggle-all'
* lisp/progmodes/hideshow.el: Menu entry for hs-toggle-all (bug#81045).
2026-05-19 18:30:57 +03:00