1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
Commit graph

180285 commits

Author SHA1 Message Date
Ahmed Khanzada
bc0f662573 Add `toolkit-theme' and 'toolkit-theme-set-functions'
* etc/NEWS: Document `toolkit-theme' and
'toolkit-theme-set-functions'
* lisp/frame.el: Add 'toolkit-theme-set-functions'
* src/frame.c: Add `toolkit-theme' Elisp variable
* src/gtkutil.c: (xg_update_dark_mode_for_all_displays): Set
`toolkit-theme' and call 'toolkit-theme-set-functions'
* src/w32fns.c: (w32_applytheme): Send WM_EMACS_SET_TOOLKIT_THEME
message to Lisp thread.
* src/w32term.h: Declare WM_EMACS_SET_TOOLKIT_THEME
* src/w32term.c: (w32_read_socket): Receive
WM_EMACS_SET_TOOLKIT_THEME message and set `toolkit-theme' and call
'toolkit-theme-set-functions'
2025-11-22 12:57:53 +02:00
Eli Zaretskii
1cfd0cf0bd ; Fix last change
* doc/lispref/variables.texi (Selecting Lisp Dialect): Update due
to bug#79760.
2025-11-22 12:56:40 +02:00
Pip Cet
e5130bdecc The --script option now enforces lexical binding (bug#79760)
* etc/NEWS: Document the change.
* lisp/startup.el (command-line--load-script): Set 'lexical-binding';
if we delete the first line, insert a new line to preserve line
numbers.
(command-line--eval-script): Set 'lexical-binding'.
2025-11-22 10:45:56 +00:00
Eli Zaretskii
e2799739a5 ; * admin/authors.el (authors-aliases): Add Huang Jing. 2025-11-22 12:06:56 +02:00
RadioNoiseE
ce0d851614 Fix XML indentation for CDATA section content
* lisp/nxml/nxml-mode.el (nxml-merge-indent-context-type):
Handle 'cdata-section' type to prevent it from returning 'mixed'.
* lisp/nxml/nxml-mode.el (nxml-compute-indent-in-delimited-token):
Preserve existing indentation for CDATA section content.
(bug#79817)

Copyright-paperwork-exempt: yes
2025-11-22 12:03:16 +02:00
Ana
dfa646096a csharp-mode : Fix typos and remove duplicated declaration
* lisp/progmodes/csharp-mode.el (csharp-vsemi-unknown): Rename
to 'csharp-vsemi-unknown-p'.  The code was calling a function that
does not exist due to this typo.
(c-class-decl-kwds): Remove duplicated declaration for csharp.
(csharp-ts-mode--font-lock-settings): Remove duplicated declaration
of 'escape-sequence'.
2025-11-22 11:53:22 +02:00
Martin Rudalics
b728f50e1f Fix thinko in 'window_set_parent_and_normal_sizes'
* src/window.c (window_set_parent_and_normal_sizes): When
assigning normal sizes in a combination, take the direction from
its parent's 'horizontal' slot and not from that of the first
window in the combination.
2025-11-22 10:12:37 +01:00
Po Lu
32fc382e9e Disable C23 for Android builds
* configure.ac (ac_cv_prog_cc_c23): Define to no when
configuring for Android.
2025-11-21 10:01:10 +08:00
Po Lu
386e4642dc * lib/strnlen.c (strnlen): Fix syntax error in Gnulib module. 2025-11-21 09:49:44 +08:00
Sean Whitton
37d4f523d3 ; * lisp/vc/vc.el (vc-revert): Use length< and ngettext. 2025-11-20 20:54:56 +00:00
Sean Whitton
0bf1eb692b Fix '(vc-revert-file (vc-git-root)'
* lisp/vc/vc-git.el (vc-git--file-list-is-rootdir):
Merge into vc-git-command.
(vc-git-command): When operating on the repository root, first
bind default-directory to that root.  When operating on the
repository root with 'git checkout', pass "." as FILE-OR-LIST.
2025-11-20 20:42:21 +00:00
Sean Whitton
896449d65a ; * test/lisp/vc/vc-tests/vc-test-misc.el: Fix compiler warnings. 2025-11-20 20:39:37 +00:00
Paul Eggert
c230dfdc26 A few more functions are not pure
Assuming ATTRIBUTE_PURE means that the function must return,
a few more functions that should not be declared with ATTRIBUTE_PURE.
The GCC manual (and even the C23 standard, with [[reproducible]])
is not clear about this, and it’s better to be safe.
* src/bignum.h (mpz_get_d_rounded):
* src/lisp.h (bignum_to_double):
No longer pure, as it does not return if memory is exhausted.
* src/fns.c (Fproper_list_p): No longer pure, as it does not
return if the user quits.
* src/gnutls.c (Fgnutls_errorp): No longer pure, as it does not
return if it runs into an eassert failure in XSYMBOL_WITH_POS via EQ.
* src/lisp.h (bignum_to_intmax, bignum_to_uintmax, bignum_bufsize):
No longer pure, as it does not return if it runs into an
eassert failure in XBIGNUM via xbignum_val.
2025-11-20 12:04:01 -08:00
Paul Eggert
918b9f04f4 Prefer C23 support if available
This merges in changes that were made to Autoconf master
in April 2024.  It causes ‘configure’ to prefer the C compiler to
enable C23 features if possible; otherwise, ‘configure’
behaves as before, using C11 if available and C99 if not.
* admin/merge-gnulib (GNULIB_MODULES): Add std-gnu23.
(AVOIDED_MODULES): Add (i.e., start avoiding) std-gnu11.
* m4/std-gnu11.m4: Remove.
* m4/std-gnu23.m4: Add.
2025-11-20 11:14:03 -08:00
Juri Linkov
f4d353f9c9 Show the diff buffer with replacements by typing 'd' in 'query-replace'
* doc/emacs/search.texi (Query Replace): Mention new key 'd'.

* lisp/replace.el (query-replace-help): Mention the key 'd'.
(query-replace-map): Bind the key 'd' to 'diff'.
(perform-replace): When 'def' is equal to 'diff',
call 'multi-file-replace-as-diff' to show the diff buffer
with replacements (bug#79761).
2025-11-20 20:39:29 +02:00
Juri Linkov
ae5c361d32 Support buffers in FILES arg of multi-file-replace-as-diff (bug#79761)
* lisp/misearch.el (multi-file-replace-as-diff): Allow providing
a list of buffers in the argument FILES.  Add autoload cookie.
(replace-regexp-as-diff): Provide the current buffer to
'multi-file-replace-as-diff' when 'buffer-file-name' is nil.
2025-11-20 20:31:12 +02:00
Sean Whitton
17f9a6355d ; * etc/NEWS: Expand on showing warnings on first daemon frame. 2025-11-20 18:19:37 +00:00
Sean Whitton
855aad48fa vc-exec-after: Drop passing zero timeout to accept-process-output
This reverts this change:

    Author:     Sean Whitton <spwhitton@spwhitton.name>
    AuthorDate: Thu Oct 30 20:45:31 2025 +0000
    Commit:     Sean Whitton <spwhitton@spwhitton.name>
    CommitDate: Fri Nov 7 15:40:25 2025 +0000

      vc-exec-after: Pass zero timeout to accept-process-output

      * lisp/vc/vc-dispatcher.el (vc-exec-after): Pass zero timeout to
      accept-process-output.
      Fix due to Spencer Baugh <sbaugh@janestreet.com>.

See thread starting at
<https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg00263.html>
2025-11-20 18:15:24 +00:00
Vincenzo Pupillo
5cef0f9c2f Use documentation mark-up face for 'tag_name' node in document block.
Embedded documentation mark-up should be used for 'tag_name' in
documentation blocks (thanks to Protesilaos Stavrou).

* lisp/progmodes/c-ts-common.el
(c-ts-mode-doxygen-comment-font-lock-settings):
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--phpdoc-font-lock-settings): Replace 'font-lock-constant-face'
with 'font-lock-doc-markup-face' (bug#79856).
2025-11-20 19:48:41 +02:00
Elías Gabriel Pérez
bbd9727aa8 hideshow: Add modification hooks to remove the hidden blocks
bug#79865

* lisp/progmodes/hideshow.el (hs--discard-overlay-after-change):
New function.
(hs-make-overlay): Use the new function.
2025-11-20 19:42:01 +02:00
Juri Linkov
9c84fb5c73 ; * etc/NEWS: Mention the change about daemon startup warnings (bug#79783) 2025-11-20 19:40:15 +02:00
Paul Eggert
2cc6c81278 Update from Gnulib by running admin/merge-gnulib 2025-11-20 09:11:59 -08:00
Paul Eggert
cada1c3192 Fix more mis-declarations of non-const functions
Problem reported by Helmut Eller in:
https://lists.gnu.org/r/emacs-devel/2025-11/msg00809.html
* src/data.c (Fsymbol_with_pos_p, Fnatnump):
* src/fns.c (Fproper_list_p):
* src/gnutls.c (Fgnutls_errorp):
Now pure, not const.
2025-11-20 09:11:59 -08:00
Stefan Monnier
4681042493 Editorconfig: Cherrypick from commit fbd078ad6478 from upstream
* lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file):
Bump limits beyond the spec's minimum.
Cherrypick from commit fbd078ad6478 from upstream.
* lisp/editorconfig-fnmatch.el (editorconfig-fnmatch--do-translate):
Hoist `push` out of the `cl-case`.
2025-11-20 06:58:39 -05:00
Paul Eggert
20fd47e741 Fix mis-declarations of non-const functions
Problem for mpz_get_d_rounded reported by Helmut Eller in:
https://lists.gnu.org/r/emacs-devel/2025-11/msg00795.html
* lib-src/make-docfile.c (DEFUN_pure): New constant.
(write_globals, scan_c_stream): Support "attributes: pure".
* src/bignum.h (mpz_get_d_rounded):
* src/data.c (Fsymbolp, Fmodule_function_p, Fintegerp, Fnumberp):
* src/lisp.h (bignum_to_double, bignum_to_intmax)
(bignum_to_uintmax, bignum_bufsize):
Now pure, not const, since they depend on current state.
For example, Fsymbolp now inspects symbols_with_pos_enabled,
and the bignum functions inspect bignum contents in memory.
* src/data.c (Feq):
* src/xfaces.c (Fface_attribute_relative_p):
No longer const, since they might abort when debugging.
* src/pdumper.h (pdumper_object_p, pdumper_cold_object_p)
(pdumper_find_object_type, pdumper_object_p_precise):
These are not const functions.  But there is no need to declare
them to be pure, either, as they’re inline so the compiler can
figure it out.
2025-11-19 16:21:24 -08:00
Eli Zaretskii
a1f36dc3b8 ; * admin/authors.el (authors-aliases): Update. 2025-11-19 17:32:21 +02:00
Spencer Baugh
784d5b4954 Fix implicit usage of the current window-width in vtable.el
Previously, many functions in vtable.el called 'vtable--cache',
which computed 'vtable--cache-key' based on the current selected
window and frame; this could cause vtable functions to fail or
misbehave if they were not called from the selected window and
frame that 'vtable-insert' was last called in.

Now, the vtable cache is stored with the text of the vtable, so
that functions which need to interact with some vtable text can
do so reliably without having to use the same selected window
and frame.

Also, 'vtable-update-object' has always required TABLE to be
present at point in the current buffer; now its docstring states
this.

* lisp/emacs-lisp/vtable.el (vtable--current-cache)
(vtable--cache-widths, vtable--cache-lines): Add.
(vtable-insert): Save cache in 'vtable-cache.
(vtable--ensure-cache, vtable--recompute-cache): Inline into
'vtable-insert'.
(vtable--widths, vtable--cache): Delete.
(vtable-update-object): Use 'vtable--current-cache' and
update docstring.  (Bug#69837)
(vtable-remove-object, vtable-insert-object): Use
'vtable--current-cache' and save cache in 'vtable-cache'.
(vtable--sort, vtable--alter-column-width)
(vtable-previous-column, vtable-next-column): Use
'vtable--current-cache'.
2025-11-19 17:26:50 +02:00
10sr
97d2ac4f95 Editorconfig: Fix for spaces_in_middle_key test
* lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file):
fix for `spaces_in_middle_key` test.

Cherrypick of commit 72b8847275cb from upstream.
2025-11-19 10:17:30 -05:00
Ron Parker
7ec541ae2c Editorconfig: Fix parsing section lines with trailing comments (#363)
Copyright-paperwork-exempt: yes

* lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file):
Fix parsing section lines with trailing comments.

Cherrypick of commit 183cfa105c2e from upstream.
2025-11-19 10:12:39 -05:00
Stefan Monnier
5e10b7fe4e Fix editorconfig-display-current-properties
In Emacs-30, `editorconfig-display-current-properties` was
broken in that it displayed only the properties set by
`editorconfig-apply` but not those set in the "normal" way,
i.e. by `hack-local-variables`.  Fix that along with a few
docstrings that had misleading old info.

* lisp/editorconfig-tools.el (editorconfig-apply)
(editorconfig-mode-apply): Fix docstring and declare obsolete.

* lisp/editorconfig.el (editorconfig-properties-hash):
(editorconfig-call-get-properties-function): Remove elements of
docstring that aren't true any more.
(editorconfig-call-get-properties-function):
Set `editorconfig-properties-hash`.
2025-11-19 09:58:19 -05:00
Martin Rudalics
788b39740a Fix 'make_lispy_position' for left margin clicks (Bug#79846)
* src/keyboard.c (make_lispy_position): When calculating a
position in the left margin skip any scroll bar on the left of
the associated window (Bug#79846).
2025-11-19 09:31:28 +01:00
Elías Gabriel Pérez
bfa0cb81dd hideshow: Fix regressions. (Bug#79857)
* lisp/progmodes/hideshow.el (hs-block-positions): Exit the
function if 'hs-forward-sexp' fails.
(hs-hide-level-recursive): Fix infloop.
* test/lisp/progmodes/hideshow-tests.el (hideshow-hide-level-1):
(hideshow-hide-level-2): Update tests.
2025-11-19 09:20:00 +02:00
Stefan Monnier
4532f5ae8f (loaddefs-generate--emacs-batch): Fix bug#79821 again
Hopefully, this one is for good.
Use `file-truename` on all the input file/dir names to try and
make sure we don't get bitten any more by symlinks or driver
letter capitalization.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Revert last change.
(loaddefs-generate--excluded-files): Remove test that's not needed any
more now that we use all relative names.
(loaddefs-generate--emacs-batch): Apply truename to all input files/dirs.
2025-11-18 17:33:11 -05:00
Stefan Monnier
be2b38ce14 (lisp-indent-function): Auto-load macros to get the indent info
Rather than preload the `lisp-indent-function` property for
autoloaded macros, auto-load them to fetch their property.
In terms of cost, this slightly reduces the heap size at
startup, while tending to increase the heap size while editing
ELisp code since more packages will be (auto)loaded.

The benefit is elsewhere: by loading the definition the macro we
will also load other (non-autoloaded) definitions, so we get
better behavior for things like `ert.el` and `inline.el` where
only some of the macros are autoloaded, because there's a good
chance that we'll end up loading them to indent the autoloaded
macro, after which indentation of the other macros will be
performed correctly (bug#68818).

* lisp/emacs-lisp/byte-run.el (byte-run--dont-autoload): New function.
(macro-declarations-alist): Use it to override `byte-run--set-indent`.

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Auto-load macros
if needed to get the indent info.
2025-11-18 17:23:11 -05:00
Anatolii Smolianinov
6b389a61c1 Eglot: use symbol at point as default in eglot-rename (bug#79757)
* lisp/progmodes/eglot.el (eglot-rename): Tweak.

Copyright-paperwork-exempt: yes
2025-11-18 20:53:55 +00:00
Juri Linkov
6b0cf8ab87 Display daemon startup warnings on the first client frame (bug#79783)
* lisp/emacs-lisp/warnings.el (display-warning): For warnings/errors
on the initial daemon frame use 'after-make-frame-functions'
to postpone their display until the first client frame is created.
(warning--display-buffer): New internal function refactored out of
'display-warning'.
2025-11-18 19:57:04 +02:00
Jonas Bernoulli
6415fc5e04
Update to Transient v0.11.0-10-g6637364e 2025-11-18 17:55:10 +01:00
Eshel Yaron
ce5d8ddb32
; Mention LSP semantic highlighting in the Emacs manual
* doc/emacs/display.texi (Semantic Font Lock): Mention
LSP-based semantic highlighting, refer to the Eglot manual.
2025-11-18 16:08:05 +01:00
Sean Whitton
e262ed18f9 ; * admin/notes/spelling: Copy note on possessive from CONTRIBUTE. 2025-11-18 15:04:58 +00:00
Eli Zaretskii
0026445dd6 Fix MinGW build broken by integration of 'stdio-consolesafe'
* src/conf_post.h: Avoid redirecting '*printf' functions if
'OMIT_CONSOLESAFE' is defined to 1.
* nt/cmdproxy.c:
* nt/ddeclient.c: Define 'OMIT_CONSOLESAFE' to 1 to avoid
redirecting '*printf functions' to stdio-consolesafe replacements.
* nt/Makefile.in (LIBS_ADDPM): Add -lgnu to link 'addpm' against
Gnulib.  (Bug#79855)
2025-11-18 16:19:20 +02:00
Sean Whitton
3ae79b7c05 diff-apply-hunk: Avoid display-buffer-overriding-action
* lisp/vc/diff-mode.el (diff-apply-hunk): Use ACTION argument to
display-buffer instead of display-buffer-overriding-action.
2025-11-18 12:56:25 +00:00
Eli Zaretskii
f81fc11613 ; Improve wording of documentation of 'hs-cycle-filter'
* doc/emacs/programs.texi (Hideshow):
* etc/NEWS:
* lisp/progmodes/hideshow.el (hs-cycle-filter): Improve wording.
2025-11-17 17:54:48 +02:00
Stefan Monnier
6c770f8624 lisp/emacs-lisp/smie.el (smie-indent-basic): Add safety predicate 2025-11-17 08:51:56 -05:00
Juri Linkov
1668290c9d Improve hs-indicator-mouse-toggle-hiding for non-selected windows
* lisp/progmodes/hideshow.el (hs-indicator-mouse-toggle-hiding):
Use 'mouse-set-point' to select the clicked window when it was not selected.
2025-11-17 09:34:36 +02:00
Juri Linkov
ec08011af4 New hideshow option 'hs-cycle-filter' for visibility-cycling with 'TAB'
* doc/emacs/programs.texi (Hideshow): Add 'hs-cycle-filter' and
remove duplicate 'hs-toggle-hiding'.

* lisp/progmodes/hideshow.el (hs-cycle-filter): New defcustom (bug#79585).
(hs-minor-mode-map): Bind 'TAB' to 'hs-toggle-hiding' using the filter.
2025-11-17 09:30:45 +02:00
Elías Gabriel Pérez
6663df5655 hideshow: Simplify code. (Bug#79585)
* lisp/progmodes/hideshow.el (hs-get-first-block): New function.
(hs--add-indicators, hs-hide-block): Use the new function and
simplify.
2025-11-17 09:27:08 +02:00
Thomas Fitzsimmons
ad13e0b864 ntlm.el: Add Package-Requires and fix two docstrings
* lisp/net/ntlm.el (Package-Requires): Add emacs 27.1.
* lisp/net/ntlm.el (ntlm-build-auth-response, ntlm-string-xor):
Fix docstrings to satisfy `checkdoc'.
2025-11-16 18:28:03 -05:00
João Távora
c81d8fd490 ; Eglot: minor documentation cleanup of last change
* lisp/progmodes/eglot.el (eglot--semtok-cache)
(eglot--semtok-inflight): Minimally enhance docstrings.
(eglot--semtok-font-lock-2): Remove FIXME comment.

bug#79374
2025-11-16 22:16:40 +00:00
Juri Linkov
4fad95d9fc * lisp/outline.el: Small fixes.
(outline-font-lock-keywords, outline-minor-mode-highlight-buffer):
Fall back to eol when there is no newline at the end of outline at eob.
(outline-after-change-functions): Remove the temporarily added variable.
(outline--fix-buttons): Remove its last use.
2025-11-16 19:37:23 +02:00
João Távora
7469ee7e27 Eglot: rework semtok feature again
This time, I bit the bullet and made eglot--semtok-cache a list
of responses.  This is motivated by "range" request which happen
in for multiple regions asynchronously.  They must all be
(eventually) sent and cannot stomp on each others' cache.

Figuring out when to delete outdated entries from
eglot--semtok-cache is also tricky.  It must be done only once
we're certain an outdated entry cannot be reused for a "delta"
request.

* lisp/progmodes/eglot.el (eglot--semtok-cache): Reword docstring.
(eglot--semtok-apply-delta-edits): Tweak variable name.
(eglot--semtok-request): Rework again.
(eglot--semtok-font-lock): Rework.
(eglot--semtok-font-lock-1): DATA no longer optional.
2025-11-16 15:26:48 +00:00