Commit graph

182301 commits

Author SHA1 Message Date
Eli Zaretskii
d3c72b8389 ; * src/xdisp.c (display_line): Fix commentary (bug#80693). 2026-05-16 11:54:43 +03:00
Andrea Alberti
a981517b72 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-16 11:48:34 +03:00
Manuel Giraud
8e37499035 ; * doc/lispref/os.texi (Init File): Fix markup (bug#81049). 2026-05-15 15:27:23 +03:00
Eli Zaretskii
f4c326c378 ; * src/sfnt.c (sfnt_read_cmap_format_12): Assert there's no overflow. 2026-05-15 15:00:35 +03:00
Eli Zaretskii
bf89ee6d07 ; * etc/PROBLEMS: Cursor not shown on Windows with system caret (bug#81047). 2026-05-15 10:20:31 +03:00
Eshel Yaron
20500d6200
; htmlfontify: Handle 'reset' face attribute value (bug#81032)
* lisp/htmlfontify.el (hfy-face-to-style-i): Add special
handling for the 'reset' face attribute value.
2026-05-14 17:11:43 +02:00
Michael Albinus
d0d657fa90 ; Minor Tramp cleanup
* lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Do not
expand remote file names w/o a localname.

* test/lisp/net/tramp-tests.el
(tramp--test-supports-environment-variables-p): New defun.
(tramp-test33-environment-variables): Use it.
2026-05-14 12:31:04 +02:00
Eli Zaretskii
93ea0d7d28 ; Improve documentation of VC commands in Dired
* doc/emacs/dired.texi (Misc Dired Features): Move VC reference
from here...
(Operating on Files): ...to here.  Add other VC commands supported
by Dired.
* doc/emacs/maintaining.texi (Old Revisions, VC Change Log): Fix
cross-references.
2026-05-14 13:12:21 +03:00
João Távora
318084829c Eglot: adjust reference to completion frontends in manual
* doc/misc/eglot.texi (Eglot Features): Rework.
2026-05-14 11:05:30 +01:00
João Távora
2a166c2dbd 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 11:05:30 +01:00
João Távora
aba60ad0c5 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 11:05:30 +01:00
Rahul Martim Juliato
689c3bd508 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 11:05:30 +01:00
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