* configure.ac: When configured with --enable-gcc-warnings,
use the -Wno-analyzer-allocation-size option if available.
This works around a false positive bug in
GCC 16.0.1 20260321 (Red Hat 16.0.1-0) x86-64; see
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125116>.
* src/gtkutil.c (xg_frame_set_char_size): Resize child frame and
its GTK widget hierarchy immediately. Update the "desired" Cairo
surface dimensions. Skip waiting for events. (bug#80662)
Remove the unnecessary call to clear_under_internal_border.
* src/gtkutil.c (xg_frame_set_char_size): Simplify. Use the
fullscreen value check to alter the values of outer_width and
outer_height rather than have several larger branches (bug#80662).
* src/gtkutil.c (xg_frame_set_char_size): Remove the effect of
x_gtk_resize_child_frames, effectively reverting that part of
c49d379f17 (bug#80662).
* src/pgtkfns.c (syms_of_pgtkfns): Remove defsyms Qhide and
Qresize_mode, never used with PGTK.
* src/xfns.c (x-gtk-resize-child-frames): Update docstring.
* src/xterm.c (x_wait_for_event): If f->wait_event_type has been
cleared (in handle_one_xevent), don't go into pselect wait.
* src/androidterm.c (android_wait_for_event): Likewise.
This pertains to X11 toolkit builds. Other ports (including
PGTK) seem to have mostly atomic window updates already.
* src/xterm.c (x_set_window_size_1): Resize the Xt widget eagerly,
so the next redraw is not clipped. Update the "desired" Cairo
surface dimensions. Skip waiting for next XEvent. Do all that
for child frames only. Update old comments (bug#80662).
(x_set_window_size_and_position_1): Same. Also clear the widget's
cached position coordinates (we don't keep them up to date).
(x_set_window_size, x_set_window_size_and_position): Skip
redrawing the border on child frames, it will happen during
redisplay anyway.
* src/gtkutil.c (xg_frame_set_size_and_position): On child
frames, resize the GTK widget hierarchy immediately. Update the
"desired" Cairo surface dimensions. Skip waiting for events.
* src/widget.c (EmacsFrameResize):
When resize should be a no-op, exit early (minor optimization).
(EmacsFrameExpose): Redraw the border on the last Expose event.
* src/xdisp.c (clear_garbaged_frames): Don't redraw borders here.
* src/xfns.c (x_window): Undo the previous change in bit_gravity
in the no-toolkit build. StaticGravity works the best for it
thanks to no nesting in window configuration.
* src/xdisp.c (glyph_string_containing_background_width):
Although it’s not immediately obvious whether the GCC 16 warning
is valid, adding an eassume here shouldn’t hurt.
* etc/ERC-NEWS: Add entry for option `erc-log-insert-log-on-open'.
Mention deprecation of `erc-log-setup-logging'.
* lisp/erc/erc-log.el (erc-log-insert-log-on-open): Expand type from
boolean to choice of boolean, predicate, and new function item
`erc-log-new-target-buffer-p'.
(erc-log-mode, erc-log-enable, erc-log-disable): Replace
`erc-log-setup-logging' on `erc-connect-pre-hook' with
`erc-log--insert-log-on-open' at depth 80. Replace calls to
`erc-log-setup-logging' with ones to `erc-log--setup'.
(erc-log-new-target-buffer-p): New function. While the name could
perhaps do more to indicate that it's only useful when called from
`erc-open', that's the only place ERC typically sets up new target
buffers.
(erc-log-setup-logging): Deprecate and replace body with adapter that
calls `erc-log--setup' and `erc-log--insert-log-on-open'.
(erc-log--setup): New function whose body is mostly from the
"nondestructive" portion of `erc-log-setup-logging'. Instead of moving
the `erc-saved-last-position' marker to the old value, expect it not to
have been initialized by `erc-initialize-log-marker' because
`erc-connect-pre-hook' now runs after this code, which is now
incorporated more judiciously into the module's "enable body".
(erc-log--insert-log-on-open): New function whose body is mostly from
the "destructive" portion of the previous incarnation of
`erc-log-setup-logging'. Unlike the original, if option
`erc-log-insert-log-on-open' is a function, call it to decide whether to
insert a log file atop its buffer. Also, don't advance the marker
`erc-last-saved-position' to the prompt area, where it can get stuck and
prevent logs from being saved when `erc-log-insert-log-on-open' is
non-nil. Thanks to Libera user Lionyx for reporting the bug, which has
been around since at least ERC 5.4 and Emacs 28.1.
(erc-log-disable-logging): Remove `erc-save-buffer-in-logs' from
`write-file-functions' to undo its buffer-local addition in what is now
`erc--log-setup'.
* test/lisp/erc/erc-scenarios-log-options.el: New file. (Bug#79665)
* lisp/erc/erc-log.el (erc-log-setup-logging): Restore
`erc-last-saved-position' from previous session. By default, a
non-/QUIT disconnect does not write out any remaining buffer text to
logs, instead leaving it until the buffer or Emacs is killed. But if a
successful reconnect occurs beforehand, the uncommitted portion must be
seen to somehow. Before this change, it would be lost because the
function `erc-initialize-log-marker' remakes the marker at the prompt
instead of recovering the previous value as now done here. Moreover,
the traditional workaround of customizing `erc-log-write-after-insert'
and `erc-log-write-after-send' to t should not be required to prevent
gaps in any decent IRC client.
* test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--reconnect): New
function.
(erc-scenarios-log--reconnect/auto, erc-scenarios-log--reconnect/manual):
New tests.
;; * test/lisp/erc/resources/join/reconnect/foonet-again.eld: Add QUIT.
* lisp/erc/erc-pcomplete.el (erc-completion-mode): New alias for the
variable `erc-pcomplete-mode' to complement the function alias of the
corresponding minor-mode command. Given that user code operating on the
value of `erc-modules' needs to detect whether members are active, it
only makes sense to address this specially. Before this change,
applying `bound-and-true-p' to `erc-completion-mode' would always return
nil, even when the module was active. For normal aliases, that's indeed
expected because `define-erc-module' doesn't automatically define a mode
variable for a non-nil ALIAS argument. Although in the long term it
probably should, while also obsoleting the "new" alias simultaneously,
that would likely break some user code and doubtless complicate things
majorly for `pcomplete', the one in-tree outlier. The latter module
would then require changing either its preferred name, the one
advertised by `erc-modules' in its Custom definition, to `pcomplete' or
its primary name to `completion'. Both are quite churn-inducing.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Intersperse more
`redisplay' calls to update the indicator's overlay.
* test/lisp/erc/erc-tests.el (erc-tests--assert-printed-in-subprocess):
Wrap CODE form in keyword sentinel.
(erc--find-mode, erc--essential-hook-ordering): Use modified interface.
(erc--find-group--real, erc--find-group/realistic): Rename former to
latter and run in subprocess.
(erc--update-modules/realistic): Redo to run in subprocess instead of
mocking.
* test/lisp/erc/resources/erc-d/erc-d-t.el
(erc-d-t-kill-related-buffers): Don't bother canceling
`erc-server-flood-timer', even in an actual ERC buffer, since
`erc-server-send-queue' first checks whether its BUFFER argument is
still live before sending anything to the process. Also, don't bother
collecting buffers only to immediately kill them.
* test/lisp/erc/resources/erc-d/erc-d.el (erc-d--filter): Always clear
remainder. Otherwise, partial emissions from the peer that aren't
terminated by a newline will confuse subsequent processing.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--run-in-term): Look for a library called
`erc-tests-compat', which ERC uses in its external CI to provide
compatibility shims of definitions too obscure or unfit for inclusion in
the Compat package on ELPA.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-kill-buffers): Also kill non-`erc-mode' buffers whose
names match a scheme used by ERC for work buffers. Allow for the
EXTRA-BUFFERS argument to possibly contain killed and null buffers.
* lisp/completion-preview.el (completion-preview-is-calling):
New variable.
(completion-preview--capf-wrapper): Bind it to t when calling
the CAPF.
* etc/NEWS: Announce it.
This enables features unrelated to native image APIs, such as
'w32-export-frame' and 'yank-media', which need to call GDI+
functions.
* configure.ac (HAVE_W32) [!CYGWIN]: Always include w32image.o in
W32_OBJ.
* etc/NEWS: Drop 'yank-media' '--without-native-image-api' caveat.
* src/emacs.c (main):
* src/w32select.c (convert_dibv5_to_png):
* src/w32term.c (w32_draw_image_foreground): Replace
HAVE_NATIVE_IMAGE_API with WINDOWSNT.
* src/w32.c (term_ntproc): Remove redundant HAVE_NATIVE_IMAGE_API guard.
* src/w32fns.c (Fw32_export_frame) [!WINDOWSNT]: Return nil on Cygwin.
* lisp/emacs-lisp/seq.el (seq-concatenate): Remove confusing
`(fn TYPE SEQUENCE...)` which made `help-function-arglist`
return less informative results and wasn't even consistent with
the rest of the docstring.
* lisp/emacs-lisp/shortdoc-doc.el (sequence): Revert last
change, since it's now redundant.
* lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1):
Fix &key specification to support empty lists of keyword
arguments (bug#80878). Fix due to Thuna <thuna.cing@gmail.com>.
* lisp/net/eww.el (eww-handle-link): The HTML rel attribute's
value is a space-separated set of keywords, so split it before
matching against known keywords (bug#80816).
Copyright-paperwork-exempt: yes
* src/coding.c: Remove file wide ignore pragma for
-Wunused-but-set-variable.
(detect_coding_XXX) <consumed_chars>: Mention that this variable might
need to be declared with the MAYBE_UNUSED attribute.
(detect_coding_utf_8, detect_coding_emacs_mule, detect_coding_iso_2022)
(encode_designation_at_bol, detect_coding_sjis, detect_coding_big5)
(detect_coding_ccl, detect_coding_charset) <consumed_chars>: Use the
MAYBE_UNUSED attribute.
A reparse will make the TSTreeCursor or TSNode to possibly point
to freed memory (because the TSTree they point to is freed.)
* src/treesit.c (treesit_pred_with_guard): New function.
(treesit_predicate_pred):
(treesit_eval_predicates):
(Ftreesit_query_capture):
(treesit_traverse_match_predicate):
(treesit_build_sparse_tree): Add guard that signals if buffer is
changed when calling predicate function.
(Qtreesit_buffer_changed): New symbol.
To decide if a `defalias` will define a command, we need to look inside
the `lambda` and search for an interactive spec. Until now we assumed
`defalias`s argument would take the shape of `(function (lambda ...))`,
which failed miserably for `transient-define-prefix` which
macroexpands to `(defalias 'foo (lambda ...))` instead.
So make sure we macroexpand the arg to turn the `(lambda ...)` into
`(function (lambda ...))` before we try to dig into it.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Macroexpand the `defalias` argument before checking if it's an
interactive function.
We were using the wrong key when inserting entries into
treesit--query-cache, making the cache both ineffective and
liable to grow without bound. On very long sessions, the cache
could end up using hundreds.
* lisp/treesit.el (treesit--compile-query-with-cache): Use
correct cache key.
These warnings are emitted at least by Texinfo 7.2.
* doc/misc/calc.texi (Introduction): Conditionally set prev node to
avoid warning.
(Interactive Tutorial): Update chapter title to match node name and
menu entry.
(Top): Add description to `Interactive Tutorial' menu entry.
(Bug#80923)
Fido-mode is meant for ido-mode emulation, so it makes some
sense C-r and C-s moves forward and backward in the list as
ido-mode once did. The price to pay is losing easy access to
isearch-backward/forward in completions. In fido-vertical-mode,
this price is unreasonably high given C-p and C-n are the
natural bindings for moving about in the vertical list.
* lisp/icomplete.el (icomplete-fido-mode-map): Disable C-s and C-r
in fido-vertical-mode.
This is the one case out of 1902 where the C name didn't match the subr
name.
* src/xfns.c (Fx_display_last_user_time): renamed to Fx_display_set_last_user_time
* lisp/treesit.el (treesit-ensure-installed): Use
treesit-language-available-p for checking if a language is
installed. treesit-ready-p also checks for buffer size, etc, so
it's not the right check.