James Cherti [Fri, 11 Apr 2025 14:18:19 +0000 (10:18 -0400)]
Mark !%:.^~, as punctuation rather than symbol constituents
In Bash, the characters !%:.^~, are not valid in variable names. In sh,
they are not permitted in either function or variable names. Treating
them as punctuation is convenient, as they are rarely used in function
names and never in variable names. Even among commands, their usage is
uncommon. The only character among these that is commonly seen in
command names is '.', although it is rarely used in function names.
Marking these characters as punctuation, rather than symbol
constituents, enhances the accuracy of symbol detection.
* lisp/progmodes/sh-script.el: Mark !%:.^~, as punctuation in the
sh-mode-syntax-table syntax table.
Stefan Monnier [Wed, 7 May 2025 17:54:47 +0000 (13:54 -0400)]
(cl-deftype): Don't set `cl-deftype-handler` directly
In order to make it easier to change that in the future, let
`cl--define-derived-type` take care of storing the derived
type's function into `cl-deftype-handler`.
* lisp/emacs-lisp/cl-preloaded.el (cl--define-derived-type):
Change calling convention. Set `cl-deftype-handler`.
* lisp/emacs-lisp/cl-macs.el (cl-deftype): Don't set `cl-deftype-handler`,
instead pass the function to `cl--define-derived-type`.
Stefan Monnier [Wed, 7 May 2025 17:24:07 +0000 (13:24 -0400)]
cl-types: The big renaming to "derived types"
`cl-defstruct` also defines a type and is also in CL, so
"cl-type" is not precise enough to talk about those types
defined with `cl-deftype`. Use the term "derived type" to be
more clear, as is done in the HyperSpec.
* doc/misc/cl.texi (Derived types): Move `cl-deftype` to this
new subsection. Document the use of derived types as method specializers.
* lisp/emacs-lisp/cl-extra.el (cl--types-of-memo): Rename from
`cl--type-unique`.
(cl--derived-type-dispatch-list): Rename from `cl--type-dispatch-list`.
(cl--derived-type-generalizer): Rename from `cl--type-generalizer`.
(cl--derived-type-generalizers): Rename from `cl--type-generalizers`.
* lisp/emacs-lisp/cl-lib.el (cl-generic-generalizers) <derived-types>:
Rename from <cl-types-of>. Catch but don't hide errors when a derived
type cannot be used as an atomic type specifier.
* lisp/emacs-lisp/cl-preloaded.el (cl--derived-type-list): Rename from
`cl--type-list`.
(cl-derived-type-class): Rename from `cl-type-class`.
(cl--derived-type-class-make): Rename from `cl--type-class-make`.
(cl--define-derived-type): Rename from `cl--type-deftype`.
Juri Linkov [Wed, 7 May 2025 06:31:01 +0000 (09:31 +0300)]
Update the default value of 'diff-outline-regexp'.
* lisp/vc/diff-mode.el (diff-outline-regexp): Change the default value
to match the diff command name in recursive diff. Move after
'diff-hunk-header-re' variable definition used in the new value.
(diff-setup-buffer-type): Change setq of 'diff-outline-regexp'
to buffer-local (bug#78269).
Po Lu [Tue, 6 May 2025 14:29:46 +0000 (22:29 +0800)]
Fix compilation on Android 35 and on Termux
* configure.ac (gl_cv_onwards_func_tzalloc): Define to "future
OS version" on Android API 35 and later.
Detect posix_spawn* by means of gl_CHECK_FUNCS_ANDROID.
* src/conf_post.h (tzalloc, tzfree): Define to non-conflicting
names on Android 35 and later.
Stefan Monnier [Tue, 6 May 2025 03:18:56 +0000 (23:18 -0400)]
cl-types: Integrate into CL-Lib
* lisp/emacs-lisp/cl-extra.el (cl--type-unique, cl-types-of)
(cl--type-dispatch-list, cl--type-generalizer): Move to `cl-extra.el`.
(cl--type-generalizers): New function extracted from "cl-types-of"
method of `cl-generic-generalizers`.
* lisp/emacs-lisp/cl-lib.el (cl-generic-generalizers): New method to
dispatch on derived types. Use `cl--type-generalizers`.
* lisp/emacs-lisp/cl-macs.el (cl-deftype): Move from `cl-types.el`
and rename from `cl-deftype2`.
(extended-char): Tweak definition to fix bootstrapping issues.
* lisp/emacs-lisp/cl-preloaded.el (cl--type-list, cl-type-class)
(cl--type-deftype): Move from `cl-types.el`.
* lisp/emacs-lisp/oclosure.el (oclosure): Don't abuse `cl-deftype` to
register the predicate function.
* test/lisp/emacs-lisp/cl-extra-tests.el: Move tests from
`cl-type-tests.el`.
Stefan Monnier [Mon, 5 May 2025 18:57:05 +0000 (14:57 -0400)]
cl-types: Simplify a bit further
Mostly, get rid of `cl--type-flag` and rely only on the presence/absence
of the type on `cl--types-list` to "flag" erroring-types.
Also, don't try and catch errors during dispatch.
* lisp/emacs-lisp/cl-types.el (cl--type-dispatch-list): Move to the
relevant section.
(cl--type-parents): Inline into sole caller.
(cl--type-deftype): Add `arglist` argument.
Don't signal an error if the type already existed but wasn't in
`cl--type-list` since that's normal and we can fix it.
Don't touch `cl--type-flag` any more.
Don't add to `cl--type-list` if it can't be used without arguments.
(cl-deftype2): Adjust call accordingly.
(cl--type-error): Inline into sole caller.
(cl-types-of): Be more careful to preserve ordering of types
before passing them to `merge-ordered-lists`.
Add `types` argument for use by dispatch.
Don't bother skipping the `root-type` since that's a built-in type,
so it should never happen anyway.
Don't catch errors if called from dispatch.
Don't bother with `cl--type-flag`.
(cl--type-generalizer): Use new arg of `cl-types-of` instead of
let-binding `cl--type-list`, in case `cl-types-of` ends up (auto)loading
a file or some such thing which needs to use/modify `cl--type-list`.
(cl--type-undefine): Move to end of file.
* test/lisp/emacs-lisp/cl-types-tests.el (cl-types-test): Remove DAG
test since we don't detect such errors any more.
Relax ordering test when the order is not guaranteed
by parent-relationships.
Juri Linkov [Mon, 5 May 2025 16:57:29 +0000 (19:57 +0300)]
New variable 'comment-setup-function' for multi-language modes.
* lisp/newcomment.el (comment-setup-function): New variable.
(comment-normalize-vars): Call non-nil 'comment-setup-function'.
* lisp/textmodes/mhtml-ts-mode.el
(mhtml-ts-mode--comment-current-lang): New internal variable.
(mhtml-ts-mode--comment-setup): New function.
(mhtml-ts-mode): Set 'comment-setup-function' to
'mhtml-ts-mode--comment-setup' instead of using
'c-ts-common-comment-setup' only for JavaScript.
Juri Linkov [Mon, 5 May 2025 16:50:24 +0000 (19:50 +0300)]
* lisp/outline.el (outline-minor-mode-highlight-buffer): Adjust match data.
After a successful call to 'outline-search-function'
set the end of the match data to the end of the line
that is equivalent to adding ".*" in the regexp.
This accompanies the recent change in 'outline-font-lock-keywords'.
David Ponce [Mon, 5 May 2025 15:03:56 +0000 (11:03 -0400)]
cl-types.el: Speed up deftype and dispatch
* lisp/emacs-lisp/cl-types.el (cl--type-list): Doc string.
(cl--type-dispatch-list): New variable.
(cl--type-parents): Make it a plain defun.
(cl--type-children, cl--type-dag): Remove.
(cl--type-undefine): Remove duplicate test for `cl--type-p'. Use
`cl--class-children'. Clear `cl--type-flag' instead of
`cl--type-error'. Also remove type from the dispatch list.
(cl--type-deftype): Doc string. Remove useless safeguard of
data on error. Fix some error messages. Clear `cl--type-flag'
when a type is (re)defined. Just push new types on
`cl--type-list'.
(cl--type-error): Set `cl--type-flag' to the symbol `error' and
remove type in error from the dispatch list.
(cl-types-of): Doc string. Remove useless check for
`cl-type-class-p'. Skip types which we are sure will not match.
Simplify creation of the DAG.
(cl--type-generalizer): In the tagcode-function, check only types
that can be dispatched.
(cl-generic-generalizers): Populate the dispatch list.
Eli Zaretskii [Mon, 5 May 2025 12:07:28 +0000 (15:07 +0300)]
; Fix recently added treesit tests
* test/src/treesit-tests.el (treesit-linecol-basic)
(treesit-linecol-search-back-across-newline)
(treesit-linecol-col-same-line): Skip tests if tree-sitter is not
available.
* lisp/progmodes/python.el (python--treesit-settings): Use more
specific selectors for constants.
* test/lisp/progmodes/python-tests.el
(python-ts-mode-nested-types-face-1)
(python-ts-mode-union-types-face-1)
(python-ts-mode-union-types-face-2): None is now a constant.
Juri Linkov [Sun, 4 May 2025 17:03:32 +0000 (20:03 +0300)]
* lisp/textmodes/markdown-ts-mode.el: Improve.
(markdown-ts-list-marker): Inherit from 'shadow' like in non-ts mode.
(markdown-ts-block-quote): Inherit from 'italic' like in non-ts mode.
(markdown-ts--treesit-settings): Use 'shadow' for parens in
'markdown-inline' only under 'inline_link' and 'image'.
Use @markdown-ts-block-quote for 'block_quote'.
Override with 'append' for links.
(markdown-ts--range-settings): Use global html parser for 'html_tag'
since its ranges are interconnected.
(markdown-ts-setup): Create the 'html' parser.
Yuan Fu [Wed, 19 Mar 2025 00:26:26 +0000 (17:26 -0700)]
Add line-column tracking for tree-sitter
Add line-column tracking for tree-sitter parsers. Copied from
comments in treesit.c:
Technically we had to send tree-sitter the line and column
position of each edit. But in practice we just send it dummy
values, because tree-sitter doesn't use it for parsing and
mostly just carries the line and column positions around and
return it when e.g. reporting node positions[1]. This has
been working fine until we encountered grammars that actually
utilizes the line and column information for
parsing (Haskell)[2].
So now we have to keep track of line and column positions and
pass valid values to tree-sitter. (It adds quite some
complexity, but only linearly; one can ignore all the linecol
stuff when trying to understand treesit code and then come
back to it later.) Eli convinced me to disable tracking by
default, and only enable it for languages that needs it. So
the buffer starts out not tracking linecol. And when a
parser is created, if the language is in
treesit-languages-require-line-column-tracking, we enable
tracking in the buffer, and enable tracking for the parser.
To simplify things, once a buffer starts tracking linecol, it
never disables tracking, even if parsers that need tracking
are all deleted; and for parsers, tracking is determined at
creation time, if it starts out tracking/non-tracking, it
stays that way, regardless of later changes to
treesit-languages-require-line-column-tracking.
To make calculating line/column positons fast, we store
linecol caches for begv, point, and zv in the
buffer (buf->ts_linecol_cache_xxx); and in the parser object,
we store linecol cache for visible beg/end of that parser.
In buffer editing functions, we need the linecol for
start/old_end/new_end, those can be calculated by scanning
newlines (treesit_linecol_of_pos) from the buffer point
cache, which should be always near the point. And we usually
set the calculated linecol of new_end back to the buffer
point cache.
We also need to calculate linecol for the visible_beg/end for
each parser, and linecol for the buffer's begv/zv, these
positions are usually far from point, so we have caches for
all of them (in either the parser object or the buffer).
These positions are far from point, so it's inefficient to
scan newlines from point to there to get up-to-date linecol
for them; but in the same time, because they're far and
outside the changed region, we can calculate their change in
line and column number by simply counting how much newlines
are added/removed in the changed
region (compute_new_linecol_by_change).
* doc/lispref/parsing.texi (Using Parser): Mention line-column
tracking in manual.
* etc/NEWS: Add news.
* lisp/treesit.el:
(treesit-languages-need-line-column-tracking): New variable.
* src/buffer.c: Include treesit.h (for TREESIT_EMPTY_LINECOL).
(Fget_buffer_create):
(Fmake_indirect_buffer): Initialize new buffer fields.
(Fbuffer_swap_text): Add new buffer fields.
* src/buffer.h (ts_linecol): New struct.
(buffer): New buffer fields.
(BUF_TS_LINECOL_BEGV):
(BUF_TS_LINECOL_POINT):
(BUF_TS_LINECOL_ZV):
(SET_BUF_TS_LINECOL_BEGV):
(SET_BUF_TS_LINECOL_POINT):
(SET_BUF_TS_LINECOL_ZV): New inline functions.
* src/casefiddle.c (casify_region): Record linecol info.
* src/editfns.c (Fsubst_char_in_region):
(Ftranslate_region_internal):
(Ftranspose_regions): Record linecol info.
* src/insdel.c (insert_1_both):
(insert_from_string_1):
(insert_from_gap_1):
(insert_from_buffer):
(replace_range):
(del_range_2): Record linecol info.
* src/treesit.c (TREESIT_BOB_LINECOL):
(TREESIT_EMPTY_LINECOL):
(TREESIT_TS_POINT_1_0): New constants.
(treesit_debug_print_linecol):
(treesit_buf_tracks_linecol_p):
(restore_restriction_and_selective_display):
(treesit_count_lines):
(treesit_debug_validate_linecol):
(treesit_linecol_of_pos):
(treesit_make_ts_point):
(Ftreesit_tracking_line_column_p):
(Ftreesit_parser_tracking_line_column_p): New functions.
(treesit_tree_edit_1): Accept real TSPoint and pass to
tree-sitter.
(compute_new_linecol_by_change): New function.
(treesit_record_change_1): Rename from treesit_record_change,
handle linecol if tracking is enabled.
(treesit_linecol_maybe): New function.
(treesit_record_change): New wrapper around
treesit_record_change_1 that handles some boilerplate and sets
buffer state.
(treesit_sync_visible_region): Handle linecol if tracking is
enabled.
(make_treesit_parser): Setup parser's linecol cache if tracking
is enabled.
(Ftreesit_parser_create): Enable tracking if the parser's
language requires it.
(Ftreesit__linecol_at):
(Ftreesit__linecol_cache_set):
(Ftreesit__linecol_cache): New functions for debugging and
testing.
(syms_of_treesit): New variable
Vtreesit_languages_require_line_column_tracking.
* src/treesit.h (Lisp_TS_Parser): New fields.
(TREESIT_BOB_LINECOL):
(TREESIT_EMPTY_LINECOL): New constants.
* test/src/treesit-tests.el (treesit-linecol-basic):
(treesit-linecol-search-back-across-newline):
(treesit-linecol-col-same-line):
(treesit-linecol-enable-disable): New tests.
* src/lisp.h: Declare display_count_lines.
* src/xdisp.c (display_count_lines): Remove static keyword.
Matthew Tromp [Tue, 22 Apr 2025 19:27:58 +0000 (15:27 -0400)]
Add `next-error' support for flymake diagnostics buffers
This adds `next-error' support for flymake diagnostics buffers.
Buffers created with `flymake-show-buffer-diagnostics' and
`flymake-show-project-diagnostics' are now next-error enabled,
and `next-error' and `previous-error' will navigate through
their listed diagnostics.
* lisp/progmodes/flymake.el (flymake-current-diagnostic-line)
(flymake--diagnostics-next-error): Add.
(flymake-show-diagnostic, flymake-show-buffer-diagnostics)
(flymake-show-project-diagnostics): Set next-error-last-buffer.
(flymake--tabulated-setup): Set next-error-function.
(Bug#77809)
Roi Martin [Thu, 6 Mar 2025 19:26:46 +0000 (20:26 +0100)]
Fix 'Skip' behavior in erts files (bug#76839)
* lisp/emacs-lisp/ert.el (ert-test--erts-test): Fix 'Skip'
behavior in erts files, so only the test case where it is
specified is skipped.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-erts-skip-one)
(ert-test-erts-skip-last): Add test cases.
* test/src/editfns-tests.el (sanity-check-change-functions-before)
(sanity-check-change-functions-after): Record notifications in
`sanity-check-change-functions-op`.
(sanity-check-change-functions-with-op): Don't rely on
`sanity-check-change-functions-op` always holding only the `op`.
(sanity-check-change-functions-errors): Include the sequence of
notifications in the error info.
(editfns-tests--before/after-change-functions): Add tests for (bug#78042).
Spencer Baugh [Fri, 2 May 2025 12:47:37 +0000 (14:47 +0200)]
Fix completion boundaries for TRAMP file names
Previously, we assumed (roughly) that substitute-in-file-name
always returns a suffix of the original string. But
substitute-in-file-name on "/ssh:user@host:/~/" returns
"/ssh:user@host:~/", preserving the TRAMP magic prefix. Weaken
the assertion in completion--sifn-boundaries to allow this; the
new assertion is more clear about the property we care about,
anyway.
Sean Whitton [Fri, 2 May 2025 04:49:35 +0000 (12:49 +0800)]
Move documentation of this-command buffer display condition entry
* doc/lispref/buffers.texi (Buffer List): Document this-command
buffer display condition entry.
* doc/lispref/windows.texi (Choosing Window): Give an example of
using this-command buffer display condition entry in
display-buffer-alist.
(Buffer Display Action Alists):
* lisp/window.el (display-buffer): Delete documentation of
this-command buffer display condition entry from these locations
because it is not a buffer display action alist entry.
* lisp/subr.el (buffer-match-p): Update cross reference.
Sean Whitton [Fri, 2 May 2025 04:04:26 +0000 (12:04 +0800)]
New user option native-comp-async-on-battery-power
* lisp/emacs-lisp/comp-run.el
(native-comp-async-on-battery-power): New option.
(battery-status-function): Declare.
(native--compile-skip-on-battery-p): New function.
(comp--run-async-workers): Call it.
* etc/NEWS: Announce the new option.
Juri Linkov [Thu, 1 May 2025 18:23:33 +0000 (21:23 +0300)]
Embed html, yaml and toml in markdown-ts-mode.
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--treesit-settings):
Use @italic on the whole 'block_quote'.
(markdown-ts-outline-predicate): New function.
(markdown-ts--range-settings): Embed 'yaml' in host 'markdown',
embed 'toml' in host 'markdown', embed 'html' in host 'markdown-inline',
and use local 'html_block'.
(markdown-ts-setup): Append html/yaml/toml to treesit-font-lock-settings
and treesit-font-lock-feature-list when their grammars are ready.
(markdown-ts-mode): Set comment-start/comment-end.
Set treesit-outline-predicate to 'markdown-ts-outline-predicate'.
* lisp/textmodes/toml-ts-mode.el
(toml-ts-mode--font-lock-feature-list): New variable.
(toml-ts-mode): Use it.
* lisp/textmodes/yaml-ts-mode.el
(yaml-ts-mode--font-lock-feature-list): New variable.
(yaml-ts-mode): Use it.
(yaml-ts-mode--outline-nodes): New variable.
(yaml-ts-mode--outline-predicate): Use it.
* lisp/treesit-x.el (liquid-generic-ts-mode):
Use 'treesit-ready-p' on optional 'yaml' grammar.
Merge 'yaml-ts-mode--font-lock-feature-list'.
Juri Linkov [Thu, 1 May 2025 18:03:34 +0000 (21:03 +0300)]
Improve elixir-ts--thing-settings.
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--thing-settings):
Add extra grouping "keywords" to named sexp nodes.
Add "," to anonymous sexp nodes. Use bos/eos.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Use bos/eos for anonymous sexp nodes for better disambiguation.
* test/lisp/progmodes/heex-ts-mode-tests.el
(heex-ts-mode-test-indentation): Skip the test when 'elixir' is
missing since 'heex-ts-mode' depends on the 'elixir' grammar.
Juri Linkov [Thu, 1 May 2025 17:55:33 +0000 (20:55 +0300)]
Avoid adding duplicate items to 'treesit-language-source-alist'.
* lisp/textmodes/mhtml-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
Use 'add-to-list' on items in language-source-alist
that should check for duplicate items.
* test/infra/Dockerfile.emba: Move multi-language mhtml-ts-mode and
php-ts-mode to the end to give their dependent grammars a lower priority.
* test/lisp/progmodes/js-tests.el (js-ts-mode-test-indentation):
Skip the test when 'jsdoc' is missing since 'js-ts-mode' depends
on the 'jsdoc' grammar.
Alan Mackenzie [Thu, 1 May 2025 16:12:18 +0000 (16:12 +0000)]
Implement C23 features:
Improve the handling of #error and #warning in C and C++ Modes.
* lisp/progmodes/cc-engine.el (c-looking-at-c++-attribute)
(c-enclosing-c++-attribute, c-forward-sws, c-backward-sws):
Handle attributes in C as they have been handled in C++.
(c-forward-align-clause-throw-if-invalid): New macro.
(c-forward-type): Handle alignas, alignof, and _BitInt, putting
a catch block around most of the function to catch invalid uses
of these new keywords.
(c-in-id-arglist): New function.
(c-forward-decl-or-cast-1): Recognize a "maybe" type identifier
as a type in arglists when there is no parameter identifier
associated with it.
* lisp/progmodes/cc-fonts.el (c-font-lock-cpp-messages): New
function.
(c-cpp-matchers): Move the handling of "invalid" comment
delimiters outside of the block handling CPP directives.
Remove the inline handling of #error and #warning, using the
new function c-font-lock-cpp-messages instead.
(c-get-fontification-context): Handle alignof, alignas,
_BitInt.
(c-font-lock-declarations): Adapt fontification of K&R
parameters to the C23 nameless parameter scheme.
* lisp/progmodes/cc-langs.el (c-has-quoted-numbers)
(c-stmt-boundary-skip-chars)
(c-recognize-post-brace-list-type-p, c-modifier-kwds)
(c-constant-kwds): Handle C the same as the existing C++
handling.
(c-cpp-message-directives-re, noncontinued-line-end)
(c-cpp-messages-re, c-cpp-message-match-no): New
c-lang-consts/vars.
(c-cpp-include-directives): New directive embed.
(c-cpp-expr-directives): New directives elifdef, elifndef.
(c-primitive-type-kwds): New types, _Decimal*, bool, char*_t,
nullptr_t.
(c-typeof-kwds): New keyword typeof_unqual.
(c-type-with-paren-kwds, c-type-with-paren-key): New
c-lang-const/vars.
(c-type-modifier-with-parens-kwds)
(c-type-modifier-with-parens-key, c-type-internal-paren-kwds)
(c-type-internal-paren-key): New c-lang-const/vars.
(c-type-modifier-prefix-kwds, c-type-start-kwds): Amend with
the above new c-lang-consts.
(c-no-type-with-equals-kwds, c-no-type-with-equals-key): New
c-lang-const/vars.
(c-modifier-kwds): Add constexpr, auto, and thread_local to the
C value.
(c-paren-nontype-kwds): Add static_assert to the C value.
(c-constant-kwds): Add nullptr to the C value.
(c-regular-keywords-regexp): Include c-type-with-paren-kwds.
(c-recognize-nameless-type-decls): New c-lang-const/var.
* lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Also clear
c-digit-separator properties.
Michael Albinus [Thu, 1 May 2025 10:47:44 +0000 (12:47 +0200)]
Improve treesitter tests on emba
* test/infra/Dockerfile.emba (emacs-tree-sitter): Print language
versions.
* test/infra/gitlab-ci.yml (.job-template): Pass ${http_proxy},
${https_proxy} and ${no_proxy} to the docker call.
(.tree-sitter-template): Add some dependencies.
Improves:
- fontification of generic types with namespace-prefixes
- function-call parameters
- variable use in string interpolation
- implicitly typed parameters in lambda-expressions
- index-expressions
- variables used in return-statements
- variables used in binary expressions
David Ponce [Tue, 29 Apr 2025 14:48:37 +0000 (10:48 -0400)]
(cl-types-of): Speed up by caching more of its work
* lisp/emacs-lisp/cl-types.el (cl--type-parents): Make it a proper function.
(cl--type-children): Use `cl--class-children` and make it a `defsubst`.
(cl--type-dag): η-reduce and make it a `defsubst`.
(cl--type-undefine): Also reset `cl--type-error`.
(cl--type-deftype): Modify `cl--type-list` atomically so we never need
to restore it upon error. Don't test bogus parent here.
(cl-deftype2): Test bogus parent here instead. Also, better preserve
the declarations for the lambda.
(cl-types-of): Do less uncached work.
Eli Zaretskii [Wed, 30 Apr 2025 11:06:44 +0000 (14:06 +0300)]
Fix compilation errors in emacsclient.c with MinGW GCC 15
* lib-src/emacsclient.c (set_fg, get_wc): Declare using actual
function signatures.
(w32_give_focus): Cast return value of 'GetProcAddress' to correct
pointer types. (Bug#78160)