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.
* 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.
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
This behavior is more expected than throwing an error,
as passing NULL (closed db connection) to 'sqlite3_close'
is a "harmless no-op" according to the documentation.
* src/sqlite.c (sqlite-close): Ignore already closed connections.
(Bug#80908)
Copyright-paperwork-exempt: yes
* src/term.c (append_glyph, append_composite_glyph)
(append_glyphless_glyph): Account for the right-border glyph
when computing the end glyph of TEXT_AREA. (Bug#80900)
This code may be called from within the loop in process_special_events
which assumed kbd_fetch_ptr remains unchanged. This caused a buffer
underflow which resulted in the entire kbd buffer being replayed.
* src/xterm.c (x_delete_selection_requests): Simply clear deleted
events rather than rotating the kbd buffer.
This should be more readable to most people, since C is
more widely familiar than the terminfo language.
* src/term.c (init_tty): Do the conversion from a single integer
24-bit color value to three 8-bit RGB values up-front.
(Bug#70941)
* src/term.c (turn_on_face): Account for TF_rgb_separate.
(init_tty): Support setrgbf/setrrgbb and set TF_rgb_separate
accordingly.
* src/termchar.h: Update commentary.
(Bug#70941)
When the non-standard terminfo capability Tc is present, or the
environment variable COLORTERM is set to truecolor, use a
hard-coded escape sequence that addresses all colors directly by
their RGB values.
Previously we used escape sequences cribbed from terminfo's
setaf/setab for direct color, that expect that we will only try to
use colors 000000 to 000007 for the first eight indexed colors.
This isn't something we currently handle.
* doc/misc/efaq.texi (Colors on a TTY): Fix off-by-one error in list
of indexed colors for terminfo RGB terminals.
* src/term.c (init_tty): Don’t use any indexed colors with terminfo
Tc capability or COLORTERM=truecolor environment variable (bug#70941).
This is intended to parallel the 'mode-line-active/inactive'
and 'header-line-active/inactive' distinction.
* doc/emacs/display.texi (Standard Faces): Document the new faces.
* lisp/faces.el (tab-line-active, tab-line-inactive): Add new faces.
* lisp/tab-line.el (tab-line-faces): Add new faces
to MEMBERS arg of 'defgroup'.
(tab-line-auto-hscroll): Use one of the faces
depending on 'mode-line-window-selected-p'.
* src/dispextern.h (CURRENT_TAB_LINE_ACTIVE_FACE_ID_3)
(CURRENT_TAB_LINE_ACTIVE_FACE_ID): New macros
based on header-line equivalents.
(CURRENT_TAB_LINE_HEIGHT): Use CURRENT_TAB_LINE_ACTIVE_FACE_ID.
(face_id): Use TAB_LINE_ACTIVE_FACE_ID and
TAB_LINE_INACTIVE_FACE_ID instead of TAB_LINE_FACE_ID.
* src/xdisp.c (window_box_height, pos_visible_p, init_iterator)
(window_text_pixel_size, display_mode_lines, display_mode_line)
(format-mode-line): Replace all uses of TAB_LINE_FACE_ID with
either a new macro or the new face IDs.
* src/xfaces.c (lookup_basic_face, realize_basic_faces):
Map new face IDs to their lisp symbols.
(syms_of_xfaces): New lisp symbols.
Many regexps do not pay attention to syntax tables at all
because they don't use things like \s, \b, \<, or \_<.
So delay the actual initialization of the machinery for
`syntax-table` properties (especially the call to `syntax-propertize`)
until the first time we actually need to consult the syntax of
a character.
* src/syntax.c (uninitialized_interval): New constant.
(RE_SETUP_SYNTAX_TABLE_FOR_OBJECT, SETUP_SYNTAX_TABLE):
Set `forw/backward_i` to that new constant to indicate they haven't
actually be initialized yet.
Set `start` and `stop` fields right away, instead of delegating it to
`update_syntax_table`, so that `e_property` and `b_property`
can be set independently.
(update_syntax_table): Remove the `init` argument. Instead, discover
the need for initialization based on the fact that `forw/backward_i`
are uninitialized. Presume `start` and `stop` fields have been
set already.
(parse_sexp_propertize): Update call accordingly.
(update_syntax_table_forward): Remove the `init` argument.
* src/syntax.h (update_syntax_table, update_syntax_table_forward):
Remove the `init` argument.
(UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD):
Update calls accordingly.
By disabling hw-acceleration we can re-enable xwidgets with newer
webkit2gtk versions (Bug#80728).
Newer versions were disallowed (Bug#66068) since they abort when a
webkit view is created; however, they work fine as long as we disable
hw-acceleration, since the off-screen windows that xwidgets uses do not
support that.
* configure.ac: Remove upper-bound for webkit2gtk version check.
* src/xwidget.c (Fmake_xwidget): Turn off hardware-acceleration.
Copyright-paperwork-exempt: yes
* src/w32console.c (w32con_set_cursor_size): New function.
(w32con_reset_terminal_modes, w32con_set_terminal_modes)
(Fset_cursor_size): Use it to change cursor shape on Windows
Terminal.
* src/w32console.c (syms_of_ntterm) <w32--terminal-is-conhost>:
New variable.
(initialize_w32_display): Set 'w32--terminal-is-conhost' non-nil
when running on ConHost.
* lisp/international/characters.el (use-cjk-char-width-table):
When Emacs runs on MS-Windows Terminal, behave as if
'cjk-ambiguous-chars-are-wide' were nil even in CJK locales.
(Bug#79298)
* src/xdisp.c (display_line): Under WORD_WRAP, save and restore
the iterator _before_ the wrap point. This fixes face extension
under 'visual-line-mode', because otherwise 'extend_face_to_end_of_line'
is called with the value of 'it' that corresponds to the first display
element on the next screen line. (Bug#80673)
The previous code would sometimes exit the loop with frame1 set to the
last considered frame, even if that wasn't a suitable frame to switch
to.
* src/frame.c (delete_frame): Reset 'frame1' in the loops if we don't
match the break condition, so we don't think we've found a suitable
replacement frame if we haven't. Error if, for some reason, that
fails.
* src/w32console.c (DEFAULTP, SSPRINTF, w32con_write_vt_seq)
(w32con_get_cursor_coords): New functions and macros.
(w32con_write_glyphs): Hide cursor before writing to the console.
Add code for writing in virtual-terminal mode when
'w32_use_virtual_terminal' is non-zero.
(w32con_write_glyphs_with_face): Add code for writing in
virtual-terminal mode when 'w32_use_virtual_terminal' is non-zero.
(w32con_setup_virtual_terminal): New function.
(w32con_set_terminal_modes): Call it.
(turn_on_face, turn_off_face): New functions.
(initialize_w32_display): Save background and foreground, and the
current TTY.
(Fset_screen_color): Accept an additional optional argument VTP;
if non-nil, arrange for 24-bit display to use the specified
colors.
(Fget_screen_color): Accept an additional optional argument VTP;
if non-nil, return colors used by 24-bit display.
(Fw32_use_virtual_terminal, Fw32_use_virtual_terminal_p): New
functions.
* src/term.c (tty_setup_colors) [WINDOWSNT]: Set up
virtual-terminal sequences for colors.
(init_tty) [WINDOWSNT]: Set up terminfo capabilities for Windows
virtual-terminal.
* src/xdisp.c (redisplay_internal): Don't call set_tty_color_mode
for WINDOWSNT.
* lisp/term/w32console.el (w32-tty-set-base-colors)
(w32-tty-define-base-colors, w32-tty-define-8bit-colors)
(w32-tty-define-24bit-colors, w32-tty-get-pixel): New functions.
(terminal-init-w32console): Remove color setup.
(w32-tty-setup-colors): New function.
* lisp/term/tty-colors.el (tty-color-mode-alist): Add --color
modes for 256 and 24-bit color modes.
* lisp/startup.el (tty-handle-args): Fix --color handling.
* lisp/faces.el (tty-set-up-initial-frame-faces): Set up colors
for MS-Windows consoles.
* etc/NEWS:
* doc/emacs/msdos.texi (Windows Misc):
* doc/emacs/cmdargs.texi (Colors X): Document 24-bit color support
on MS-Windows.
(Bug#79298)
* doc/misc/url.texi (Retrieving URLs): Describe the ':peer' entry
of the STATUS argument passed to CALLBACK of 'url-retrieve'.
* lisp/url/url.el (url-retrieve):
* src/gnutls.c (Fgnutls_peer_status): Doc fixes.
(Bug#80762)
Before the fix, if user uses the NODE-ONLY option, we don't keep
the capture names in the results, then predicates won't work
because they can't reference capture names.
* src/treesit.c (query_capture_remove_capture_name): New
function.
(Ftreesit_query_capture): Use the new function to remove capture
names AFTER running the predicate.
* test/src/treesit-tests.el:
(treesit-query-node-only-and-grouped): New test.