1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

188957 commits

Author SHA1 Message Date
Helmut Eller
7f925475a2 Merge branch 'master' into feature/igc 2025-11-12 17:48:40 +01:00
Sean Whitton
f9c94e05f5 vc-do-async-command: Print how long command took to run
* lisp/vc/vc-dispatcher.el (vc-do-async-command): Print how long
the command took to run.
2025-11-12 15:00:00 +00:00
Sean Whitton
e7696c64a9 ; * lisp/vc/vc-dispatcher.el (vc-do-command): Improve docstring. 2025-11-12 14:21:15 +00:00
Sean Whitton
1484e3108a vc-do-command: Restore using a pipe in the async case
* lisp/vc/vc-dispatcher.el (vc-do-command): Restore using a pipe
in the async case.  This was unintentionally changed when adding
support for discarding output.
2025-11-12 13:08:17 +00:00
Helmut Eller
81b80cee65 Set dump_public.start to some place outside of the GC heap
The idea is to reduce the probability for stray pointers on the stack.
pdumper_object_p uses dump_public.start and pdumper_object_p is called
quite frequently, e.g. by xfree.

* src/pdumper.c (pdumper_load): Set dump_public.start to ~0.
2025-11-12 13:26:02 +01:00
Helmut Eller
cfe464d2ed Remove IGC_OBJ_DUMPED_CHARSET_TABLE from igc_obj_type
Use IGC_OBJ_DUMPED_BYTES instead.

* src/igc.h (enum igc_obj_type): Remove IGC_OBJ_DUMPED_CHARSET_TABLE.
* src/igc.c (obj_type_names, gc_init_header, dflt_scan_obj, thread_ap)
(builtin_obj_type_and_hash, igc_dump_finish_obj, igc_on_pdump_loaded):
Adjust accordingly.
(fix_charset_table): Deleted.
* src/pdumper.c (dump_charset_table): Use IGC_OBJ_DUMPED_BYTES.
2025-11-12 13:18:08 +01:00
Helmut Eller
b4e0fa7e86 Remove gc_header from struct charset
* src/charset.h (struct charset): Remove gc_header.
* src/pdumper.c (dump_charset_table): No header to initialize.
* src/igc.c: Update struct hashes.
2025-11-12 11:15:46 +01:00
Helmut Eller
bb0382e247 Avoid crashes when displaying menu help-echo strings
Use GC handles for help-echo strings instead of raw pointers.

* src/w32menu.c (add_menu_item): Store GC handles.
(w32_menu_display_help): Dereference the string.
(w32_free_submenu_strings): Free GC handles.
2025-11-12 08:01:28 +01:00
Eli Zaretskii
6969b53028 ; * lisp/progmodes/hideshow.el (hs-hideable-region-p): Doc fix. 2025-11-11 21:36:33 +02:00
Po Lu
45a82437a3 Merge from savannah/emacs-30
ca4af1768d Fix crash on Android 2.2
2025-11-12 01:14:37 +08:00
Po Lu
ca4af1768d Fix crash on Android 2.2
* src/android-asset.h (AAssetManager_open): Initialize desc and
asset to NULL, lest `desc' be accessed uninitialized if C_NAME
does not exist in the directory tree.
2025-11-12 01:13:46 +08:00
Michael Albinus
b398a6c629 Extend Tramp direct async processes for further methods
* lisp/net/tramp-container.el (tramp-methods) <distrobox>:
* lisp/net/tramp-sh.el (tramp-methods) <sg>: Add `tramp-direct-async'.
(tramp-expand-script): Fix typo in script name.
(tramp-maybe-send-script): Adapt docstring.
2025-11-11 16:40:33 +01:00
Sean Whitton
4bb1b938df ; * lisp/progmodes/hideshow.el (hs-minor-mode): Style fixes. 2025-11-11 12:47:31 +00:00
Sean Whitton
3d844e49f7 ; * lisp/vc/vc-hooks.el: Note vc-after-revert in after-revert-hook. 2025-11-11 12:45:16 +00:00
Sean Whitton
fd16fcce52 ; minibuffer-default-add-shell-commands: Use 'and' not 'unless'. 2025-11-11 12:38:38 +00:00
Elías Gabriel Pérez
48ef7d91b1 hideshow: Fix indicators for multiple block in the same line
bug#79810

* lisp/progmodes/hideshow.el (hs-hideable-region-p): Simplify.
(hs-block-positions): Change return value.
(hs--add-indicators): Go to the next line only if we have
successfully created the overlays.
(hs-hide-block-at-point, hs-hide-block): Update code.
2025-11-11 09:38:49 +02:00
Juri Linkov
9709cb8d16 Improve hideshow support for heex-ts-mode and yaml-ts-mode
* lisp/progmodes/heex-ts-mode.el (heex-ts--thing-settings): Add 'defun' thing.
(heex-ts-mode): Use it in 'hs-treesit-things'.

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Set 'hs-treesit-things'
and 'hs-adjust-block-end-function'.
2025-11-10 21:46:29 +02:00
Juri Linkov
d059e7516e Improve hideshow support for elixir-ts-mode and heex-ts-mode
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--thing-settings):
Add 'defun' thing.
(elixir-ts-mode): Set 'hs-treesit-things'.
* lisp/progmodes/heex-ts-mode.el (heex-ts-mode):
Set 'hs-treesit-things'.  Use bos/eos instead of bol/eol.
2025-11-10 20:46:40 +02:00
Sean Whitton
4358838a3b vc-do-command: Support discarding standard error
* lisp/vc/vc-dispatcher.el (vc-do-command): Support discarding
standard error.
* lisp/vc/vc-hg.el (vc-hg-dir-status-files): Discard standard
error of 'hg status' to avoid parsing mistakes.
(vc-hg-command): Update docstring given new meaning of first
argument to vc-do-command.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-do-command-1)
(vc-test-do-command-2, vc-test-do-command-3)
(vc-test-do-command-4, vc-test-do-command-5)
(vc-test-do-command-6, vc-test-do-command-7): New tests.
2025-11-10 18:08:39 +00:00
Sean Whitton
af9a137fe8 ; vc-start-logentry: Require log-edit (bug#79803)
* lisp/vc/vc-dispatcher.el (vc-start-logentry):
Require log-edit (bug#79803).
2025-11-10 15:14:33 +00:00
João Távora
1772a4e468 ; Eglot: unbreak "lsp-abiding-column" test for newer clangd
Newer/newest clangd support more encodings and actually
negotiate with us, so test shouldn't assume UTF-16..

* test/lisp/progmodes/eglot-tests.el
(eglot-tests--lsp-abiding-column-1): Tweak.
2025-11-10 12:28:14 +00:00
Helmut Eller
2dc3f8f564 Fix MS Windows build
* src/w32menu.c (add_menu_item): Adapt to gc-handles enough to
avoid compilation error.  More work is needed to fix the problem.
2025-11-10 13:11:18 +01:00
Helmut Eller
8a907ad5c2 Fix help popups for Athena menus
* lwlib/lwlib-widget.h (struct _widget_value): Use a gc_handle for the
help field.
* lwlib/lwlib.c (free_widget_value_tree, copy_widget_value_tree)
(merge_widget_value): Adapt to gc_handles.
* src/gc-handles.h (gc_handle_for_gc_handle, gc_handle_assign): New
helpers.
* src/gc-handles.c (gc_handle_for_gc_handle, gc_handle_assign):
Implementation.
* src/menu.c (make_widget_value, free_menubar_widget_value_tree): Adapt
to gc_handles.
* src/xmenu.c (menu_highlight_callback): Adapt to gc_handles.
* src/gtkutil.c (make_menu_item, xg_create_one_menuitem)
(xg_update_menu_item): Adapted to changed widget_value.
2025-11-10 13:03:27 +01:00
Helmut Eller
d46e931f2c Fix non-MPS build
* src/alloc.c (make_misc_ptr, make_user_ptr): Add #ifdefs.
2025-11-10 12:43:35 +01:00
Helmut Eller
ddfb4d5016 Don't call record_unwind_protect_ptr with a GCed pointer
* src/xmenu.c (create_and_show_popup_menu): Use record_unwind_protect
instead of record_unwind_protect_ptr.
(leave_toolkit_menu): Use a Lisp_Object instead of a untagged pointer.
2025-11-10 12:35:21 +01:00
João Távora
683e7462df Flymake: fix compatibility to older emacsen (bug#79769)
* lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode-map):
Don't use keymap-set.
(Package-Requires): Require project 0.11.1
(Version): Bump to 1.4.3.
2025-11-10 11:33:48 +00:00
Spencer Baugh
411e8068dc Eglot: consider invisibility in eldoc one-liners (bug#79779)
Since we keep the invisible characters of all the
server-supplied markdown, we risk that the first lines are
entirely invisible.  This defeats the :echo calculation in
eglot-hover-eldoc-function.

Fallout of bug#79552.

* lisp/progmodes/eglot.el (eglot-hover-eldoc-function): Fix.

Co-authored-by: João Távora <joaotavora@gmail.com>
2025-11-10 11:33:48 +00:00
Helmut Eller
1fe6c51625 Fix indentation of recent commits
* src/fns.c (strong_copy_hash_table):
* src/xterm.c (x_cache_xi_devices, xi_disable_devices): clang-format's
output does not comform to Emacs coding conventions.
2025-11-10 12:33:18 +01:00
Gerd Möllmann
605c9a4e41 Revert "Alternative implementation of constants in .eln files"
This reverts commit f996f5512c
because it is missing some important other changes.
2025-11-10 12:16:04 +01:00
Gerd Möllmann
f996f5512c Alternative implementation of constants in .eln files
* src/comp.h (USE_POINTER_TO_CONSTANT_VECTOR): If defined, don't
use vectors.
(Lisp_Native_Comp_Unit): Make data_relocs and data_eph_relocs
pointers to Lisp_Object pointers.

* src/comp.c (ABI_VERSION): Increase to 13.
(check_comp_unit_relocs): Don't check if pointers are used.
* src/comp.c (load_comp_unit, Fcomp__register_lambda): Handle
case that constant vectors are pointers.
* src/comp.c (emit_static_object): Add some FIXME comments.
(declare_imported_data_relocs): Handle case of pointers to
constants vectors differently.
* src/comp.c (declare_imported_data_relocs): Make array elemen
type volatile.
* src/comp.c (comp_t): Add n_data_relocs and
n_data_relocs_ephemeral.
(obj_to_reloc): Set array length correctly.
(declare_imported_data_relocs): Return # of constants.
(declare_imported_data): Set comp's number of constants.

* src/igc.c (root_create_exact_ptr, igc_root_create_exact_ptr):
Return root list node.
* src/igc.h (igc_root_create_exact_ptr): Change return type.

* src/pdumper.c (dump_do_dump_relocation): Don't do fixup if
using pointers to constants vectors.

* src/comp.h (struct Lisp_Native_Comp_Unit): Add member
data_eph_vec.
* src/comp.c (load_comp_unit): Use data_eph_vec to protect the
eph constants.
2025-11-10 11:21:50 +01:00
Elías Gabriel Pérez
24535f95c8 ; * lisp/progmodes/hideshow.el (hs-minor-mode, hs-grok-mode-type): Fix code. 2025-11-10 09:27:18 +02:00
Elías Gabriel Pérez
60cadb7d18 * lisp/progmodes/grep.el (grep-menu-map): Add "Edit Grep Buffer" (bug#79793). 2025-11-10 09:21:00 +02:00
Po Lu
6a724b3963 Port Android build system to Autoconf < 2.70
* m4/ndk-build.m4 (ndk_INIT): Don't suppose that $ac_aux_dir
will be terminated with a trailing slash on Autoconf 2.69 and
earlier.
2025-11-10 12:16:53 +08:00
Michael R. Mauger
04520bfd7e Zone multi-window and -frame support
* lisp/play/zone.el: Multi-window and -frame support.
(zone): New group.
(zone-buffer-name): New	constant.
(zone-add-program, zone-remove-program): New functions.

* : User configuration
(zone-all-frames, zone-all-windows-in-frame)
(zone-delete-other-windows): New boolean options.
(zone-time-elapsed-while-zoning): New var.
(zone-start-hook, zone-finish-hook): New hooks.

* : Preserve frame configuration
(zone-frame-configuration-alist): New Alist of cursor type and
window configuration per frame.
(zone--save-frame-configuration)
(zone--restore-frame-configuration)
(zone--restore-all-frame-configuration): New internal functions to
restore windows and frames.

* : Rewrite/modularization of zone logic
(zone): Refactor function.
(zone--buffer-empty-p, zone--buffer-encrypted-p): New functions.
(zone--choose-window-and-buffer): New function.
(zone-ignored-buffers, zone--buffer-zoneable-p): New var and function.
(zone--build-zone-buffer): New function to create zone buffer.
(zone--prepare-frames): New function to configure multi-frames and -windows.
(zone--apologize-seconds, zone--apologize-for-failing): New var
and function when zone fails.
2025-11-09 19:40:48 -05:00
Michael Heerdegen
d2bc774ec9 ; * lisp/progmodes/hideshow.el: Spelling fixes (bug#79585) 2025-11-09 21:18:01 +02:00
Juri Linkov
41701df12a * lisp/progmodes/flymake.el (flymake-start): Use 'when-let*' (bug#79796).
This fixes the case when 'flymake-autoresize-margins' is nil, but
'flymake--suitably-fringed-p' returns nil and still resizes margins.
2025-11-09 20:48:19 +02:00
Juri Linkov
e2531721b4 * lisp/vc/diff-mode.el (diff-changed-unspecified): Restore old colors.
Restore yellow colors previously used in the 'diff-changed' face.
Copy color values from 'smerge-base'.  This will distinguish them
from grey 'diff-file-header' and 'diff-hunk-header' in context diffs.
2025-11-09 20:14:12 +02:00
Juri Linkov
1f32ff090a * lisp/simple.el (minibuffer-default-add-shell-commands): Fix old bug.
Don't treat the first element of the list of commands as a file name.
2025-11-09 19:49:29 +02:00
Eli Zaretskii
79e1226238 * src/w32fns.c (Fw32_system_idle_time): New function. 2025-11-09 18:52:32 +02:00
Sean Whitton
4fab1265f0 ; vc-do-command: Delete spurious with-current-buffer
* lisp/vc/vc-dispatcher.el (vc-do-command): Delete spurious
with-current-buffer.
2025-11-09 14:56:21 +00:00
Michael Albinus
782ca15a88 Improve handling of Tramp internal shell scripts
* doc/misc/tramp.texi (New operations): Mention tramp-expand-script.

* lisp/net/tramp-sh.el (tramp-uudecode)
(tramp-readlink-file-truename, tramp-perl-file-truename)
(tramp-perl-file-name-all-completions)
(tramp-shell-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes, tramp-perl-id)
(tramp-python-id, tramp-perl-encode, tramp-perl-decode)
(tramp-awk-encode, tramp-awk-decode)
(tramp-bundle-read-file-names): Indent script for better readability.
(tramp-perl-file-name-all-completions)
(tramp-shell-file-name-all-completions)
(tramp-ls-file-attributes, tramp-bundle-read-file-names):
Adapt docstring.
(tramp-shell-print-quoted-string): New defconst.
(tramp-shell-file-name-all-completions): Use "%b" format specifier.
(tramp-bundle-read-file-names):  Use "%k" format specifier.
(tramp-sh-handle-file-name-all-completions): Don't send
`tramp-bundle-read-file-names'.
(tramp-expand-script): Adapt docstring.  Apply always
`format-spec'.  Handle also "%b" and "%k" format specifiers.
2025-11-09 13:11:49 +01:00
Sean Whitton
0483178219 ; * lisp/vc/vc-dispatcher.el (vc-do-command): Reduce indentation. 2025-11-09 11:58:39 +00:00
Sean Whitton
786f9f1fd4 ; * lisp/vc/vc-dispatcher.el: Fix last change. 2025-11-09 11:52:00 +00:00
Sean Whitton
a86f8c9cbe vc-do-command: Error when BUFFER is nil, untabify
This function is shortly to gain support for separating standard
output and standard error from the child.  Commit untabifying it
first to make the diff adding the new features more readable.
This will include documented support for BUFFER nil, meaning to
discard output.

* lisp/vc/vc-dispatcher.el (vc-do-command): Untabify the source
in preparation for work on this function.  If BUFFER is nil,
signal an error, in keeping with the current docstring.
Use ensure-list.  Use equal not string= for string comparison.
2025-11-09 11:43:22 +00:00
Elías Gabriel Pérez
9fc46f1fd9 hideshow: Rework previous changes
* lisp/progmodes/hideshow.el (hs-grok-mode-type): Improve 'hs--set-variable'.
* lisp/progmodes/python.el (python-base-mode, python-ts-mode):
Provide backward-compatibility for older versions.
2025-11-09 09:20:05 +02:00
Eli Zaretskii
f11349ea1a Fix a crash in 'merge_face_ref'
* src/xfaces.c (get_lface_attributes): Avoid crashes if F is NULL.
This happens when 'face_inheritance_cycle' is for some reason
called for the default attributes of a face (which are applicable
to future frames).  We avoid the crashes by not consulting face
remapping in that case, since face remapping is buffer-local, and
therefore cannot possibly affect face defaults.  (Bug#79790)
2025-11-09 08:58:15 +02:00
Wilson Snyder
266335374e verilog-mode: Make recent change backward-compatible and update from package upstream.
* lisp/progmodes/verilog-mode.el (verilog-mode): Support Emacs 31.1
'hs-forward-sexp-func in backward-compatible way.
(verilog-submit-bug-report) Remove key binding.
2025-11-08 18:33:58 -05:00
Elías Gabriel Pérez
ef2584585b hideshow: Rework previous changes
* lisp/progmodes/hideshow.el: Set default values of buffer-local variables.
(hs-inside-comment-p): Restore.
(hs--set-variable): Rename from 'hs--get-mode-value'.
(hs-grok-mode-type): Rework.
* lisp/nxml/nxml-mode.el:
* lisp/progmodes/f90.el:
* lisp/progmodes/fortran.el:
* lisp/progmodes/icon.el:
* lisp/progmodes/lua-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/verilog-mode.el:
* lisp/progmodes/vhdl-mode.el:
* lisp/textmodes/mhtml-mode.el:
* lisp/textmodes/sgml-mode.el:
* lisp/treesit.el (treesit-major-mode-setup): Rename
'hs-forward-sexp-func' to 'hs-forward-sexp-function',
'hs-adjust-block-beginning' to 'hs-adjust-block-beginning-function',
'hs-find-block-beginning-func' to 'hs-find-block-beginning-function',
'hs-find-next-block-func' to 'hs-find-next-block-function',
'hs-looking-at-block-start-p-func' to 'hs-looking-at-block-start-predicate',
'hs-inside-comment-p-func' to 'hs-inside-comment-predicate'.
2025-11-08 20:04:30 +02:00
Steven Allen
5d11ee9f54 Lookup cached basic-auth credentials with the correct key
Credentials cached in 'url-basic-auth-storage' are keyed by
"server:port", but were being looked up by just "server" in
'url-basic-auth'.
* lisp/url/url-auth.el (url-basic-auth): Lookup cached basic auth
credentials by "server:port".  (Bug#79486)

* test/lisp/url/url-auth-tests.el (url-auth-test-auth-retrieve-cache):
Check the digest auth test-cases cache retrieval test cases against the
basic auth logic.
2025-11-08 19:21:10 +02:00
Alexander Kuleshov
19ee128845 * lisp/progmodes/ld-script.el: Add 'PT_TLS' to 'ld-script-keywords'. 2025-11-08 19:17:56 +02:00