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
* 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.
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*.
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
* 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)
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.
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)
* 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.
With Emacs 31 the old_buffer slot of a window gets overwritten
with the buffer unshown in that window when that window is
deleted. Fset_window_configuration triggers that when calling
delete_all_child_windows. If a window configuration gets saved
and restored in one and the same redisplay cycle, the change
time stamps of the window and its frame will be equal and
'window-buffer-change-functions' may wrongly decide that the
window's buffer has not changed because its buffer and
old_buffer slots refer to the same buffer (Bug#81097). Fix that
by saving and restoring the old_buffer slot.
* src/window.c (struct saved_window): Add 'old_buffer' slot.
(Fset_window_configuration): Restore old_buffer slot.
(save_window_save): Save old_buffer slot.
* 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.
* src/w32proc.c (w32_raise): A more complete, Posix-compliant
implementation.
(sys_signal): Support SIGBREAK.
* src/syssignal.h (raise): Redirect to 'w32_raise'.
* src/atimer.c: Don't redirect 'raise', now done in syssignal.h.
(Bug#80760)
* src/gtkutil.c (xg_frame_set_size_and_position): Remove a
gtk_window_resize call which used a wrong value type
(GdkX11Window instead of GtkWindow). The original motivation
for that line seems to be fixed by later changes (bug#80662).
* 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>.
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.
* 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.
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.
* 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.
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.
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.
This avoids an alloca in x_set_mouse_color.
* src/xfns.c (x_set_mouse_color): Use local array rather than
alloca, since the string is small.
* src/xterm.c (X_ERROR_MESSAGE_SIZE): Move defn from here ...
* src/xterm.h: ... to here, and make it an enum not a macro.
* src/sysdep.c (serial_open): On failure, simply return -1
and set errno; do not call report_file_error, as the
caller is supposed to do that if needed.
Problem discovered on Fedora 44 x86-64 when using GCC 16.1.1 with
-fsanitize=address, with test/src/process-tests.el tests that use
process-tests--with-raised-rlimit. This function overrides the
default of 1024 for the maximum number of open files, which causes
undefined behavior (subscript errors) in src/process.c.
* src/process.c (inrange_fd, inrange_pipe): New functions.
(allocate_pty, create_process, create_pty, Fmake_pipe_process)
(Fmake_serial_process, connect_network_socket)
(network_interface_info, server_accept_connection)
(Fprocess_send_eof, child_signal_init):
Check that all newly allocated file descriptors are less than
FD_SETSIZE; close them and fail otherwise.
(create_pty, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket, server_accept_connection)
(child_signal_init): Remove no-longer-needed comparisons
to FD_SETSIZE, now that inrange_fd and inrange_pipe
do the checking for us.
* src/regex-emacs.c (forall_firstchar):
Avoid undefined behavior in the 2nd eassert when !bufp && !pend.
This pacifies GCC 16.1.1 20260501 (Red Hat 16.1.1-1) x86-64
when Emacs is configured with --enable-gcc-warnings.
Problem discovered with GCC 16.1.1 -fsanitize=undefined.
* src/fns.c (maybe_resize_hash_table): Avoid undefined
behavior when h->key_and_value or h->hash are null pointers,
in which case we call memcpy (destination, NULL, 0)
which has undefined behavior in C89 through C23.
* src/emacs-module.c (module_bignum_count_max):
Now of type ptrdiff_t, instead of likely being of type size_t.
(module_extract_big_integer): Omit now-unnecessary prefix +, a
now-unnecessary eassert against PTRDIFF_MAX, and and an
unnecessary cast to ptrdiff_t.
* src/comp.c (emit_static_object): Avoid an malloc/free of
a 1 KiB buffer; just put it on the stack. Use strnlen+mempcpy
instead of strncpy as there is no need to zero-fill buff.
Use int for values that must fit in int since we are
passing them to gcc_jit_context_new_rvalue_from_int.
Problem discovered with GCC 16.1.1 -fsanitize=undefined.
* src/data.c (Fash): Don’t left-shift a negative number;
behavior is undefined (ISO C23 § 6.5.8 ¶ 4).
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.