Commit graph

182189 commits

Author SHA1 Message Date
Rahul Martim Juliato
71809ee5df 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 11:05:30 +01:00
Rahul Martim Juliato
286833e401 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-14 11:04:07 +01:00
Rahul Martim Juliato
b39c123490 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 23:36:27 +01:00
Rahul Martim Juliato
0be998d4bc 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 23:36:27 +01:00
Stéphane Marks
a00beb3a31 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 23:36:27 +01:00
Michael Albinus
a0c05029fd * etc/NEWS: Mention new user option tramp-propagate-emacsclient-tramp. 2026-05-13 18:46:31 +02:00
Michael Albinus
2e71d2c709 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 18:39:04 +02:00
Stefan Monnier
ff96db93f2 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 11:10:15 -04:00
Stefan Monnier
ce3098752c 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 10:34:22 -04:00
Sean Whitton
9bc04b001a 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-13 13:15:23 +01:00
Corwin Brust
13039e3442 ; touch-up last commit: copyright and comments 2026-05-13 01:06:17 -05:00
Corwin Brust
c2a24dcec8 ; update msys2 build helper for Emacs 31 & UCRT 2026-05-13 00:46:31 -05:00
Elias Gabriel Perez
3630baae72 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 18:45:28 +03:00
Juri Linkov
20d17df3f4 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 18:42:42 +03:00
Sean Whitton
07f2bbc905 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 09:49:53 +01:00
F. Jason Park
a8f67a1f06 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 20:24:26 -07:00
Philip Kaludercic
7eab6ef3ce
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 23:43:27 +02:00
Aidan Coyle
09dc864b0b
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.

Copyright-paperwork-exempt: yes
2026-05-11 23:06:27 +02:00
Elias Gabriel Perez
0e7a24d931 * lisp/progmodes/hideshow.el (hs--set-variable): Use 'set-local' (bug#80999) 2026-05-11 20:35:14 +03:00
Juri Linkov
f12b01582d 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 20:30:15 +03:00
Michael Albinus
519fd83211 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 18:11:24 +02:00
Philip Kaludercic
9e4ea934f2
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 15:36:58 +02:00
Philip Kaludercic
e613e38021
Update "timeout" to 2.1.6
See https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00033.html.
2026-05-11 15:31:06 +02:00
Dmitry Gutov
196fd80689 [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 03:32:29 +03:00
Dmitry Gutov
acc07f1a03 [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-11 02:03:30 +03:00
Pip Cet
5323eebcff 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 20:00:41 +00:00
Pip Cet
01c5990dd0 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-10 20:00:41 +00:00
Augusto Stoffel
027043df25 ; * lisp/gnus/message.el (message-server-alist): Doc fix (bug#80880). 2026-05-10 19:19:05 +03:00
Pip Cet
3b608b233e 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 15:33:21 +00:00
Eli Zaretskii
6a605c65a8 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 14:59:54 +03:00
Michael Albinus
e4d529c67b ; Fix last change
* doc/misc/gnus.texi (System Sleep Integration): Move @anchor up.

* etc/NEWS: gnus-dbus.el is obsolete.
Presentational fixes and improvements.

* lisp/gnus/gnus-start.el (gnus-close-on-sleep): Add :version.
(gnus-sleep-handler): Use `ignore-errors'.
2026-05-09 13:17:06 +02:00
Morgan Smith
d54faa0f1b 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 12:50:23 +02:00
Morgan Smith
9bf2a19bb2 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 12:50:12 +02:00
Morgan Smith
984024daf3 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 12:50:04 +02:00
Eli Zaretskii
d7c130972e ; * lisp/term/pgtk-win.el (icon-map-list): Fix :type. 2026-05-09 12:44:59 +03:00
Eli Zaretskii
5579893ed7 ; Don't block/unblock input in text_extents methods
* src/xftfont.c (xftfont_text_extents):
* src/ftcrfont.c (ftcrfont_text_extents): Don't block/unblock
input.  (Bug#80863)
2026-05-09 12:22:02 +03:00
Eli Zaretskii
547b1ee7b6 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 <mdl@alum.mit.edu>.  (Bug#80879)
2026-05-09 12:01:07 +03:00
Eli Zaretskii
6ba05106f4 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 08:58:59 +03:00
João Távora
56f27dd9f0 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-09 02:52:18 +01:00
Alan Third
543d8a7a9d [NS] Fix deprecated variable (bug#80985)
* src/nsterm.h (NSLevelIndicatorStyleContinuousCapacity): Define in
macOS < 10.15.
2026-05-08 14:07:56 +01:00
Sean Whitton
2d496b842d ; Fix Gregor Schmid's attribution for lua-mode.el. 2026-05-08 13:47:52 +01:00
Sean Whitton
69c50dcb47 ; package-activate-all: Drop requiring package now not preloaded. 2026-05-08 12:27:24 +01:00
Dmitry Gutov
f94637749a 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 12:25:49 +01:00
Stéphane Marks
060451d6e0
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 21:35:46 -07:00
João Távora
48b064a2aa 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 e05fab5775
   Author: Stephen Berman <stephen.berman@gmx.net>
   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 22:15:42 +01:00
Sean Whitton
8d0bf280a6 ; * ChangeLog.5: Some fixes and tidying up. 2026-05-07 20:14:12 +01:00
Sean Whitton
1ec79b48f3 ; Update exported ChangeLog files and etc/AUTHORS
There are still unfixed problems in *Authors Errors*.

* ChangeLog.3: Fix typos.
* ChangeLog.5: Export from VCS history.
* Makefile.in: Update PREFERRED_BRANCH.
* admin/authors.el (authors-aliases, authors-ignored-files)
(authors-valid-file-names, authors-renamed-files-alist): Add
some entries.
* etc/AUTHORS: Regenerate.
2026-05-07 20:08:43 +01:00
Sean Whitton
991f6100eb ; * admin/make-tarball.txt: Suggest load-file, not require. 2026-05-07 20:04:26 +01:00
Sean Whitton
3c6c3f5a69 ; Fix two file headers misunderstood by authors.el. 2026-05-07 20:04:04 +01:00
Sean Whitton
311f1fe2ba Cut the emacs-31 release branch
* README:
* configure.ac:
* exec/configure.ac:
* java/AndroidManifest.xml.in (Version-code):
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 31.0.60.
* lisp/cus-edit.el (customize-changed-options-previous-release):
Set last version to 30.2.
2026-05-07 17:38:20 +01:00