Commit graph

100427 commits

Author SHA1 Message Date
Andrea Alberti
ca5e9976b1 Pixel-direct alignment in visual-wrap-prefix-mode (bug#81039)
`visual-wrap--content-prefix' previously returned a column count
computed as

    (max (string-width prefix)
         (ceiling (string-pixel-width prefix) avg-space-width))

with two problems:

* `string-width' ignores `buffer-invisibility-spec', so an invisible
  prefix (hidden ATX markers under `markdown-ts-hide-markup', for
  example) still reserved its character count on line 1 via a
  `min-width' display property, shifting the visible heading right.

* With variable-pitch fonts, rounding the prefix width up to whole
  columns added visible padding whenever the natural width did not
  fall on an exact column boundary.

Return the prefix's natural pixel width via `string-pixel-width'
instead, which accounts for any display transformation applied to
the prefix (invisibility, `display' replacements, text scaling,
proportional fonts).  Drop the `min-width' property from
`visual-wrap--apply-to-line' so line 1 renders at its natural width.
Switch the continuation `wrap-prefix' to a mixed-unit `:align-to'
sum form:

    (space :align-to (+ (PIX) (EXTRA-INDENT . width)))

where PIX is the prefix's pixel width and EXTRA-INDENT is
`visual-wrap-extra-indent' in canonical character widths.  The
display engine resolves each term per the active frame and sums
them, so no Lisp-level unit conversion is needed.

Since `min-width' is no longer installed, the accumulation cycle
that commit 81a5beb8af (bug#73882) worked around cannot recur.
Drop the `min-width' strip from `visual-wrap--content-prefix' and
the `min-width' removal from `visual-wrap--remove-properties'.
Keep `min-width' in `visual-wrap--safe-display-specs' so that
lines where other modes install it are not skipped.

* lisp/visual-wrap.el (visual-wrap--content-prefix): Return pixel
width instead of column count; drop the `min-width' strip.
(visual-wrap--apply-to-line): Drop `min-width' on line 1; use
mixed-unit `:align-to' sum form for the continuation wrap-prefix.
(visual-wrap--adjust-prefix): Handle only string prefixes; the
numeric (pixel) case is now handled inline in `--apply-to-line'
via the mixed-unit `:align-to' sum form.
(visual-wrap--remove-properties): Drop `min-width' removal.
(visual-wrap--safe-display-specs): Add note about `min-width'.
* test/lisp/visual-wrap-tests.el: Update expected `wrap-prefix'
values to the new sum form.
(visual-wrap-tests/invisible-prefix): New test motivated by bug#81039.
(visual-wrap-tests/negative-extra-indent): New test; verify that a
large negative `visual-wrap-extra-indent' produces a valid
wrap-prefix (the display engine clamps the stretch to zero).
* test/manual/visual-wrap-test.el: New file.  Manual test suite
for visual-eyeball verification of prefix alignment behavior.

Reported-by: Andrea Alberti <a.alberti82@gmail.com>
Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
2026-05-26 16:56:32 -04:00
Stefan Monnier
02fb01166e Gnus: Prefer passing functions to message-add-action
Building code with code is tricky.  E.g. the code in gnus-draft-setup
suffered from a security issue because it forgot to quote
some arguments (see commit 142b1e0d4c).

* lisp/gnus/gnus-salt.el (gnus-pick-setup-message):
* lisp/gnus/gnus-msg.el (gnus-inews-add-send-actions):
* lisp/gnus/gnus-draft.el (gnus-draft-setup): Prefer passing functions
to message-add-action over passing it ELisp expressions.

* lisp/gnus/message.el (message-do-actions): Drop errors but not silently.
2026-05-26 15:54:48 -04:00
Stefan Monnier
72b50901ef lisp/emacs-lisp/package.el (package-quickstart-refresh): Delete stale elc 2026-05-25 17:01:07 -04:00
Harald Jörg
217064e9dc ;cperl-mode.el: Fix fontification edge cases
These were reported by happy-barney on GitHub
https://github.com/HaraldJoerg/cperl-mode/issues

* lisp/progmodes/cperl-mode.el (cperl-init-faces): Don't mistake
$method as a method declaration.
Move matcher for "use require" higher to prevent "require" being
fontified as keyword.

* test/lisp/progmodes/cperl-mode-resources/sub-names.pl: Add a
test case for $method

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-declarations): Add a test case for a module
name looking like a keyword
(cperl-test-fontify-sub-names): Verify that $method does not
declare a method
2026-05-25 11:23:34 +02:00
Sean Whitton
a96fc7d546 Merge from origin/emacs-31
4f13f52a3a * build-aux/git-hooks/commit-msg: Replace Markdown-style ...
dd42133315 vc-test--rename-file: Disable part of test for SCCS
eb653865c3 markdown-ts-mode: Don't enable unconditionally by default

# Conflicts:
#	etc/NEWS
2026-05-23 17:30:21 +01:00
Rahul Martim Juliato
eb653865c3 markdown-ts-mode: Don't enable unconditionally by default
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode-maybe):
New function.
(auto-mode-alist): Bind ".md", ".markdown", and ".mdx" to
'markdown-ts-mode-maybe' instead of 'markdown-ts-mode'.
* etc/NEWS: Update the 'markdown-ts-mode' entry.
2026-05-23 16:25:09 +01:00
Sean Whitton
7fe595465b vc-refresh-state: Use cond*
This is okay with regard to bootstrapping because vc-hooks.el is
loaded after loaddefs.el in loadup.el.

* lisp/emacs-lisp/cond-star.el (cl-lib): Don't require, so we
can use cond* in preloaded files.
(cond*-convert-condition): Replace calls to cl-assert.
* lisp/vc/vc-hooks.el (vc-refresh-state): Use cond*.
2026-05-23 12:47:24 +01:00
Eli Zaretskii
ccc94458fb Merge from origin/emacs-31
7a17f97baa Prettify special glyphs
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather tha...
70b79b3ed8 Rename `icalendar-recur' type and related functions
3d2bb233f2 ; Minor Tramp changes
f6281d757d ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'.
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
d6f7b2d99b Save/restore old_buffer slot via window configurations (B...
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
7df8604ea6 ; Improve documentation of lazy-highlight in search and r...
2936b36164 Fix "assertion 'GTK_IS_WINDOW (window)' failed"
98348a0bdc [Xt] Fix child frame resizing glitch
13b29eebc1 Eglot: use standard face for completion annotations (bug#...

# Conflicts:
#	etc/NEWS
2026-05-23 07:23:33 -04:00
Manuel Giraud
7a17f97baa Prettify special glyphs
* lisp/disp-table.el (prettify-special-glyphs-mode): New mode to
display nicer special glyphs.
(special-glyphs): New face for displaying special glyphs when
the minor mode is active.
(prettify-special-glyphs-saved-truncation)
(prettify-special-glyphs-saved-continuation): Internal variables
to save previous special glyphs.
* etc/NEWS: Announce the change.  (Bug#80628)
2026-05-23 14:12:19 +03:00
Elias Gabriel Perez
741feca497 New tool bar icons for artist-mode
* etc/images/artist-mode/README:
* etc/images/artist-mode/char-for-spray.xpm:
* etc/images/artist-mode/char-to-fill.xpm:
* etc/images/artist-mode/ellipse.xpm:
* etc/images/artist-mode/eraser.xpm:
* etc/images/artist-mode/fill.xpm:
* etc/images/artist-mode/line.xpm:
* etc/images/artist-mode/pen.xpm:
* etc/images/artist-mode/poly-line.xpm:
* etc/images/artist-mode/rectangle.xpm:
* etc/images/artist-mode/spray.xpm:
* etc/images/artist-mode/square.xpm:
* etc/images/artist-mode/text.xpm:
* etc/images/artist-mode/char-for-spray.pbm:
* etc/images/artist-mode/char-to-fill.pbm:
* etc/images/artist-mode/ellipse.pbm:
* etc/images/artist-mode/eraser.pbm:
* etc/images/artist-mode/fill.pbm:
* etc/images/artist-mode/line.pbm:
* etc/images/artist-mode/pen.pbm:
* etc/images/artist-mode/poly-line.pbm:
* etc/images/artist-mode/rectangle.pbm:
* etc/images/artist-mode/spray.pbm:
* etc/images/artist-mode/square.pbm:
* etc/images/artist-mode/text.pbm: New files.
* lisp/textmodes/artist.el (artist-tool-bar-map): New variable.
(artist-mode, artist-mode-exit): Use it (bug#80644).
2026-05-23 11:50:10 +01:00
Eli Zaretskii
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather than a symbol constituent"
This reverts commit b3c0aee42b.
It caused regressions in 'sh-script', see bug#80794 and
bug#80854.
2026-05-23 13:27:49 +03:00
Richard Lawrence
70b79b3ed8 Rename `icalendar-recur' type and related functions
More context in Bug#80786 and:
https://lists.gnu.org/archive/html/emacs-orgmode/2026-03/msg00286.html

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

* lisp/calendar/icalendar-parser.el:  Rename symbols as follows:
(icalendar-recur): `icalendar-rrule-value'
(icalendar-read-recur-rule-part): `icalendar-read-rrule-part'
(icalendar-print-recur-rule-part): `icalendar-print-rrule-part'
(icalendar-recur-rule-part): `icalendar-rrule-part'
(icalendar-read-recur): `icalendar-read-rrule-value'
(icalendar-print-recur): `icalendar-print-rrule-value'
(icalendar--recur-value-types): `icalendar--rrule-value-types'
(icalendar-recur-value-p): `icalendar-rrule-value-p'
(icalendar-recur-freq): `icalendar-rrule-freq'
(icalendar-recur-interval-size): `icalendar-rrule-interval-size'
(icalendar-recur-until): `icalendar-rrule-until'
(icalendar-recur-count): `icalendar-rrule-count'
(icalendar-recur-weekstart): `icalendar-rrule-weekstart'
(icalendar-recur-by*): `icalendar-rrule-by*'.
(icalendar-rrule):
(icalendar-index-insert):
(icalendar-index-get): Update references.
* lisp/calendar/icalendar-recur.el (icalendar-recur-find-interval):
(icalendar-recur-nth-interval):
(icalendar-recur-next-interval):
(icalendar-recur-previous-interval):
(icalendar-recur-refine-from-clauses):
(icalendar-recur-recurrences-in-interval):
(icalendar-recur-recurrences-in-window):
(icalendar-recur-recurrences-to-count):
(icalendar-recur-tz-observance-on): Update references.
* lisp/calendar/diary-icalendar.el: Update references.
* lisp/calendar/icalendar-shortdoc.el (icalendar): Update shortdoc examples.
* lisp/gnus/gnus-icalendar.el: Update references.
* test/lisp/calendar/diary-icalendar-tests.el:
* test/lisp/calendar/icalendar-parser-tests.el:
* test/lisp/calendar/icalendar-recur-tests.el: Update references in tests.
2026-05-23 13:25:19 +03:00
Augusto Stoffel
646702f70b let-alist.el: Use 'elt' instead of 'nth'
The advantage is that this works also for mixtures of alists and
vectors, as one obtains, e.g., from 'json-parse-buffer' and
'json-parse-string'.
* lisp/emacs-lisp/let-alist.el (let-alist--list-to-sexp): Use
'elt' instead of 'nth'.
(let-alist): Adapt doc string.  (Bug#80992)
2026-05-23 12:37:34 +03:00
Michael Albinus
3d2bb233f2 ; Minor Tramp changes
* doc/misc/tramp.texi (Frequently Asked Questions):
google-drive has been disabled in GNOME 50.

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

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

* test/lisp/net/tramp-tests.el (tramp-methods) <mock>:
Add `tramp-tmpdir'.  Adapt `tramp-login-program'.
(ert-remote-temporary-file-directory): Improve expansion.
(tramp-test35-remote-path): Adapt test.
2026-05-23 10:25:46 +02:00
Jacek Migacz
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
* lisp/gnus/gnus-msg.el (gnus-inews-make-draft-meta-information):
Escape the group name with prin1-to-string to prevent arbitrary
Lisp injection through crafted group names.  The unescaped group
name was embedded into a Lisp-readable string, parsed back with
read-from-string in gnus-draft-setup, and eventually eval'd via
message-do-actions, allowing code execution when a draft was sent.
2026-05-22 11:59:43 -07:00
Michael Albinus
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
* lisp/emacs-lisp/ert-x.el (tramp-default-remote-shell)
(tramp-encoding-shell): Declare.
(tramp-methods) <mock>: Add `tramp-tmpdir'.  Adapt
`tramp-login-program' and `tramp-remote-shell'.
2026-05-22 18:37:36 +02:00
Eli Zaretskii
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-mode--initialize): Tweak the warning message when
Tree-sitter is not available.  (Bug#81100)
2026-05-22 19:12:12 +03:00
Eli Zaretskii
7df8604ea6 ; Improve documentation of lazy-highlight in search and replace commands
* lisp/isearch.el (lazy-highlight, lazy-highlight-initial-delay)
(lazy-highlight-buffer, isearch-lazy-highlight, isearch-forward):
* lisp/replace.el (query-replace, query-replace-lazy-highlight)
(query-replace, query-replace-regexp): Doc fixes.

* doc/emacs/search.texi (Search Customizations): Document
'lazy-highlight-buffer' and 'lazy-highlight-buffer-max-at-a-time'.
Use @vtable to avoid the need of indexing each variable
separately.
2026-05-22 14:46:13 +03:00
João Távora
13b29eebc1 Eglot: use standard face for completion annotations (bug#81088)
* lisp/progmodes/eglot.el (eglot-completion-at-point): Use
completions-annotations face, not font-lock-function-name-face.
2026-05-21 10:33:37 +01:00
João Távora
e86825e595 Merge from origin/emacs-31
655302cc21 Fix 'shr-outline-search' (bug#81073)
1754015c60 Improve auth-source-backend-parse
8f31ccbf82 Eglot: announce markdown support for completion docs
aad170d1ed markdown-ts-mode: hide fence lines in view-mode (bug#81081)
133d1d591c markdown-ts-mode: align default face definitions with mar...
e0aeee2dc5 Fix markdown-ts-mode atx_heading face computation (bug#81...
997fc2cef7 Allow markdown-ts--run-command-in-code-block to ignore ou...
7d84e69a34 hideshow: Menu entry for 'hs-toggle-all'
e90cafc288 ; * doc/lispref/display.texi (Displaying Faces): Mention ...
520c5b7c71 ; * doc/lispref/text.texi (Special Properties): Fix last ...
8095fbef77 doc/lispref/text.texi: Add complement to commit f4a1c00656
9436d92c5d Eglot: fix eglot--format-makrup when MARKUP just a string
9ba65aa965 Fix missing margin face on display prop in erc-stamp
2026-05-21 00:24:52 +01:00
Juri Linkov
655302cc21 Fix 'shr-outline-search' (bug#81073)
* lisp/net/shr.el (shr-outline-search):
Don't check for the beginning of the line.
Suggested by Omar Antolín Camarena <omar@im.unam.mx>.
Confirmed by Rahguzar <rahguzar@mailbox.org>.
2026-05-20 18:41:59 +03:00
Pip Cet
0b5ead9923 Detect some API violations in combine-change-calls (bug#80877)
Quickly verify that the number of unchanged characters before and
after the region that changes are supposed to be limited to doesn't
change.

Suggested by Stefan Monnier.

* lisp/subr.el (combine-change-calls-1): Copy BEG into a marker, and
count the characters after the changed region.  After the changes,
ensure the character counts still match.
* test/lisp/subr-tests.el (subr-test-combine-change-calls-error): New.
2026-05-20 11:27:40 +00:00
Michael Albinus
1754015c60 Improve auth-source-backend-parse
* lisp/auth-source.el (auth-source-backend-parse): Use `run-hook-wrapped'.
Suggested by Augusto Stoffel <arstoffel@gmail.com>.
Transform a warning into a debug message.
2026-05-20 10:10:30 +02:00
João Távora
8f31ccbf82 Eglot: announce markdown support for completion docs
No reason not to.  Tested with gfm-view-mode and markdown-ts-mode

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

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

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

* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-code-block-commands): Add 'complete-symbol'.
(markdown-ts-code-block-ignore-output-commands): New defvar.
(markdown-ts--run-command-in-code-block): Ignore command output
when necessary.
2026-05-20 00:34:39 +01:00
Lin Sun
7d84e69a34 hideshow: Menu entry for 'hs-toggle-all'
* lisp/progmodes/hideshow.el: Menu entry for hs-toggle-all (bug#81045).
2026-05-19 18:30:57 +03:00
Stefan Monnier
8c71b0d6b8 shr.el: Don't insert image at outdated destination (bug#80945)
When fetching images asynchronously, keep track of the
destination region and refrain from inserting the image if
that region has been modified in the mean time.

* lisp/net/shr.el (shr--image-fetched, shr--async-put-image): New functions.
(shr-insert-image, shr-zoom-image, shr-image-displayer, shr-tag-img):
Use them.

* lisp/mail/rmailmm.el (rmail-mime-render-html-shr): Add FIXME.
2026-05-18 22:26:12 -04:00
João Távora
9436d92c5d 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 23:14:49 +01:00
F. Jason Park
9ba65aa965 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 15:07:34 -07:00
Sean Whitton
641754e870 Merge from origin/emacs-31
28a13b01c7 vc-refresh-state: Override default-directory for backend ...
389874c533 Eglot: unbreak for treesit-less builds
10e91e096d Get selected item in newsticker list view
6bd73af241 ; * test/lisp/jsonrpc-tests.el: Adjust timeouts for CI EM...
eb90c528f3 ; * lisp/progmodes/eglot.el (eglot-code-action-indication...
1d7d6ffedb ; * etc/PROBLEMS: Fix entries about display of Emoji on T...
6c1829bf4c Eglot: fix thinko in recent markdown-related commit (bug#...
36036e71c0 Jsonrpc: migrate more tests to Python subprocess fixtures
0977d5915d Eglot: add left-fringe code action indicator (bug#80326)
b7825c3a27 Fix auth-source-backends-parse
d89054627c Fix updates of embedded formulas by 'calc-embedded-update...
1832a93547 ; * src/fns.c (Fequal): Doc fix.
f68e7a0a41 ; Improve documentation of commands that move by compilat...
2026-05-18 22:16:46 +01:00
Sean Whitton
28a13b01c7 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 22:15:29 +01:00
João Távora
389874c533 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 20:53:15 +01:00
Joshua Murphy
10e91e096d 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)

Copyright-paperwork-exempt: yes
2026-05-18 19:51:04 +03:00
João Távora
eb90c528f3 ; * lisp/progmodes/eglot.el (eglot-code-action-indications): Tweak. 2026-05-18 16:27:35 +01:00
Jim Porter
e381cf1fc9 Allow child processes to continue after EPIPE
This ensures that if the child process closed its stdin and Emacs tries
to write to it, the process can still do any remaining work and exit
normally.  In practice, this can occur with commands like "head(1)"
(bug#79079).

* src/fileio.c (file_for_stream): New function, extracted from...
(Fset_binary_mode): ... here.
(Ffile__close_stream): New function.

* src/process.c (send_process): When encountering EPIPE, only close the
fd for the pipe to the child process's stdin.

* lisp/eshell/esh-io.el (eshell-output-object-to-target): Don't check
for process liveness anymore.

* test/src/process-tests.el (process-tests/broken-pipe): New function.
(process-tests/broken-pipe/pipe, process-tests/broken-pipe/pty)
(process-tests/broken-pipe/pipe-stdin)
(process-tests/broken-pipe/pty-stdin): New tests.

* etc/NEWS: Announce this change.
2026-05-17 17:24:10 -07:00
Brian Leung
6c1829bf4c 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 19:28:16 +01:00
João Távora
0977d5915d 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 19:24:53 +01:00
Michael Albinus
b7825c3a27 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 18:21:49 +02:00
Eli Zaretskii
d89054627c 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-17 10:57:53 +03:00
Eli Zaretskii
f68e7a0a41 ; Improve documentation of commands that move by compilation errors
* lisp/simple.el (next-error):
* lisp/progmodes/compile.el (compilation-next-error)
(compilation-previous-error): Doc fixes.
2026-05-17 09:05:13 +03:00
Philip Kaludercic
b13450973a
Copy changes from tarballs when installing VC packages
* etc/NEWS: Document change.
* lisp/emacs-lisp/package-vc.el (package-vc--clone): Implement
logic to find and copy files from a previous installation.
(package-vc-install): Indicate the effect of the prefix argument
in the prompt.
2026-05-16 16:31:48 +02:00
Eli Zaretskii
407b5ce7ab Merge from origin/emacs-31
cf96e9cb5a ; Fix byte-compilation warnings in non-Tree-Sitter builds
23575adc7b ; * doc/lispref/variables.texi (Local Variables): Fix typ...
8b6fb2f646 ; * doc/lispref/variables.texi (Local Variables): Fix 'na...
d3c72b8389 ; * src/xdisp.c (display_line): Fix commentary (bug#80693).
a981517b72 Fill margins with 'margin' face on truncated screen lines
8e37499035 ; * doc/lispref/os.texi (Init File): Fix markup (bug#81049).
f4c326c378 ; * src/sfnt.c (sfnt_read_cmap_format_12): Assert there's...
bf89ee6d07 ; * etc/PROBLEMS: Cursor not shown on Windows with system...
20500d6200 ; htmlfontify: Handle 'reset' face attribute value (bug#8...
d0d657fa90 ; Minor Tramp cleanup
93ea0d7d28 ; Improve documentation of VC commands in Dired
318084829c Eglot: adjust reference to completion frontends in manual
2a166c2dbd Eldoc: display documentation in visual-line-mode
aba60ad0c5 Eglot: prefer markdown-ts-view-mode for markup rendering ...
689c3bd508 Use 'read-multiple-choice' in 'markdown-ts-mode' (bug#81027)
71809ee5df Fix 'markdown-ts-code-span' face (bug#81026)
286833e401 Add read-only 'markdown-ts-view-mode' (bug#81023)
b39c123490 Fix strikethrough in 'markdown-ts-mode' (bug#80991)
0be998d4bc Fix code-span in headings in 'markdown-ts-mode' (bug#80979)
a00beb3a31 Make 'markdown-ts-inline-images' buffer local and test fo...
a0c05029fd * etc/NEWS: Mention new user option tramp-propagate-emacs...
2e71d2c709 Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp
ff96db93f2 keyboard-tests.el: Try and fix the failure on EMBA
ce3098752c doc: Remove long obsolete references to `package-initialize`
9bc04b001a vc-next-action: Call vc-delete-file on FILESET-ONLY-FILES
13039e3442 ; touch-up last commit: copyright and comments
c2a24dcec8 ; update msys2 build helper for Emacs 31 & UCRT
3630baae72 hideshow: Support new 'margin' face for margin indicators...
20d17df3f4 Use the new 'margin' face in Flymake (bug#80693)
07f2bbc905 vc-dir-resynch-file: Pass down non-truename'd FILE
2026-05-16 07:24:17 -04:00
Eli Zaretskii
87e4687749 Merge from origin/emacs-31
7eab6ef3ce Fix 'sgml-parse-tag-backward' to handle tags in comments
09dc864b0b Fix eww-submit for forms with no action (bug#80918)
0e7a24d931 * lisp/progmodes/hideshow.el (hs--set-variable): Use 'set...
f12b01582d Fix Completions buffer disappearing with tmm-menubar (bug...
519fd83211 Fix secrets.el when Emacs is a flatpak
9e4ea934f2 Fix 'prepare-user-lisp' to follow symlinks
e613e38021 Update "timeout" to 2.1.6
196fd80689 [GTK3, HiDPI] Fix width/height round-trip through Configu...
acc07f1a03 [GTK3] On Expose, repaint the border before the content
5323eebcff Test read-passwd behavior (bug#80838)
01c5990dd0 Fix nested read-passwd calls (bug#80838)
027043df25 ; * lisp/gnus/message.el (message-server-alist): Doc fix ...
3b608b233e Fix terminal emulation of "ESC [ K" sequence
6a605c65a8 Fix vertical-motion across overlay strings with embedded ...
e4d529c67b ; Fix last change
d54faa0f1b Mark gnus-dbus.el as obsolete
9bf2a19bb2 Move gnus-dbus.el to obsolete/gnus-dbus.el
984024daf3 Gnus: Use new sleep library
d7c130972e ; * lisp/term/pgtk-win.el (icon-map-list): Fix :type.
5579893ed7 ; Don't block/unblock input in text_extents methods
547b1ee7b6 Fix Rmail behavior wrt globalized minor modes
6ba05106f4 Fix display images in the display margins
56f27dd9f0 Eglot: fix eglot--sig-info with non-UTF-32 positionEncoding
543d8a7a9d [NS] Fix deprecated variable (bug#80985)

# Conflicts:
#	etc/NEWS
2026-05-16 07:17:51 -04:00
Eli Zaretskii
cf96e9cb5a ; Fix byte-compilation warnings in non-Tree-Sitter builds
* lisp/progmodes/eglot.el (treesit-grammar-location):
* lisp/treesit.el (treesit-grammar-location): Declare.
2026-05-16 14:13:56 +03:00
Philip Kaludercic
025ecf9e7b
* lisp/net/rcirc.el (rcirc-monospace-text): Inherit 'fixed-pitch' 2026-05-14 22:13:33 +02:00
Richard Stallman
0fb9d096e3 The summary scan should include the current msg and run to end.
* lisp/mail/rmailsum.el (rmail-new-summary-1): If we are before,
or close to, msg number rmail-summary-starting-message,
start the search a little before there.
2026-05-14 11:16:35 -04: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