diff --git a/ChangeLog.5 b/ChangeLog.5 index c20a552f2c5..fbf23263ad3 100644 --- a/ChangeLog.5 +++ b/ChangeLog.5 @@ -1,3 +1,1322 @@ +2026-06-04 Stefan Monnier + + message.el: Fix part of bug#81035 + + * lisp/gnus/message.el (message-narrow-to-field) + (message-hide-headers): Syntax-propertize before narrowing. + +2026-06-04 Michael Albinus + + Fix prompt in remote shell + + * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Do not use a + hard-coded directory in PS1. (Bug#81177) + +2026-06-04 Dirk-Jan C. Binnema + + Fmake_xwidget: Use about:blank workaround only when needed + + * src/process.c (glib_installs_sigchld_handler): New variable. + (init_process_emacs): Set it when GLib overrides Emacs's SIGCHLD + handler. + * src/process.h (glib_installs_sigchld_handler): Declare. + * src/xwidget.c (Fmake_xwidget): Skip the "about:blank" + workaround when glib_installs_sigchld_handler is false. + +2026-06-04 JD Smith + + Allow brew/macports libgccjit for default native compilation + + * configure.ac: Move flag setup for libgccjit installed by + Homebrew or macports earlier, so default native compilation can + proceed (bug#81171). + +2026-06-04 Sean Whitton + + vc-dir-refresh: Respect non-essential wrt saving buffers + + * lisp/vc/vc-dir.el (vc-dir-refresh): If non-essential is + non-nil, don't call vc-buffer-sync-fileset. + +2026-06-04 Alan Mackenzie + + CC Mode: Fontify a cast type preceding a brace initialization + + This fixes bug#81084. + * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): + In the test for a cast near the end of the function, add a test + for a {...} block which isn't a statement block, allowing such + blocks to be recognized as operands of casts. + +2026-06-04 Michael Albinus + + Fix Tramp distrobox integration + + * lisp/net/tramp.el (tramp-yesno-prompt-regexp): Fix docstring. + (tramp-yn-prompt-regexp): Fix docstring. Extend. Add :version. + + * test/lisp/net/tramp-tests.el (tramp-test03-file-error): Adapt test. + +2026-06-04 Rahul Martim Juliato + + markdown-ts-mode: fix first-item indent (bug#81118) + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--fontify-unordered-list-marker): Skip leading + whitespace in the node range before applying the display bullet, + since the tree-sitter grammar bundles indent into the first + list_marker_* node. + +2026-06-03 Dmitry Gutov + + [GTK3] Re-fix the stored values for width and height + + * src/gtkutil.c (xg_frame_set_char_size) + (xg_frame_set_size_and_position): Round WIDTH and HEIGHT to + multiples of SCALE without adding toolbar/menubar (bug#80662). + +2026-06-02 João Távora + + Eglot: mentions markdown-ts-view-mode less (bug#81150) + + * doc/misc/eglot.texi (Customization Variables): Don't mention + markdown-ts-view-mode. + + * etc/EGLOT-NEWS: Don't mention markdown-ts-view-mode. + +2026-06-02 Alexander Adolf + + vc--subject-to-file-name: Fix over-greedy regex (bug#81017) + + * lisp/vc/vc.el (vc--subject-to-file-name): Make the prefix + regex less greedy, ensure the result has no text properties, + improve the docstring (bug#81017). + +2026-06-02 F. Jason Park + + Fix more missing faces on ERC margin strings + + * lisp/erc/erc-goodies.el (keep-place-indicator): Add + `erc-keep-place-indicator-arrow' face to overlay arrow. + * lisp/erc/erc-stamp.el (erc-stamp--display-prompt-in-left-margin) + (erc--conceal-prompt): Add `erc-prompt-face' to entire `left-margin' + string. See also 9ba65aa9 "Fix missing margin face on display prop in + erc-stamp". + * test/lisp/erc/erc-fill-tests.el (erc-fill--left-hand-stamps): Update + expected text properties on prompt. (Bug#80693) + +2026-06-01 João Távora + + Eglot: Simplify markdown rendering support (bug#81150) + + Now that markdown-ts-view-mode is demoted to "experimental" in emacs-31, + simplify bits of eglot.el and rewrite docs to be more neutral. In + practice 'gfm-view-mode' is still used if found, just like before, but + intrepid users can still try the "experimental" modes. + + * lisp/progmodes/eglot.el (eglot-documentation-renderer): Rewrite + doc string. + (eglot--accepted-formats): Rewrite. + (eglot--builtin-mdown-p): Remove. + + * doc/misc/eglot.texi (Customization Variables): Rewrite entry. + + * etc/EGLOT-NEWS: Tweak. + +2026-06-01 Eli Zaretskii + + Prevent segfaults due to frame resizing at the wrong time + + * src/dispextern.h: + * src/xdisp.c (dont_resize_frames): New variable. + (unwind_format_mode_line): Decrement 'dont_resize_frames'. + (gui_consider_frame_title, display_mode_line, Fformat_mode_line): + Increment 'dont_resize_frames'. + * src/dispnew.c (do_pending_window_change): Don't resize frames if + 'dont_resize_frames' is non-zero. (Bug#81121) + + (cherry picked from commit 94eb6389d403eb1b71a81ecdc3b8416cf5f850d6) + +2026-06-01 Sean Whitton + + Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31 + + Do not merge to master. + + * lisp/progmodes/eglot.el (eglot-documentation-renderer) + (eglot--format-markup): Don't call eglot--builtin-mdown-p. + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode) + (markdown-ts-view-mode): Mark as experimental. + (auto-mode-alist, treesit-major-mode-remap-alist): Don't add + anything. + * doc/misc/eglot.texi (Customization Variables): + * etc/EGLOT-NEWS: + * etc/NEWS: Don't mention markdown-ts-mode or + markdown-ts-view-mode. + +2026-05-31 Juri Linkov + + More tests for fill-paragraph-handle-comment.erts + + * test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts: + Add more tests for current comment lines (bug#80449). + +2026-05-31 Kyle Meyer + + Update to Org 9.8.5 + +2026-05-30 João Távora + + 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 Amin Bandali + + 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 Eli Zaretskii + + 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-29 Augusto Stoffel + + * lisp/shell.el (shell): Fix typo: use process-live-p (bug#81145). + +2026-05-28 David Ponce + + 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 Po Lu + + 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-27 Zhengyi Fu (tiny change) + + 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). + +2026-05-27 Juri Linkov + + 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 Paul Eggert + + 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-24 Sean Whitton + + Revert "* admin/notes/documentation: Recommend not using "it's"." + +2026-05-24 Sean Whitton + + 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 + for the report. + +2026-05-24 Zhengyi Fu (tiny change) + + 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). + +2026-05-24 Eli Zaretskii + + 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 Yuan Fu + + 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-24 João Távora + + 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-23 Amin Bandali + + 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 Thomas Mühlbacher (tiny change) + + 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). + +2026-05-23 Sean Whitton + + * build-aux/git-hooks/commit-msg: Replace Markdown-style quotation. + +2026-05-23 Sean Whitton + + 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 Rahul Martim Juliato + + 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 Manuel Giraud + + 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 Eli Zaretskii + + Revert "sh-script: Mark + and * as punctuation rather than a symbol constituent" + + This reverts commit b3c0aee42b086af4b3c6e26da1a5d81490b6128b. + It caused regressions in 'sh-script', see bug#80794 and + bug#80854. + +2026-05-23 Richard Lawrence + + 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-22 Jacek Migacz + + 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 Martin Rudalics + + 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 Michael Albinus + + Adapt ert-remote-temporary-file-directory settings + + * lisp/emacs-lisp/ert-x.el (tramp-default-remote-shell) + (tramp-encoding-shell): Declare. + (tramp-methods) : Add `tramp-tmpdir'. Adapt + `tramp-login-program' and `tramp-remote-shell'. + +2026-05-22 Eli Zaretskii + + 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 Dmitry Gutov + + 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-21 Dmitry Gutov + + [Xt] Fix child frame resizing glitch + + * src/widget.c (EmacsFrameResize): Exit early for child frames + (bug#81077). + +2026-05-21 João Távora + + 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-20 Juri Linkov + + 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 . + Confirmed by Rahguzar . + +2026-05-20 Michael Albinus + + Improve auth-source-backend-parse + + * lisp/auth-source.el (auth-source-backend-parse): Use `run-hook-wrapped'. + Suggested by Augusto Stoffel . + Transform a warning into a debug message. + +2026-05-20 João Távora + + 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 Rahul Martim Juliato + + 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 João Távora + + 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 Stéphane Marks + + 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 Stéphane Marks + + 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-19 Lin Sun + + hideshow: Menu entry for 'hs-toggle-all' + + * lisp/progmodes/hideshow.el: Menu entry for hs-toggle-all (bug#81045). + +2026-05-18 Stefan Monnier + + doc/lispref/text.texi: Add complement to commit f4a1c006569f + + * doc/lispref/text.texi (Examining Properties): Mention the change in + cursor-sensor-functions. + +2026-05-18 João Távora + + Eglot: fix eglot--format-makrup when MARKUP just a string + + * lisp/progmodes/eglot.el (eglot--format-markup): Fix case where + markup is string. + +2026-05-18 F. Jason Park + + Fix missing margin face on display prop in erc-stamp + + * lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Explicitly add + face to right-hand stamp's `display' margin string. Commit d24b10ca + "Introduce 'margin' face for window margin background" did away with the + "fall-through" behavior in which a margin spec's string that lacks its + own face property inherited whatever the associated `display' char + happened to have. (Bug#80693) + + ;; The old language in "(elisp) Display Margins" said "if the + ;; string to be displayed in the margin doesn't specify a face, its + ;; face is determined using the same rules and priorities as it is + ;; for strings displayed in the text area (see Displaying Faces)," + ;; and that "if this results in undesirable 'leaking' of faces into + ;; the margin, make sure the string has an explicit face specified + ;; for it." It seems ERC and likely more than a few other packages + ;; never came to heed this guidance and have erroneously depended + ;; on such behavior for years if not decades. + ;; + ;; * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: + ;; * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: + ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: + ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: + ;; * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update + ;; snapshot. + +2026-05-18 Sean Whitton + + vc-refresh-state: Override default-directory for backend functions + + I ran into the issue described in the comment with the current + code in project-find-file-in and project-find-dir, when using + 'C-x p p' to switch between projects. + + * lisp/vc/vc-hooks.el (vc-refresh-state): When calling into the + backend, override any let-bindings of default-directory. + +2026-05-18 João Távora + + Eglot: unbreak for treesit-less builds + + * lisp/progmodes/eglot.el + (eglot--builtin-mdown-p): New helper. + (eglot--accepted-formats) + (eglot--format-markup): Use it. + +2026-05-18 Joshua Murphy (tiny change) + + Get selected item in newsticker list view + + * lisp/net/newst-treeview.el + (newsticker--treeview-get-selected-item): If an item is already + selected, use it. (Bug#80972) + +2026-05-17 Brian Leung + + Eglot: fix thinko in recent markdown-related commit (bug#81063) + + * lisp/progmodes/eglot.el (eglot--format-markup): Correct return value + for gfm-view-mode. + +2026-05-17 João Távora + + Jsonrpc: migrate more tests to Python subprocess fixtures + + All tests now use 'jsonrpc--with-python-fixture' with a Python3 + subprocess instead of the in-Emacs TCP server. Changed the "harakiri" + method to be a request instead of a notification for to reduce chance of + "Sentinel hasn't run" warning. + + The two in-Emacs-RPC-specific error tests ('errors-with--32601' and + 'signals-an--32603-JSONRPC-error') are dropped with the fixture itself, + as the error paths they exercise are internal to the Emacs Lisp + dispatcher and have no direct Python equivalent. They will have to be + re-done later on in other form. + + * test/lisp/jsonrpc-resources/server-emacsrpc.py: New file. + + * test/lisp/jsonrpc-resources/server-anxious-nested.py: Use new + harakiri. + + * test/lisp/jsonrpc-resources/server-emacsrpc.py: Use new harakiri. + + * test/lisp/jsonrpc-resources/server-harakiri.py: Use new harakiri. + + * test/lisp/jsonrpc-resources/server-remote-during-sync-1.py: Use new + harakiri. + + * test/lisp/jsonrpc-resources/server-remote-during-sync-2.py: Use new + harakiri. + + * test/lisp/jsonrpc-resources/server-remote-error.py: Use new harakiri. + + * test/lisp/jsonrpc-resources/common.py (harakiri): New definition. + + * test/lisp/jsonrpc-tests.el + (jsonrpc--with-python-fixture): Rework, move up. + (jsonrpc-connection-ready-p): Move up. + (jsonrpc--call-with-emacsrpc-fixture) + (jsonrpc--with-emacsrpc-fixture) + (errors-with--32601) + (signals-an--32603-JSONRPC-error): Remove. + (returns-3, times-out, doesnt-time-out, stretching-it-but-works) + (deferred-action-toolate, deferred-action-intime) + (deferred-action-complex-tests): Migrate to Python fixture. + (scontrol-remote-during-sync-1, scontrol-remote-during-sync-2) + (scontrol-anxious-nested, scontrol-remote-error) + (shutdown-clean-after-notification): Tweak. + +2026-05-17 João Távora + + Eglot: add left-fringe code action indicator (bug#80326) + + The fringe indicator uses a custom lightning-bolt bitmap, an alternative + to the margin indicator on GUI frames. It is non-interactive, however. + + * lisp/progmodes/eglot.el (eglot--fringe-action): New fringe bitmap. + + (eglot-code-action-indications): Add 'left-fringe' to default value + and to docstring. Update incompatibility note. + + (eglot-code-action-suggestion): Handle 'left-fringe' indication. + +2026-05-17 Michael Albinus + + Fix auth-source-backends-parse + + * lisp/auth-source.el (auth-source-backend-parse): Drop backends + of type `ignore'. (Bug#81024) + (auth-source-backends): Drop duplicate backends. + +2026-05-17 Eli Zaretskii + + Fix updates of embedded formulas by 'calc-embedded-update-formula' + + * lisp/calc/calc-embed.el (calc-embedded-update): Use + 'buffer-substring' to better track the string representation of + the formula when it is being edited. Suggested by + gnu@publik.slmail.me. Also, update commentary. (Bug#80901) + +2026-05-16 Andrea Alberti + + Fill margins with 'margin' face on truncated screen lines + + * src/xdisp.c (display_line): Remove the unnecessary condition that + row->used of the margin areas is zero, for when we call + 'extend_face_to_end_of_line'. (Bug#80693) + +2026-05-14 João Távora + + Eglot: adjust reference to completion frontends in manual + + * doc/misc/eglot.texi (Eglot Features): Rework. + +2026-05-14 João Távora + + Eldoc: display documentation in visual-line-mode + + Documentation is overwhelmingly prose and intended to be viewed, + not edited. Using visual-line-mode allows members of + 'eldoc-doc-functions' to provide long lines that correctly fill + to the window width. + + * lisp/emacs-lisp/eldoc.el (eldoc--format-doc-buffer): Use + visual-line-mode. + +2026-05-14 João Távora + + Eglot: prefer markdown-ts-view-mode for markup rendering (bug#80127) + + Eglot previously needed gfm-view-mode from markdown-mode.el to render + Markdown from LSP servers. It now prefers markdown-ts-view-mode when + available. + + * lisp/progmodes/eglot.el (eglot--accepted-formats): Recognize + markdown-ts-view-mode as a Markdown renderer. + (eglot--format-markup): Rework with cl-labels; prefer + markdown-ts-view-mode over gfm-view-mode. + + * doc/misc/eglot.texi (Eglot Features): Don't mention + markdown-mode directly. + + * etc/EGLOT-NEWS: Mention change + +2026-05-14 Rahul Martim Juliato + + Use 'read-multiple-choice' in 'markdown-ts-mode' (bug#81027) + + Replace the "c" character-prompt interactive spec with + 'read-multiple-choice', which presents named options instead of + requiring users to decode the prompt string and type a single + character. + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts-table-align-column): Use 'read-multiple-choice'. + Adjust ALIGN docstring punctuation. + * lisp/textmodes/markdown-ts-mode-x.el + (markdown-ts-toc-insert-template): Use 'read-multiple-choice'. + +2026-05-14 Rahul Martim Juliato + + Fix 'markdown-ts-code-span' face (bug#81026) + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-code-span): + Inherit from 'font-lock-keyword-face' rather than + 'font-lock-string-face'. + +2026-05-14 Rahul Martim Juliato + + Add read-only 'markdown-ts-view-mode' (bug#81023) + + This new derived mode is intended for consumers that render + Markdown content for display rather than editing, such as Eglot + and Eldoc when showing documentation popups and buffers. It + pre-sets the relevant customizations (markup hidden, inline + images on, hard-line-break markup hidden, native code-block + fontification, table and code-block context minor modes off), + makes the buffer read-only, and uses its own keymap derived from + 'special-mode-map' so navigation keys behave like a viewer. + + A pre-init hook lets callers normalize buffer content before the + grammar parses it; 'markdown-ts-add-final-newline' is the + default so that markup depending on a terminating newline parses + correctly. 'markdown-ts-buffer-string' returns the rendered + buffer string with overlay faces flattened into text properties, + which is useful for callers that capture the rendered output. + + Along the way: 'list_marker_parenthesis' is now recognized as an + ordered list marker; the strikethrough query is simplified to a + single rule; thematic breaks span the window via an ':extend' + underline when the face supports it. + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-view-mode): + New read-only derived mode. + (markdown-ts-view-mode-map): New keymap. + (markdown-ts-view-mode-pre-init-hook): New hook, defaulting to + 'markdown-ts-add-final-newline'. + (markdown-ts-mode--initialize): New helper, factored out of + 'markdown-ts-mode' so 'markdown-ts-view-mode' can reuse the + parser readiness and setup logic after overriding local + variables. + (markdown-ts-mode): Call 'markdown-ts-mode--initialize'. + (markdown-ts-add-final-newline): New function. + (markdown-ts-buffer-string): New function. + (markdown-ts-unordered-list-marker): New defcustom. + (markdown-ts-hard-line-break-backslash) + (markdown-ts-hard-line-break-space): Accept the symbol 'hide. + (markdown-ts--fontify-hard-line-break): Honor 'hide. + (markdown-ts--fontify-atx-heading) + (markdown-ts--fontify-setext-heading) + (markdown-ts--fontify-atx-delimiter) + (markdown-ts--fontify-unordered-list-marker) + (markdown-ts--list-item-depth): New functions supporting clean + rendering when markup is hidden. + (markdown-ts--fontify-thematic-break): Use ':extend' underline + span when the face supports it. + (markdown-ts--resolve-display-value): Accept non-cons values. + (markdown-ts--list-ordered-item-p): Also recognize + 'list_marker_parenthesis'. + (markdown-ts--range-settings): Mark markdown-inline embed as + ':local t'. + (markdown-ts--set-up): Create the markdown-inline parser only in + the inline setup branch; drop the redundant + 'markdown-ts-hide-markup' make-local-variable. + (markdown-ts--treesit-settings): Route atx and setext headings + to their dedicated fontifiers; route unordered list markers + through 'markdown-ts--fontify-unordered-list-marker'; move + 'strikethrough' to the simpler paragraph-inline query. + +2026-05-13 Rahul Martim Juliato + + Fix strikethrough in 'markdown-ts-mode' (bug#80991) + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--treesit-settings): Add a new font-lock block for + 'paragraph-inline' that handles strikethrough nodes more + carefully. + +2026-05-13 Rahul Martim Juliato + + Fix code-span in headings in 'markdown-ts-mode' (bug#80979) + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--treesit-settings): Move the 'code_span' and + 'code_span_delimiter' font-lock rules into a separate block with + ':override prepend' instead of 'append'. The heading feature + (level 1) applies its face via 'font-lock-append-text-property', + so a code span that later appends 'markdown-ts-code-span' ends + up with '(markdown-ts-heading-N markdown-ts-code-span)', where + the heading face takes priority and the code-span face is + suppressed. Prepending ensures 'markdown-ts-code-span' appears + first in the face list and wins visually. + +2026-05-13 Stéphane Marks + + Make 'markdown-ts-inline-images' buffer local and test for GUI (bug#80978) + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-inline-images): + Now buffer local. + (markdown-ts--fontify-image): Defensively test for graphical + display before rendering images. + +2026-05-13 Michael Albinus + + * etc/NEWS: Mention new user option tramp-propagate-emacsclient-tramp. + +2026-05-13 Michael Albinus + + Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp + + * doc/misc/tramp.texi (Remote processes): + Explain `tramp-propagate-emacsclient-tramp'. + + * lisp/net/tramp.el (tramp-remote-process-environment): Adapt docstring. + (tramp-propagate-emacsclient-tramp): New defcustom. + (tramp-handle-make-process): + * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) + (tramp-sh-handle-process-file): Use it. + + * test/lisp/net/tramp-tests.el (tramp-test33-environment-variables): + Adapt test. + +2026-05-13 Stefan Monnier + + keyboard-tests.el: Try and fix the failure on EMBA + + * test/src/keyboard-tests.el (keyboard-sigint-to-quit): Fix a small + race condition and avoid `sit-for` returning early. + +2026-05-13 Stefan Monnier + + doc: Remove long obsolete references to `package-initialize` + + Since Emacs-27, `package-initialize` is for internal use only, + and callers should either call `package-activate-all` instead + (cheaper and faster) or do nothing at all (because the other + functions should trigger the needed initialization automatically + as needed). + + * doc/lispref/package.texi (Packaging Basics): Delete `package-initialize`. + + * doc/misc/eglot.texi (Reporting bugs): Don't recommend using `package-initialize`. + + * doc/misc/org.org (Using Emacs packaging system): Simplify the command + line since both `(require 'package)` and `(package-initialize)` are + redundant here. + +2026-05-13 Sean Whitton + + vc-next-action: Call vc-delete-file on FILESET-ONLY-FILES + + * lisp/vc/vc.el (vc-next-action): Call vc-delete-file on + FILESET-ONLY-FILES, not FILES (bug#80998). + +2026-05-12 Elias Gabriel Perez + + hideshow: Support new 'margin' face for margin indicators. (Bug#80693) + + * lisp/progmodes/hideshow.el (hs-indicator-hide): Remove 'default' face. + (hs--make-indicators-overlays): Rework. + +2026-05-12 Juri Linkov + + Use the new 'margin' face in Flymake (bug#80693) + + * lisp/progmodes/flymake.el (flymake--bs-display): + Use the 'margin' face when it's available. + +2026-05-12 Sean Whitton + + vc-dir-resynch-file: Pass down non-truename'd FILE + + * lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Delete + recently introduced TRUENAME parameter. + (vc-dir-resynch-file): Pass the file name from before calling + file-truename to vc-dir-recompute-file-state. + +2026-05-12 F. Jason Park + + Change ERC version for Emacs 31 to 5.6.2.31.1 + + * doc/misc/erc.texi: Change ERCVER to 5.6.2.31.1. + * lisp/erc/erc.el: Change "Version" package header to 5.6.2.31.1. Don't + update the `customize-package-emacs-version-alist' entry because this is + not a GNU ELPA release. + (erc-version): Change version to 5.6.2.31.1. + + Do not merge to master. + +2026-05-11 Philip Kaludercic + + Fix 'sgml-parse-tag-backward' to handle tags in comments + + * lisp/textmodes/sgml-mode.el (sgml--find-<>-backward): Ignore + SGML tags that happen to occur within comments. This also means + that the contents of comments are not indented, but also do not + affect the indentation of tags following the comments as well. + + (Bug#80841) + +2026-05-11 Aidan Coyle (tiny change) + + Fix eww-submit for forms with no action (bug#80918) + + * lisp/net/eww.el (eww-submit): If a form does not specify an action + the assumed action is the current URL. If the current URL has an + existing query part, that part must be replaced by the form values, + rather than appended to. + +2026-05-11 Elias Gabriel Perez + + * lisp/progmodes/hideshow.el (hs--set-variable): Use 'set-local' (bug#80999) + +2026-05-11 Juri Linkov + + Fix Completions buffer disappearing with tmm-menubar (bug#80995) + + * lisp/minibuffer.el (completions--start-background-update): + Cancel a possible leftover timer (e.g. from the previous + after-change hook) that would suppress the display of + *Completions* when 'completion-eager-update' is nil. + (completions--after-change): Don't start background update + when not required to automatically update *Completions*. + +2026-05-11 Michael Albinus + + Fix secrets.el when Emacs is a flatpak + + * doc/misc/dbus.texi (Flatpak integration): New chapter. + + * lisp/net/secrets.el (top): Protect against wrong signals in the + flatpak case. (Bug#80977) + +2026-05-11 Philip Kaludercic + + Fix 'prepare-user-lisp' to follow symlinks + + * lisp/startup.el (prepare-user-lisp): Call + 'directory-files-recursively' with a non-nil value for + FOLLOW-SYMLINKS. This was the intended way for the function to + operate, during the planning phase, so that users could + structure their User Lisp directory by linking in Lisp + directories from other parts of their file system. + +2026-05-11 Philip Kaludercic + + Update "timeout" to 2.1.6 + + See https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00033.html. + +2026-05-11 Dmitry Gutov + + [GTK3, HiDPI] Fix width/height round-trip through ConfigureNotify + + * src/gtkutil.c (xg_frame_set_char_size) + (xg_frame_set_size_and_position): Truncate WIDTH and HEIGHT to + be multiples of the scale factor (bug#80662). + +2026-05-11 Dmitry Gutov + + [GTK3] On Expose, repaint the border before the content + + * src/xterm.c (handle_one_xevent): Move the + x_clear_under_internal_border call before expose_frame, for less + chance of implicit flush to screen in between (bug#80662). + +2026-05-10 Pip Cet + + Test read-passwd behavior (bug#80838) + + * test/lisp/auth-source-tests.el (auth-source-test--displayed-string): + (auth-source-test-read-passwd): + (auth-source-test-read-passwd-revealed): + (auth-source-test-read-passwd-nested): New. + +2026-05-10 Pip Cet + + Fix nested read-passwd calls (bug#80838) + + Calls to 'read-passwd' may be nested. The old code didn't handle + that, because some of the state was global and we'd end up revealing + passwords. The new code still has global state, but it has been + changed so that we hide rather than reveal passwords when we enter or + leave a nested read-passwd prompt. + + * lisp/auth-source.el (read-passwd--hide-password): Removed. + (read-passwd--password-hidden): New. + (read-passwd-toggle-visibility): Add optional FORCE argument. + (read-passwd--mini-buffers): New variable. + (read-passwd-mode): Don't modify mode line when nested. Hide password + when returning to nested minibuffer or entering a new one. + +2026-05-09 Pip Cet + + Fix terminal emulation of "ESC [ K" sequence + + * lisp/term.el (term-erase-in-line): Don't immediately delete the + newly inserted characters. + +2026-05-09 Eli Zaretskii + + Fix vertical-motion across overlay strings with embedded newlines + + * src/indent.c (Fvertical_motion): Handle the case of an overlay + string on invisible text at point. (Bug#80989) + +2026-05-09 Morgan Smith + + Mark gnus-dbus.el as obsolete + + This functionality has been replaced by the new sleep library + which supports more then just DBUS systems. + + * lisp/obsolete/gnus-dbus.el: Add Obsolete-since header. Add + commentary. + (gnus-dbus-close-on-sleep, gnus-dbus-sleep-registration-object) + (gnus-dbus-register-sleep-signal gnus-dbus-sleep-handler) + (gnus-dbus-unregister-sleep-signal): Mark as obsolete. + +2026-05-09 Morgan Smith + + Move gnus-dbus.el to obsolete/gnus-dbus.el + + * lisp/gnus/gnus-dbus.el: Move from here... + * lisp/obsolete/gnus-dbus.el: ...to here. + +2026-05-09 Morgan Smith + + Gnus: Use new sleep library + + * etc/NEWS: Announce. + * lisp/gnus/gnus-start.el: Don't require gnus-dbus. + (gnus-sleep-handler): New function. + (gnus-close-on-sleep): New variable. + (gnus-1): Add `gnus-sleep-handler' to + `system-sleep-event-functions' when `gnus-close-on-sleep' is + non-nil. + * doc/misc/gnus.texi: Update documentation. + +2026-05-09 Eli Zaretskii + + Fix Rmail behavior wrt globalized minor modes + + Previously, "M-x rmail" would not call 'run-mode-hooks', which + didn't let globalized minor modes a chance to turn on themselves + in Rmail buffers. This modifies the way Rmail runs the various + hooks so as to abide by behavior required by Emacs 30 and later. + * lisp/mail/rmail.el (rmail-mode-2): Call 'run-mode-hooks'. + (rmail-mode): Call 'run-hooks', not 'run-mode-hooks'. Suggested + by Mark Lillibridge . (Bug#80879) + +2026-05-09 Eli Zaretskii + + Fix display images in the display margins + + * src/xdisp.c (handle_single_display_spec): Set the iterator face + to use 'margin' when displaying in the margins. (Bug#80693) + +2026-05-09 João Távora + + Eglot: fix eglot--sig-info with non-UTF-32 positionEncoding + + Github-reference: https://github.com/joaotavora/eglot/discussions/1588 + + When the server negotiates positionEncoding utf-8 or utf-16, + ParameterInformation.label vector offsets are byte/code-unit counts + into the signature label, not character counts. Using them raw caused + wrong highlights and crashes on Unicode-rich signatures. + + * lisp/progmodes/eglot.el (eglot--sig-info): Mostly rewrite. + (eglot-move-to-utf-8-linepos-function): Tweak docstring. + (eglot-move-to-utf-8-linepos, eglot-move-to-utf-16-linepos): Return + position moved to. + +2026-05-08 Alan Third + + [NS] Fix deprecated variable (bug#80985) + + * src/nsterm.h (NSLevelIndicatorStyleContinuousCapacity): Define in + macOS < 10.15. + +2026-05-08 Dmitry Gutov + + vc-switch-working-tree: Use project-current again + + * lisp/vc/vc.el (vc-switch-working-tree): Use project-current + instead of manually constructing VC project objects. + +2026-05-08 Stéphane Marks + + treesit-explore-mode usability improvements (bug#80935) + + Improve the usability of treesit-explore-mode. + + - Prompt for the primary parser first, if there is one, rather + than the first in the list reported by 'treesit-parser-list'. + Previously, in a multi-parser buffer like 'markdown-ts-mode', one + had to hunt for the primary parser. + + - Kill the tree buffer and its window if the source buffer is + killed or 'treesit-explore-mode'. Previously, when + 'treesit-explore-mode' is disabled in the source buffer, its + companion explorer tree buffer was left dangling and window + open (with an unrelated buffer). + + - Improve 'treesit--explorer-refresh-1' to recenter the window + around the selected nodes when the selected region in the source + buffer changes. Previously, one had to navigate manually to find + the corresponding highlighted node in the tree window which may + be far away from that the source buffer's region represents. + + - Disable 'treesit-explore-mode' in the source buffer if its + companion tree buffer is killed. Previously, + 'treesit-explore-mode' remained active in the source buffer in + an effectively unusable state. + + - Disable 'treesit-explore-mode' if the user quits + 'completing-read' in 'treesit-explorer-switch-parser' when + enabling the mode. Previously, 'treesit-explore-mode' was left + enabled after quit. + + - New command to switch back and forth between the source buffer + and tree buffer windows to make navigating more convenient. + Previously, in a multi-window frame, one had to navigate to/from + these two related windows in a more cumbersome way. + + - New command to quit 'treesit-explore-mode' and + 'treesit--explorer-tree-mode' and handle buffer and window + cleanup. + + * lisp/treesit.el (treesit--explorer-refresh-1): Recenter the + window, if amenable, to the node selected in the source buffer. + (treesit--explorer-kill-explorer-buffer): Remove function. + (treesit--explorer-generate-parser-alist): Prioritize the + primary parser, if there is one. + (treesit--explorer-tree-mode-cleanup): New defun. + (treesit-explore-quit): New command. + (treesit-explorer-tree-window): New defun. + (treesit-explorer-source-buffer-window): New defun. + (treesit-explore-mode-map): Revise key bindings. + (treesit--explorer-tree-mode-map): Revise key bindings. + (treesit--explorer-tree-mode): New keymap. + (treesit-explorer-switch-parser): Add a default to + completing-read. + (treesit-explore-mode): Guard completing read quit. Wire up the + new cleanup functions. + +2026-05-07 João Távora + + Fix 'vc-dir-resynch-file' again (bug#80967) + + This unbreak project-vc-dir for dirs under non-truename + hierarchies. + + The following commit presumably makes 'M-x vc-dir' usable again + for versioned directories inside non-truename hierarchies, + + commit e05fab5775c96f8f88eab8d75dea40253bfb78eb + Author: Stephen Berman + Date: Sat May 2 15:11:37 2026 +0200 + + Fix 'vc-dir-resynch-file' (bug#80803) + + * lisp/vc/vc-dir.el (vc-dir-resynch-file): Apply 'file-truename' + instead of 'expand-file-name' to FNAME argument to prevent + spurious display of symlinked files in *vc-dir* buffer. + + However the similar command 'M-x project-vc-dir' was broken and made + unusable in similar circumstances. + + This relatively simple fix addresses both situations touching only the + problematic 'vc-resynch-file' and one of its callees, + 'vc-dir-recompute-file-state', which now discerns clearly between the + short/familiar name to present in the list and the "fname" to use to + call into the backend to gather the VC state. Since this function is + also called from another context, where the requirements are less clear, + keeping current smenatics in that situation seemed prudent, so the new + behaviour is activate with a new optional parameter. + + * lisp/vc/vc-dir.el (vc-dir-resynch-file): Call + vc-dir-recompute-file-state with truename=t. + (vc-dir-recompute-file-state): Accept optional truename param. + 2026-05-07 Sean Whitton Cut the emacs-31 release branch @@ -64440,7 +65759,7 @@ This file records repository revisions from commit 1cda0967b4d3c815fc610794ad6a8fc2b913a3c5 (exclusive) to -commit 311f1fe2ba2a4d069715c992ba839645b55a9427 (inclusive). +commit 5e3e1a5bb23b5e7813a60c2b121b1393ff6ca86f (inclusive). See ChangeLog.4 for earlier changes. ;; Local Variables: diff --git a/Makefile.in b/Makefile.in index 0cb4887ae5d..1c5bbc9ce2e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -115,6 +115,8 @@ HAVE_GSETTINGS = @HAVE_GSETTINGS@ ANDROID = @ANDROID@ +DOCLANGS?=@DOCLANGS@ + # ==================== Where To Install Things ==================== # Location to install Emacs.app under GNUstep / macOS. @@ -795,7 +797,7 @@ install-info: info [ -f "$(DESTDIR)${infodir}/dir" ] || \ [ ! -f ${srcdir}/info/dir ] || \ ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \ - info_misc=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \ + info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \ cd ${srcdir}/info ; \ for elt in ${INFO_NONMISC} $${info_misc}; do \ for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ @@ -945,7 +947,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas done -rm -rf "$(DESTDIR)${libexecdir}/emacs/${version}" thisdir=`pwd -P`; \ - (info_misc=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \ + (info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \ if cd "$(DESTDIR)${infodir}"; then \ for elt in ${INFO_NONMISC} $${info_misc}; do \ (cd "$${thisdir}"; \ @@ -1123,7 +1125,7 @@ TAGS tags: lib lib-src # src $(MAKE) -C doc/emacs tags $(MAKE) -C doc/lispintro tags $(MAKE) -C doc/lispref tags - $(MAKE) -C doc/misc tags + $(foreach DOCLANG,$(DOCLANGS),$(MAKE) -C doc/misc DOCLANG=$(DOCLANG) tags;) CHECK_TARGETS = check check-maybe check-expensive check-all check-byte-compile .PHONY: $(CHECK_TARGETS) @@ -1144,8 +1146,21 @@ PDFS = lispref-pdf lispintro-pdf emacs-pdf misc-pdf PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) -$(DOCS): - $(MAKE) -C doc/$(subst -, ,$@) + +define MAKE_DOC_FOR_DOCLANG +$(1)-DOCLANG-$(2): $(1)-common + $$(MAKE) -C doc/$$(subst -, DOCLANG=$(2) ,$(1)) + +endef +define MAKE_DOC +# Define a target to which dependencies common to all of the doc files +# in this directory may be assigned. +$(1)-common: +$(1): $$(addprefix $(1)-DOCLANG-,$(DOCLANGS)) + +$$(foreach lang,$(DOCLANGS),$$(eval $$(call MAKE_DOC_FOR_DOCLANG,$(1),$$(lang)))) +endef +$(foreach doc,$(DOCS),$(eval $(call MAKE_DOC,$(doc)))) .PHONY: $(DOCS) docs pdf ps .PHONY: info dvi dist html info-dir check-info @@ -1162,20 +1177,25 @@ ps: $(PSS) # Depending on src is sufficient, but ends up being slow, since the # uncompiled lisp/org/*.el files are used to build the .texi files # (which can be slow even with the elc files). -misc-info: lisp +misc-info-common: lisp # Using src rather than lisp because one is less likely to get unnecessary # rebuilds of stuff that is not strictly necessary for generating manuals. -misc-dvi misc-html misc-pdf misc-ps: src +misc-dvi-common misc-html-common misc-pdf-common misc-ps-common: src info-dir: ${srcdir}/info/dir -texi_misc = $(shell MAKEFLAGS= ${MAKE} --no-print-directory -s -C doc/misc echo-sources) +define set_texi_misc +texi_misc_$(1) = $$(shell MAKEFLAGS= $${MAKE} --no-print-directory -s -C doc/misc LANG=$(1) echo-sources) + +endef + +$(foreach lang,$(DOCLANGS),$(eval $(call set_texi_misc,$(lang)))) srcdir_doc_info_dir_inputs = \ ${srcdir}/doc/emacs/emacs.texi \ ${srcdir}/doc/lispintro/emacs-lisp-intro.texi \ ${srcdir}/doc/lispref/elisp.texi \ - $(addprefix ${srcdir}/doc/misc/,${texi_misc}) + $(foreach lang,$(DOCLANGS),$(addprefix ${srcdir}/doc/misc/$(filter-out ../translations/default/misc/,../translations/$(lang)/misc/),$(texi_misc_$(lang)) )) info_dir_inputs = \ ../build-aux/dir_top \ $(subst ${srcdir}/doc/,,${srcdir_doc_info_dir_inputs}) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 2ef31c0042b..8299668a8a6 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -13,29 +13,22 @@ Preparations: Steps to take before starting on the first pretest in any release sequence: -0. The release branch (e.g. emacs-28) should already have been made +0. The release branch (e.g. emacs-31) should already have been made and you should use it for all that follows. Diffs from this branch should be going to the emacs-diffs mailing list. 1. Decide on versions of m4 and autoconf, and ensure you will have them available for the duration of the release process. -2. Consider increasing the value of the variable - 'customize-changed-options-previous-release' in cus-edit.el to - refer to a newer version of Emacs. (This is now done when cutting - the release branch, see admin/release-branch.txt, but it can't - hurt to double check its value.) Commit cus-edit.el if changed. - -3. Remove any old pretests from . +2. Remove any old pretests from . You can use 'gnupload --delete' (see below for more gnupload details). - (We currently don't bother with this.) -4. Check that all new Lisp libraries belong to sensible packages. +3. Check that all new Lisp libraries belong to sensible packages. Run "make -C lisp finder-data" and check the diff of the generated file against the previously released Emacs version to see what has changed. -5. If this is an emergency release without a prior pretest, inform the +4. If this is an emergency release without a prior pretest, inform the maintainers of the bundled packages which are developed separately to make sure they install adjustments required for an official release. Currently, these packages include: @@ -70,7 +63,7 @@ General steps (for each step, check for possible errors): "M-x emacs-news-delete-temporary-markers" command to delete any left-over "---" and "+++" markers from etc/NEWS, as well as the "Temporary note" section at the beginning of that file, and commit - etc/NEWS if it was modified. For a bug fix release (e.g. 28.2), + etc/NEWS if it was modified. For a bug fix release (e.g. 31.2), delete any empty headlines too. 2. Regenerate the versioned ChangeLog.N and etc/AUTHORS files. @@ -268,30 +261,33 @@ General steps (for each step, check for possible errors): 9. You can now tag the release/pretest and push it together with the last commit: - cd EMACS_ROOT_DIR && git tag -a TAG -m "Emacs TAG" + cd EMACS_ROOT_DIR && git tag -s TAG -m "Emacs STR" git push git push --tags Here TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release. - For a release, if you are producing a release candidate first, use - emacs-XX.Y-rcN (N = 1, 2, ...) when you tar the RC, and add the - actual release tag later, when the official release tarball is - uploaded to ftp.gnu.org. When adding a tag later, it is safer to - use the SHA1 of the last commit which went into the release + For STR see below. For a release, if you are producing a release + candidate first, use emacs-XX.Y-rcN (N = 1, 2, ...) when you tar the + RC, and add the actual release tag later, when the official release + tarball is uploaded to ftp.gnu.org. When adding a tag later, it is + safer to use the SHA1 of the last commit which went into the release tarball, in case there were some intervening commits since then: - git tag -a TAG -m "Emacs TAG" SHA1 + git tag -s TAG -m "Emacs TAG STR" SHA1 git push --tags In the past, we were not always consistent with the annotation (i.e. -m "Emacs TAG"). The preferred format is like this for a pretest, release candidate and final release: - git tag -a emacs-28.0.90 -m "Emacs 28.0.90 pretest" - git tag -a emacs-28.1-rc1 -m "Emacs 28.1 RC1" - git tag -a emacs-28.1 -m "Emacs 28.1 release" + git tag -s emacs-31.0.90 -m "Emacs 31.0.90 pretest" + git tag -s emacs-31.1-rc1 -m "Emacs 31.1 RC1" + git tag -s emacs-31.1 -m "Emacs 31.1 release" -10. Decide what compression schemes to offer. +10. Merge the release branch to master, checking you skip the right + commits. + +11. Decide what compression schemes to offer. For a release, at least gz and xz: gzip --best --no-name -c emacs-NEW.tar > emacs-NEW.tar.gz xz -c emacs-NEW.tar > emacs-NEW.tar.xz @@ -300,7 +296,9 @@ General steps (for each step, check for possible errors): Now you should upload the files to the GNU FTP server; your GPG key must already be accepted as described above. The simplest method of uploading is with the gnulib - script "build-aux/gnupload": + script "build-aux/gnupload" + (/usr/share/gnulib/build-aux/gnupload on Debian and its derivatives + with the 'gnulib' and 'ncftp' packages installed): For a pretest or release candidate: gnupload [--user your@gpg.key.email] --to alpha.gnu.org:emacs/pretest \ @@ -333,14 +331,14 @@ General steps (for each step, check for possible errors): For a pretest, place the files in /incoming/alpha instead, so that they appear on . -11. After five minutes, verify that the files are visible at +12. After five minutes, verify that the files are visible at for a pretest, or for a release. Download them and check the signatures and SHA1/SHA256 checksums. Check they build (./configure --with-native-compilation). -12. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org. +13. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org. For a pretest, also bcc: platform-testers@gnu.org. For a release, also bcc: info-gnu@gnu.org. (The reason for using bcc: is to make it less likely that people @@ -354,19 +352,19 @@ General steps (for each step, check for possible errors): because replies that invariably are not announcements also get sent out as if they were.) - To create the included SHA1 and SHA256 checksums, run: + To create the included SHA256 and SHA512 checksums, run: - sha1sum emacs-NEW.tar.xz sha256sum emacs-NEW.tar.xz + sha512sum emacs-NEW.tar.xz You can optionally sign the announcement email using the same PGP key that you used for signing the tarball. (Use e.g. `M-x mml-secure-message-sign' in `message-mode' to sign an email.) -13. After a release, update the Emacs pages as described below. +14. After a release, update the Emacs pages as described below. -14. After a release, bump the Emacs version on the release branch. +15. After a release, bump the Emacs version on the release branch. There is no need to bump the version after a pretest; the version is bumped before the next pretest or release instead. @@ -396,7 +394,7 @@ like this:
-

Emacs 28.1 is out, download it here!

+

Emacs 31.1 is out, download it here!

diff --git a/admin/notes/documentation b/admin/notes/documentation index d355ad06412..f6fa321b217 100644 --- a/admin/notes/documentation +++ b/admin/notes/documentation @@ -106,7 +106,7 @@ For instance, this anywhere in sight is too confusing. may not need mentioning, because --daemon will give an error message -saying it is not implemented, and other cases aren't affected. +saying it's not implemented, and other cases aren't affected. The kind of change for which the user really needs help from Antinews is where a feature works _differently_ in the previous version. @@ -164,5 +164,3 @@ like subr.el, which are not quoted. Call 'emacs-news-view-mode'. Lisp symbols and Info manual links shall be decorated, and clicking on them shall lead to the respective Help buffer or Info node. - -*** Do not use "it's", "you're" and alike. diff --git a/configure.ac b/configure.ac index d5127c5f88b..307fe6b2719 100644 --- a/configure.ac +++ b/configure.ac @@ -2127,44 +2127,7 @@ if test $opsys = darwin; then AC_PATH_PROG([HAVE_MACPORTS], [port]) fi -## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. -: ${MAKEINFO:=makeinfo} -case `($MAKEINFO --version) 2>/dev/null` in - *' (GNU texinfo) '4.1[[3-9]]* | \ - *' (GNU texinfo) '[[5-9]]* | \ - *' (GNU texinfo) '[[1-9][0-9]]* ) ;; - *) MAKEINFO=no;; -esac - -## Makeinfo is unusual. For a released Emacs, the manuals are -## pre-built, and not deleted by the normal clean rules. makeinfo is -## therefore in the category of "special tools" not normally required, which -## configure does not have to check for (eg autoconf itself). -## In a repository checkout on the other hand, the manuals are not included. -## So makeinfo is a requirement to build from the repository, and configure -## should test for it as it does for any other build requirement. -## We use the presence of $srcdir/info/emacs to distinguish a release, -## with pre-built manuals, from a repository checkout. -if test "$MAKEINFO" = "no"; then - MAKEINFO=makeinfo - if test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then - AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.13, and your -source tree does not seem to have pre-built manuals in the 'info' directory. -Please install a suitable version of makeinfo.] ) - else - AC_MSG_WARN( [You do not seem to have makeinfo >= 4.13. -You will not be able to rebuild the manuals if you delete them or change -their sources.] ) - fi -fi -AC_SUBST([MAKEINFO]) - -if test $opsys = mingw32; then - DOCMISC_W32=efaq-w32 -else - DOCMISC_W32= -fi -AC_SUBST([DOCMISC_W32]) +gl_TEXINFO dnl Add our options to ac_link now, after it is set up. @@ -5253,25 +5216,7 @@ if test "$with_features" = "no" \ with_native_compilation=no fi -if test "${with_native_compilation}" = "default"; then - # Check if libgccjit is available. - AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire], - [], [libgccjit_not_found]) - AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found]) - if test "${with_native_compilation}" != "no"; then - # Check if libgccjit really works. - AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken]) - fi -fi - if test "${with_native_compilation}" != "no"; then - if test "${HAVE_ZLIB}" = no; then - AC_MSG_ERROR(['--with-native-compilation' requires zlib]) - fi - - SAVE_CFLAGS=$CFLAGS - SAVE_LIBS=$LIBS - if test "${opsys}" = "darwin"; then # Ensure libgccjit installed by Homebrew or macports can be found. if test -n "$BREW"; then @@ -5308,15 +5253,39 @@ if test "${with_native_compilation}" != "no"; then fi fi - # In the default case we already checked - if test "${with_native_compilation}" != "default"; then - # Check if libgccjit is available. - AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire], - [], [libgccjit_not_found_err]) - AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found_err]) + # Check if libgccjit is available. + AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire], [], + [if test "${with_native_compilation}" = "default"; then + libgccjit_not_found + else + libgccjit_not_found_err + fi]) + # `libgcc_not_found' may set `with_native_compilation' to `no'. + AS_IF([test "$with_native_compilation" != "no"], + [AC_CHECK_HEADERS([libgccjit.h], [], + [if test "${with_native_compilation}" = "default"; then + libgccjit_dev_not_found + else + libgccjit_dev_not_found_err + fi])]) + if test "${with_native_compilation}" != "no"; then # Check if libgccjit really works. - AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken_err]) + AC_RUN_IFELSE([libgccjit_smoke_test], [], + [if test "${with_native_compilation}" = "default"; then + libgccjit_broken + else + libgccjit_broken_err + fi]) fi +fi + +if test "${with_native_compilation}" != "no"; then + if test "${HAVE_ZLIB}" = no; then + AC_MSG_ERROR(['--with-native-compilation' requires zlib]) + fi + + SAVE_CFLAGS=$CFLAGS + SAVE_LIBS=$LIBS HAVE_NATIVE_COMP=yes case "${opsys}" in # mingw32 loads the library dynamically. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index d103e7f961f..785322118f9 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1523,10 +1523,11 @@ on the current line if no files are marked. and their version control statuses. It lists files in the current directory (the one specified when you called @kbd{C-x v d}) and its subdirectories, but only those with a noteworthy status. Files -that are up-to-date (i.e., the same as in the repository) are -omitted. If all the files in a subdirectory are up-to-date, the +that are up-to-date (i.e., the same as in the repository) or ignored +are omitted. If all the files in a subdirectory are up-to-date, the subdirectory is not listed either. As an exception, if a file has -become up-to-date as a direct result of a VC command, it is listed. +become up-to-date as a direct result of a VC command, it is listed by +default. Here is an example of a VC Directory buffer listing: @@ -1565,6 +1566,16 @@ systems can show other statuses. For instance, CVS shows the been applied to the work file. RCS and SCCS show the name of the user locking a file as its status. +@vindex vc-dir-auto-hide-up-to-date + As mentioned above, by default files and directories which become +up-to-date or ignored after the VC Directory buffer is first displayed +stay displayed. To automatically remove such files from display, +customize the variable @code{vc-dir-auto-hide-up-to-date} to the value +@code{t}. You can also customize it to the value @code{revert}, in +which case such files will be removed only when you refresh the VC +Directory display, e.g., by typing @kbd{g} (@pxref{VC Directory +Commands}). + @ifnottex On CVS, the @code{vc-dir} command normally contacts the repository, which may be on a remote machine, to check for updates. If you change @@ -1595,7 +1606,7 @@ cases Emacs must occasionally fetch from the remote repository in order to determine the count. If your connection to the remote repository is slow then this may cause unacceptable slowdowns in refreshing the VC Directory buffer. If this affects you, you can customize -@code{vc-dir-show-outgoing-count} to nil to disable the unpushed +@code{vc-dir-show-outgoing-count} to @code{nil} to disable the unpushed revisions count altogether. You can also set this on a per-repository basis using directory local variables (@pxref{Directory Variables}). @@ -1674,9 +1685,6 @@ the VC Directory buffer (@code{vc-dir-root-next-action}). This is like @w{@kbd{C-x v v}} (@pxref{Basic VC Editing}) except that it ignores any marks and the position of point. -@item q -Quit the VC Directory buffer, and bury it (@code{quit-window}). - @item u Unmark the file or directory on the current line. If the region is active, unmark all the files in the region (@code{vc-dir-unmark}). @@ -1691,6 +1699,12 @@ files and directories. Hide files with @samp{up-to-date} or @samp{ignored} status (@code{vc-dir-hide-up-to-date}). With a prefix argument, hide items whose state is that of the item at point. + +@item g +Refresh the VC Directory buffer display (@code{revert-buffer}). + +@item q +Quit the VC Directory buffer, and bury it (@code{quit-window}). @end table @findex vc-dir-mark diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 87a1e053905..d0a0285f9f1 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -52,15 +52,15 @@ Here is an example: @group (defun silly-loop (n) "Return the time, in seconds, to run N iterations of a loop." - (let ((t1 (float-time))) + (let ((t1 (current-time))) (while (> (setq n (1- n)) 0)) - (- (float-time) t1))) + (float-time (time-since t1)))) @result{} silly-loop @end group @group -(silly-loop 50000000) -@result{} 5.200886011123657 +(silly-loop 100000000) +@result{} 2.236908583 @end group @group @@ -69,13 +69,13 @@ Here is an example: @end group @group -(silly-loop 50000000) -@result{} 0.6239290237426758 +(silly-loop 100000000) +@result{} 0.374873305 @end group @end example - In this example, the interpreted code required more than 5 seconds to run, -whereas the byte-compiled code required less than 1 second. These + In this example, the interpreted code was about six times slower +than the byte-compiled code. These results are representative, but actual results may vary. @node Compilation Functions diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 8d498608da4..48f3c3f8257 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -638,11 +638,9 @@ debugger, etc.), and fills it with information about the stack of Lisp function calls. It then enters a recursive edit, showing the backtrace buffer in Debugger mode. In batch mode (more generally, when @code{noninteractive} is non-@code{nil}, @pxref{Batch Mode}), -this function shows the Lisp backtrace on the standard error stream, -and then kills Emacs, causing it to exit with a non-zero exit code -(@pxref{Killing Emacs}). Binding -@code{backtrace-on-error-noninteractive} to @code{nil} suppresses the -backtrace in batch mode, see below. +this function shows the Lisp backtrace on the standard error stream. +Binding @code{backtrace-on-error-noninteractive} to @code{nil} +suppresses the backtrace in batch mode, see below. The Debugger mode @kbd{c}, @kbd{d}, @kbd{j}, and @kbd{r} commands exit the recursive edit; then @code{debug} switches back to the previous diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 09022883f71..49b09f6583d 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3527,6 +3527,7 @@ non-selected window, Emacs applies the @code{mode-line-inactive} face. For a header line, Emacs applies the @code{header-line} face. For a tab line, Emacs applies the @code{tab-line} face. +@cindex @code{margin} face, and face merging @item If the text comes from an overlay string via @code{before-string} or @code{after-string} properties (@pxref{Overlay Properties}), or from a @@ -3535,13 +3536,14 @@ contain a @code{face} or @code{mouse-face} property, or these properties leave some face attributes undefined, but the buffer text affected by the overlay/display property does define a face or those attributes, Emacs applies the face attributes of the ``underlying'' -buffer text. Note that this is so even if the overlay or display -string is displayed in the display margins (@pxref{Display Margins}). +buffer text. However, this does not apply to strings displayed in the +display margins, which use the @code{margin} face as the base instead +(@pxref{Display Margins}). @item -If the text is to be shown in the display margins, and any given -attribute has not been specified during the preceding steps, Emacs -applies the attribute of the @code{margin} face. +If the text is to be shown in the display margins, Emacs uses the +@code{margin} face as the base, so any attribute not specified by the +string's own face is taken from the @code{margin} face. @item If any given attribute has not been specified during the preceding @@ -3804,29 +3806,42 @@ The default face, whose attributes are all specified. All other faces implicitly inherit from it: any unspecified attribute defaults to the attribute on this face (@pxref{Face Attributes}). +@vindex mode-line @r{faces} @item mode-line-active @itemx mode-line-inactive @itemx header-line @itemx tab-line Basic faces used for the mode line, header line, and tab line. +@vindex tool-bar @r{face} @item tool-bar +@vindex tab-bar @r{face} @itemx tab-bar +@vindex fringe @r{face} @itemx fringe +@vindex scroll-bar @r{face} @itemx scroll-bar +@vindex window-divider @r{face} @itemx window-divider +@vindex border @r{face} @itemx border +@vindex child-frame-border @r{face} @itemx child-frame-border Basic faces used for the corresponding decorations of GUI frames. +@vindex cursor @r{face} @item cursor The basic face used for the text cursor. +@vindex margin @r{face} @item margin The basic face used for window margins, both on the left and on the right. It is commonly used to customize the background of the empty -areas of the margins. It inherits from the @code{default} face. +areas of the margins, and it also provides the base attributes for +strings displayed in the margins (@pxref{Display Margins}). It +inherits from the @code{default} face. +@vindex mouse @r{face} @item mouse The basic face used for displaying mouse-sensitive text when the mouse pointer is on that text. @@ -3842,6 +3857,7 @@ These have the attributes indicated by their names (e.g., @code{bold} has a bold @code{:weight} attribute), with all other attributes unspecified (and so given by @code{default}). +@vindex shadow @r{face} @item shadow For dimmed-out text. For example, it is used for the ignored part of a filename in the minibuffer (@pxref{Minibuffer File,, @@ -3857,15 +3873,21 @@ For stretches of text that should temporarily stand out. For example, it is commonly assigned to the @code{mouse-face} property for cursor highlighting (@pxref{Special Properties}). +@vindex match @r{face} @item match +@vindex isearch @r{face} @itemx isearch +@vindex lazy-highlight @r{face} @itemx lazy-highlight For text matching (respectively) permanent search matches, interactive search matches, and lazy highlighting other matches than the current interactive one. +@vindex error @r{face} @item error +@vindex warning @r{face} @itemx warning +@vindex success @r{face} @itemx success For text concerning errors, warnings, or successes. For example, these are used for messages in @file{*Compilation*} buffers. @@ -5921,12 +5943,9 @@ the before-string. Note that if the string to be displayed in the margin doesn't fully specify its face, the nonspecified attributes are inherited from the -@code{margin} face (@pxref{Basic Faces}). The face merging mechanism -ensures that the margin background remains consistent when margin -annotations specify only a foreground color. If you want a margin -string to have a specific appearance independent of the @code{margin} -face, make sure the string has a face specifying all required -attributes. +@code{margin} face (@pxref{Basic Faces}). If you want a margin string +to have a specific appearance independent of the @code{margin} face, +make sure the string has a face specifying all required attributes. Before the display margins can display anything, you must give them a nonzero width. The usual way to do that is to set these diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index c50619a2de0..a3be6cc2bfc 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2694,10 +2694,9 @@ The color to use for the background of characters. It is equivalent to the @code{:background} attribute of the @code{default} face. @vindex mouse-color@r{, a frame parameter} -@vindex mouse@r{, a face} @item mouse-color The color for the mouse pointer. It is equivalent to the @code{:background} -attribute of the @code{mouse} face. +attribute of the @code{mouse} face (@pxref{Basic Faces}). @vindex cursor-color@r{, a frame parameter} @item cursor-color diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 809fa36098a..59e0fe90a46 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2040,6 +2040,7 @@ system. @defun format-seconds format-string seconds This function converts its argument @var{seconds} into a string of years, days, hours, etc., according to @var{format-string}. The +argument @var{seconds} is a time value (@pxref{Time of Day}). The argument @var{format-string} may contain @samp{%}-sequences which control the conversion. Here is a table of what the @samp{%}-sequences mean: diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 5ef6cbebfb9..a5535df601b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2625,7 +2625,8 @@ avoid calling @code{widen} in their indentation code and obey @defvar prog-indentation-context This variable, when non-@code{nil}, holds the indentation context for the sub-mode's indentation engine provided by the superior major mode. -The value should be a list of the form @code{(@var{first-column} . @var{rest}}. +The value should be a list of the form @w{@code{(@var{first-column} +. @var{rest})}}. The members of the list have the following meaning: @table @var @@ -4870,6 +4871,24 @@ Therefore, all else being equal, it is preferable to pass a buffer than a string as @var{source} argument. @end defun +Sometimes @code{replace-region-contents} is unable to understand the +nature of the change in which case information such as overlays and +markers will not be preserved as well as we would like. If this is +important and you have enough knowledge about the change, you can +preserve this information manually. For example, when sorting the lines +of a region, you can start by collecting all the overlays and markers in +the affected region using @code{overlays-in} and @code{markers-in} as +well as recording a description of the line on which they were found. +After inserting the sorted lines, you can then move the objects back to +their rightful position. + +@defun markers-in &optional beg end +Return a list of all the markers found between @var{beg} and @var{end} +in the current buffer. @var{beg} defaults the @code{point-min} and +@var{end} defaults to @code{point-max}. Do not rely on the order of the +markers in the list, because it is unspecified. +@end defun + @node Decompression @section Dealing With Compressed Data diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 5eee5023f54..11a2dc3d517 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -63,18 +63,22 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force -I$(emacsdir) +ifeq ($(DOCLANG),) +DOCLANG:=default +else ifeq ($(wildcard $(srcdir)/../translations/$(DOCLANG)/info_common.mk),) +$(error No manual language $(DOCLANG) found) +DOCLANG:=default +endif + +lang_suffix:=$(filter-out -default,-$(DOCLANG)) +lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(DOCLANG)/misc/) + ## On MS Windows, efaq-w32; otherwise blank. DOCMISC_W32 = @DOCMISC_W32@ +DOCMISC_W32_TARGET = efaq-w32 ## Info files to build and install on all platforms. -INFO_COMMON = auth autotype bovine calc ccmode cl dbus dired-x \ - ebrowse ede ediff edt efaq eglot eieio emacs-gnutls \ - emacs-mime epa erc ert eshell eudc eww flymake forms gnus \ - htmlfontify idlwave ido info.info mairix-el message mh-e \ - modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg \ - rcirc reftex remember sasl sc semantic ses sieve smtpmail \ - speedbar srecode todo-mode tramp transient url use-package \ - vhdl-mode viper vtable widget wisent woman +include $(srcdir)/../translations/$(DOCLANG)/info_common.mk ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) @@ -82,29 +86,31 @@ INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) ## Info files to build on current platform. ## This is all of them, even though they might not all get installed, ## because the info files are pre-built in release tarfiles. -INFO_TARGETS = $(INFO_COMMON) efaq-w32 +INFO_TARGETS = $(INFO_COMMON) $(DOCMISC_W32_TARGET) ## Some manuals have their source in .org format. ## This is discouraged because the .texi files it generates ## are not as well formatted as handwritten ones. -ORG_SETUP = $(wildcard ${srcdir}/*-setup.org) -ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/*.org)) +ORG_SETUP = $(wildcard ${srcdir}/$(lang_subdir)*-setup.org) +ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/$(lang_subdir)*.org)) TEXI_FROM_ORG = ${ORG_SRC:.org=.texi} # There are some naming differences between the info targets and the other # targets, so let's resolve them here. -TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode) -TARGETS = $(TARGETS_1:info.info=info) +TARGETS = $(INFO_INSTALL:ccmode=cc-mode) -texi_sources = $(addsuffix .texi,${TARGETS}) +# Sources are also suffixed, this is useless as they are in different +# directories, but some people argued that there should not be +# different files with same name in the repo. +texi_sources = $(addsuffix $(lang_suffix).texi,${TARGETS}) texi_notgen = $(filter-out $(notdir ${TEXI_FROM_ORG}),${texi_sources}) texi_and_org = $(notdir ${ORG_SRC}) ${texi_notgen} SOURCES = $(sort ${texi_and_org}) -DVI_TARGETS = $(TARGETS:=.dvi) -HTML_TARGETS = $(TARGETS:=.html) -PDF_TARGETS = $(TARGETS:=.pdf) -PS_TARGETS = $(TARGETS:=.ps) +DVI_TARGETS = $(TARGETS:=$(lang_suffix).dvi) +HTML_TARGETS = $(TARGETS:=$(lang_suffix).html) +PDF_TARGETS = $(TARGETS:=$(lang_suffix).pdf) +PS_TARGETS = $(TARGETS:=$(lang_suffix).ps) TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf @@ -118,21 +124,21 @@ ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \ gfdl = ${srcdir}/doclicense.texi style = ${emacsdir}/docstyle.texi -.PHONY: info dvi html pdf ps echo-info echo-sources $(INFO_TARGETS) +.PHONY: info dvi html pdf ps echo-info echo-sources $(patsubst info, info-doc, $(INFO_TARGETS)) ## Prevent implicit rule triggering for foo.info. .SUFFIXES: ## Disable implicit rules. %.texi: ; -# Default. -info: $(INFO_TARGETS) +# Default. patsubst as "info" is already taken. +info: $(patsubst info, info-doc,$(INFO_TARGETS)) ## Used by top-level Makefile. ## Base file names of output info files. INFO_BASES = $(patsubst %.info,%,$(notdir $(INFO_INSTALL))) echo-info: - @: $(info $(addsuffix .info,$(INFO_BASES))) + @: $(info $(addsuffix $(lang_suffix).info,$(INFO_BASES))) echo-sources: @: $(info $(SOURCES)) @@ -152,32 +158,30 @@ ${buildinfodir}: EXTRA_OPTS = -${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} ${style} | ${buildinfodir} +${buildinfodir}/%$(lang_suffix).info: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} | ${buildinfodir} $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) \ -o $@ $< ## The short aliases, eg efaq = $(buildinfodir)/efaq.info. define info_template - $(1): $$(buildinfodir)/$(1).info +## patsubst as "info" is already taken. +$$(patsubst info, info-doc, $(1)): $$(buildinfodir)/$(1)$$(lang_suffix).info endef -## "info" is already taken. -info.info: $(buildinfodir)/info.info - -$(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile)))) +$(foreach ifile,$(INFO_TARGETS),$(eval $(call info_template,$(ifile)))) -%.dvi: ${srcdir}/%.texi ${gfdl} ${style} +%$(lang_suffix).dvi: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} $(ENVADD) $(TEXI2DVI) $< -%.pdf: ${srcdir}/%.texi ${gfdl} ${style} +%$(lang_suffix).pdf: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} $(ENVADD) $(TEXI2PDF) $< -%.html: ${srcdir}/%.texi ${gfdl} ${style} +%$(lang_suffix).html: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) \ -o $@ $< -%.ps: %.dvi +%$(lang_suffix).ps: %$(lang_suffix).dvi $(DVIPS) -o $@ $< @@ -204,16 +208,16 @@ ${buildinfodir}/ccmode.info: \ ## efaq, efaq_w32 do not depend on gfdl. ## Maybe we can use .SECONDEXPANSION for this. -${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi ${style} | ${buildinfodir} +${buildinfodir}/efaq%$(lang_suffix).info: ${srcdir}/efaq%$(lang_suffix).texi ${style} | ${buildinfodir} $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $< -efaq%.dvi: ${srcdir}/efaq%.texi +efaq%$(lang_suffix).dvi: ${srcdir}/efaq%$(lang_suffix).texi $(ENVADD) $(TEXI2DVI) $< -efaq%.pdf: ${srcdir}/efaq%.texi +efaq%$(lang_suffix).pdf: ${srcdir}/efaq%$(lang_suffix).texi $(ENVADD) $(TEXI2PDF) $< -efaq%.html: ${srcdir}/efaq%.texi +efaq%$(lang_suffix).html: ${srcdir}/efaq%$(lang_suffix).texi $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $< ${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding @@ -248,7 +252,10 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefe # things like org-setup's "version" macro work. Sigh. define org_template $(1:.org=.texi): $(1) ${top_srcdir}/lisp/org/ox-texinfo.el - $${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \ + $${AM_V_GEN}cd "$${srcdir}" && $${emacs} \ + --eval '(add-to-list (quote load-path) "$(abspath ${top_srcdir}/lisp/org)")' \ + --eval '(setq org--inhibit-version-check t)' \ + -l ox-texinfo \ --eval '(setq gc-cons-threshold 50000000)' \ --eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-id-track-globally nil)' \ diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 8764fcade90..d63e26755d9 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -1340,9 +1340,20 @@ keyword @code{:session}. D-Bus object path, @var{service} is registered at. @var{interface} is an interface offered by @var{service}. It must provide @var{method}. -@var{handler} is a Lisp function, which is called when the -corresponding return message arrives. If @var{handler} is @code{nil}, -no return message will be expected. +@var{handler} is a Lisp function, which is called when the corresponding +return message has arrived. It uses the returned values from the +@var{method} call as arguments. These are the same arguments which are +returned when @code{dbus-call-method} is invoked instead, +@pxref{Synchronous Methods}. If @var{handler} is @code{nil}, no return +message will be expected. + +@var{handler} can also be the cons cell @code{(@var{handler} +. @var{error-handler})}. In this case, @var{error-handler} will be +called in case an error is returned from D-Bus. It uses the returned +D-Bus error as argument. + +Neither the return value of @var{handler} nor the return value of +@var{error-handler} is used. If the parameter @code{:timeout} is given, the following integer @var{timeout} specifies the maximum number of milliseconds before a @@ -1366,19 +1377,40 @@ arguments. They are converted into D-Bus types as described in If @var{handler} is a Lisp function, the function returns a key into the hash table @code{dbus-registered-objects-table}. The corresponding entry in the hash table is removed, when the return -message arrives, and @var{handler} is called. Example: +message arrives, and @var{handler} is called. Examples: + +The return value of @samp{org.freedesktop.portal.Settings.ReadOne} is a variant. @lisp (dbus-call-method-asynchronously - :system "org.freedesktop.Hal" - "/org/freedesktop/Hal/devices/computer" - "org.freedesktop.Hal.Device" "GetPropertyString" - (lambda (msg) (message "%s" msg)) - "system.kernel.machine") + :session "org.freedesktop.portal.Desktop" + "/org/freedesktop/portal/desktop" + "org.freedesktop.portal.Settings" "ReadOne" + '((lambda (msg) (message "Method handler %s" msg)) . + (lambda (err) (message "Error handler %s" err))) + "org.freedesktop.appearance" "color-scheme") -@print{} i686 +@print{} Method handler (0) -@result{} (:serial :system 2) +@result{} (:serial :session 4) +@end lisp + +There does not exist a method @samp{org.freedesktop.portal.Settings.ReadTwo}. + +@lisp +(dbus-call-method-asynchronously + :session "org.freedesktop.portal.Desktop" + "/org/freedesktop/portal/desktop" + "org.freedesktop.portal.Settings" "ReadTwo" + '((lambda (msg) (message "Method handler %s" msg)) . + (lambda (err) (message "Error handler %s" err))) + "org.freedesktop.appearance" "color-scheme") + +@print{} Error handler + (dbus-error "org.freedesktop.DBus.Error.UnknownMethod + No such method "ReadTwo") + +@result{} (:serial :session 5) @end lisp @end defun diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index d501fe32d5d..caa009f1ec5 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -996,6 +996,17 @@ same language server. That file is still outside your project will consider it to be part of the workspace. The default is @code{nil}. +@cindex markdown renderer +@item eglot-documentation-renderer +This variable controls how Eglot renders at-point documentation imported +from the server (@pxref{Eglot Features}). The default value is +@code{nil}, meaning Eglot selects a suitable Markdown renderer on each +use---for example, @code{gfm-view-mode} from @code{markdown-mode} on +NonGNU ELPA, which enhances documentation through fontification and +other formatting. If you set it to @code{t}, plain text is requested +from the server and no rendering is attempted. See docstring for more +options. + @item eglot-mode-map This variable is the keymap for binding Eglot-related command. It is in effect only as long as the buffer is managed by Eglot. By default, it diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 458cccf3063..b08c62c06b6 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -933,8 +933,8 @@ that start with a space are part of the value). @example Name: foo -Code: (indent-region - (point-min) (point-max)) +Code: (lambda () + (indent-region (point-min) (point-max))) @end example @table @samp diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 3e6fbed95bb..3c11d8a17c0 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -9,6 +9,13 @@ @syncodeindex vr cp @syncodeindex ky cp @c %**end of header +@c compile info with +@c make -C doc/misc ../../info/ses.info +@c or just +@c make -C doc/misc ses +@c compile pdf with +@c make -C doc/misc ses.pdf + @copying This file documents @acronym{SES}: the Simple Emacs Spreadsheet. diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 6eddd0e71c5..165d0eb1352 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -7,7 +7,7 @@ @c In the Tramp GIT, the version number and the bug report address @c are auto-frobbed from configure.ac. -@set trampver 2.8.2-pre +@set trampver 2.8.2 @set trampurl https://www.gnu.org/software/tramp/ @set tramp-bug-report-address tramp-devel@@gnu.org @set emacsver 28.1 diff --git a/doc/translations/README b/doc/translations/README index bac8bc5d188..f97f4fb105c 100644 --- a/doc/translations/README +++ b/doc/translations/README @@ -1,3 +1,19 @@ +* Translated Emacs manuals +** Translations available + +Translations for language _doclang_ can be found under directory +doc/translations/_doclang_. + +** Compiling a manual translation + +For the info output, and, say, SES manual in French: + + make -C doc/misc ses DOCLANG=fr + +For the pdf output: + + make -C doc/misc ses-fr.pdf DOCLANG=fr + * Translating the Emacs manuals ** Copyright assignment diff --git a/doc/translations/default/info_common.mk b/doc/translations/default/info_common.mk new file mode 100644 index 00000000000..56c505c8b10 --- /dev/null +++ b/doc/translations/default/info_common.mk @@ -0,0 +1,9 @@ +## Info files to build and install on all platforms. +INFO_COMMON = auth autotype bovine calc ccmode cl dbus dired-x \ + ebrowse ede ediff edt efaq eglot eieio emacs-gnutls \ + emacs-mime epa erc ert eshell eudc eww flymake forms gnus \ + htmlfontify idlwave ido info mairix-el message mh-e \ + modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg \ + rcirc reftex remember sasl sc semantic ses sieve smtpmail \ + speedbar srecode todo-mode tramp transient url use-package \ + vhdl-mode viper vtable widget wisent woman diff --git a/doc/translations/fr/info_common.mk b/doc/translations/fr/info_common.mk new file mode 100644 index 00000000000..9db4f4f540f --- /dev/null +++ b/doc/translations/fr/info_common.mk @@ -0,0 +1,8 @@ +## Info files to build and install on all platforms (only ses has been +## translated to French) +INFO_COMMON = ses + +## efaq-w32 has not been translated to French +DOCMISC_W32:=# + +DOCMISC_W32_TARGET:=# diff --git a/doc/translations/fr/misc/ses-fr.texi b/doc/translations/fr/misc/ses-fr.texi index 10bb20420a9..368858413f1 100644 --- a/doc/translations/fr/misc/ses-fr.texi +++ b/doc/translations/fr/misc/ses-fr.texi @@ -10,6 +10,12 @@ @syncodeindex vr cp @syncodeindex ky cp @c %**end of header +@c compiler info avec +@c make -C doc/misc ../../info/ses-fr.info DOCLANG=fr +@c ou juste +@c make -C doc/misc ses DOCLANG=fr +@c compiler pdf avec +@c make -C doc/misc ses-fr.pdf DOCLANG=fr @copying Ce fichier documente @acronym{SES} : le tableur simple d’Emacs (Simple diff --git a/etc/AUTHORS b/etc/AUTHORS index ab4abbfc62b..150f5ee6527 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -87,6 +87,8 @@ Agustín Martín: changed ispell.el flyspell.el fixit.texi Ahmed Khanzada: changed gtkutil.c battery.el frame.c frame.el gtkutil.h nsterm.m w32fns.c w32term.c w32term.h xsettings.c xsettings.h +Aidan Coyle: changed eww.el + Aidan Gauland: wrote em-tramp.el and changed eshell.texi em-term.el em-unix.el erc-match.el em-cmpl.el em-dirs.el em-ls.el em-script.el esh-proc.el eshell-tests.el @@ -157,7 +159,7 @@ Aleksey Kladov: changed eglot.el Alexander Adolf: wrote eudc-capf.el eudcb-ecomplete.el eudcb-macos-contacts.el eudcb-mailabbrev.el and changed eudc.texi message.el eudc-vars.el ecompleterc eudc-tests.el - eudc.el mailrc + eudc.el mailrc vc.el Alexander Becher: changed vc-annotate.el @@ -288,7 +290,7 @@ Amin Bandali: changed erc.el erc.texi erc-backend.el erc-button.el erc-compat.el erc-track.el erc-dcc.el erc-desktop-notifications.el erc-match.el erc-services.el erc-speedbar.el erc-status-sidebar.el erc-autoaway.el erc-fill.el erc-goodies.el erc-ibuffer.el erc-imenu.el - erc-join.el erc-lang.el erc-list.el erc-log.el and 13 other files + erc-join.el erc-lang.el erc-list.el erc-log.el and 15 other files Amos Bird: changed xfns.c @@ -309,7 +311,7 @@ and changed nsterm.m nsfns.m nsmenu.m nsterm.h font-lock.el nsimage.m Anders Waldenborg: changed emacsclient.c -Andrea Alberti: changed dispextern.h faces.el xdisp.c xfaces.c +Andrea Alberti: changed xdisp.c dispextern.h faces.el xfaces.c Andrea Corallo: wrote [native compilation of Emacs Lisp] comp-common.el comp-cstr-tests.el comp-cstr.el comp-run.el comp-tests.el comp.c @@ -583,7 +585,7 @@ and changed progmodes/python.el eglot.el isearch.el comint.el eldoc.el progmodes/compile.el project.el README.md bookmark.el dired.el dockerfile-ts-mode.el files.el font-lock.el glasses.el gnutls.el man.el message.el message.texi misc.texi modes.texi outline.el - and 16 other files + and 17 other files Aurélien Aptel: changed alloc.c emacs-module.h lisp.h Makefile configure.ac cus-face.el data.c dispextern.h display.texi dynlib.c @@ -1542,7 +1544,7 @@ David Ponce: wrote bovine/grammar.el cedet.el comp.el java-tags.el semantic/java.el semantic/wisent.el senator.el tree-widget.el wisent/grammar.el wisent/wisent.el and co-wrote util-modes.el -and changed subr-x.el wid-edit.el image.el w32menu.c w32term.c +and changed wid-edit.el subr-x.el image.el w32menu.c w32term.c cl-extra.el cl-types.el close.png close.xpm cus-edit.el empty.png empty.xpm end-guide.png end-guide.xpm files.el guide.png guide.xpm handle.png handle.xpm keyboard.c leaf.png and 36 other files @@ -1670,7 +1672,8 @@ Dionisio E Alonso: changed eglot.el Dirk Herrmann: co-wrote bibtex.el -Dirk-Jan C. Binnema: changed configure.ac org-agenda.el xwidget.c +Dirk-Jan C. Binnema: changed xwidget.c configure.ac org-agenda.el + process.c process.h Dirk Ullrich: changed ispell.el @@ -1809,9 +1812,9 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c] chartab-tests.el coding-tests.el etags-tests.el rxvt.el tty-colors.el and co-wrote help-tests.el and changed xdisp.c display.texi w32.c msdos.c simple.el w32fns.c - files.el fileio.c keyboard.c configure.ac emacs.c text.texi w32term.c - dispnew.c frames.texi files.texi w32proc.c xfaces.c process.c window.c - dispextern.h and 1451 other files + files.el fileio.c keyboard.c configure.ac emacs.c text.texi dispnew.c + w32term.c frames.texi files.texi w32proc.c xfaces.c process.c window.c + dispextern.h and 1453 other files Eliza Velasquez: changed server.el simple.el @@ -2093,8 +2096,8 @@ Filipp Gunbin: changed ldap.el compilation.txt progmodes/compile.el Filippo Argiolas: changed eglot.el eglot.texi c-ts-common.el -F. Jason Park: changed erc.el erc-tests.el erc-backend.el erc-common.el - erc-stamp.el erc-fill.el erc.texi erc-goodies.el erc-button.el +F. Jason Park: changed erc.el erc-tests.el erc-backend.el erc-stamp.el + erc-common.el erc-fill.el erc.texi erc-goodies.el erc-button.el erc-fill-tests.el erc-networks.el foonet.eld erc-compat.el erc-match.el erc-speedbar.el erc-dcc.el erc-scenarios-common.el erc-sasl.el erc-networks-tests.el erc-track.el erc-goodies-tests.el @@ -2648,6 +2651,8 @@ Iwamuro Motonori: changed gnus-kill.el Jaap-Henk Hoepman: changed mm-decode.el +Jacek Migacz: changed gnus-msg.el + Jacek Świerk: changed compilation.txt compile-tests.el progmodes/compile.el @@ -2849,9 +2854,9 @@ Jay Sachs: changed gnus-score.el gnus-win.el J.D. Smith: co-wrote idlw-help.el idlw-shell.el idlwave.el and changed idlw-rinfo.el comint.el idlwave.texi loaddefs-gen.el vc.el - bibtex.el byte-run.el cl-generic.el easy-mmode.el eglot.el files.texi - functions.texi hideshow.el inline.el loading.texi misc.texi mouse.el - os.texi pcase.el repeat.el shr.el and 9 other files + bibtex.el byte-run.el cl-generic.el configure.ac easy-mmode.el eglot.el + files.texi functions.texi hideshow.el inline.el loading.texi misc.texi + mouse.el os.texi pcase.el repeat.el and 10 other files Jean Abou Samra: changed scheme.el @@ -3054,11 +3059,11 @@ João P. L. De Carvalho: changed sh-script.el João Távora: wrote eglot-tests.el eglot.el elec-pair.el electric-tests.el flymake-cc.el jsonrpc-tests.el jsonrpc.el message-tests.el shorthands.el -and changed flymake.el icomplete.el EGLOT-NEWS README.md eldoc.el +and changed flymake.el EGLOT-NEWS icomplete.el README.md eldoc.el eglot.texi minibuffer.el flymake-proc.el flymake.texi elisp-mode.el flymake-tests.el flymake-elisp.el electric.el elisp-mode-tests.el lread.c text.texi Makefile flymake-ui.el progmodes/python.el project.el - xref.el and 74 other files + xref.el and 77 other files Jochen Hein: changed gnus-art.el @@ -3314,6 +3319,8 @@ Josh Huber: changed mml-sec.el mml.el message.el gnus-msg.el mml2015.el Joshua Datko: changed fortune.el +Joshua Murphy: changed newst-treeview.el + Joshua Varner: changed intro.texi Jostein Kjønigsen: changed csharp-mode.el typescript-ts-mode.el eglot.el @@ -3391,7 +3398,7 @@ Juri Linkov: wrote compose.el emoji.el files-x.el misearch.el and changed isearch.el simple.el replace.el info.el dired.el treesit.el minibuffer.el dired-aux.el window.el outline.el progmodes/grep.el subr.el diff-mode.el repeat.el vc.el mouse.el files.el image-mode.el - menu-bar.el project.el display.texi and 526 other files + menu-bar.el project.el display.texi and 528 other files Jussi Lahdenniemi: changed w32fns.c ms-w32.h msdos.texi w32.c w32.h w32console.c w32heap.c w32inevt.c w32term.h @@ -3877,9 +3884,9 @@ Lin Jian: changed Makefile.in subr.el Lin Sun: changed python-tests.el cedet/semantic.el ediff-util.el package.el progmodes/python.el autorevert-tests.el autorevert.el - bovine/make.el calc.el esh-mode.el eww.el find-func.el html.el - java-tags.el javascript.el lread.c ls-lisp-tests.el ls-lisp.el - master.el package-test-server.py package-tests.el and 5 other files + bovine/make.el calc.el esh-mode.el eww.el find-func.el hideshow.el + html.el java-tags.el javascript.el lread.c ls-lisp-tests.el ls-lisp.el + master.el package-test-server.py and 6 other files Lin Zhou: changed w32fns.c w32term.h @@ -3972,7 +3979,7 @@ Manuel Giraud: changed image-dired.el xdisp.c tmm.el calendar.el doc-view.el image.c vc.el ox-html.el bookmark.el diary-lib.el find-dired.el gnus.el image-dired-util.el keyboard.c longlines.el midnight.el ox-publish.el simple.el smtpmail.el buff-menu.el - cal-hebrew.el and 68 other files + cal-hebrew.el and 69 other files Manuel Gómez: changed speedbar.el @@ -4583,9 +4590,10 @@ Mohsin Kaleem: changed cus-face.el dispextern.h eglot.el term.c Mon Key: changed animate.el imap.el syntax.el -Morgan Smith: changed doc-view.el image-dired.el window.el battery.el - dbus.texi esh-var-tests.el esh-var.el eshell.texi gnus-group-tests.el - minibuffer-tests.el minibuffer.el url-vars.el vc-git.el +Morgan Smith: changed doc-view.el gnus-dbus.el image-dired.el window.el + battery.el dbus.texi esh-var-tests.el esh-var.el eshell.texi + gnus-group-tests.el gnus-start.el gnus.texi minibuffer-tests.el + minibuffer.el url-vars.el vc-git.el Morgan Willcock: changed tempo.el electric.el ert-font-lock.el imenu.el modes.texi progmodes/python.el smie.el speedbar-tests.el speedbar.el @@ -5140,7 +5148,7 @@ Philip Kaludercic: wrote epa-ks.el newcomers-presets-theme.el and co-wrote compat.el and changed package.el rcirc.el package.texi rcirc.texi vc.el sgml-mode.el vc-git.el project.el which-key.el package-autosuggest.eld - package-activate.el message.el startup.el subr.el custom.texi eglot.el + package-activate.el startup.el message.el subr.el custom.texi eglot.el simple.el bytecomp.el cus-edit.el custom.el help.el and 94 other files Philippe Altherr: changed sh-script.el sh-script-tests.el shell.sh @@ -5232,7 +5240,7 @@ Pip Cet: wrote image-circular-tests.el and changed pdumper.c comp.c lisp.h xdisp.c alloc.c xterm.c fns.c configure.ac emacs.c eval.c image.c comp.el frame.c print.c src/Makefile.in byte-opt.el conf_post.h data.c doc.c ftcrfont.c - gtkutil.c and 116 other files + gtkutil.c and 119 other files Platon Pronko: changed tramp.el @@ -5299,8 +5307,8 @@ Raffael Mancini: changed misc.el Raffael Stocker: changed w32.c w32console.c w32fns.c w32term.h w32xfns.c -Rahul Martim Juliato: changed markdown-ts-mode.el icomplete.el - markdown-ts-mode-x.el newst-backend.el +Rahul Martim Juliato: changed markdown-ts-mode.el markdown-ts-mode-x.el + icomplete.el newst-backend.el Raimon Grau: changed thingatpt.el calc-fin.el eww.el replace.el thingatpt-tests.el @@ -5430,11 +5438,11 @@ Richard Lawrence: wrote calendar-tests.el diary-icalendar.el icalendar-ast.el icalendar-macs.el icalendar-mode.el icalendar-parser.el icalendar-recur.el icalendar-shortdoc.el icalendar-utils.el -and changed calendar.el icalendar.el calendar.texi - diary-icalendar-tests.el icalendar-recur-tests.el diary-lib.el - icalendar-tests.el .gitattributes cal-dst.el cal-move.el cond-star.el - diary-icalendar-resources emacs.texi gnus-icalendar-tests.el - gnus-icalendar.el icalendar-ast-tests.el icalendar-parser-tests.el +and changed calendar.el diary-icalendar-tests.el icalendar-recur-tests.el + icalendar.el calendar.texi diary-lib.el gnus-icalendar.el + icalendar-parser-tests.el icalendar-tests.el .gitattributes cal-dst.el + cal-move.el cond-star.el diary-icalendar-resources emacs.texi + gnus-icalendar-tests.el icalendar-ast-tests.el import-legacy-function.ics import-legacy-vars.ics import-non-recurring-all-day.ics import-rrule-anniversary.ics and 8 other files @@ -5761,7 +5769,7 @@ and co-wrote vc-tests.el and changed vc.el vc-git.el vc-dispatcher.el vc-hg.el vc-dir.el diff-mode.el vc-hooks.el vc1-xtra.texi log-view.el maintaining.texi subr.el project.el log-edit.el files.texi server.el simple.el window.el - cond-star.el dired-aux.el keyboard.c vc/vc-bzr.el and 329 other files + cond-star.el dired-aux.el keyboard.c vc/vc-bzr.el and 333 other files Sebastian Fieber: changed gnus-art.el mm-decode.el mm-view.el @@ -6007,7 +6015,7 @@ and co-wrote font-lock.el gitmerge.el pcvs.el visual-wrap.el and changed subr.el simple.el cl-macs.el bytecomp.el files.el keyboard.c lisp.h vc.el eval.c xdisp.c alloc.c help-fns.el buffer.c sh-script.el package.el tex-mode.el progmodes/compile.el lread.c keymap.c window.c - easy-mmode.el and 1744 other files + easy-mmode.el and 1745 other files Stefano Facchini: changed gtkutil.c @@ -6035,9 +6043,9 @@ Stéphane Boucher: changed replace.el Stephane Marks: wrote savehist-tests.el system-sleep.el system-taskbar.el and changed frame.el frames.texi nsfns.m tab-bar.el bookmark.el frame.c - nsterm.m project.el recentf.el savehist.el subr.el vtable.el w32fns.c - display.texi ibuf-macs.el os.texi saveplace.el shell.el vtable-tests.el - androidfns.c ansi-osc.el and 32 other files + nsterm.m markdown-ts-mode.el project.el recentf.el savehist.el subr.el + vtable.el w32fns.c display.texi ibuf-macs.el os.texi saveplace.el + shell.el treesit.el vtable-tests.el and 32 other files Stephane Zermatten: changed term-tests.el term.el ansi-osc.el @@ -6330,6 +6338,8 @@ Thomas Link: wrote filesets.el Thomas Morgan: changed org-habit.el forms.el select.el +Thomas Mühlbacher: changed progmodes/compile.el + Thomas Neumann: co-wrote make-mode.el and changed makefile.el @@ -6929,8 +6939,8 @@ Your Name: changed configure.ac Yuan Fu: changed treesit.el treesit.c c-ts-mode.el parsing.texi treesit-tests.el progmodes/python.el modes.texi js.el c-ts-common.el typescript-ts-mode.el indent.erts treesit.h java-ts-mode.el - rust-ts-mode.el css-mode.el go-ts-mode.el sh-script.el configure.ac - csharp-mode.el treesit-admin.el cmake-ts-mode.el and 88 other files + rust-ts-mode.el css-mode.el go-ts-mode.el sh-script.el cmake-ts-mode.el + configure.ac csharp-mode.el treesit-admin.el and 89 other files Yuanle Song: changed rng-xsd.el @@ -6997,7 +7007,8 @@ Zhang Weize: wrote ob-plantuml.el Zhehao Lin: changed xfaces.c -Zhengyi Fu: changed bookmark.el executable.el +Zhengyi Fu: changed bookmark.el executable.el progmodes/grep.el + replace.el Zhiwei Chen: changed hideif.el diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index eb4040d107e..cdbd3048f27 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -32,11 +32,13 @@ New key bindings: 'k' shuts down, 'r' reconnects, 'e' visits the events buffer, 'w' shows workspace configuration, and 'RET' invokes 'eglot-describe-connection'. -** Eglot uses new built-in 'markdown-ts-mode' of Emacs 31 (bug#80127) +** New variable 'eglot-documentation-renderer' (bug#80127) -This means that on newer versions of Emacs the external -'markdown-mode.el' package does not need to be installed to render -Markdown content. +The variable 'eglot-documentation-renderer' replaces the now-obsolete +'eglot-prefer-plaintext' and offers more control over what major mode is +used to render markdown snippets. By default, the variable is nil and +'gfm-view-mode' from NonGNU ELPA's markdown-mode package is used if +found. See docstring for more details. * Changes in Eglot 1.23 (2/4/2026) diff --git a/etc/NEWS b/etc/NEWS index e6fd8a7f747..1b5bd471cb8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -37,6 +37,18 @@ exit status to 256 if sending input to that process returned EPIPE. Now when this happens, Emacs closes the file descriptor to write to the child process, but allows it to continue execution as normal. +--- +** New variable 'tty-cursor-movement-use-TAB'. +If this is set to the nil value, Emacs will not use TABs to optimize +cursor motion on text-mode terminals. This is for the rare cases where +the hardware tabs of the terminal were set to a non-default value by the +'tabs' command or similar, or if using TABs for cursor movement has any +other undesired effects. The default is t, which preserves past +behavior. + +If this variable is nil, 'tty-cursor-movement-use-TAB-BS' has no effect, +and Emacs will never use TABs for any cursor-movement sequences. + * Editing Changes in Emacs 32.1 @@ -53,15 +65,34 @@ package with the same version. This is useful if you have started making local changes to your tarball installation, and then decided to check out the repository to prepare a patch for the package maintainer. +** Compilation mode + +--- +*** Messages from Ansible are now recognized. + * New Modes and Packages in Emacs 32.1 +** New major modes based on the tree-sitter library + +*** New major mode 'markdown-ts-mode'. +A major mode based on the tree-sitter library for editing Markdown +files. Markdown files are visited using this mode when the required +tree-sitter grammars ('markdown' and 'markdown-inline') are available, +or when the user has opted in via 'treesit-enabled-modes'. Otherwise, +Markdown files fall back to 'text-mode'. + +To install the grammars, use 'M-x markdown-ts-mode-install-parsers'. + * Incompatible Lisp Changes in Emacs 32.1 * Lisp Changes in Emacs 32.1 ++++ +** The new function 'markers-in' returns the set of markers in a region. + --- ** New variable 'completion-frontend-properties'. This variable generalizes the 'completion-lazy-hilit' variable added in @@ -69,6 +100,14 @@ Emacs 30. It allows Lisp programs that present completion candidates ("completion frontends") to provide additional information which can be used to adjust or optimize completion candidates computation. +** D-Bus + ++++ +*** Support error handler in asynchronous method calls. +The HANDLER argument of 'dbus-call-method-asynchronously' can be a cons +cell '(HANDLER . ERROR-HANDLER)'. ERROR-HANDLER is invoked if the +method call returns with a D-Bus error; the error is passed as argument. + * Changes in Emacs 32.1 on Non-Free Operating Systems diff --git a/etc/NEWS.31 b/etc/NEWS.31 index 7fc998ff547..0aaeb547f06 100644 --- a/etc/NEWS.31 +++ b/etc/NEWS.31 @@ -93,7 +93,15 @@ below the line, which allows for vertically centering text. A new basic face 'margin' is used by default for text displayed in the left and right margin areas, which are used by various packages for per-line annotations. Its background defaults to the frame default, so -existing behavior is unchanged for users who do not customize it. +existing behavior is unchanged for users who do not customize this new +face. + +Display strings shown in the margins now inherit the unspecified face +attributes from the 'margin' face, if the string itself does not fully +specify its face. If your code relied on the face of the underlying +buffer text to serve as default for the unspecified face attributes of +strings displayed in the margin, you must now set those face attributes +in the margin string itself via 'propertize'. +++ ** 'prettify-symbols-mode' attempts to ignore undisplayable characters. @@ -572,6 +580,14 @@ ID. When called interactively, both functions prompt for an ID. ** Mode Line +--- +*** New definitions for mode-line faces under dark background mode. +The faces 'mode-line' and 'mode-line-highlight' now have separate +definitions for the dark background mode. Previously, these two faces +looked the same in both the light and dark background modes. To get the +previous visuals for these two faces, customize them to have the colors +"grey75" and "grey40", respectively, regardless of the background mode. + +++ *** New user option 'mode-line-collapse-minor-modes'. If non-nil, minor mode lighters on the mode line are collapsed into a @@ -2997,7 +3013,7 @@ In addition, the Git backend has been fixed to display missing files as There is still some further work to do to rationalize VC's handling of file removal. ---- ++++ *** New user option 'vc-dir-auto-hide-up-to-date'. If you customize this option to 'revert', the 'g' command to refresh the VC Directory buffer also has the effect of the 'x' command. @@ -3936,15 +3952,6 @@ A major mode based on 'conf-mode' for editing ".npmrc" files. ** New major modes based on the tree-sitter library -*** New major mode 'markdown-ts-mode'. -A major mode based on the tree-sitter library for editing Markdown -files. Markdown files are visited using this mode when the required -tree-sitter grammars ('markdown' and 'markdown-inline') are available, -or when the user has opted in via 'treesit-enabled-modes'. Otherwise, -Markdown files fall back to 'text-mode'. - -To install the grammars, use 'M-x markdown-ts-mode-install-parsers'. - *** New major mode 'mhtml-ts-mode'. An optional major mode based on the tree-sitter library for editing HTML files. This mode handles indentation, fontification, and commenting for @@ -4214,6 +4221,11 @@ suggestions. So the 'M-?' command now works without a tags table. And the 'M-.' will show a message describing the several built-in options that will provide an Xref backend when used. ++++ +** Calling 'debug' in batch sessions no longer kills Emacs. +If you want Emacs to exit, your program will now have to call +'kill-emacs' explicitly. + * Lisp Changes in Emacs 31.1 diff --git a/etc/PROBLEMS b/etc/PROBLEMS index b619c6e7f37..54302968e6d 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -136,6 +136,9 @@ result in an endless loop. If you need Emacs to be able to recover from closing displays, compile it with the Lucid toolkit instead of GTK. +One possible mitigation for the problem is described in +https://debbugs.gnu.org/81124 + ** Emacs compiled with GTK+ 3 crashes when run under some X servers. This happens when the X server does not provide certain display features that the underlying GTK+ 3 toolkit assumes. For example, this @@ -3643,6 +3646,41 @@ file; for example: "/usr/local/opt/libgccjit/lib/gcc/11" "/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin20/11.2.0") ":")) +** Stuttering and missed keypresses during Native Compilation on macOS + +Natively compiled modules are validated by macOS the first time that +they are loaded. On some machines, this can cause Emacs to be +temporarily less responsive while a large number of '*.eln' files are +being compiled and loaded. + +One can force the first load of the module to happen in the async +compilation worker by adding this to their early-init.el: + + (setq native-comp-async-env-modifier-form + '(progn + (defun c/native-comp--preload-eln-after-compile + (compile function-or-file &optional with-late-load output) + "Preload async native-comp output in the compiler child." + (prog1 (funcall compile function-or-file with-late-load output) + (when (and (stringp function-or-file) with-late-load) + (with-demoted-errors "Async native .eln preload: %S" + (let ((eln-file (comp-el-to-eln-filename function-or-file))) + (when (file-exists-p eln-file) + (native-elisp-load eln-file t))))))) + + (advice-add 'comp--native-compile + :around #'c/native-comp--preload-eln-after-compile))) + +Alternatively, if one is willing to accept the associated security +risks, one could disable library validation on their Emacs binary: + + codesign --force --sign - \ + --entitlements macos-disable-library-validation.entitlements \ + src/emacs + +Disabling validation might expose you to security risks, so please +consider that before using this recipe. + ** Text dictation doesn't work on macOS The indication is that the macOS keyboard shortcut for dictation is ignored. diff --git a/etc/compilation.txt b/etc/compilation.txt index b97ba12fb9a..323ef8cf3c0 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -41,6 +41,24 @@ symbol: aix ****** Error number 140 in line 8 of file errors.c ****** +* Ansible + +symbols: ansible-error ansible-fatal ansible-warning + ansible-included ansible-origin + +[ERROR]: couldn't resolve module/action 'shelll'. This often indicates a misspelling, missing collection, or incorrect module path. +Origin: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml:19:3 +[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg. +[DEPRECATION WARNING]: Importing 'to_bytes' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead. +included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'}) +fatal: [localhost]: FAILED! => { + "assertion": "message == []", + "changed": false, + "evaluated_to": false, + "msg": "Assertion failed" +} + + * Ant Java: works at least for jikes and javac symbol: ant @@ -161,7 +179,7 @@ cucumber foo/cucumber.feature:15 # Scenario: deep backtrace in step definition * EDG C/C++ -symbol: edg-1 edg-2 +symbols: edg-1 edg-2 build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ... @@ -178,7 +196,7 @@ Error 24 at (2:progran.f90) : syntax error * Fortran checker -symbols: ftnchek +symbol: ftnchek Dummy arg W in module SUBA line 8 file arrayclash.f is array L4 used at line 55 file test/assign.f; never set @@ -336,7 +354,7 @@ boost/container/detail/flat_tree.hpp:589:25: [ skipping 5 instantiation contex * Guile backtrace, 2.0.11 -symbols: guile-file, guile-line +symbols: guile-file guile-line Backtrace: In ice-9/boot-9.scm: @@ -356,6 +374,8 @@ In /home/janneke/vc/guile/examples/gud-break.scm: * Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1 +symbols: lua lua-stack + /usr/bin/lua: database.lua:31: assertion failed! stack traceback: [C]: in function 'assert' @@ -490,7 +510,7 @@ Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66 * Rust -symbol: rust rust-panic +symbols: rust rust-panic error[E0277]: `Foo` is not an iterator --> src/main.rs:4:16 @@ -612,7 +632,7 @@ bloofle defined( /users/wolfgang/foo.c(4) ), but never used * GCOV (test coverage program) -symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line +symbols: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line -: 0:Source:foo.c -: 0:Object:foo.bb diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index dcd3208d132..8b38b98897e 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{9.8.3} +\def\orgversionnumber{9.8.5} \def\versionyear{2026} % latest update \input emacsver.tex diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index e0da2c88121..381481c7fbd 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -74,6 +74,7 @@ char *w32_getenv (const char *); #include #include #include +#include #include #include #include @@ -146,8 +147,9 @@ static char const *socket_name; /* If non-NULL, the filename of the authentication file. */ static char const *server_file; -/* Seconds to wait before timing out (0 means wait forever). */ -static uintmax_t timeout; +/* Seconds to wait before timing out. Negative means no --timeout so + use DEFAULT_TIMEOUT, 0 means wait forever. */ +static intmax_t timeout = -1; /* If non-NULL, the tramp prefix emacs must use to find the files. */ static char const *tramp_prefix; @@ -539,10 +541,8 @@ decode_options (int argc, char **argv) break; case 'w': - timeout = strtoumax (optarg, &endptr, 10); - if (timeout <= 0 || - ((timeout == INTMAX_MAX || timeout == INTMAX_MIN) - && errno == ERANGE)) + timeout = strtoimax (optarg, &endptr, 10); + if (timeout < 0 || endptr == optarg || *endptr) { fprintf (stderr, "Invalid timeout: \"%s\"\n", optarg); exit (EXIT_FAILURE); @@ -902,7 +902,7 @@ quote_argument_len (HSOCKET s, const char *str, ptrdiff_t len) static void quote_argument (HSOCKET s, const char *str) { - return quote_argument_len (s, str, strlen (str)); + quote_argument_len (s, str, strlen (str)); } /* The inverse of quote_argument. Remove quoting in string STR by @@ -1952,28 +1952,30 @@ start_daemon_and_retry_set_socket (void) return emacs_socket; } +/* Set SOCKET's timeout to SECONDS. + If SECONDS is zero or out of range, do not set the timeout. + Silently ignore errors, as POSIX says it is implementation-defined as + to whether SO_RCVTIMEO works. Although we could fall back on + non-blocking I/O if setsockopt fails, it's not worth the trouble. */ static void -set_socket_timeout (HSOCKET socket, int seconds) +set_socket_timeout (HSOCKET socket, intmax_t seconds) { - int ret; + if (seconds <= 0) + return; #ifndef WINDOWSNT struct timeval timeout; - timeout.tv_sec = seconds; + if (ckd_add (&timeout.tv_sec, seconds, 0)) + return; timeout.tv_usec = 0; - ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout); + setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout); #else DWORD timeout; - if (seconds > INT_MAX / 1000) - timeout = INT_MAX; - else - timeout = seconds * 1000; - ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout); + if (ckd_mul (&timeout, seconds, 1000)) + return; + setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout); #endif - - if (ret < 0) - sock_err_message ("setsockopt"); } static bool @@ -2210,7 +2212,7 @@ main (int argc, char **argv) } fflush (stdout); - set_socket_timeout (emacs_socket, timeout > 0 ? timeout : DEFAULT_TIMEOUT); + set_socket_timeout (emacs_socket, timeout < 0 ? DEFAULT_TIMEOUT : timeout); bool saw_response = false; ptrdiff_t nrecv = 0; @@ -2236,7 +2238,7 @@ main (int argc, char **argv) if (timeout > 0) { /* Don't retry if we were given a --timeout flag. */ - fprintf (stderr, "\nServer not responding; timed out after %ju seconds", + fprintf (stderr, "\nServer not responding; timed out after %jd seconds", timeout); retry = false; } diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 83764074eec..cc40b99cfb4 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -267,7 +267,7 @@ If DATE is malformed, return a time value of zero." ;;;###autoload (defun format-seconds (string seconds) - "Use format control STRING to format the number SECONDS. + "Use format control STRING to format the time value SECONDS. The valid format specifiers are: %y is the number of (365-day) years. %d is the number of days. @@ -325,13 +325,14 @@ right of \"%x\", trailing zero units are not output." (push match usedunits))) (when (and zeroflag larger) (error "Units are not in decreasing order of size")) - (unless (numberp seconds) - (setq seconds (float-time seconds))) - (setq minus (when (< seconds 0) "-") ; Treat -0.0 like 0.0. - seconds (abs seconds) - seconds (let ((s (floor seconds))) - (setq fraction (- seconds s)) - s)) + (unless seconds + (setq seconds (current-time))) + (let ((negative (time-less-p seconds 0))) + (setq minus (when negative "-") ; Treat -0.0 like 0.0. + seconds (if negative (time-subtract 0 seconds) seconds) + seconds (let ((s (time-convert seconds 'integer))) + (setq fraction (time-subtract seconds s)) + s))) (dolist (u units) (setq spec (car u) name (cadr u) @@ -352,9 +353,8 @@ right of \"%x\", trailing zero units are not output." ;; Cf article-make-date-line in gnus-art. (setq num (floor seconds unit) seconds (- seconds (* num unit))) - (let ((is-zero (zerop (if (= unit 1) - (+ num fraction) - num)))) + (let ((is-zero (and (zerop num) + (or (/= unit 1) (time-equal-p 0 fraction))))) ;; Start position of the first non-zero unit. (when (and (not leading-zeropos) (not is-zero)) @@ -379,7 +379,9 @@ right of \"%x\", trailing zero units are not output." "f%s") (concat "%" (match-string 1 string) "d%s")) (if (= unit 1) - (+ num fraction) + ;; 'float-time' rounds, then 'format' rounds. + ;; Oh well. + (float-time (time-add num fraction)) num) (if (string-equal (match-string 3 string) spec) "" ; lower-case, no unit-name diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el index f329d627392..64e20327906 100644 --- a/lisp/emacs-lisp/comp-run.el +++ b/lisp/emacs-lisp/comp-run.el @@ -203,9 +203,10 @@ LOAD and SELECTOR work as described in `native--compile-async'." ;; because power users often configure their batteries ;; to stop charging at less than 100% as a way to ;; extend the lifetime of their battery hardware. - (string= (cdr (assq ?b res)) "+") - (member (cdr (assq ?B res)) '("charging" "pending-charge")) - (not (string= (cdr (assq ?B res)) "discharging"))))))) + ;; Further discussion in bug#80922. + (and (not (equal (cdr (assq ?b res)) "+")) + (not (member (cdr (assq ?B res)) + '("charging" "pending-charge"))))))))) (defvar comp-files-queue () "List of Emacs Lisp files to be compiled.") diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el index e0198b53b63..f95ea41e496 100644 --- a/lisp/emacs-lisp/elisp-scope.el +++ b/lisp/emacs-lisp/elisp-scope.el @@ -1,4 +1,4 @@ -;;; elisp-scope.el --- Semantic analysis for Elisp symbols -*- lexical-binding: t; -*- +;;; elisp-scope.el --- Semantic analysis for Emacs Lisp symbols -*- lexical-binding: t; -*- ;; Copyright (C) 2025-2026 Free Software Foundation, Inc. diff --git a/lisp/emacs-lisp/timeout.el b/lisp/emacs-lisp/timeout.el index 5accb5b7e24..f0aa0481401 100644 --- a/lisp/emacs-lisp/timeout.el +++ b/lisp/emacs-lisp/timeout.el @@ -1,4 +1,4 @@ -;;; timeout.el --- Throttle or debounce Elisp functions -*- lexical-binding: t; -*- +;;; timeout.el --- Throttle or debounce Emacs Lisp functions -*- lexical-binding: t; -*- ;; Copyright (C) 2023-2026 Free Software Foundation, Inc. diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el index 9416e217ba9..70e74bb0928 100644 --- a/lisp/emacs-lisp/timer-list.el +++ b/lisp/emacs-lisp/timer-list.el @@ -49,10 +49,9 @@ (let ((time (timer--time timer))) (format "%12s" (format-seconds "%dd %hh %mm %z%,1ss" - (float-time - (if (timer--idle-delay timer) - time - (time-subtract time nil)))))) + (if (timer--idle-delay timer) + time + (time-subtract time nil))))) 'help-echo "Time until next invocation") ;; Repeat. ,(let ((repeat (timer--repeat-delay timer))) diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el index 83c8bc38b26..e0504371e0d 100644 --- a/lisp/epa-ks.el +++ b/lisp/epa-ks.el @@ -194,7 +194,7 @@ KEYS is a list of `epa-ks-key' structures, as parsed by (if (epa-ks-key-expires key) (let* ((date (epa-ks-key-expires key)) (str (format-time-string "%F" date))) - (when (< 0 (time-to-seconds (time-since date))) + (when (time-less-p date nil) (setq str (propertize str 'face 'font-lock-warning-face))) str) diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index f1f92923ea2..e99d5f68175 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -399,16 +399,18 @@ This module is local to individual buffers." (progn (erc--restore-initialize-priors erc-keep-place-indicator-mode erc--keep-place-indicator-overlay (make-overlay 0 0)) - (when-let* (((memq erc-keep-place-indicator-style '(t arrow))) - (ov-property (if (zerop (fringe-columns 'left)) - 'after-string - 'before-string)) - (display (if (zerop (fringe-columns 'left)) - `((margin left-margin) ,overlay-arrow-string) - '(left-fringe right-triangle - erc-keep-place-indicator-arrow))) - (bef (propertize " " 'display display))) - (overlay-put erc--keep-place-indicator-overlay ov-property bef)) + (when (memq erc-keep-place-indicator-style '(t arrow)) + (overlay-put + erc--keep-place-indicator-overlay + (if (zerop (fringe-columns 'left)) 'after-string 'before-string) + (propertize " " 'display + (if (zerop (fringe-columns 'left)) + `((margin left-margin) + ,(propertize overlay-arrow-string + 'font-lock-face + 'erc-keep-place-indicator-arrow)) + '(left-fringe right-triangle + erc-keep-place-indicator-arrow))))) (when (memq erc-keep-place-indicator-style '(t face)) (overlay-put erc--keep-place-indicator-overlay 'face 'erc-keep-place-indicator-line))) diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index bf1018f58b6..fa4b829b4cf 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el @@ -478,7 +478,7 @@ and `erc-stamp--margin-left-p', before activating the mode." (defun erc-stamp--display-prompt-in-left-margin () "Show prompt in the left margin with padding." - (when (or (not erc-stamp--last-prompt) (functionp erc-prompt) + (when (or (null erc-stamp--last-prompt) (functionp erc-prompt) (> (string-width erc-stamp--last-prompt) left-margin-width)) (let ((s (buffer-substring erc-insert-marker (1- erc-input-marker)))) ;; Prevent #("abc" n m (display ((...) #("abc" p q (display...)))) @@ -489,7 +489,9 @@ and `erc-stamp--margin-left-p', before activating the mode." ;; This papers over a subtle off-by-1 bug here. (unless (equal sm s) (setq s (concat sm (substring s -1)))))) - (setq erc-stamp--last-prompt (string-pad s left-margin-width nil t)))) + (setq erc-stamp--last-prompt + (propertize (string-pad s left-margin-width nil t) + 'font-lock-face 'erc-prompt-face)))) (put-text-property erc-insert-marker (1- erc-input-marker) 'display `((margin left-margin) ,erc-stamp--last-prompt)) erc-stamp--last-prompt) @@ -505,12 +507,15 @@ and `erc-stamp--margin-left-p', before activating the mode." (&context (erc-stamp--display-margin-mode (eql t)) (erc-stamp--margin-left-p (eql t)) (erc-stamp--skip-left-margin-prompt-p null)) - (when-let* (((null erc--hidden-prompt-overlay)) - (prompt (string-pad erc-prompt-hidden left-margin-width nil 'start)) - (ov (make-overlay erc-insert-marker (1- erc-input-marker) - nil 'front-advance))) - (overlay-put ov 'display `((margin left-margin) ,prompt)) - (setq erc--hidden-prompt-overlay ov))) + (unless erc--hidden-prompt-overlay + (let ((ov (make-overlay erc-insert-marker (1- erc-input-marker) + nil 'front-advance))) + (overlay-put ov 'display + `((margin left-margin) + ,(propertize (string-pad erc-prompt-hidden + left-margin-width nil 'start) + 'font-lock-face 'erc-prompt-face))) + (setq erc--hidden-prompt-overlay ov)))) (defun erc-insert-timestamp-left (string) "Insert timestamps at the beginning of the line." diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 782c51add08..703619848d7 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -257,10 +257,8 @@ If it is down, start it up (again)." (goto-char (point-max)) (insert (format-time-string "%H:%M:%S") (format " %.2fs %s %S\n" - (if (numberp gnus-backend-trace-elapsed) - (float-time - (time-since gnus-backend-trace-elapsed)) - 0) + (float-time + (time-since gnus-backend-trace-elapsed)) type form)) (setq gnus-backend-trace-elapsed (float-time))))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 6531669087b..b08a54d9d09 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2217,6 +2217,8 @@ see `message-narrow-to-headers-or-head'." (beginning-of-line) (while (looking-at "[ \t]") (forward-line -1)) + ;; `syntax-propertize' can't widen so make sure it won't need to (bug#81035). + (syntax-propertize (point)) (narrow-to-region (point) (progn @@ -8659,6 +8661,9 @@ From headers in the original article." (save-excursion (goto-char end-of-headers) (insert-before-markers header)))))))) + ;; `syntax-propertize' can't widen so make sure it won't need to + ;; (bug#81035). + (syntax-propertize end-of-headers) (narrow-to-region end-of-headers (point-max))))) (defun message-hide-header-p (regexps) diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 57f23e6b8aa..6e0cde6b653 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -157,7 +157,8 @@ coding system names is determined from `latex-inputenc-coding-alist'." nil t) (match-string 2) (or (and (bound-and-true-p TeX-master) - (stringp TeX-master)) + (stringp TeX-master) + TeX-master) (bound-and-true-p tex-main-file))))) (dolist (ext `("" ,(if (boundp 'TeX-default-extension) (concat "." TeX-default-extension) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index f4a032c647d..d69fd106e5c 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -473,6 +473,7 @@ and send the mail again%s." ;; questions about From header validity if the user is going to ;; use mailclient, anyway. (when (or (and (derived-mode-p 'message-mode) + (not message-server-alist) (eq (message-default-send-mail-function) 'sendmail-query-once)) (and (not (derived-mode-p 'message-mode)) (eq send-mail-function 'sendmail-query-once))) diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 1f9d1310782..e317b0f13cd 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -843,8 +843,11 @@ directly." ((string-match "text/" content-type) (setq type 'text)) ((string-match "image/\\(.*\\)" content-type) - (setq type (image-supported-file-p - (concat "." (match-string 1 content-type)))) + (let ((fnext (match-string 1 content-type))) + ;; Ask about SVG support when Content-type is image/svg+xml. + (if (equal fnext "svg+xml") + (setq fnext "svg")) + (setq type (image-supported-file-p (concat "." fnext)))) (when (and type rmail-mime-show-images (not (eq rmail-mime-show-images 'button)) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b1c5e6e5180..00ce306ba67 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -5005,11 +5005,6 @@ usual. Returns (ALL PAT PREFIX SUFFIX)." (prefix (substring beforepoint 0 (car bounds))) (suffix (substring afterpoint (cdr bounds))) (pat2 (substring pat (car bounds) (+ point (cdr bounds)))) - (completion-regexp-list - (cons (mapconcat (lambda (c) (regexp-quote (char-to-string c))) - pat2 - ".*") - completion-regexp-list)) (all (all-completions prefix table pred)) (all (if (zerop (length pat2)) all diff --git a/lisp/mouse.el b/lisp/mouse.el index 20c819ee0a8..1ff79e3833e 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -539,6 +539,7 @@ Some context functions add menu items below the separator." (cdr mode)))) menu) +(autoload 'send-to--resolve-handler "send-to") (defun context-menu-send-to (menu _click) "Add a \"Send to...\" context MENU entry on supported platforms." (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) diff --git a/lisp/mpc.el b/lisp/mpc.el index 4b2aa7ac647..1d2f38a97dc 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -2570,6 +2570,9 @@ If stopped, start playback." (t (mpc-proc-cmd "previous"))) (mpc-status-refresh))) +;; FIXME - mpc-last-seek-time and mpc--faster are no longer used; +;; remove them? + (defvar mpc-last-seek-time '(0 . 0)) (defun mpc--faster (event speedup step) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 63aad53abe4..b75c4f119a0 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -317,7 +317,8 @@ Defaults to the value of `browse-url-mozilla-arguments' at the time "zen") "firefox") "The name by which to invoke Firefox or a variant of it." - :type 'string) + :type 'string + :version "31.1") (defcustom browse-url-firefox-arguments nil "A list of strings to pass to Firefox (or variant) as arguments." @@ -1214,8 +1215,9 @@ used instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-firefox (url &optional new-window) "Ask the Firefox WWW browser to load URL. -Defaults to the URL around or before point. Passes the strings -in the variable `browse-url-firefox-arguments' to Firefox. +Defaults to the URL around or before point. Invokes the program +specified by `browse-url-firefox-program'. Passes the strings +in the variable `browse-url-firefox-arguments' to that program. Interactively, if the variable `browse-url-new-window-flag' is non-nil, loads the document in a new Firefox window. A non-nil prefix argument @@ -1246,9 +1248,9 @@ instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-chromium (url &optional _new-window) "Ask the Chromium WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-chromium-arguments' are also passed to -Chromium. +Default to the URL around or before point. Invokes the program +specified by `browse-url-chromium-program'. Passes the strings in +variable `browse-url-chromium-arguments' to that program. The optional argument NEW-WINDOW is not used." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) @@ -1264,9 +1266,9 @@ The optional argument NEW-WINDOW is not used." (defun browse-url-chrome (url &optional _new-window) "Ask the Google Chrome WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-chrome-arguments' are also passed to -Google Chrome. +Default to the URL around or before point. Invokes the program +specified by `browse-url-chrome-program'. Passes to that program +the strings in variable `browse-url-chrome-arguments'. The optional argument NEW-WINDOW is not used." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) @@ -1282,8 +1284,9 @@ The optional argument NEW-WINDOW is not used." (defun browse-url-epiphany (url &optional new-window) "Ask the GNOME Web (Epiphany) WWW browser to load URL. -Default to the URL around or before point. The strings in variable -`browse-url-epiphany-arguments' are also passed to GNOME Web. +Default to the URL around or before point. Invokes the program +specified by `browse-url-epiphany-program'. Passes the strings +in variable `browse-url-epiphany-arguments' to that program. When called interactively, if variable `browse-url-new-window-flag' is non-nil, load the document in a new GNOME Web window, otherwise use a @@ -1353,7 +1356,9 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-qutebrowser (url &optional new-window) "Ask the Qutebrowser WWW browser to load URL. -Default to the URL around or before point. +Default to the URL around or before point. Invokes the program +specified by `browse-url-qutebrowser-program'. Passes the strings +in the variable `browse-url-qutebrowser-arguments' to that program. When called interactively, if variable `browse-url-new-window-flag' is non-nil, load the document in a new Qutebrowser window, otherwise use a diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 0c748e76fcf..3a5cf48b92f 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -445,8 +445,17 @@ object path SERVICE is registered at. INTERFACE is an interface offered by SERVICE. It must provide METHOD. HANDLER is a Lisp function, which is called when the corresponding -return message has arrived. If HANDLER is nil, no return message -will be expected. +return message has arrived. It uses the returned values from the METHOD +call as arguments. These are the same arguments which are returned when +`dbus-call-method' is invoked instead. If HANDLER is nil, no return +message will be expected. + +HANDLER can also be the cons cell `(HANDLER . ERROR-HANDLER)'. In this +case, ERROR-HANDLER will be called in case an error is returned from +D-Bus. It uses the returned D-Bus error as argument. + +Neither the return value of HANDLER nor the return value of +ERROR-HANDLER is used. If the parameter `:timeout' is given, the following integer TIMEOUT specifies the maximum number of milliseconds before the @@ -477,18 +486,37 @@ about type keywords, see Info node `(dbus)Type Conversion'. If HANDLER is a Lisp function, the function returns a key into the hash table `dbus-registered-objects-table'. The corresponding entry in the hash table is removed, when the return message arrives, -and HANDLER is called. +and HANDLER is called. Examples: -Example: +The return value of \"org.freedesktop.portal.Settings.ReadOne\" is a variant. \(dbus-call-method-asynchronously - :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" - \"org.freedesktop.Hal.Device\" \"GetPropertyString\" #\\='message - \"system.kernel.machine\") + :session \"org.freedesktop.portal.Desktop\" + \"/org/freedesktop/portal/desktop\" + \"org.freedesktop.portal.Settings\" \"ReadOne\" + \\='((lambda (msg) (message \"Method handler %s\" msg)) . + (lambda (err) (message \"Error handler %s\" err))) + \"org.freedesktop.appearance\" \"color-scheme\") - -| i686 + -| Method handler (0) - => (:serial :system 2)" + => (:serial :session 4) + +There does not exist a method \"org.freedesktop.portal.Settings.ReadTwo\". + +\(dbus-call-method-asynchronously + :session \"org.freedesktop.portal.Desktop\" + \"/org/freedesktop/portal/desktop\" + \"org.freedesktop.portal.Settings\" \"ReadTwo\" + \\='((lambda (msg) (message \"Method handler %s\" msg)) . + (lambda (err) (message \"Error handler %s\" err))) + \"org.freedesktop.appearance\" \"color-scheme\") + + -| Error handler + (dbus-error org.freedesktop.DBus.Error.UnknownMethod + No such method \"ReadTwo\") + + => (:serial :session 5)" (or (featurep 'dbusbind) (signal 'dbus-error (list "Emacs not compiled with dbus support"))) @@ -504,6 +532,7 @@ Example: (or (stringp method) (signal 'wrong-type-argument (list 'stringp method))) (or (null handler) (functionp handler) + (and (listp handler) (functionp (car handler)) (functionp (cdr handler))) (signal 'wrong-type-argument (list 'functionp handler))) (apply #'dbus-message-internal dbus-message-type-method-call @@ -1111,9 +1140,11 @@ INTERFACE and MEMBER denote the message which has been sent. When TYPE is `dbus-message-type-error', MEMBER is the error name. HANDLER is the function which has been registered for this -message. ARGS are the typed arguments as returned from the -message. They are passed to HANDLER without type information, -when it is called during event handling in `dbus-handle-event'. +message. It can also be a cons cell (HANDLER . ERROR-HANDLER). + +ARGS are the typed arguments as returned from the message. They are +passed to HANDLER without type information, when it is called during +event handling in `dbus-handle-event'. This function signals a `dbus-error' if the event is not well formed." @@ -1150,7 +1181,10 @@ formed." (or (= dbus-message-type-method-return (nth 2 event)) (stringp (nth 8 event))) ;; Handler. - (functionp (nth 9 event)) + (or (functionp (nth 9 event)) + (and (consp (nth 9 event)) + (functionp (car (nth 9 event))) + (functionp (cdr (nth 9 event))))) ;; Arguments. (listp (nthcdr 10 event))) (signal 'dbus-error (list "Not a valid D-Bus event" event)))) @@ -1207,10 +1241,17 @@ If the HANDLER returns a `dbus-error', it is propagated as return message." (setq result (dbus-ignore-errors (apply (nth 9 event) args))) ;; Error messages must be propagated. The error name is in ;; the member slot. - (when (= dbus-message-type-error (nth 2 event)) - (signal 'dbus-error (cons (nth 8 event) args))) - ;; Apply the handler. - (setq result (apply (nth 9 event) args)) + (let* ((handler (nth 9 event)) + (error-handler (if (functionp handler) #'signal + (prog1 (cdr handler) + (setq handler (car handler)))))) + (setq result + (if (= dbus-message-type-error (nth 2 event)) + (funcall + error-handler + (cons 'dbus-error (cons (nth 8 event) args))) + ;; Apply the handler. + (apply handler args)))) ;; Return an (error) message when it is a message call. (when (= dbus-message-type-method-call (nth 2 event)) (dbus-ignore-errors diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 9acbaa52fa9..542afa41180 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1771,7 +1771,10 @@ just re-display the HTML already fetched." (put-text-property start (point) 'keymap eww-submit-map) ;; Pretend to touch-screen.el that this is a button. (put-text-property start (point) 'button t) - (insert " "))) + (insert " ") + (put-text-property start (1+ start) 'help-echo "Button") + ;; Mark this as an element we can TAB to. + (put-text-property start (1+ start) 'shr-tab-stop t))) (defun eww-form-checkbox (dom) (let ((start (point))) @@ -1991,7 +1994,8 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") :value (or (dom-attr dom 'value) ""))))))) (t (eww-form-text dom))) - (unless (= start (point)) + (unless (or (= start (point)) + (equal type "submit")) (put-text-property start (1+ start) 'help-echo "Input field") ;; Mark this as an element we can TAB to. (put-text-property start (1+ start) 'shr-tab-stop t)))) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8d4dc557676..f939635cfb5 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3081,7 +3081,7 @@ will be used." ;; We discard hops, if existing, that's why we cannot use ;; `file-remote-p'. (prompt (format "PS1=%s %s" - (tramp-make-tramp-file-name v) + (tramp-make-tramp-file-name v 'noloc) tramp-initial-end-of-output)) ;; We use as environment the difference to toplevel ;; `process-environment'. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index fc897fb2a7c..044580bac07 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -801,19 +801,23 @@ The regexp should match at end of buffer." (? "/[fingerprint]") ")?" (* blank)) "Regular expression matching all yes/no queries which need to be confirmed. -The confirmation should be done with yes or no. +The confirmation should be done with \"yes\" or \"no\". The regexp should match at end of buffer. See also `tramp-yn-prompt-regexp'." :type 'regexp) (defcustom tramp-yn-prompt-regexp (rx (| (: "Store key in cache? (y/n" (* nonl) ")") - "Update cached key? (y/n, Return cancels connection)") + "Update cached key? (y/n, Return cancels connection)" + ;; distrobox. + (: "Error: no such container \"" (+ nonl) "\"\n" + "Create it now, out of image " (+ nonl) "? [Y/n]:")) (* blank)) "Regular expression matching all y/n queries which need to be confirmed. -The confirmation should be done with y or n. +The confirmation should be done with \"y\" or \"n\". The regexp should match at end of buffer. See also `tramp-yesno-prompt-regexp'." + :version "31.1" :type 'regexp) ;;;###tramp-autoload @@ -5474,7 +5478,9 @@ should be set connection-local.") "Return non-nil if ARG exists in default `process-environment'. Tramp does not propagate local environment variables in remote processes." - (member arg (default-toplevel-value 'process-environment))) + (or (ignore-error void-variable + (member arg (buffer-local-toplevel-value 'process-environment))) + (member arg (default-toplevel-value 'process-environment)))) (defun tramp-handle-make-process (&rest args) "An alternative `make-process' implementation for Tramp files." diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index b900ab377aa..00d5ffb2afa 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -7,7 +7,7 @@ ;; Maintainer: Michael Albinus ;; Keywords: comm, processes ;; Package: tramp -;; Version: 2.8.2-pre +;; Version: 2.8.2 ;; Package-Requires: ((emacs "28.1")) ;; Package-Type: multi ;; URL: https://www.gnu.org/software/tramp/ @@ -40,7 +40,7 @@ ;; ./configure" to change them. ;;;###tramp-autoload -(defconst tramp-version "2.8.2-pre" +(defconst tramp-version "2.8.2" "This version of Tramp.") ;;;###tramp-autoload @@ -76,7 +76,7 @@ ;; Check for Emacs version. (let ((x (if (not (string-version-lessp emacs-version "28.1")) "ok" - (format "Tramp 2.8.2-pre is not fit for %s" + (format "Tramp 2.8.2 is not fit for %s" (replace-regexp-in-string "\n" "" (emacs-version)))))) (unless (string-equal "ok" x) (error "%s" x))) @@ -109,7 +109,8 @@ ("2.5.2.28.1" . "28.1") ("2.5.3.28.2" . "28.2") ("2.5.4" . "28.3") ("2.6.0.29.1" . "29.1") ("2.6.2.29.2" . "29.2") ("2.6.3-pre" . "29.3") ("2.6.3" . "29.4") - ("2.7.1.30.1" . "30.1") ("2.7.3.30.2" . "30.2"))) + ("2.7.1.30.1" . "30.1") ("2.7.3.30.2" . "30.2") + ("2.8.2" . "31.1"))) (add-hook 'tramp-unload-hook (lambda () diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index dd86a716ac7..481eba50313 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -7875,7 +7875,7 @@ in the agenda." "Rebuild possibly ALL agenda view(s) in the current buffer." (interactive "P") (defvar org-agenda-tag-filter-while-redo) ;FIXME: Where is this var used? - (let* ((p (or (and (looking-at "\\'") (1- (point))) (point))) + (let* ((p (or (and (/= 1 (point)) (looking-at "\\'") (1- (point))) (point))) (cpa (unless (eq all t) current-prefix-arg)) (org-agenda-doing-sticky-redo org-agenda-sticky) (org-agenda-sticky nil) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index ce2d23a9b97..43f7681d684 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1207,9 +1207,9 @@ to be CLOCKED OUT.")))) (read-number "Keep how many minutes: " default)) (and (memq ch '(?t ?T)) (floor - (/ (float-time - (time-subtract (org-read-date t t) last-valid)) - 60))))) + (float-time + (time-subtract (org-read-date t t) last-valid)) + 60)))) (gotback (and (memq ch '(?g ?G)) (read-number "Got back how many minutes ago: " default))) @@ -1991,13 +1991,15 @@ Optional argument N tells to change by that many units." (user-error "No active clock")) (save-excursion ; Do not replace this with `with-current-buffer'. (with-no-warnings (set-buffer (org-clocking-buffer))) - (goto-char org-clock-marker) - (if (looking-back (concat "^[ \t]*" org-clock-string ".*") - (line-beginning-position)) - (progn (delete-region (1- (line-beginning-position)) (line-end-position)) - (org-remove-empty-drawer-at (point))) - (message "Clock gone, cancel the timer anyway") - (sit-for 2))) + (save-restriction + (widen) + (goto-char org-clock-marker) + (if (looking-back (concat "^[ \t]*" org-clock-string ".*") + (line-beginning-position)) + (progn (delete-region (1- (line-beginning-position)) (line-end-position)) + (org-remove-empty-drawer-at (point))) + (message "Clock gone, cancel the timer anyway") + (sit-for 2)))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (setq org-clock-current-task nil) diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 8b97aa2ad01..6eed2351ceb 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2004-2026 Free Software Foundation, Inc. ;; Author: Carsten Dominik +;; Maintainer: Slawomir Grochowski ;; Keywords: outlines, hypermedia, calendar, text ;; URL: https://orgmode.org ;; diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index ba33f6724a0..32cea3e4b0b 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -2953,6 +2953,8 @@ known that the table will be realigned a little later anyway." (log-first-time (current-time)) (log-last-time log-first-time) (cnt 0) + (table-beg org-table-current-begin-pos) + (table-end (org-table-end)) beg end eqlcol eqlfield) ;; Insert constants in all formulas. (when eqlist @@ -2989,8 +2991,8 @@ existing formula for column %s" ;; Get the correct line range to process. (if all (progn - (setq end (copy-marker (org-table-end))) - (goto-char (setq beg org-table-current-begin-pos)) + (setq end (copy-marker table-end)) + (goto-char (setq beg table-beg)) (cond ((re-search-forward org-table-calculate-mark-regexp end t) ;; This is a table with marked lines, compute selected @@ -3005,7 +3007,7 @@ existing formula for column %s" (t nil))) (setq beg (line-beginning-position) end (copy-marker (line-beginning-position 2)))) - (org-combine-change-calls beg end + (org-combine-change-calls table-beg table-end (goto-char beg) ;; Mark named fields untouchable. Also check if several ;; field/range formulas try to set the same field. diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index 8c9df9d379f..82db4829afc 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el @@ -388,10 +388,7 @@ VALUE can be `on', `off', or `paused'." "No timer set" (format-seconds "%m minute(s) %s seconds left before next time out" - ;; Note: Once our minimal require is Emacs 27, we can drop this - ;; org-time-convert-to-integer call. - (org-time-convert-to-integer - (time-subtract (timer--time org-timer-countdown-timer) nil)))))) + (time-subtract (timer--time org-timer-countdown-timer) nil))))) ;;;###autoload (defun org-timer-set-timer (&optional opt) @@ -436,7 +433,7 @@ using three \\[universal-argument] prefix arguments." (and (not (equal opt '(64))) effort-minutes (number-to-string effort-minutes)) - (and (consp opt) default-timer) + (and (consp opt) (not (equal opt '(64))) default-timer) (and (stringp opt) opt) (read-from-minibuffer "How much time left? (minutes or h:mm:ss) " diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index b6a6d1d4eec..f0a212f2ef0 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.8.3")) + (let ((org-release "9.8.5")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.8.3")) + (let ((org-git-version "release_9.8.5")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index 84b4f245f8e..ba31ad67bd1 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -9,7 +9,7 @@ ;; URL: https://orgmode.org ;; Package-Requires: ((emacs "28.2")) -;; Version: 9.8.3 +;; Version: 9.8.5 ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/ox-koma-letter.el b/lisp/org/ox-koma-letter.el index 61b624e870d..3a17dceb2fb 100644 --- a/lisp/org/ox-koma-letter.el +++ b/lisp/org/ox-koma-letter.el @@ -6,7 +6,6 @@ ;; Alan Schmitt ;; Viktor Rosenfeld ;; Rasmus Pank Roulund -;; Maintainer: Marco Wahl ;; Keywords: org, text, tex ;; This file is part of GNU Emacs. diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index b4d1ada8d5e..1feddac37cd 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2011-2026 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou -;; Maintainer: Daniel Fleischer +;; Maintainer: Pedro A. Aranda ;; Keywords: outlines, hypermedia, calendar, text ;; This file is part of GNU Emacs. diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index 232a643738f..03a47c86995 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -2869,7 +2869,7 @@ Style is a symbol among `quoted', `centered' and nil." (org-element-lineage paragraph '(center-block quote-block section))) - (center-block 'center) + (center-block 'centered) (quote-block 'quoted))) (defun org-odt--format-paragraph (paragraph contents info default center quote) diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 686ffee8de2..8d7201353fd 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -7137,7 +7137,7 @@ appropriate for `tabulated-list-print'." ;; Age. (let ((info (nth 2 entry))) (if (processp info) (symbol-name (process-status info)) - (format-seconds "%h:%.2m" (float-time (time-since info))))) + (format-seconds "%h:%.2m" (time-since info)))) ;; Source. (if (stringp source) source (buffer-name source)))))) org-export-stack-contents))) diff --git a/lisp/paren.el b/lisp/paren.el index 10c72dadc79..c2ecdc60c72 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -272,9 +272,14 @@ It is the default value of `show-paren-data-function'." (save-restriction ;; Determine the range within which to look for a match. (when blink-matching-paren-distance - (narrow-to-region - (max (point-min) (- (point) blink-matching-paren-distance)) - (min (point-max) (+ (point) blink-matching-paren-distance)))) + (let ((beg (max (point-min) + (- (point) blink-matching-paren-distance)))) + ;; `syntax-propertize' can't widen so make sure it won't + ;; need to (bug#81035). + (syntax-propertize beg) + (narrow-to-region + beg + (min (point-max) (+ (point) blink-matching-paren-distance))))) ;; Scan across one sexp within that range. ;; Errors or nil mean there is a mismatch. (condition-case () diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 54bdf799f95..7808278518d 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -1606,7 +1606,7 @@ Hack on previous word, setting global variable DOCTOR-OWNER to correct result." (setq doctor--suicide-flag t) (doctor-type '( If you are really suicidal\, you might want to contact the Samaritans via - e-mail: jo@samaritans.org \. + https://www.samaritans.org/how-we-can-help/contact-samaritan/ \. or find a Befrienders crisis center at https://www.befrienders.org/\ \. you can also find other suicide crisis lines at diff --git a/lisp/plstore.el b/lisp/plstore.el index 0964e6ccaf6..c67ca37e716 100644 --- a/lisp/plstore.el +++ b/lisp/plstore.el @@ -478,7 +478,7 @@ perform a match." (when match (setq plist (cdr entry)) (while plist - (if (string-match "\\`:secret-" (symbol-name (car plist))) + (if (plstore--has-secret-keys plist) (setq decrypt t plist nil)) (setq plist (nthcdr 2 plist))) @@ -503,7 +503,7 @@ Return nil if there is none." plist) (setq plist (cdr entry)) (while plist - (if (string-match "\\`:secret-" (symbol-name (car plist))) + (if (plstore--has-secret-keys plist) (progn (plstore--decrypt plstore) (setq entry (assoc name (plstore--get-merged-alist plstore)) @@ -550,23 +550,36 @@ SECRET-KEYS is a plist containing secret data." (cons (cons name secret-plist) (plstore--get-secret-alist plstore))))) (plstore--merge-secret plstore))) +(defun plstore--has-secret-keys (plist) + "Return t if PLIST of a plstore entry has secret keys." + (string-match-p "\\`:secret-" (symbol-name (car plist)))) + (defun plstore-delete (plstore name) "Delete the first entry named NAME from PLSTORE." - (let ((entry (assoc name (plstore--get-alist plstore)))) - (if entry - (plstore--set-alist - plstore - (delq entry (plstore--get-alist plstore)))) - (setq entry (assoc name (plstore--get-secret-alist plstore))) - (if entry - (plstore--set-secret-alist - plstore - (delq entry (plstore--get-secret-alist plstore)))) - (setq entry (assoc name (plstore--get-merged-alist plstore))) - (if entry - (plstore--set-merged-alist - plstore - (delq entry (plstore--get-merged-alist plstore)))))) + (when-let* ((entry (assoc name (plstore--get-alist plstore))) + (plist (cdr entry))) + (when (plstore--has-secret-keys plist) + (plstore--decrypt plstore) + (setq entry (assoc name (plstore--get-alist plstore)))) + (plstore--set-alist + plstore + (delq entry (plstore--get-alist plstore)))) + (when-let* ((entry (assoc name (plstore--get-secret-alist plstore))) + (plist (cdr entry))) + (when (plstore--has-secret-keys plist) + (plstore--decrypt plstore) + (setq entry (assoc name (plstore--get-secret-alist plstore)))) + (plstore--set-secret-alist + plstore + (delq entry (plstore--get-secret-alist plstore)))) + (when-let* ((entry (assoc name (plstore--get-merged-alist plstore))) + (plist (cdr entry))) + (when (plstore--has-secret-keys plist) + (plstore--decrypt plstore) + (setq entry (assoc name (plstore--get-merged-alist plstore)))) + (plstore--set-merged-alist + plstore + (delq entry (plstore--get-merged-alist plstore))))) (defvar pp-escape-newlines) (defun plstore--insert-buffer (plstore) @@ -650,7 +663,7 @@ GnuPG key, silently save with symmetric encryption." ; (FIXME) (let ((merged-plist (cdr (assoc (car entry) merged-alist))) (plist (cdr entry))) (while plist - (if (string-match "\\`:secret-" (symbol-name (car plist))) + (if (plstore--has-secret-keys plist) (setcar (cdr plist) (plist-get merged-plist @@ -678,7 +691,7 @@ some plstore." (error "Invalid plstore format %s" string)) (setq plist (cdr (car pointer))) (while plist - (when (string-match "\\`:secret-" (symbol-name (car plist))) + (when (plstore--has-secret-keys plist) (setq entry (assoc (car (car pointer)) secret-alist)) (unless entry (setq entry (list (car (car pointer))) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index c8120d5752c..d08615446a1 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -1475,7 +1475,9 @@ in your init files, or customize `treesit-enabled-modes'." :group 'c :after-hook (c-ts-mode-set-modeline) - (when (treesit-ensure-installed 'c) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'c) + (treesit-ready-p 'c)) ;; Create an "for-each" parser, see `c-ts-mode--emacs-set-ranges' ;; for more. (when c-ts-mode-emacs-sources-support @@ -1554,7 +1556,9 @@ recommended to enable `electric-pair-mode' with this mode." :group 'c++ :after-hook (c-ts-mode-set-modeline) - (when (treesit-ensure-installed 'cpp) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'cpp) + (treesit-ready-p 'cpp)) (let ((primary-parser (treesit-parser-create 'cpp))) ;; Syntax. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index bc7d8372f11..5f150778129 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -11687,34 +11687,37 @@ This function might do hidden buffer changes." (forward-char) (c-forward-syntactic-ws) (setq cast-end (point)) - (and (looking-at c-primary-expr-regexp) - (progn - (setq pos (match-end 0)) - (or - ;; Check if the expression begins with a prefix keyword. - (match-beginning 2) - (if (match-beginning 1) - ;; Expression begins with an ambiguous operator. - (cond - ((match-beginning c-per-&*+--match) - (memq at-type '(t known found))) - ((match-beginning c-per-++---match) - t) - ((match-beginning c-per-\(-match) - (or - (memq at-type '(t known found)) - (not inside-macro))) - (t nil)) - ;; Unless it's a keyword, it's the beginning of a primary - ;; expression. - (not (looking-at c-keywords-regexp))))) - ;; If `c-primary-expr-regexp' matched a nonsymbol token, check - ;; that it matched a whole one so that we don't e.g. confuse - ;; the operator '-' with '->'. It's ok if it matches further, - ;; though, since it e.g. can match the float '.5' while the - ;; operator regexp only matches '.'. - (or (not (looking-at c-nonsymbol-token-regexp)) - (<= (match-end 0) pos)))) + (or + (and (looking-at c-primary-expr-regexp) + (progn + (setq pos (match-end 0)) + (or + ;; Check if the expression begins with a prefix keyword. + (match-beginning 2) + (if (match-beginning 1) + ;; Expression begins with an ambiguous operator. + (cond + ((match-beginning c-per-&*+--match) + (memq at-type '(t known found))) + ((match-beginning c-per-++---match) + t) + ((match-beginning c-per-\(-match) + (or + (memq at-type '(t known found)) + (not inside-macro))) + (t nil)) + ;; Unless it's a keyword, it's the beginning of a primary + ;; expression. + (not (looking-at c-keywords-regexp))))) + ;; If `c-primary-expr-regexp' matched a nonsymbol token, + ;; check that it matched a whole one so that we don't + ;; e.g. confuse the operator '-' with '->'. It's ok if it + ;; matches further, though, since it e.g. can match the float + ;; '.5' while the operator regexp only matches '.'. + (or (not (looking-at c-nonsymbol-token-regexp)) + (<= (match-end 0) pos))) + (and (eq (char-after) ?\{) + (not (eq (c-looking-at-statement-block-1) t))))) ;; There should either be a cast before it or something that isn't an ;; identifier or close paren. diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index d8873191d61..6abd92b5e1a 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -220,7 +220,9 @@ Return nil if there is no name or if NODE is not a defun node." :group 'cmake :syntax-table cmake-ts-mode--syntax-table - (when (treesit-ensure-installed 'cmake) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'cmake) + (treesit-ready-p 'cmake)) (setq treesit-primary-parser (treesit-parser-create 'cmake)) ;; Comments. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index aaad8622c95..593f9867533 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -229,6 +229,19 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (aix " in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) + (ansible-fatal + "^fatal: .*: FAILED!" nil nil nil 2 0 (0 compilation-error-face)) + (ansible-error + "^\\[ERROR\\]:" + nil nil nil 2 0 (0 compilation-error-face)) + (ansible-warning + "^\\[\\(?:DEPRECATION \\)?WARNING\\]:" + nil nil nil 1 0 (0 compilation-warning-face)) + (ansible-included "^included: \\([^[:space:]]+\\)" 1 nil nil 0 1) + (ansible-origin + "^Origin: \\([^[:space:]]+\\):\\([[:digit:]]+\\):\\([[:digit:]]+\\)" + 1 2 3 0 1) + ;; Checkstyle task may report its own severity level: "[checkstyle] [ERROR] ..." ;; (see AuditEventDefaultFormatter.java in checkstyle sources). (ant @@ -421,6 +434,20 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) nil (1 compilation-error-face)) + ;; This must precede the `gnu' rule or the latter would match instead. + (rust + ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note")) + (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl) + "\n" (+ " ") "-->" + " " (group-n 4 (+ nonl)) ; file + ":" (group-n 5 (+ (in "0-9"))) ; line + ":" (group-n 6 (+ (in "0-9")))) ; column + 4 5 6 (2 . 3) + nil + (1 compilation-error-face) + (2 compilation-warning-face) + (3 compilation-info-face)) + ;; Tested with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1. (lua ,(rx bol @@ -582,19 +609,6 @@ during global destruction\\.$\\)" 1 2) "\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil nil) - (rust - ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note")) - (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl) - "\n" (+ " ") "-->" - " " (group-n 4 (+ nonl)) ; file - ":" (group-n 5 (+ (in "0-9"))) ; line - ":" (group-n 6 (+ (in "0-9")))) ; column - 4 5 6 (2 . 3) - nil - (1 compilation-error-face) - (2 compilation-warning-face) - (3 compilation-info-face)) - (rxp "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\ \\([0-9]+\\) of file://\\(.+\\)" diff --git a/lisp/progmodes/dockerfile-ts-mode.el b/lisp/progmodes/dockerfile-ts-mode.el index 1d42c239b84..b97ec89b99a 100644 --- a/lisp/progmodes/dockerfile-ts-mode.el +++ b/lisp/progmodes/dockerfile-ts-mode.el @@ -167,7 +167,9 @@ Return nil if there is no name or if NODE is not a stage node." :group 'dockerfile :syntax-table dockerfile-ts-mode--syntax-table - (when (treesit-ensure-installed 'dockerfile) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'dockerfile) + (treesit-ready-p 'dockerfile)) (setq treesit-primary-parser (treesit-parser-create 'dockerfile)) ;; Comments. diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e945dfb9739..8d5d7cafc3c 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -149,6 +149,8 @@ 'eglot-managed-mode-hook "1.6") (define-obsolete-variable-alias 'eglot-confirm-server-initiated-edits 'eglot-confirm-server-edits "1.16") +(define-obsolete-variable-alias 'eglot-prefer-plaintext + 'eglot-documentation-renderer "1.24") (make-obsolete-variable 'eglot-events-buffer-size 'eglot-events-buffer-config "1.16") (define-obsolete-function-alias 'eglot--uri-to-path #'eglot-uri-to-path "1.16") @@ -535,10 +537,16 @@ or file operation kinds not in the alist." "If non-nil, activate Eglot in cross-referenced non-project files." :type 'boolean) -(defcustom eglot-prefer-plaintext nil - "If non-nil, always request plaintext responses to hover requests." - :type 'boolean - :package-version '(Eglot . "1.17.30")) +(defcustom eglot-documentation-renderer nil + "Controls rendering of LSP documentation fragments. +If set to a major mode symbol like `gfm-view-mode', or the experimental +`markdown-ts-view-mode', request markdown snippets and use that mode to +render them. If t, request and render plain text instead. If nil, +request markdown snippets and select a renderer dynamically." + :type '(choice (const :tag "Plain text" t) + (const :tag "Auto-detect" nil) + (function :tag "Renderer")) + :package-version '(Eglot . "1.24")) (defcustom eglot-report-progress t "If non-nil, show progress of long running LSP server work. @@ -727,16 +735,11 @@ This can be useful when using docker to run a language server.") (declare-function treesit-grammar-location "treesit.c") -(defun eglot--builtin-mdown-p () - (and (fboundp 'markdown-ts-view-mode) - (fboundp 'treesit-grammar-location) - (treesit-grammar-location 'markdown))) - (defun eglot--accepted-formats () - (if (and (not eglot-prefer-plaintext) - (or (fboundp 'gfm-view-mode) (eglot--builtin-mdown-p))) - ["markdown" "plaintext"] - ["plaintext"])) + (if (or (eq t eglot-documentation-renderer) + (not (or eglot-documentation-renderer (fboundp 'gfm-view-mode)))) + ["plaintext"] + ["markdown" "plaintext"])) (defconst eglot--uri-path-allowed-chars (let ((vec (copy-sequence url-path-allowed-chars))) @@ -2263,12 +2266,13 @@ If MODE, force MODE to be used for fontifying MARKUP." finally return (buffer-string))) (calc2 (forced-mode) (cond - (forced-mode `(,forced-mode)) - ((eglot--builtin-mdown-p) `(,#'markdown-ts-view-mode)) - ((fboundp 'gfm-view-mode) `(,#'gfm-view-mode ,#'gfm-extract)) - (t `(#'text-mode)))) + (forced-mode forced-mode) + ((fboundp eglot-documentation-renderer) eglot-documentation-renderer) + ((fboundp 'gfm-view-mode) #'gfm-view-mode) + (t #'text-mode))) (calc (s &optional (forced-mode mode) &aux (x (calc2 forced-mode))) - (setq string s render (car x) extract (or (cadr x) #'buffer-string)))) + (setq string s render x + extract (if (eq x 'gfm-view-mode) #'gfm-extract #'buffer-string)))) (cond ((stringp markup) (calc markup)) ; plain string ((setq lang (plist-get markup :language)) ; deprecated MarkedString (calc (format "```%s\n%s\n```" lang (plist-get markup :value)))) diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index 9514d6bdc91..9bda7f0046f 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -737,7 +737,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (add-hook 'post-self-insert-hook #'elixir-ts--electric-pair-string-delimiter 'append t) - (when (treesit-ensure-installed 'elixir) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'elixir) + (treesit-ready-p 'elixir)) (setq-local treesit-primary-parser (treesit-parser-create 'elixir)) @@ -762,7 +764,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (setq-local treesit-defun-name-function #'elixir-ts--defun-name) ;; Embedded Heex. - (when (treesit-ensure-installed 'heex) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'heex) + (treesit-ready-p 'heex)) (require 'heex-ts-mode) (treesit-parser-create 'heex) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 76de7c9b41b..8de6d0e0700 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -287,7 +287,9 @@ :group 'go :syntax-table go-ts-mode--syntax-table - (when (treesit-ensure-installed 'go) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'go) + (treesit-ready-p 'go)) (setq treesit-primary-parser (treesit-parser-create 'go)) ;; Comments. @@ -608,7 +610,9 @@ what the parent of the node would be if it were a node." :group 'go :syntax-table go-mod-ts-mode--syntax-table - (when (treesit-ensure-installed 'gomod) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'gomod) + (treesit-ready-p 'gomod)) (setq treesit-primary-parser (treesit-parser-create 'gomod)) ;; Comments. @@ -712,7 +716,9 @@ what the parent of the node would be if it were a node." "Major mode for editing go.work files, powered by tree-sitter." :group 'go - (when (treesit-ensure-installed 'gowork) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'gowork) + (treesit-ready-p 'gowork)) (setq treesit-primary-parser (treesit-parser-create 'gowork)) ;; Comments. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 72a05a082bb..a5ba32d26e8 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1120,6 +1120,8 @@ list is empty)." (defvar grep-edit-mode-hook nil "Hooks run when changing to Grep-Edit mode.") +(defvar grep-edit-original-mode-map nil) + (defun grep-edit-mode () "Major mode for editing *grep* buffers. In this mode, changes to the *grep* buffer are applied to the @@ -1140,6 +1142,7 @@ The only editable texts in a Grep-Edit buffer are the match results." (error "Not a Grep buffer")) (when (get-buffer-process (current-buffer)) (error "Cannot switch when grep is running")) + (setq-local grep-edit-original-mode-map (current-local-map)) (use-local-map grep-edit-mode-map) (grep-edit--prepare-buffer) (setq buffer-read-only nil) @@ -1159,7 +1162,7 @@ The only editable texts in a Grep-Edit buffer are the match results." (unless (derived-mode-p 'grep-edit-mode) (error "Not a Grep-Edit buffer")) (remove-hook 'after-change-functions #'occur-after-change-function t) - (use-local-map grep-mode-map) + (use-local-map grep-edit-original-mode-map) (setq buffer-read-only t) (setq major-mode 'grep-mode) (setq mode-name "Grep") diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el index d756224f371..e8fec8b0469 100644 --- a/lisp/progmodes/heex-ts-mode.el +++ b/lisp/progmodes/heex-ts-mode.el @@ -201,7 +201,9 @@ Return nil if NODE is not a defun node or doesn't have a name." "Major mode for editing HEEx, powered by tree-sitter." :group 'heex-ts - (when (treesit-ensure-installed 'heex) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'heex) + (treesit-ready-p 'heex)) (setq treesit-primary-parser (treesit-parser-create 'heex)) ;; Comments @@ -236,7 +238,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (setq-local treesit-font-lock-feature-list heex-ts--font-lock-feature-list) - (when (treesit-ensure-installed 'elixir) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'elixir) + (treesit-ready-p 'elixir)) (require 'elixir-ts-mode) (treesit-parser-create 'elixir) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index e7e5bd901e1..3f2deca317c 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4041,7 +4041,9 @@ See `treesit-thing-settings' for more information.") \\" :group 'js :syntax-table js-mode-syntax-table - (when (treesit-ensure-installed 'javascript) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'javascript) + (treesit-ready-p 'javascript)) ;; Borrowed from `js-mode'. (setq-local prettify-symbols-alist js--prettify-symbols-alist) (setq-local parse-sexp-ignore-comments t) @@ -4073,7 +4075,9 @@ See `treesit-thing-settings' for more information.") (setq-local treesit-font-lock-settings (js--treesit-font-lock-settings)) (setq-local treesit-font-lock-feature-list js--treesit-font-lock-feature-list) - (when (treesit-ensure-installed 'jsdoc) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'jsdoc) + (treesit-ready-p 'jsdoc)) (setq-local treesit-range-settings (treesit-range-rules :embed 'jsdoc diff --git a/lisp/progmodes/lua-mode.el b/lisp/progmodes/lua-mode.el index 72c1932ab64..227d5d777b1 100644 --- a/lisp/progmodes/lua-mode.el +++ b/lisp/progmodes/lua-mode.el @@ -1,4 +1,4 @@ -;;; lua-mode.el --- Major-mode for editing Lua files -*- lexical-binding: t -*- +;;; lua-mode.el --- Major mode for editing Lua files -*- lexical-binding: t -*- ;; Copyright (C) 2025-2026 Free Software Foundation, Inc. diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 8d726b9b15b..2963d5a96af 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -675,7 +675,9 @@ Calls REPORT-FN directly." :syntax-table lua-ts--syntax-table (use-local-map lua-ts-mode-map) - (when (treesit-ensure-installed 'lua) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'lua) + (treesit-ready-p 'lua)) (setq treesit-primary-parser (treesit-parser-create 'lua)) ;; Comments. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ad0e84bf74f..86336979067 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -7477,9 +7477,11 @@ implementations: `python-mode' and `python-ts-mode'." \\{python-ts-mode-map}" :syntax-table python-mode-syntax-table - (when (if (fboundp 'treesit-ensure-installed) ; Emacs 31 - (treesit-ensure-installed 'python) - (treesit-ready-p 'python)) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (if (fboundp 'treesit-ensure-installed) ; Emacs 31 + (treesit-ensure-installed 'python) + t) + (treesit-ready-p 'python)) (setq treesit-primary-parser (treesit-parser-create 'python)) (setq-local treesit-font-lock-feature-list '(( comment definition) diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 9bc4324ff66..dee82f934ce 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -557,7 +557,9 @@ See `prettify-symbols-compose-predicate'." :group 'rust :syntax-table rust-ts-mode--syntax-table - (when (treesit-ensure-installed 'rust) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'rust) + (treesit-ready-p 'rust)) (setq treesit-primary-parser (treesit-parser-create 'rust)) ;; Syntax. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8479c3cfd9a..4d025eeb18d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1583,7 +1583,9 @@ with your script for an edit-interpret-debug cycle." This mode automatically falls back to `sh-mode' if the buffer is not written in Bash or sh." :syntax-table sh-mode-syntax-table - (when (treesit-ensure-installed 'bash) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'bash) + (treesit-ready-p 'bash)) (sh-set-shell "bash" nil nil) (add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t) (add-hook 'hack-local-variables-hook diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index c9d1d1eff4d..61e281310aa 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -701,7 +701,9 @@ This mode is intended to be inherited by concrete major modes." :group 'typescript :syntax-table typescript-ts-mode--syntax-table - (when (treesit-ensure-installed 'typescript) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'typescript) + (treesit-ready-p 'typescript)) (setq treesit-primary-parser (treesit-parser-create 'typescript)) ;; Indent. @@ -757,7 +759,9 @@ at least 3 (which is the default value)." :group 'typescript :syntax-table typescript-ts-mode--syntax-table - (when (treesit-ensure-installed 'tsx) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'tsx) + (treesit-ready-p 'tsx)) (setq treesit-primary-parser (treesit-parser-create 'tsx)) ;; Comments. diff --git a/lisp/replace.el b/lisp/replace.el index 48e158de531..4bb91fbd6a0 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -369,6 +369,8 @@ should a regexp." (replace--region-filter (funcall region-extract-function 'bounds))) :highlight (and query-replace-lazy-highlight (not no-highlight)) + :lax-whitespace (if regexp-flag replace-regexp-lax-whitespace + replace-lax-whitespace) :regexp regexp-flag :regexp-function (or replace-regexp-function delimited-flag diff --git a/lisp/ring-bell-fns.el b/lisp/ring-bell-fns.el index b35725e192b..32eb0c32051 100644 --- a/lisp/ring-bell-fns.el +++ b/lisp/ring-bell-fns.el @@ -1,4 +1,4 @@ -;;; ring-bell-fns.el --- Collection of functions for ring-bell -*- lexical-binding: t; -*- +;;; ring-bell-fns.el --- Collection of functions for ring-bell-function -*- lexical-binding: t; -*- ;; Copyright (C) 2025-2026 Free Software Foundation, Inc. diff --git a/lisp/send-to.el b/lisp/send-to.el index f1795cfa7a0..95e95fd5433 100644 --- a/lisp/send-to.el +++ b/lisp/send-to.el @@ -152,6 +152,7 @@ explicitly overridden." (forward-line 1)))) filenames))) +;;;###autoload (defun send-to--resolve-handler () "Return first supported handler from `send-to-handlers'." (seq-find (lambda (handler) @@ -221,7 +222,7 @@ From any other buffer, either of these two, in order of preference: (region-beginning) (region-end)))) ((thing-at-point 'existing-filename) - (thing-at-point 'existing-filename)) + (list (thing-at-point 'existing-filename))) ((buffer-file-name) (list (buffer-file-name))))) diff --git a/lisp/shell.el b/lisp/shell.el index 2730c417b49..acaa8e1f860 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -996,7 +996,7 @@ Make the shell buffer the current buffer, and return it. (lambda (proc event) (when sentinel (funcall sentinel proc event)) - (unless (buffer-live-p proc) + (unless (process-live-p proc) (kill-buffer buffer)))))) buffer) diff --git a/lisp/subr.el b/lisp/subr.el index 08eee8646a4..cea786ae64d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7125,8 +7125,7 @@ REPORTER is the result of a call to `make-progress-reporter'. STATE can be one of: - A float representing the percentage complete in the range 0.0-1.0 for a numeric reporter. -- An integer representing the index which cycles through the range 0-3 -for a pulsing reporter. +- A monotonically increasing integer for a pulsing reporter. - The symbol `done' to indicate that the progress reporter is complete.") (defsubst progress-reporter-update (reporter &optional value suffix) @@ -7141,7 +7140,7 @@ MIN-VALUE and MAX-VALUE. Optional argument SUFFIX is a string to be displayed after REPORTER's main message and progress text. If REPORTER is a non-numerical reporter, then VALUE should be nil, or a string to use instead of -SUFFIX. SUFFIX is considered obsolete and may be removed in the future. +SUFFIX. See `progress-reporter-update-functions' for the list of functions called on each update. @@ -7252,8 +7251,9 @@ area is busy with something else." (message "%s" text))) ((pred integerp) (let ((message-log-max nil) - (pulse-char (aref progress-reporter--pulse-characters - state))) + (pulse-char + (aref progress-reporter--pulse-characters + (mod state (length progress-reporter--pulse-characters))))) (message "%s %s" text pulse-char))) ('done (message "%sdone" text)))))) @@ -7305,7 +7305,7 @@ area is busy with something else." (if suffix (aset parameters 6 suffix) (setq suffix (or (aref parameters 6) ""))) - (let ((index (mod (1+ (car reporter)) 4))) + (let ((index (1+ (car reporter)))) (setcar reporter index) (run-hook-with-args 'progress-reporter-update-functions reporter diff --git a/lisp/system-taskbar.el b/lisp/system-taskbar.el index cc41183fb32..973b426e026 100644 --- a/lisp/system-taskbar.el +++ b/lisp/system-taskbar.el @@ -282,7 +282,9 @@ REPORTER and STATE are the same as in ((pred floatp) (system-taskbar--progress state)) ((pred integerp) - (system-taskbar--progress (/ (1+ state) 4.0))) + ;; This won't show 0.0 to indicate work in process until done. + (system-taskbar--progress + (/ (1+ (mod state 5)) 5.0))) ('done (system-taskbar--progress nil))))) diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 355555df090..12632e24e0e 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -1888,7 +1888,9 @@ can also be used to fill comments. \\{css-mode-map}" :syntax-table css-mode-syntax-table - (when (treesit-ensure-installed 'css) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'css) + (treesit-ready-p 'css)) ;; Borrowed from `css-mode'. (setq-local syntax-propertize-function css-syntax-propertize-function) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index c1ccdf2ec5f..270cb388971 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -911,6 +911,7 @@ region, instead of just filling the current paragraph." (fill-comment-paragraph justify))) ;; 4. If it all fails, default to the good ol' text paragraph filling. (let ((before (point)) + (paragraph-start-orig paragraph-start) (paragraph-start paragraph-start) ;; Fill prefix used for filling the paragraph. fill-pfx) @@ -933,6 +934,18 @@ region, instead of just filling the current paragraph." (setq fill-pfx "") (let ((end (point)) (beg (progn (fill-forward-paragraph -1) (point)))) + ;; If the paragraph starts with a comment line preceding point + ;; on a non-comment line, skip such comment lines, so they + ;; are not filled together (bug#80449). + (when (and fill-paragraph-handle-comment comment-start-skip + (< beg before)) + (save-excursion + (goto-char beg) + (when (looking-at paragraph-start-orig) + (goto-char (1+ (match-end 0)))) + (when (looking-at comment-start-skip) + (forward-line 1) + (setq beg (point))))) (goto-char before) (setq fill-pfx (if use-hard-newlines diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el index fed6ded192c..fb895c9231f 100644 --- a/lisp/textmodes/markdown-ts-mode.el +++ b/lisp/textmodes/markdown-ts-mode.el @@ -1404,8 +1404,16 @@ If NODE is not in a list, return -1." "Fontify unordered list marker NODE, show a symbol when markup is hidden. OVERRIDE, START, and END are passed through to `treesit-fontify-with-override'." - (let* ((node-start (treesit-node-start node)) + ;; The tree-sitter markdown grammar includes the leading indentation + ;; in the first list_marker_minus/plus/star node of a list, so skip + ;; over any leading whitespace to avoid overwriting the indent with + ;; the replacement glyph. + (let* ((raw-start (treesit-node-start node)) (node-end (treesit-node-end node)) + (node-start (save-excursion + (goto-char raw-start) + (skip-chars-forward " \t" node-end) + (point))) (face 'markdown-ts-list-marker)) (treesit-fontify-with-override node-start node-end face override start end) diff --git a/lisp/textmodes/mhtml-ts-mode.el b/lisp/textmodes/mhtml-ts-mode.el index 2a1c62b87e4..d53d74e220a 100644 --- a/lisp/textmodes/mhtml-ts-mode.el +++ b/lisp/textmodes/mhtml-ts-mode.el @@ -511,7 +511,9 @@ Powered by tree-sitter." ;; jsdoc is not mandatory for js-ts-mode, so we respect this by ;; adding jsdoc range rules only when jsdoc is available. - (when (treesit-ensure-installed 'jsdoc) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'jsdoc) + (treesit-ready-p 'jsdoc)) (setq-local c-ts-common--comment-regexp js--treesit-jsdoc-comment-regexp)) diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index e9acf91c824..8f6f0a1445a 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -440,7 +440,7 @@ Also checks if buffers visiting the files are in read-only mode." (t (setq nxt-buff (funcall isearch-next-buffer-function - (current-buffer))) + (current-buffer))) (if (not nxt-buff) (progn (error "Wrap backward")) @@ -475,54 +475,43 @@ Also checks if buffers visiting the files are in read-only mode." ;; NB this is a global autoload - see reftex.el. ;;;###autoload -(defun reftex-isearch-minor-mode (&optional arg) +(define-minor-mode reftex-isearch-minor-mode "When on, isearch searches the whole document, not only the current file. This minor mode allows isearch to search through all the files of -the current TeX document. - -With no argument, this command toggles -`reftex-isearch-minor-mode'. With a prefix argument ARG, turn -`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off." - (interactive "P") - (let ((old-reftex-isearch-minor-mode reftex-isearch-minor-mode)) - (setq reftex-isearch-minor-mode - (not (or (and (null arg) reftex-isearch-minor-mode) - (<= (prefix-numeric-value arg) 0)))) - (unless (eq reftex-isearch-minor-mode old-reftex-isearch-minor-mode) - (if reftex-isearch-minor-mode - (progn - (dolist (crt-buf (buffer-list)) - (with-current-buffer crt-buf - (when reftex-mode - (if (boundp 'multi-isearch-next-buffer-function) - (setq-local multi-isearch-next-buffer-function - #'reftex-isearch-switch-to-next-file) - (setq-local isearch-wrap-function - #'reftex-isearch-wrap-function) - (setq-local isearch-search-fun-function - (lambda () #'reftex-isearch-isearch-search)) - (setq-local isearch-push-state-function - #'reftex-isearch-push-state-function) - (setq-local isearch-next-buffer-function - #'reftex-isearch-switch-to-next-file)) - (setq reftex-isearch-minor-mode t)))) - (add-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)) +the current TeX document." + :lighter "/I" + :global t + :group 'reftex + (if reftex-isearch-minor-mode + (progn (dolist (crt-buf (buffer-list)) (with-current-buffer crt-buf (when reftex-mode (if (boundp 'multi-isearch-next-buffer-function) - (kill-local-variable 'multi-isearch-next-buffer-function) - (kill-local-variable 'isearch-wrap-function) - (kill-local-variable 'isearch-search-fun-function) - (kill-local-variable 'isearch-push-state-function) - (kill-local-variable 'isearch-next-buffer-function)) - (setq reftex-isearch-minor-mode nil)))) - (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode))) - ;; Force mode line redisplay. - (set-buffer-modified-p (buffer-modified-p)))) + (setq-local multi-isearch-next-buffer-function + #'reftex-isearch-switch-to-next-file) + (setq-local isearch-wrap-function + #'reftex-isearch-wrap-function) + (setq-local isearch-search-fun-function + (lambda () #'reftex-isearch-isearch-search)) + (setq-local isearch-push-state-function + #'reftex-isearch-push-state-function) + (setq-local isearch-next-buffer-function + #'reftex-isearch-switch-to-next-file))))) + (add-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)) + (dolist (crt-buf (buffer-list)) + (with-current-buffer crt-buf + (when reftex-mode + (if (boundp 'multi-isearch-next-buffer-function) + (kill-local-variable 'multi-isearch-next-buffer-function) + (kill-local-variable 'isearch-wrap-function) + (kill-local-variable 'isearch-search-fun-function) + (kill-local-variable 'isearch-push-state-function) + (kill-local-variable 'isearch-next-buffer-function))))) + (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode))) + + -(add-minor-mode 'reftex-isearch-minor-mode "/I" nil nil - 'reftex-isearch-minor-mode) ;;; reftex-global.el ends here diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 4e2c89e87dc..c0533ada842 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2180,8 +2180,6 @@ fonts. Currently it is only used for reftex-label-face." ;; Define a menu for the menu bar if Emacs is running under X -(defvar-local reftex-isearch-minor-mode nil) - (easy-menu-define reftex-mode-menu reftex-mode-map "Menu used in RefTeX mode." `("Ref" diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 86a4b1d006e..d6be9d511d6 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -89,6 +89,7 @@ The command `tex-file' runs TeX on the file specified by `tex-main-file' if the variable is non-nil." :type '(choice (const :tag "None" nil) file) + :safe (lambda (x) (or (stringp x) (null x))) :group 'tex-file) ;;;###autoload diff --git a/lisp/textmodes/toml-ts-mode.el b/lisp/textmodes/toml-ts-mode.el index d3f09526b90..63e3f60edd9 100644 --- a/lisp/textmodes/toml-ts-mode.el +++ b/lisp/textmodes/toml-ts-mode.el @@ -138,7 +138,9 @@ Return nil if there is no name or if NODE is not a defun node." :group 'toml-mode :syntax-table toml-ts-mode--syntax-table - (when (treesit-ensure-installed 'toml) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'toml) + (treesit-ready-p 'toml)) (setq treesit-primary-parser (treesit-parser-create 'toml)) ;; Comments diff --git a/lisp/textmodes/yaml-ts-mode.el b/lisp/textmodes/yaml-ts-mode.el index c1521c82c22..5afd4d2d111 100644 --- a/lisp/textmodes/yaml-ts-mode.el +++ b/lisp/textmodes/yaml-ts-mode.el @@ -262,7 +262,9 @@ Calls REPORT-FN directly." :group 'yaml :syntax-table yaml-ts-mode--syntax-table - (when (treesit-ensure-installed 'yaml) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'yaml) + (treesit-ready-p 'yaml)) (setq treesit-primary-parser (treesit-parser-create 'yaml)) ;; Comments. diff --git a/lisp/time.el b/lisp/time.el index f553ebab413..ddcd44ee8c0 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -708,9 +708,7 @@ point." (interactive "i\nP") (let ((str (format-seconds (or format "%Y, %D, %H, %M, %z%S") - (time-convert - (time-since before-init-time) - 'integer)))) + (time-since before-init-time)))) (if here (insert str) (if (called-interactively-p 'interactive) diff --git a/lisp/treesit-x.el b/lisp/treesit-x.el index 9d0541b458c..86eb417c7b5 100644 --- a/lisp/treesit-x.el +++ b/lisp/treesit-x.el @@ -142,7 +142,9 @@ of `define-treesit-generic-mode'. ;;;###autoload (defun treesit-generic-mode-setup (lang) "Go into the treesit generic mode MODE." - (when (treesit-ensure-installed lang) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed lang) + (treesit-ready-p lang)) (setq treesit-primary-parser (treesit-parser-create lang)) (when-let* ((query (treesit-generic-mode-font-lock-query lang))) diff --git a/lisp/tty-tip.el b/lisp/tty-tip.el index 4db64126005..4ae2bc7312f 100644 --- a/lisp/tty-tip.el +++ b/lisp/tty-tip.el @@ -1,4 +1,4 @@ -;;; tty-tip.el --- Display help in kind of tooltips on ttys -*- lexical-binding: t -*- +;;; tty-tip.el --- Display tooltip-like child frames on ttys -*- lexical-binding: t -*- ;; Copyright (C) 2024-2026 Free Software Foundation, Inc. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index ce512c6db33..0be1b326d6c 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -826,9 +826,12 @@ should be shown to the user." ;; Authorization header field. (url-http-handle-authentication nil)) ('payment-required ; 402 - ;; This code is reserved for future use - (url-mark-buffer-as-dead buffer) - (error "Somebody wants you to give them money")) + ;; This code is "reserved for future use", but in the + ;; mean time websites have been seen to use it, for + ;; instance anti-bot challenges requiring the "payment" + ;; of a click of a button to prove the visitor is human, + ;; so we no longer raise an `error' here. + t) ('forbidden ; 403 ;; The server understood the request, but is refusing to ;; fulfill it. Authorization will not help and the request diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 1be1f6db7f4..7b2bf33fad6 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -1032,7 +1032,9 @@ stream. Standard error output is discarded." (defun vc-bzr-dir-status-files (dir files update-function) "Return a list of conses (file . state) for DIR." - (apply #'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) + (set-process-query-on-exit-flag + (apply #'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) + nil) ;; FIXME: Consider `vc-run-delayed-success'. (vc-run-delayed (vc-bzr-after-dir-status update-function diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index eb971754c1c..293ebcca3e2 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -1083,9 +1083,11 @@ Query all files in DIR if files is nil." (let ((local (vc-cvs-stay-local-p dir))) (if (and (not files) local (not (eq local 'only-file))) (vc-cvs-dir-status-heuristic dir update-function)) - (vc-cvs-command (current-buffer) 'async - files - "-f" "-n" "-q" "update") + (set-process-query-on-exit-flag + (vc-cvs-command (current-buffer) 'async + files + "-f" "-n" "-q" "update") + nil) ;; FIXME: Consider `vc-run-delayed-success'. (vc-run-delayed (vc-cvs-after-dir-status update-function)))) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 2d6f8ee97d0..27513f463bd 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -161,17 +161,23 @@ proceed to mark and unmark other entries, without asking." :version "31.1") (defcustom vc-dir-auto-hide-up-to-date nil - "If non-nil, VC-Dir automatically hides \\+`up-to-date' and \\+`ignored' items. + "Whether VC-Dir auto-removes \\+`up-to-date'/\\+`ignored' files from display. -If the value of this variable is the symbol `revert', \ -\\\\[revert-buffer] in VC-Dir -buffers also does \\[vc-dir-hide-up-to-date]. \ -That is, refreshing the VC-Dir buffer also hides -\\+`up-to-date' and \\+`ignored' items. +If the value is nil, files shown in the VC-Dir buffer will remain on +display if they become \\+`up-to-date' or \\+`ignored'. +If the value is t, files are automatically removed from display when +they become \\+`up-to-date' or \\+`ignored'. +If the value is the symbol `revert', any displayed files that +are \\+`up-to-date' or \\+`ignored' are removed from display +by \\\\[revert-buffer], but they are not automatically removed +when they become \\+`up-to-date' or \\+`ignored'. That is, +refreshing the VC-Dir buffer hides \\+`up-to-date' and \\+`ignored' +files when the value is the symbol `revert'. +Any other value is treated as t. + +VC-Dir never shows \\+`up-to-date' and \\+`ignored' files when the +directory is first displayed. -If the value of this variable is any other non-nil value, then in -addition, hide items whenever their state would change to -\\+`up-to-date' or \\+`ignored'. You can still use `vc-dir-show-fileentry' to manually add an entry for an \\+`up-to-date' or \\+`ignored' file." :type 'boolean @@ -640,7 +646,8 @@ Also update some VC file properties from ENTRIES." (or (null next) (vc-dir-fileinfo->directory (ewoc-data next))))) (ewoc-delete vc-ewoc crt))) - (setq crt prev)))))) + (setq crt prev)))) + (cl-assert (null to-remove)))) ;; Update VC file properties. (pcase-dolist (`(,file ,state ,_extra) entries) (vc-file-setprop file 'vc-backend @@ -1515,7 +1522,7 @@ Throw an error if another update process is in progress." (error "Another update process is in progress, cannot run two at a time") (let ((def-dir default-directory) (backend vc-dir-backend)) - (when vc-dir-save-some-buffers-on-revert + (when (and vc-dir-save-some-buffers-on-revert (not non-essential)) (vc-buffer-sync-fileset `(,vc-dir-backend (,def-dir)) t)) (vc-set-mode-line-busy-indicator) ;; Call the `dir-status' backend function. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 6b9530c9570..4021c69ea4f 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -724,44 +724,39 @@ or an empty string if none." (defun vc-git-dir-status-goto-stage (git-state) ;; TODO: Look into reimplementing this using `git status --porcelain=v2'. - (let ((files (vc-git-dir-status-state->files git-state)) - (allowed-exit 1)) - (erase-buffer) - (pcase (vc-git-dir-status-state->stage git-state) - ('update-index - (if files - (progn (vc-git-command (current-buffer) 'async files - "add" "--refresh" "--") - ;; git-add exits 128 if some of FILES are untracked; - ;; we can ignore that (bug#79999). - (setq allowed-exit 128)) - (vc-git-command (current-buffer) 'async nil - "update-index" "--refresh"))) - ('ls-files-added - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-c" "-s" "--")) - ('ls-files-up-to-date - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-c" "-s" "--")) - ('ls-files-conflict - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-u" "--")) - ('ls-files-missing - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-d" "--")) - ('ls-files-unknown - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-o" "--exclude-standard" "--")) - ('ls-files-ignored - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-o" "-i" "--directory" - "--no-empty-directory" "--exclude-standard" "--")) - ;; --relative added in Git 1.5.5. - ('diff-index - (vc-git-command (current-buffer) 'async files - "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) - (vc-run-delayed-success allowed-exit - (vc-git-after-dir-status-stage git-state)))) + (cl-flet ((git-cmd (&rest args) + (set-process-query-on-exit-flag + (apply #'vc-git-command (current-buffer) 'async args) + nil))) + (let ((files (vc-git-dir-status-state->files git-state)) + (allowed-exit 1)) + (erase-buffer) + (pcase (vc-git-dir-status-state->stage git-state) + ('update-index + (if files + (progn (git-cmd files "add" "--refresh" "--") + ;; git-add exits 128 if some of FILES are untracked; + ;; we can ignore that (bug#79999). + (setq allowed-exit 128)) + (git-cmd nil "update-index" "--refresh"))) + ('ls-files-added + (git-cmd files "ls-files" "-z" "-c" "-s" "--")) + ('ls-files-up-to-date + (git-cmd files "ls-files" "-z" "-c" "-s" "--")) + ('ls-files-conflict + (git-cmd files "ls-files" "-z" "-u" "--")) + ('ls-files-missing + (git-cmd files "ls-files" "-z" "-d" "--")) + ('ls-files-unknown + (git-cmd files "ls-files" "-z" "-o" "--exclude-standard" "--")) + ('ls-files-ignored + (git-cmd files "ls-files" "-z" "-o" "-i" "--directory" + "--no-empty-directory" "--exclude-standard" "--")) + ;; --relative added in Git 1.5.5. + ('diff-index + (git-cmd files "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) + (vc-run-delayed-success allowed-exit + (vc-git-after-dir-status-stage git-state))))) (defun vc-git-dir-status-files (_dir files update-function) "Return a list of (FILE STATE EXTRA) entries for DIR." diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index af143a4b1da..c375d14b7e3 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1544,11 +1544,13 @@ REV is the revision to check out into WORKFILE." ;; XXX: We can't pass DIR directly to 'hg status' because that ;; returns all ignored files if FILES is non-nil (bug#22481). (let ((default-directory dir)) - (apply #'vc-hg-command '(t nil) 'async files - "status" (concat "-mardu" (if files "i")) "-C" - (if (version<= "4.2" (vc-hg--program-version)) - '("--config" "commands.status.relative=1") - '("re:" "-I" ".")))) + (set-process-query-on-exit-flag + (apply #'vc-hg-command '(t nil) 'async files + "status" (concat "-mardu" (if files "i")) "-C" + (if (version<= "4.2" (vc-hg--program-version)) + '("--config" "commands.status.relative=1") + '("re:" "-I" "."))) + nil)) (vc-run-delayed-success 0 (vc-hg-after-dir-status update-function))) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 12704361430..6e920f7e721 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -227,7 +227,9 @@ A value of `default' means to use the value of `vc-resolve-conflicts'." CALLBACK is called as (CALLBACK RESULT BUFFER), where RESULT is a list of conses (FILE . STATE) for directory DIR." ;; FIXME shouldn't this rather default to all the files in dir? - (apply #'vc-svn-command (current-buffer) 'async nil "status" "-u" files) + (set-process-query-on-exit-flag + (apply #'vc-svn-command (current-buffer) 'async nil "status" "-u" files) + nil) ;; FIXME: Consider `vc-run-delayed-success'. (vc-run-delayed (vc-svn-after-dir-status callback t))) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 8f0e9e5bdc4..256a04812f6 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -5393,15 +5393,19 @@ of the current file." (vc-working-revision file))))) (defun vc--subject-to-file-name (subject) - "Generate a file name for a patch with subject line SUBJECT." + "Generate a file name for a patch with subject line SUBJECT. + +The resulting filename is similar to the names generated by \"git +format-patch\", but without the leading patch sequence number \"0001-\". +Any leading \"[PATCH 1/1]\" style strings, and any text properties are +removed from SUBJECT prior to conversion." (let* ((stripped - (replace-regexp-in-string "\\`\\[.*PATCH.*\\]\\s-*" "" + (replace-regexp-in-string "\\`\\[[^][]*PATCH[^][]*]\\s-*" "" subject)) - (truncated (if (length> stripped 50) - (substring stripped 0 50) - stripped))) + (truncated (substring-no-properties stripped + 0 (min (length stripped) 50)))) (concat - (string-trim (replace-regexp-in-string "\\W" "-" truncated) + (string-trim (replace-regexp-in-string "\\W+" "-" truncated) "-+" "-+") ".patch"))) diff --git a/lisp/view.el b/lisp/view.el index ec69699108a..4e2e1f54c76 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -464,6 +464,10 @@ Entry to view-mode runs the normal hook `view-mode-hook'." ;; so that View mode stays off if read-only-mode is called. (if (local-variable-p 'view-read-only) (kill-local-variable 'view-read-only)) + ;; Reset the read-only state memory as well, so that 'revert-buffer' + ;; won't make the buffer read-only again. + (if (local-variable-p 'read-only-mode--state) + (setq-local read-only-mode--state nil)) (if buffer-read-only (setq buffer-read-only view-old-buffer-read-only))) diff --git a/lisp/visual-wrap.el b/lisp/visual-wrap.el index 733f059ca85..e7be0c960d6 100644 --- a/lisp/visual-wrap.el +++ b/lisp/visual-wrap.el @@ -56,7 +56,7 @@ extra indent = -1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation + aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. actual indent = 2 @@ -64,7 +64,7 @@ extra indent = 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation + aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." :type 'integer :safe #'integerp @@ -174,7 +174,6 @@ members of `visual-wrap--safe-display-specs' (which see)." (defun visual-wrap--content-prefix (prefix) "Get the next-line prefix for the specified first-line PREFIX. -POSITION is the position in the buffer where PREFIX is located. This returns a string prefix to use for subsequent lines; a number, indicating the pixel width to use for whitespace alignment; or nil if diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 353d546fce4..b81adc49a54 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -868,7 +868,8 @@ extension (xpm, xbm, gif, jpg, or png) located in image) ((stringp image) ;; A string. Look it up in relevant directories. - (let* ((load-path (cons widget-image-directory load-path)) + (let* ((image-load-path (cons widget-image-directory + image-load-path)) specs) (dolist (elt widget-image-conversion) (dolist (ext (cdr elt)) @@ -2545,9 +2546,13 @@ when he invoked the menu." (widget-get widget (if val :on :off)))) (img (widget-image-find (widget-get widget (if val :on-glyph :off-glyph))))) - (widget-image-insert widget (or text "") - (if img - (append img '(:ascent center)))))) + (and img (null (image-property img :ascent)) + ;; Unlike (setf (image-property img :ascent) 'center), a simple + ;; `append' will not modify img as a side effect, and is safe + ;; to use here because the :ascent property is guaranteed to be + ;; absent. + (setq img (append img '(:ascent center)))) + (widget-image-insert widget (or text "") img))) (defun widget-toggle-action (widget &optional event) ;; Toggle value. diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 new file mode 100644 index 00000000000..231d0b35736 --- /dev/null +++ b/m4/texinfo.m4 @@ -0,0 +1,117 @@ +# texinfo.m4 +dnl Copyright (C) 2026 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. +dnl +dnl +AC_DEFUN([gl_TEXINFO],[dnl +AC_REQUIRE([gl_SET_MAKEINFO]) +AC_REQUIRE([gl_SET_DOCMISC_W32]) +AC_REQUIRE([gl_SET_DOCLANGS]) +]) +dnl +dnl gl_SET_MAKEINFO +dnl set the MAKEINFO precious variable to the suitable makeinfo compiler. +AC_DEFUN([gl_SET_MAKEINFO],[dnl +[## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. +: ${MAKEINFO:=makeinfo} +case `($MAKEINFO --version) 2>/dev/null` in + *' (GNU texinfo) '4.1[3-9]* | \ + *' (GNU texinfo) '[5-9]* | \ + *' (GNU texinfo) '[1-9][0-9]* ) ;; + *) MAKEINFO=no;; +esac + +## Makeinfo is unusual. For a released Emacs, the manuals are +## pre-built, and not deleted by the normal clean rules. makeinfo is +## therefore in the category of "special tools" not normally required, which +## configure does not have to check for (eg autoconf itself). +## In a repository checkout on the other hand, the manuals are not included. +## So makeinfo is a requirement to build from the repository, and configure +## should test for it as it does for any other build requirement. +## We use the presence of $srcdir/info/emacs to distinguish a release, +## with pre-built manuals, from a repository checkout. +if test "$MAKEINFO" = "no"; then + MAKEINFO=makeinfo + if test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then + ]AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.13, and your +source tree does not seem to have pre-built manuals in the 'info' directory. +Please install a suitable version of makeinfo.] )[ + else + ]AC_MSG_WARN( [You do not seem to have makeinfo >= 4.13. +You will not be able to rebuild the manuals if you delete them or change +their sources.] )[ + fi +fi +]AC_SUBST([MAKEINFO]) +]) +dnl +dnl gl_SET_DOCMISC_W32 +AC_DEFUN([gl_SET_DOCMISC_W32],[dnl +[if test $opsys = mingw32; then + DOCMISC_W32=efaq-w32 +else + DOCMISC_W32= +fi +]AC_SUBST([DOCMISC_W32]) +]) +dnl +dnl gl_dollar is needed for $1, $2 etc. in AWK snippets not to be intepreted by +dnl M4 as macros arguments. +m4_define([gl_dollar],[m4_quote([$])])dnl +m4_define([gl_DOCLANGS_FULL],[[default fr]])dnl +dnl This is minimal texinfo.tex version with "-" removed from the ISO date +dnl part from which there is no issue with index key sorting when document +dnl language/encoding corresponding locale is not installer nor active. +dnl See texinfo version 836b8924560. +m4_define([gl_TEXINFO_TEX_MINVER],[[20260426.12]])dnl +m4_define([gl_TEXINDEX_MINVER],[[7.1]])dnl +m4_define([gl_TEXINFO_INDEXING_IS_LOCALE_DEPENDANT],[dnl +[DOCLANGS='default' +gl_fn_doclangs_info () {] + AC_MSG_WARN([texinfo.tex/texindex versions suggest that indexing is locale dependant, manual compilation is restricted to lang 'default', override this by setting DOCLANGS in the environment]) +[}]])dnl +m4_define([gl_GET_TEXINFO_TEX_VER],[dnl +[texinfo_tex_ver=`tex -jobname=conftest '\nonstopmode\input texinfo.tex @typeout{TEXINFO_TEX_VER=@texinfoversion}@bye' | awk 'BEGIN{R=1;FS="="};]gl_dollar[1=="TEXINFO_TEX_VER" { gsub("-","");print ]gl_dollar[2; R=0; exit}; END{ exit R}'` +if test $? -ne 0; then + texinfo_tex_ver_ver=0.0 + gl_fn_doclangs_info () {] + AC_MSG_WARN([Can't find texinfo.tex version, check tex and texinfo.tex are installed.]) +[ } +fi +]])dnl +m4_define([gl_GET_TEXINDEX_VER],[dnl +[texindex_ver=`texindex --version | awk 'BEGIN { R=1};NR==1 && ]gl_dollar[1 == "texindex"{ print $NF; R=0; exit}; {exit}; END { exit R}'` +if test $? -ne 0; then + texindex_ver=0.0] + AC_MSG_WARN([Can't find texindex version, check texindex is installed.]) +[fi +] +])dnl +AC_DEFUN([gl_TEXINFO_VERSION_COMPARE],[dnl +AC_REQUIRE([AS_VERSION_COMPARE]) +AS_VERSION_COMPARE([$1],[$2],[gl_TEXINFO_INDEXING_IS_LOCALE_DEPENDANT()],[$3],[$3])dnl +])dnl +dnl gl_SET_DOCLANGS +AC_DEFUN([gl_SET_DOCLANGS],[dnl +AC_REQUIRE([gl_TEXINFO_VERSION_COMPARE]) +AC_ARG_VAR([DOCLANGS],[languages for which manuals are compiled, languages supported: ]gl_DOCLANGS_FULL()[, list is space separated]) +AC_MSG_CHECKING([for DOCLANGS derivation from texinfo.tex/texindex versions]) +dnl By default nothing to inform about +[gl_fn_doclangs_info () { :; }] +gl_GET_TEXINFO_TEX_VER() +gl_GET_TEXINDEX_VER() +gl_TEXINFO_VERSION_COMPARE([$texinfo_tex_ver],[gl_TEXINFO_TEX_MINVER()],[dnl + gl_TEXINFO_VERSION_COMPARE([$texindex_ver],[gl_TEXINDEX_MINVER()],[dnl + [DOCLANGS=']gl_DOCLANGS_FULL()[' + gl_fn_doclangs_info () {] + AC_MSG_NOTICE([texinfo.tex/texindex versions suggest that indexing is not locale dependant]) + [}]]) +]) +AC_MSG_RESULT([[']$DOCLANGS[']]) +gl_fn_doclangs_info +AC_SUBST([DOCLANGS]) +]) +dnl diff --git a/make-dist b/make-dist index 427274cf249..aa8df7126ee 100755 --- a/make-dist +++ b/make-dist @@ -369,7 +369,7 @@ possibly_non_vc_files=" ) || exit if [ $with_info = yes ]; then - info_files="info/dir $(echo info/*.info info/*.txt info/*.jpg)" || exit + info_files="info/dir $(echo info/*.info info/*.txt info/*.jpg info/*.png)" || exit else info_files= fi diff --git a/src/android.c b/src/android.c index 7ff7f26b527..034e1db2dd6 100644 --- a/src/android.c +++ b/src/android.c @@ -6158,8 +6158,6 @@ android_build_jstring (const char *text) if global_foo cannot be allocated, and after the global reference is created. */ -#define likely(cond) __builtin_expect (cond, 1) - /* Check for JNI exceptions and call memory_full in that situation. */ diff --git a/src/cm.c b/src/cm.c index 4693b69c26e..f453fc2650a 100644 --- a/src/cm.c +++ b/src/cm.c @@ -225,7 +225,8 @@ calccost (struct tty_display_info *tty, goto dodelta; /* skip all the tab junk */ } /* Tabs (the toughie) */ - if (tty->Wcm->cc_tab >= BIG || !tty->Wcm->cm_usetabs) + if (!tty_cursor_movement_use_TAB + || tty->Wcm->cc_tab >= BIG || !tty->Wcm->cm_usetabs) goto olddelta; /* forget it! */ /* diff --git a/src/conf_post.h b/src/conf_post.h index e0bb753df56..74742ac16dc 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -371,6 +371,11 @@ extern int emacs_setenv_TZ (char const *); # define UNINIT /* empty */ #endif +/* likely (COND) is equivalent to COND ? 1 : 0, but instructs the + compiler to provide static branch prediction hints to the CPU so that + the branch isn't mispredicted. */ +#define likely(cond) __builtin_expect (!!(cond), 1) + /* Emacs needs neither glibc strftime behavior for AM and PM indicators, nor Gnulib strftime support for non-Gregorian calendars. */ #define REQUIRE_GNUISH_STRFTIME_AM_PM false diff --git a/src/dbusbind.c b/src/dbusbind.c index 9dab7658d82..3270254e93c 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1434,7 +1434,11 @@ usage: (dbus-message-internal &rest REST) */) XD_DBUS_VALIDATE_PATH (path); XD_DBUS_VALIDATE_INTERFACE (interface); XD_DBUS_VALIDATE_MEMBER (member); - if (!NILP (handler) && !FUNCTIONP (handler)) + if (!NILP (handler) + && !(FUNCTIONP (handler) + || (CONSP (handler) + && FUNCTIONP (CAR_SAFE (handler)) + && FUNCTIONP (CDR_SAFE (handler))))) wrong_type_argument (Qinvalid_function, handler); } @@ -1585,6 +1589,12 @@ usage: (dbus-message-internal &rest REST) */) if (mtype != DBUS_MESSAGE_TYPE_METHOD_CALL) XD_SIGNAL1 (build_string (":keep-fd is only supported on method calls")); + /* This is because the error handler and the keepfd path use + the same slot in Vdbus_registered_objects_table. */ + if (CONSP (handler)) + XD_SIGNAL1 + (build_string + (":keep-fd cannot be used when there is an error handler")); /* Ignore this keyword if unsupported. */ #ifdef DBUS_TYPE_UNIX_FD @@ -1865,9 +1875,6 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) /* Remove the entry. */ Fremhash (key, Vdbus_registered_objects_table); - /* Store the event. */ - xd_store_event (CONSP (value) ? CAR_SAFE (value) : value, args, event_args); - #ifdef DBUS_TYPE_UNIX_FD /* Check, whether there is a file descriptor to be kept. value is (handler . path) @@ -1880,8 +1887,12 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) Fcons (Fcons (CAR_SAFE (CDR_SAFE (CAR_SAFE (args))), CDR_SAFE (value)), xd_registered_fds); + value = CAR_SAFE (value); } #endif + + /* Store the event. */ + xd_store_event (value, args, event_args); } else /* DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_SIGNAL. */ @@ -2164,8 +2175,9 @@ means a wildcard then. OBJECT is either the handler to be called when a D-Bus message, which matches the key criteria, arrives (TYPE `:method', `:signal' and -`:monitor'), or a list (ACCESS EMITS-SIGNAL VALUE) for TYPE -`:property'. +`:monitor'), or a list (ACCESS EMITS-SIGNAL VALUE) for TYPE `:property'. +For type `:message', the handler slot can also be a cons cell (HANDLER +. ERROR-HANDLER) or (HANDLER . KEEP-FD-PATH). For entries of type `:signal' or `:monitor', there is also a fifth element RULE, which keeps the match string the signal or monitor is diff --git a/src/dispextern.h b/src/dispextern.h index 4ae12c31f1b..ef301ee45ac 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -259,7 +259,7 @@ enum window_part /* Macros to include code only if GLYPH_DEBUG is defined. */ #ifdef GLYPH_DEBUG -#define IF_DEBUG(X) ((void) (X)) +#define IF_DEBUG(X) do { (X); } while (false) #else #define IF_DEBUG(X) ((void) 0) #endif @@ -3616,6 +3616,7 @@ int frame_mode_line_height (struct frame *); extern bool redisplaying_p; extern unsigned int redisplay_counter; extern bool display_working_on_window_p; +extern int dont_resize_frames; extern void unwind_display_working_on_window (void); extern bool help_echo_showing_p; extern Lisp_Object help_echo_string, help_echo_window; diff --git a/src/dispnew.c b/src/dispnew.c index 50dfa065af9..d7141f953cc 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6713,7 +6713,7 @@ deliver_window_change_signal (int sig) void do_pending_window_change (bool safe) { - if (redisplaying_p && !safe) + if ((redisplaying_p || dont_resize_frames) && !safe) return; while (delayed_size_change) diff --git a/src/fns.c b/src/fns.c index 2b6d68ae997..fd465502785 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1827,7 +1827,10 @@ DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, mpz_export (&iz, NULL, -1, sizeof iz, 0, 0, mpz[0]); num += iz; } - num += cycle_length - large_num % cycle_length; + if (num < cycle_length) + num += cycle_length; + num -= large_num % cycle_length; + eassume (num >= 0); } num %= cycle_length; diff --git a/src/ftfont.c b/src/ftfont.c index fd8a9c39b16..4028de8a9f3 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1989,7 +1989,7 @@ adjust_anchor (FT_Face ft_face, OTF_Anchor *anchor, FT_Outline *outline; int ap = anchor->f.f1.AnchorPoint; - FT_Load_Glyph (ft_face, (FT_UInt) {code}, FT_LOAD_MONOCHROME); + FT_Load_Glyph (ft_face, code, FT_LOAD_MONOCHROME); outline = &ft_face->glyph->outline; if (ap < outline->n_points) { diff --git a/src/gtkutil.c b/src/gtkutil.c index 41532f45a89..6d3ffa874f4 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1223,8 +1223,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height) outer_height /= scale; outer_width /= scale; - height = outer_height * scale; - width = outer_width * scale; + height = height / scale * scale; + width = width / scale * scale; xg_wm_set_size_hint (f, 0, 0); @@ -1351,8 +1351,8 @@ xg_frame_set_size_and_position (struct frame *f, int width, int height) outer_height /= scale; outer_width /= scale; - height = outer_height * scale; - width = outer_width * scale; + height = height / scale * scale; + width = width / scale * scale; x /= scale; y /= scale; diff --git a/src/lisp.h b/src/lisp.h index 44bf69fb834..88a97ce9f12 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1361,7 +1361,7 @@ EQ (Lisp_Object x, Lisp_Object y) { if (BASE_EQ (x, y)) return true; - else if (!__builtin_expect (symbols_with_pos_enabled, false)) + else if (likely (symbols_with_pos_enabled == false)) return false; else return slow_eq (x, y); @@ -6508,7 +6508,8 @@ enum { SMALL_LIST_LEN_MAX = 127 }; set TAIL to the current cons. If the loop exits normally, set TAIL to the terminating non-cons, typically nil. The loop body should not modify the list’s top level structure other than by - perhaps deleting the current cons. */ + perhaps deleting the current cons. In practice, this macro rarely + quits. */ #define FOR_EACH_TAIL(tail) \ FOR_EACH_TAIL_INTERNAL (tail, circular_list (tail), true) @@ -6522,16 +6523,17 @@ enum { SMALL_LIST_LEN_MAX = 127 }; /* Iterator intended for use only within FOR_EACH_TAIL_INTERNAL. */ struct for_each_tail_internal { + /* The object we're comparing to. */ Lisp_Object tortoise; - intptr_t max, n; - unsigned short int q; + /* How many iterations of the algorithm have happened. */ + ptrdiff_t l; }; /* Like FOR_EACH_TAIL (LIST), except evaluate CYCLE if a cycle is found, and check for quit if CHECK_QUIT. This is an internal macro intended for use only by the above macros. - Use Brent’s teleporting tortoise-hare algorithm. See: + Modifies Brent’s teleporting tortoise-hare algorithm. See: Brent RP. BIT. 1980;20(2):176-184. doi:10.1007/BF01933190 https://maths-people.anu.edu.au/~brent/pd/rpb051i.pdf @@ -6546,20 +6548,35 @@ struct for_each_tail_internal FOR_EACH_TAIL_STEP_CYCLEP (tail, check_quit) \ ? (cycle) : (void) 0) -#define FOR_EACH_TAIL_BASIC(tail, stepper) \ - for (struct for_each_tail_internal li = { tail, 2, 0, 2 }; \ - CONSP (tail); stepper) +#define FOR_EACH_TAIL_BASIC(tail, stepper) \ + for (struct for_each_tail_internal li = { tail, 0 }; \ + CONSP (tail) || (likely (NILP (tail)), false); \ + stepper) -/* Step TAIL and return whether a cycle has been detected. - If CHECK_QUIT then check for quit occasionally. */ -#define FOR_EACH_TAIL_STEP_CYCLEP(tail, check_quit) \ - ((tail) = XCDR (tail), \ - ((--li.q != 0 \ - || ((check_quit) ? maybe_quit () : (void) 0, 0 < --li.n) \ - || (li.q = li.n = li.max <<= 1, li.n >>= USHRT_WIDTH, \ - li.tortoise = (tail), false)) \ - && BASE_EQ (tail, li.tortoise))) +/* How many iterations until we start advancing the tortoise, which is + necessary to detect lists which end in a cycle but whose initial + elements aren't part of the cycle. Also, number of iterations until + we check for quits. Must be a power of two. */ +#define FOR_EACH_TAIL_THRESHOLD 4096 + +static_assert (POWER_OF_2 (FOR_EACH_TAIL_THRESHOLD)); + +/* Step TAIL and return whether a cycle has been detected. If + CHECK_QUIT then check for quit occasionally. We only check for quits + once every 4096 iterations, and we don't advance the tortoise until + that happens for the first time. + + The C comma operator is used here to avoid statement expressions: the + expression evaluates to the value of BASE_EQ (tail, li.tortoise), but + has additional side effects, possibly exiting nonlocally. */ + +#define FOR_EACH_TAIL_STEP_CYCLEP(tail, check_quit) \ + ((tail) = XCDR (tail), \ + (! likely (!BASE_EQ (tail, li.tortoise)) \ + || (! likely (((++li.l) & (FOR_EACH_TAIL_THRESHOLD-1)) != 0) \ + && (((check_quit) ? maybe_quit () : (void) 0, false) \ + || (POWER_OF_2 (li.l) && (li.tortoise = (tail), false)))))) /* Do a `for' loop over alist values. */ diff --git a/src/marker.c b/src/marker.c index 9fa46ed7b4b..d44b8a26862 100644 --- a/src/marker.c +++ b/src/marker.c @@ -819,6 +819,36 @@ If TYPE is nil, it means the marker stays behind when you insert text at it. */ return type; } +DEFUN ("markers-in", Fmarkers_in, Smarkers_in, 0, 2, 0, + doc: /* Return the list of markers in region BEG..END. +The list includes markers at BEG and at END. */) + (Lisp_Object beg, Lisp_Object end) +{ + Lisp_Object res = Qnil; + struct Lisp_Marker *tail; + ptrdiff_t ibeg, iend; + if (NILP (beg)) + ibeg = BEGV; + else + { + CHECK_FIXNUM_COERCE_MARKER (beg); + ibeg = clip_to_bounds (BEGV, XFIXNUM (beg), ZV); + } + if (NILP (end)) + iend = ZV; + else + { + CHECK_FIXNUM_COERCE_MARKER (end); + iend = clip_to_bounds (BEGV, XFIXNUM (end), ZV); + } + + for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) + if (ibeg <= tail->charpos && tail->charpos <= iend) + res = Fcons (make_lisp_ptr (tail, Lisp_Vectorlike), res); + + return res; +} + #ifdef MARKER_DEBUG /* For debugging -- count the markers in buffer BUF. */ @@ -876,4 +906,5 @@ syms_of_marker (void) defsubr (&Scopy_marker); defsubr (&Smarker_insertion_type); defsubr (&Sset_marker_insertion_type); + defsubr (&Smarkers_in); } diff --git a/src/minibuf.c b/src/minibuf.c index c716ac0d811..745a71a63fc 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -2364,6 +2364,22 @@ STR the i-th character of PAT matched. */) if (patlen == 0 || strlen == 0 || size > FLEX_MAX_MATRIX_SIZE) return Qnil; + /* Also bail if PAT is not a subsequence of STR so bail "cheaply" + before the O(N*M) DP algorithm. Walking both strings + byte-by-byte for this purpose (and only for case-sensitive common + case) should be valid even for multibyte strings. */ + if (!completion_ignore_case) + { + const unsigned char *p = SDATA (pat); + const unsigned char *s = SDATA (str); + int pi = 0; + for (int si = 0; si < strlen && pi < patlen; si++) + if (s[si] == p[pi]) + pi++; + if (pi < patlen) + return Qnil; + } + /* Initialize M and D with positive infinity... */ for (int j = 0; j < size; j++) M[j] = D[j] = pos_inf; diff --git a/src/nsterm.m b/src/nsterm.m index 0de77c9ff96..d3c1fa9c278 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1657,8 +1657,13 @@ -(void)remove unblock_input (); } - /* Making a frame invisible seems to break the parent->child - relationship, so reinstate it. */ + /* A child window cannot remain attached while hidden. Per Apple's + documentation, "Calling orderOut(_:) on a child window causes the + window to be removed from its parent window before being removed" + (https://developer.apple.com/documentation/appkit/nswindow/orderout(_:)), + and ns_make_frame_invisible hides the frame with -orderOut:. The + parent->child relationship is therefore broken while invisible, so + reinstate it now that we are making the frame visible again. */ if ([window parentWindow] == nil && FRAME_PARENT_FRAME (f) != NULL) { block_input (); @@ -9968,7 +9973,7 @@ - (void)setParentChildRelationships #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - if ([ourView respondsToSelector:@selector (toggleFullScreen)]) + if ([ourView respondsToSelector:@selector (toggleFullScreen:)]) #endif /* If we are the descendent of a fullscreen window and we have no new parent, go fullscreen. */ @@ -9993,15 +9998,22 @@ - (void)setParentChildRelationships #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - if ([ourView respondsToSelector:@selector (toggleFullScreen)]) + if ([ourView respondsToSelector:@selector (toggleFullScreen:)]) #endif /* Child frames must not be fullscreen. */ if ([ourView fsIsNative] && [ourView isFullscreen]) [ourView toggleFullScreen:self]; #endif - [parentWindow addChildWindow:self - ordered:NSWindowAbove]; + /* -addChildWindow: also orders the child window onto the screen, so + attaching a child frame Emacs considers invisible is what + resurrects a dismissed completion popup (corfu, company-box, ...) + when relationships are rebuilt. Only attach a visible child; a + hidden one is re-attached by ns_make_frame_visible when it is + shown again. */ + if (FRAME_VISIBLE_P (ourFrame)) + [parentWindow addChildWindow:self + ordered:NSWindowAbove]; } /* Check our child windows are configured correctly. */ diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 54d50cfc56e..543571c6538 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -1907,6 +1907,8 @@ parse_resource_key (const char *res_key, char *setting_key) /* check existence of setting_key */ GSettingsSchemaSource *ssrc = g_settings_schema_source_get_default (); + if (ssrc == NULL) + return NULL; /* No GSettings schemas installed. */ GSettingsSchema *scm = g_settings_schema_source_lookup (ssrc, SCHEMA_ID, TRUE); if (!scm) return NULL; /* *.schema.xml is not installed. */ diff --git a/src/process.c b/src/process.c index 806ed451e46..5efcf0ba45f 100644 --- a/src/process.c +++ b/src/process.c @@ -7672,6 +7672,37 @@ child_signal_notify (void) static void dummy_handler (int sig) {} static signal_handler_t volatile lib_child_handler; +/* True if Glib installs its own SIGCHLD handler that Emacs must work + around. Determined once in init_process_emacs; consulted elsewhere + (e.g. xwidget.c) to decide whether the about:blank load workaround + is needed. */ +bool glib_installs_sigchld_handler; + +/* Handle a SIGCHLD signal by looking for known child processes of + Emacs whose status have changed. For each one found, record its + new status. + + All we do is change the status; we do not run sentinels or print + notifications. That is saved for the next time keyboard input is + done, in order to avoid timing errors. + + ** WARNING: this can be called during garbage collection. + Therefore, it must not be fooled by the presence of mark bits in + Lisp objects. + + ** USG WARNING: Although it is not obvious from the documentation + in signal(2), on a USG system the SIGCLD handler MUST NOT call + signal() before executing at least one wait(), otherwise the + handler will be called again, resulting in an infinite loop. The + relevant portion of the documentation reads "SIGCLD signals will be + queued and the signal-catching function will be continually + reentered until the queue is empty". Invoking signal() causes the + kernel to reexamine the SIGCLD queue. Fred Fish, UniSoft Systems + Inc. + + ** Malloc WARNING: This should never call malloc either directly or + indirectly; if it does, that is a bug. */ + void process_sigchld_async (int sig) { @@ -8756,6 +8787,7 @@ init_process_emacs (int sockfd) if (lib_child_handler != dummy_handler) { /* The hacky workaround is needed on this platform. */ + glib_installs_sigchld_handler = true; signal_handler_t lib_child_handler_glib = lib_child_handler; catch_child_signal (); eassert (lib_child_handler == dummy_handler); diff --git a/src/process.h b/src/process.h index 8a0dd3adc91..e17a95dedc8 100644 --- a/src/process.h +++ b/src/process.h @@ -264,6 +264,8 @@ pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val) /* True means don't run process sentinels. This is used when exiting. */ extern bool inhibit_sentinels; +/* True means that Glib clobbers Emacs SIGCHLD handler. */ +extern bool glib_installs_sigchld_handler; /* Exit statuses for GNU programs that exec other programs. */ enum diff --git a/src/term.c b/src/term.c index 85af6f4a8bb..a87efb9ce1c 100644 --- a/src/term.c +++ b/src/term.c @@ -5281,9 +5281,20 @@ On TTY frames, as a display optimization, Emacs may move to a position by "overshooting" with TAB characters and one BACKSPACE character, when this is more efficient. This combination can interfere with the functioning of some software, such as screen readers. Set this to -non-nil to enable this optimization. */); +non-nil to enable this optimization. +If `tty-cursor-movement-use-TAB' is nil, this variable has no effect, +as Emacs will never use TABs for cursor movement. */); tty_cursor_movement_use_TAB_BS = 0; + DEFVAR_BOOL ("tty-cursor-movement-use-TAB", tty_cursor_movement_use_TAB, + doc: /* Whether TTY frames may use TAB for cursor motion. +On TTY frames, as a display optimization, Emacs may move cursor to a +position with TAB characters, when this is more efficient. This might +produce wrong results if the hardware tabs of the terminal were set to +be of different width than Emacs expects. Set this to nil to disable +using TABs for cursor motion. */); + tty_cursor_movement_use_TAB = 1; + defsubr (&Stty_display_color_p); defsubr (&Stty_display_color_cells); defsubr (&Stty_no_underline); diff --git a/src/xdisp.c b/src/xdisp.c index e0595e247fe..05eddf4550f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1081,6 +1081,14 @@ bool redisplaying_p; the callers. */ bool display_working_on_window_p; +/* Non-zero when we do not allow resizing frames. For example, + display_mode_line and other functions produce glyphs for the mode + line, in particular when called from non-redisplay code (so + redisplaying_p is false). We inhibit resizing of the frames during + that time, because that could change glyph_row pointers in the glyph + matrix behind the back of teh code which manipulates these pointers. */ +int dont_resize_frames; + /* If a string, XTread_socket generates an event to display that string. (The display is done in read_char.) */ @@ -14029,6 +14037,9 @@ unwind_format_mode_line (Lisp_Object vector) } Vmode_line_unwind_vector = vector; + + if (dont_resize_frames > 0) + dont_resize_frames--; } @@ -14165,6 +14176,7 @@ gui_consider_frame_title (Lisp_Object frame) title_start = MODE_LINE_NOPROP_LEN (0); init_iterator (&it, XWINDOW (f->selected_window), -1, -1, NULL, DEFAULT_FACE_ID); + dont_resize_frames++; display_mode_element (&it, 0, -1, -1, fmt, Qnil, false); len = MODE_LINE_NOPROP_LEN (title_start); title = mode_line_noprop_buf + title_start; @@ -19870,7 +19882,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, && !(!NILP (Vdisplay_line_numbers) && NILP (Finternal_lisp_face_equal_p (Qline_number, Qline_number_current_line, - w->frame))) + w->frame, Qt))) /* This code is not used for mini-buffer for the sake of the case of redisplaying to replace an echo area message; since in that case the mini-buffer contents per se are usually @@ -22671,7 +22683,7 @@ try_window_id (struct window *w) || (!NILP (Vdisplay_line_numbers) && NILP (Finternal_lisp_face_equal_p (Qline_number, Qline_number_current_line, - w->frame)))) + w->frame, Qt)))) GIVE_UP (24); /* composition-break-at-point is incompatible with the optimizations @@ -28157,6 +28169,10 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) format_mode_line_unwind_data (NULL, NULL, Qnil, false)); + /* We cannot allow frame-resizing as long as the code below runs, + because that could invalidate the it.glyph_row->glyphs pointers. */ + dont_resize_frames++; + /* Temporarily make frame's keyboard the current kboard so that kboard-local variables in the mode_line_format will get the right values. */ @@ -28272,8 +28288,6 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) } pop_kboard (); - unbind_to (count, Qnil); - /* Fill up with spaces. */ display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0); @@ -28303,6 +28317,8 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) - (it.current_x - it.last_visible_x))); } + unbind_to (count, Qnil); + return it.glyph_row->height; } @@ -29045,6 +29061,7 @@ are the selected window and the WINDOW's buffer). */) set_buffer_internal_1 (XBUFFER (buffer)); init_iterator (&it, w, -1, -1, NULL, face_id); + dont_resize_frames++; /* Make sure `base_line_number` is fresh in case we encounter a `%l`. */ if (current_buffer == XBUFFER ((w)->contents) diff --git a/src/xfaces.c b/src/xfaces.c index 9a4b2fc5bdd..63350565835 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -535,7 +535,7 @@ static void x_free_gc (struct frame *f, GC gc) { eassert (input_blocked_p ()); - IF_DEBUG ((--ngcs, eassert (ngcs >= 0))); + IF_DEBUG ((eassert (ngcs > 0), ngcs--)); XFreeGC (FRAME_X_DISPLAY (f), gc); } @@ -561,7 +561,7 @@ x_create_gc (struct frame *f, unsigned long mask, Emacs_GC *egc) static void x_free_gc (struct frame *f, Emacs_GC *gc) { - IF_DEBUG ((--ngcs, eassert (ngcs >= 0))); + IF_DEBUG ((eassert (ngcs > 0), ngcs--)); xfree (gc); } @@ -4531,12 +4531,16 @@ lface_equal_p (Lisp_Object *v1, Lisp_Object *v2) DEFUN ("internal-lisp-face-equal-p", Finternal_lisp_face_equal_p, - Sinternal_lisp_face_equal_p, 2, 3, 0, + Sinternal_lisp_face_equal_p, 2, 4, 0, doc: /* True if FACE1 and FACE2 are equal. If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame. If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames). -If FRAME is omitted or nil, use the selected frame. */) - (Lisp_Object face1, Lisp_Object face2, Lisp_Object frame) +If FRAME is omitted or nil, use the selected frame. +Optional fourth argument INHERIT, if non-nil, means the faces +are considered equal if one inherits from the other in a way +that makes them have the same attributes when used on display. */) + (Lisp_Object face1, Lisp_Object face2, Lisp_Object frame, + Lisp_Object inherit) { bool equal_p; struct frame *f; @@ -4552,6 +4556,45 @@ If FRAME is omitted or nil, use the selected frame. */) lface2 = lface_from_face_name (f, face2, true); equal_p = lface_equal_p (XVECTOR (lface1)->contents, XVECTOR (lface2)->contents); + if (!(NILP (inherit) || equal_p)) + { + /* The below is a subset of merging the descendant face with its + parent(s). We only consider a direct inheritance (so no FACE1 + that inherits from some other face which inherits from FACE2), + and the values of :inherit that are lists are not considered. + This is enough in simple cases such as the line-number-current + face that inherits from line-number. */ + Lisp_Object attrs1[LFACE_VECTOR_SIZE], attrs2[LFACE_VECTOR_SIZE]; + int i; + equal_p = true; + memcpy (attrs1, xvector_contents (lface1), sizeof attrs1); + memcpy (attrs2, xvector_contents (lface2), sizeof attrs2); + /* If either face inherits from the other one, and all the other + face attributes of the inheriting face are either unspecified + or equal to those of the parent face, consider the faces equal. */ + if (EQ (attrs1[LFACE_INHERIT_INDEX], face2)) + { + for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i) + { + if (i == LFACE_INHERIT_INDEX) + continue; + equal_p = face_attr_equal_p (attrs1[i], attrs2[i]) + || UNSPECIFIEDP (attrs1[i]); + } + } + else if (EQ (attrs2[LFACE_INHERIT_INDEX], face1)) + { + for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i) + { + if (i == LFACE_INHERIT_INDEX) + continue; + equal_p = face_attr_equal_p (attrs1[i], attrs2[i]) + || UNSPECIFIEDP (attrs2[i]); + } + } + + } + return equal_p ? Qt : Qnil; } diff --git a/src/xsettings.c b/src/xsettings.c index 1d6bc712292..966416a2995 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -1100,12 +1100,15 @@ init_gsettings (void) #if GLIB_CHECK_VERSION (2, 32, 0) { - GSettingsSchema *sc = g_settings_schema_source_lookup - (g_settings_schema_source_get_default (), - GSETTINGS_SCHEMA, - true); - schema_found = sc != NULL; - if (sc) g_settings_schema_unref (sc); + GSettingsSchemaSource *source = g_settings_schema_source_get_default + (); + if (source != NULL) + { + GSettingsSchema *sc = g_settings_schema_source_lookup + (source, GSETTINGS_SCHEMA, true); + schema_found = sc != NULL; + if (sc) g_settings_schema_unref (sc); + } } #else { diff --git a/src/xterm.c b/src/xterm.c index 6b57a1a2665..e9b551502c2 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -28610,6 +28610,27 @@ x_set_window_size_1 (struct frame *f, bool change_gravity, } } +/* Resizing an occluding window (such as a child frame) immediately + triggers a fill with background color on the exposed area on the + parent when the X server receives the corresponding command + (XResizeWindow, XMoveResizeWindow, etc). But only if the window has + a background assigned. Change it to None to block that effect. */ +static void +x_suspend_background_fills (struct frame *f) +{ + Display *dpy = FRAME_X_DISPLAY (f); + + XSetWindowBackgroundPixmap (dpy, FRAME_X_WINDOW (f), None); +} + +/* No automatmic fill happens when the background is restored. */ +static void +x_restore_background_fills (struct frame *f) +{ + Display *dpy = FRAME_X_DISPLAY (f); + + XSetWindowBackground (dpy, FRAME_X_WINDOW (f), FRAME_BACKGROUND_PIXEL (f)); +} /* Change the size of frame F's X window to WIDTH and HEIGHT pixels. If CHANGE_GRAVITY, change to top-left-corner window gravity for this @@ -28622,6 +28643,9 @@ x_set_window_size (struct frame *f, bool change_gravity, { block_input (); + if (FRAME_PARENT_FRAME (f)) + x_suspend_background_fills (FRAME_PARENT_FRAME (f)); + #ifdef USE_GTK if (FRAME_GTK_WIDGET (f)) xg_frame_set_char_size (f, width, height); @@ -28633,6 +28657,9 @@ x_set_window_size (struct frame *f, bool change_gravity, x_clear_under_internal_border (f); #endif /* not USE_GTK */ + if (FRAME_PARENT_FRAME (f)) + x_restore_background_fills (FRAME_PARENT_FRAME (f)); + /* If cursor was outside the new size, mark it as off. */ mark_window_cursors_off (XWINDOW (f->root_window)); @@ -28694,6 +28721,9 @@ x_set_window_size_and_position (struct frame *f, int width, int height) { block_input (); + if (FRAME_PARENT_FRAME (f)) + x_suspend_background_fills (FRAME_PARENT_FRAME (f)); + #ifdef USE_GTK if (FRAME_GTK_WIDGET (f)) xg_frame_set_size_and_position (f, width, height); @@ -28706,6 +28736,9 @@ x_set_window_size_and_position (struct frame *f, int width, int height) if (!FRAME_PARENT_FRAME (f)) x_clear_under_internal_border (f); + if (FRAME_PARENT_FRAME (f)) + x_restore_background_fills (FRAME_PARENT_FRAME (f)); + /* If cursor was outside the new size, mark it as off. */ mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); @@ -29465,6 +29498,9 @@ x_make_frame_invisible (struct frame *f) by hand again (they have already done that once for this window.) */ x_wm_set_size_hint (f, 0, true); + if (FRAME_PARENT_FRAME (f)) + x_suspend_background_fills (FRAME_PARENT_FRAME (f)); + #ifdef USE_GTK if (FRAME_GTK_OUTER_WIDGET (f)) gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); @@ -29482,6 +29518,9 @@ x_make_frame_invisible (struct frame *f) error ("Can't notify window manager of window withdrawal"); } + if (FRAME_PARENT_FRAME (f)) + x_restore_background_fills (FRAME_PARENT_FRAME (f)); + /* Don't perform the synchronization if the network connection is slow, and the user says it is unwanted. */ if (NILP (Vx_lax_frame_positioning)) diff --git a/src/xwidget.c b/src/xwidget.c index e554dc63bbf..69d589101b1 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -361,13 +361,26 @@ fails. */) g_signal_connect (G_OBJECT (ctx), "download-started", G_CALLBACK (webkit_download_cb), xw); + /* In process.c:init_process_emacs(), we determine whether GLib + overrides Emacs' SIGCHLD handler (based on Glib version + and kernel; see process.c for details). - webkit_web_view_load_uri (WEBKIT_WEB_VIEW (xw->widget_osr), - "about:blank"); - /* webkitgtk uses GSubprocess which sets sigaction causing - Emacs to not catch SIGCHLD with its usual handle setup in - 'catch_child_signal'. This resets the SIGCHLD sigaction. */ - catch_child_signal (); + webkit_web_view_load_uri() is potentially affected by this + (through GSubProcess), so as a workaround we load a minimal + about:blank url and restore the SIGCHLD handler afterward. + + With PGTK, this workaround has the unfortunate side-effect of + making the first load of an URI not work immediately (it needs + a refresh), so avoid the workaround when we can. + + See thread + . */ + if (glib_installs_sigchld_handler) + { + webkit_web_view_load_uri (WEBKIT_WEB_VIEW (xw->widget_osr), + "about:blank"); + catch_child_signal (); + } } else { diff --git a/test/lisp/calendar/time-date-tests.el b/test/lisp/calendar/time-date-tests.el index cd2dc203adf..d3477ff3e04 100644 --- a/test/lisp/calendar/time-date-tests.el +++ b/test/lisp/calendar/time-date-tests.el @@ -115,6 +115,7 @@ ("%mm %5ss" 66 "1m 6s") ("%mm %.5ss" 66.4 "1m 00006s") ("%mm %,1ss" 66.4 "1m 6.4s") + ("%mm %,1ss" (664 . 10) "1m 6.4s") ("%mm %5,1ss" 66.4 "1m 6.4s") ("%mm %.5,1ss" 66.4 "1m 006.4s") ("%hh %z%x%mm %ss" 120 "2m") @@ -128,8 +129,8 @@ (seconds (nth 1 fs)) (expected (nth 2 fs))) (should (equal (format-seconds string seconds) expected)) - (when (< 0 seconds) - (should (equal (format-seconds string (- seconds)) + (when (time-less-p 0 seconds) + (should (equal (format-seconds string (time-subtract 0 seconds)) (concat "-" expected)))))))) (ert-deftest test-ordinal () diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el index b06d600db66..780bec550f8 100644 --- a/test/lisp/erc/erc-fill-tests.el +++ b/test/lisp/erc/erc-fill-tests.el @@ -421,13 +421,14 @@ (pcase-let ((`((margin left-margin) ,displayed) (get-text-property erc-insert-marker 'display))) (should (equal-including-properties - displayed #(" ERC>" 4 8 - ( read-only t - front-sticky t - field erc-prompt - erc-prompt t - rear-nonsticky t - font-lock-face erc-prompt-face))))) + displayed #(" ERC>" + 0 4 (font-lock-face erc-prompt-face) + 4 8 ( read-only t + front-sticky t + field erc-prompt + erc-prompt t + rear-nonsticky t + font-lock-face erc-prompt-face))))) (erc-fill-tests--compare "stamps-left-01") (ert-info ("Shrink left margin by 1 col") @@ -437,13 +438,14 @@ (pcase-let ((`((margin left-margin) ,displayed) (get-text-property erc-insert-marker 'display))) (should (equal-including-properties - displayed #(" ERC>" 3 7 - ( read-only t - front-sticky t - field erc-prompt - erc-prompt t - rear-nonsticky t - font-lock-face erc-prompt-face)))))))))) + displayed #(" ERC>" + 0 3 (font-lock-face erc-prompt-face) + 3 7 ( read-only t + front-sticky t + field erc-prompt + erc-prompt t + rear-nonsticky t + font-lock-face erc-prompt-face)))))))))) (ert-deftest erc-fill--wrap-massage-legacy-indicator-type () (let (calls diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 3d0ab522d3f..c8ff2941f3c 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -842,6 +842,73 @@ Returns the respective error." dbus--test-interface "Foo" :authorizable t "foo") :type 'dbus-error))) +(defvar dbus--test-method-another-handler nil) +(defun dbus--test-method-another-handler (&rest args) + "Method handler for `dbus-test04-call-method-error-handler'." + (should args) + (setq dbus--test-method-another-handler t)) + +(defvar dbus--test-method-error-handler nil) +(defun dbus--test-method-error-handler (&rest args) + "Error handler for `dbus-test04-call-method-error-handler'." + (should (eq 'dbus-error (caar args))) + (setq dbus--test-method-error-handler t)) + +(ert-deftest dbus-test04-call-method-error-handler () + "Verify `dbus-call-method-asynchronously' error handler." + :tags '(:expensive-test) + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + (dbus-register-service :session dbus--test-service) + + (unwind-protect + (let ((method "Method") + (method-handler #'dbus--test-method-handler) + (handler #'dbus--test-method-another-handler) + (error-handler #'dbus--test-method-error-handler) + ;dbus-debug ; There would be errors otherwise. + registered) + + ;; Register. + (should + (equal + (setq + registered + (dbus-register-method + :session dbus--test-service dbus--test-path + dbus--test-interface method method-handler)) + `((:method :session ,dbus--test-interface ,method) + (,dbus--test-service ,dbus--test-path ,method-handler)))) + + ;; Call HANDLER. + (setq dbus--test-method-another-handler nil) + (dbus-call-method-asynchronously + :session dbus--test-service dbus--test-path + dbus--test-interface method `(,handler . ,error-handler) "foo") + (with-timeout (1 (dbus--test-timeout-handler)) + (while (not dbus--test-method-another-handler) + (read-event nil nil 0.1))) + (should dbus--test-method-another-handler) + + ;; Call ERROR-HANDLER. + (setq dbus--test-method-error-handler nil) + (dbus-call-method-asynchronously + :session dbus--test-service dbus--test-path + dbus--test-interface method `(,handler . ,error-handler) + "foo" "foo" "foo") + (with-timeout (1 (dbus--test-timeout-handler)) + (while (not dbus--test-method-error-handler) + (read-event nil nil 0.1))) + (should dbus--test-method-error-handler) + + ;; Unregister method. + (should (dbus-unregister-object registered)) + (should-not (dbus-unregister-object registered))) + + ;; Cleanup. + (ignore-errors (kill-buffer "*Warnings*")) + (dbus-unregister-service :session dbus--test-service))) + (defvar dbus--test-event-expected nil "The expected event in `dbus--test-signal-handler'.") @@ -2416,7 +2483,15 @@ The argument EXPECTED-ARGS is a list of expected arguments for the method." ;; Closing them again is a noop. (should-not (dbus--fd-close lock1)) - (should-not (dbus--fd-close lock2)))) + (should-not (dbus--fd-close lock2)) + + ;; `:keep-fd' cannot be used together with an error handler. + (should-error + (dbus-call-method-asynchronously + :system dbus--test-systemd-service dbus--test-systemd-path + dbus--test-systemd-manager-interface "Inhibit" + '(ignore . ignore) :keep-fd what who why mode) + :type 'dbus-error))) (ert-deftest dbus-test10-open-close-fd () "Check D-Bus open/close a file descriptor." diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 4d11faf64de..3577388aa62 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2299,6 +2299,7 @@ being the result.") (tramp-default-proxies-alist tramp-default-proxies-alist) (tramp-show-ad-hoc-proxies t)) (cl-letf* (((symbol-function #'read-string) #'ignore) ; Suppress password. + ((symbol-function #'y-or-n-p) #'ignore) ; distrobox. ((tramp-file-name-host vec) "example.com.invalid")) (should-error (file-exists-p (tramp-make-tramp-file-name vec)) diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index caf386b4950..cd8e41c3dfb 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -52,6 +52,17 @@ ;; aix (aix "****** Error number 140 in line 8 of file errors.c ******" 25 nil 8 "errors.c" error) + ;; Ansible + (ansible-error "[ERROR]: couldn't resolve module/action 'shelll'. This often indicates a misspelling, missing collection, or incorrect module path." + 1 nil nil nil error) + (ansible-fatal "fatal: [localhost]: FAILED! => {" + 1 nil nil nil error) + (ansible-warning "[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg." + 1 nil nil nil warning) + (ansible-included "included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'})" + 11 nil nil "/home/albinus/src/tramp-tests/roles/test/tasks/adb.yml" info) + (ansible-origin "Origin: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml:19:3" + 9 3 19 "/home/albinus/src/tramp-tests/roles/test/tasks/adb.yml" info) ;; ant (ant "[javac] /src/DataBaseTestCase.java:27: unreported exception ..." 13 nil 27 "/src/DataBaseTestCase.java" error) @@ -561,7 +572,7 @@ The test data is in `compile-tests--test-regexps-data'." (should (eq compilation-num-errors-found 111)) (should (eq compilation-num-warnings-found 37)) - (should (eq compilation-num-infos-found 36))))) + (should (eq compilation-num-infos-found 38))))) (ert-deftest compile-test-grep-regexps () "Test the `grep-regexp-alist' regexps. diff --git a/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts b/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts new file mode 100644 index 00000000000..5e46ca35817 --- /dev/null +++ b/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts @@ -0,0 +1,67 @@ +Point-Char: | + +Name: fill-paragraph-handle-comment - current non-comment line before comment line +Code: + (lambda () + (setq-local comment-start "# ") + (setq-local fill-paragraph-handle-comment t) + (setq-local fill-column 42) + (fill-paragraph)) + +=-= + +this is not part of the comment this is not part of the comment| +# this is a comment this is a comment this is a comment + +=-= + +this is not part of the comment this is +not part of the comment +# this is a comment this is a comment this is a comment + +=-=-= + +Name: fill-paragraph-handle-comment - non-comment line before current comment line + +=-= + +this is not part of the comment this is not part of the comment +# this is a comment this is a comment this is a comment| + +=-= + +this is not part of the comment this is not part of the comment +# this is a comment this is a comment this +# is a comment + +=-=-= + +Name: fill-paragraph-handle-comment - comment line before current non-comment line + +=-= + +# this is a comment this is a comment this is a comment +this is not part of the comment this is not part of the comment| + +=-= + +# this is a comment this is a comment this is a comment +this is not part of the comment this is +not part of the comment + +=-=-= + +Name: fill-paragraph-handle-comment - current comment line before non-comment line + +=-= + +# this is a comment this is a comment this is a comment| +this is not part of the comment this is not part of the comment + +=-= + +# this is a comment this is a comment this +# is a comment +this is not part of the comment this is not part of the comment + +=-=-= diff --git a/test/lisp/textmodes/fill-tests.el b/test/lisp/textmodes/fill-tests.el index 2bb9d3ea163..c37a879b4b2 100644 --- a/test/lisp/textmodes/fill-tests.el +++ b/test/lisp/textmodes/fill-tests.el @@ -163,6 +163,10 @@ eius. Foo"))) (skip-unless (functionp 'markdown-mode)) (ert-test-erts-file (ert-resource-file "fill-paragraph-semlf-markdown-mode.erts"))) +(ert-deftest fill-test-fill-paragraph-handle-comment () + "Test the `fill-paragraph-handle-comment' variable." + (ert-test-erts-file (ert-resource-file "fill-paragraph-handle-comment.erts"))) + (provide 'fill-tests) ;;; fill-tests.el ends here diff --git a/test/src/marker-tests.el b/test/src/marker-tests.el index ddd8bc702e4..f083ece41e1 100644 --- a/test/src/marker-tests.el +++ b/test/src/marker-tests.el @@ -57,4 +57,17 @@ (set-marker marker-2 marker-1) (should (goto-char marker-2)))) +(ert-deftest marker-markers-in () + (with-temp-buffer + (insert "hello ") + (let ((m2 (point-marker))) + (insert "world") + (let ((m1 (point-min-marker)) + (m3 (point-max-marker)) + (ms (markers-in (1+ (point-min)) (1- (point-max))))) + (should (memq m2 ms)) + (should-not (memq m1 ms)) + (should-not (memq m3 ms)) + (should (all (lambda (m) (eq (marker-buffer m) (current-buffer))) ms)))))) + ;;; marker-tests.el ends here diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 3048cada03d..9b964e41995 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -89,6 +89,7 @@ process to complete." (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n")))))) (ert-deftest process-test-stderr-buffer () + :tags (if (getenv "EMACS_EMBA_CI") '(:unstable)) (skip-unless (executable-find "bash")) (with-timeout (60 (ert-fail "Test timed out")) (let* ((stdout-buffer (generate-new-buffer "*stdout*")) diff --git a/test/src/xfaces-tests.el b/test/src/xfaces-tests.el index ae57909a664..e79d2e88543 100644 --- a/test/src/xfaces-tests.el +++ b/test/src/xfaces-tests.el @@ -65,6 +65,16 @@ 'button)))) (kill-buffer buf))) +(ert-deftest xfaces-test-face-equality () + "Test `internal-lisp-face-equal-p'." + (should (internal-lisp-face-equal-p 'default 'default)) + (should-not (internal-lisp-face-equal-p 'default 'region)) + (should-not (internal-lisp-face-equal-p 'line-number 'default)) + (should-not (internal-lisp-face-equal-p 'line-number ' + line-number-current-line)) + (should (internal-lisp-face-equal-p 'line-number + 'line-number-current-line t))) + (provide 'xfaces-tests) ;;; xfaces-tests.el ends here