Commit graph

100430 commits

Author SHA1 Message Date
Jim Porter
06ebfca7f4 fixup! Add basic support in Eshell for piping to Lisp commands 2026-06-06 18:44:05 -07:00
Jim Porter
e9847f8263 Handle Lisp errors in Eshell workers
* lisp/eshell/esh-worker.el (eshell-worker-name): New generic function.
(eshell-worker--error): New defsubst.
(eshell-output-object-to-target, eshell-close-target): Wrap
'cl-call-next-method' in error handlers.

* test/lisp/eshell/esh-worker-tests.el
(esh-worker-test/pipe/error-handling)
(esh-worker-test/map-lines/error-handling)
(esh-worker-test/apply-lines/error-handling): New tests.
2026-05-27 18:35:14 -07:00
Jim Porter
a1cbfe27b1 Add 'apply-lines' and 'map-lines' Eshell commands
* lisp/eshell/esh-worker.el (eshell-map-lines-worker)
(eshell-apply-lines-worker): New structs.
(eshell-map-lines-worker--apply): New generic function.
(eshell-output-object-to-target, eshell-close-target): New methods.
(eshell/map-lines, eshell/apply-lines): New functions.

* test/lisp/eshell/esh-worker-tests.el (eshell-test-line-number): New
defvar...
(eshell-test-number): ... use it in this new function.
(esh-worker-test/map-lines/eshell-one-line)
(esh-worker-test/map-lines/eshell-multiple-lines)
(esh-worker-test/map-lines/eshell-multiple-batches)
(esh-worker-test/map-lines/external-one-line)
(esh-worker-test/map-lines/external-multiple-lines)
(esh-worker-test/map-lines/numbers)
(esh-worker-test/map-lines/numeric-conversion)
(esh-worker-test/apply-lines/eshell-one-line)
(esh-worker-test/apply-lines/eshell-multiple-lines)
(esh-worker-test/apply-lines/external-one-line)
(esh-worker-test/apply-lines/external-multiple-lines)
(esh-worker-test/apply-lines/numbers)
(esh-worker-test/apply-lines/numeric-conversion): New tests.
2026-05-25 17:20:19 -07:00
Jim Porter
751dccb17e Add basic support in Eshell for piping to Lisp commands
* lisp/eshell/esh-worker.el:
* test/lisp/eshell/esh-worker-tests.el: New files.

* lisp/eshell/esh-cmd.el (eshell-lisp-command): Call 'eshell-get-pipe'
when the command is a pipe target.

* lisp/eshell/em-basic.el (eshell/echo): Mark as producing literal
results.
2026-05-25 17:20:19 -07:00
Jim Porter
be067246af Add some initial generic functions to support Eshell tasks
* lisp/eshell/esh-util.el (eshell-task-p, eshell-task-status)
(eshell-task-active-p): New generic functions.
(eshell-process-list-p): Obsolete in favor of...
(eshell-task-list-p): ... this.  Update callers.
(eshell-make-process-list): Obsolete in favor of...
(eshell-make-task-list): ... this.  Update callers.

* lisp/eshell/esh-proc.el (eshell-task-p, eshell-task-status)
(eshell-task-active-p): New functions.
2026-05-24 17:30:19 -07:00
Jim Porter
c58dd07fc1 Add 'eshell-convert-args' utility function
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Extract from here...
* lisp/eshell/esh-util.el (eshell-convert-args): ... to this new
function.
2026-05-24 17:30:19 -07:00
Jim Porter
47cda4ecac Allow writing a lambda function as a command in Eshell
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Don't try to call a
literal lambda.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/literal-lambda): New
test.
2026-05-24 17:30:19 -07: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