1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00
Commit graph

50852 commits

Author SHA1 Message Date
Paul Eggert
481ad70d5c December 2025 spelling fixes
Some of the fixes are to continue to use American
rather than British spelling.
* doc/misc/modus-themes.org (my-modus-themes-engraved-faces):
Fix misspelled ‘:foreground’s.
* etc/themes/modus-themes.el (modus-themes-faces):
Fix misspelled ‘modus-themes-bold’.
* lisp/emacs-lisp/rx.el (rx--normalize-char-pattern):
Rename from rx--normalise-char-pattern.
(rx--optimize-or-args):	Rename from rx--optimise-or-args.
* lisp/frame.el (frame--special-parameters):
Fix misspelled "right-divider-width".
* lisp/net/tramp.el (tramp-fingerprint-prompt-regexp):
Use American spelling “centered”, to match current libfprintf.
* lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers):
Rename from org-fold-core--optimise-for-huge-buffers.
(org-fold-core-update-optimization):
Rename from org-fold-core-update-optimisation,
leaving an alias behind.
(org-fold-core-remove-optimization):
Rename from org-fold-core-remove-optimisation,
leaving an alias behind.
* lisp/org/org.el (org-advertized-archive-subtree):
This alias is now obsolete.
* lisp/play/zone.el (zone-ignored-buffers):
Fix misspelling of ‘zone--buffer-encrypted-p’.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces):
Fix misspelling of ‘csharp’ group.
* lisp/vc/vc.el (vc-clonable-backends-custom-type):
Rename from vc-cloneable-backends-custom-type,
leaving an alias behind.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(bytecomp-tests--warn-arity-non-compiled-callee):
Rename from bytecomp-tests--warn-arity-noncompiled-callee.
(bytecomp-test-defface-spec): Reword a deliberate misspelling
of “default” that is so common I don’t want it to pollute the
spelling dictionary.
* test/lisp/emacs-lisp/package-vc-tests.el:
(package-vc-tests-preserve-artifacts):
Rename from package-vc-tests-preserve-artifacts.
* test/lisp/eshell/em-prompt-tests.el:
(em-prompt-test/forward-backward-paragraph-1):
Reword a deliberate misspelling of “goodbye” that is so common I
don’t want it to pollute the spelling dictionary.
2025-12-26 10:22:12 -08:00
Stéphane Marks
d576216adb Add ns_set_window_size_and_position
* src/frame.c (Fset_frame_size_and_position_pixelwise): Correct
docstring typo.
* src/nsterm.m (compute_offset): New function of common code.
(ns_set_offset): Call compute_offset.
(ns_set_window_size_and_position): New function.
(ns_create_terminal): Add new function to the hook.
2025-12-24 16:32:04 +01:00
Stéphane Marks
b3aa0a652c In Fns_progress_indicator fix GNUstep enum spelling (bug#79859)
* src/nsfns.m (Fns_progress_indicator): GNUstep spells its level
indicator enum NSContinuousCapacityLevelIndicatorStyle vs. macOS
NSLevelIndicatorStyleContinuousCapacity.
2025-12-24 16:24:19 +01:00
Eli Zaretskii
2566f26e0a Improve documentation of 'word-combining-categories'
* src/category.c (syms_of_category) <word-combining-categories>:
Doc fix.  (Bug#80042)
2025-12-24 15:47:06 +02:00
Gerd Möllmann
39badb5a38 ; * src/frame.c (Fmake_frame_invisible): Don't skip setting frame invisible. 2025-12-23 04:39:28 +01:00
Po Lu
b0140bcd44 Implement set_window_size_and_position_hook on Android
* java/org/gnu/emacs/EmacsWindow.java (moveResizeWindow): New
method, which alters all of the bounding box of a window at
once.

* src/android.c (android_init_emacs_window): Load method
`move_resize_window'.
(android_move_resize_window): Invoke this method, rather than a
sequence of operations that will produce two ConfigureNotify
events.

* src/androidterm.c (android_set_window_size_and_position_1)
(android_set_window_size_and_position): New functions; ported
from X.
(android_create_terminal): Register the same.
2025-12-23 10:39:45 +08:00
Gerd Möllmann
575dc8e534 Fix handling of border face on tty child frames (bug#80043)
* src/dispnew.c (box_from_display_table, box_default,
box_glyph): New functions, extracted from produce_box_glyphs.
(box_from_display_table): Merge face nwith glyph's face.
(box_default): Lookup face.
(produce_box_glyphs): Use new functions.
2025-12-22 15:00:42 +01:00
Eli Zaretskii
acb91f501c ; Improve documentation of 'font-spec'
* src/font.c (Ffont_spec):
* doc/lispref/display.texi (Low-Level Font): More accurate
documentation of 'font-spec's arguments.
2025-12-22 15:36:11 +02:00
Mattias Engdegård
ca5d0de3e5 ; * src/editfns.c (styled_format): fix build for C99 compilers 2025-12-22 11:12:43 +01:00
Martin Rudalics
f3d9371a89 Add functions to set frame size and position in one compound step
* lisp/frame.el (set-frame-size-and-position): New function.
* src/frame.c (adjust_frame_size): Handle requests to set size
and position.
(Fset_frame_size_and_position_pixelwise): New function.
* src/gtkutil.c (xg_frame_set_size_and_position): New function.
(xg_wm_set_size_hint): Handle any non-NorthWestGravity values
for child frames only.  Some GTK implementations don't like
them.
* src/gtkutil.h (xg_frame_set_size_and_position.): Add external
declaration.
* src/termhooks.h (set_window_size_and_position_hook): New hook.
* src/w32term.c (w32_set_window_size_and_position): New
function.
(w32_create_terminal): Make it the Microsoft Windows API
set_window_size_and_position_hook.
* src/xterm.c (x_set_window_size_and_position_1)
(x_set_window_size_and_position): New functions.
(x_create_terminal): Make x_set_window_size_and_position the
set_window_size_and_position_hook for the X protocol.
* src/xterm.h (x_set_window_size_and_position): Add external
declaration.
* etc/NEWS: Announce new functions.
2025-12-22 11:01:53 +01:00
Paul Eggert
5cf8af2290 Simplify new %b/%B code many years from now
* src/editfns.c (styled_format): Do %b and %B with sprintf if
sprintf is known to support them.  This will let us simplify this
code many years from now.  (Bug#79990)
2025-12-22 00:15:09 -08:00
Jacob S. Gordon
cff022f0c3 Add binary format specifications '%b' and '%B'
These produce the binary representation of a number.
'%#b' and '%#B' prefix with '0b' and '0B', respectively.
(bug#79990)
* etc/NEWS: Announce change.
* doc/lispref/strings.texi (Formatting Strings): Describe new format
specs and add to comment on reconstructing the value with 'read'.
* src/editfns.c (format): Update doc string.
(styled_format): Add support for '%b' and '%B'.  To remain
portable, avoid use of 'sprintf' by converting by hand.
* test/src/editfns-tests.el (format-binary-zero, format-binary-floats)
(format-binary-nonzero-integers): Add tests.
(read-large-integer): Add binary test cases.
Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
2025-12-22 00:15:09 -08:00
Po Lu
1f7c804ab1 ; Fix coding style in w32fns.c
* src/w32fns.c (Fw32_badge, syms_of_w32fns): Stylistic
corrections.
2025-12-22 09:54:38 +08:00
Paul Eggert
f98c3a940d Remove binary-as-unsigned (bug#79990)
This experimental variable caused more trouble than it cured:
it was rarely used, and when used it tended to be used incorrectly.
* src/editfns.c (binary-as-unsigned): Remove.  All uses removed.
2025-12-21 09:57:56 -08:00
Eli Zaretskii
2fa1e80289 ; Fix system-taskbar-badges on MS-Windows
* src/w32fns.c (Fw32_badge): Fix typos in specifying color values.

* lisp/system-taskbar.el (system-taskbar-w32-badge-background)
(system-taskbar-w32-badge-foreground): Adjust to Windows
conventions.  (Bug#79859)
2025-12-21 16:04:04 +02:00
Stéphane Marks
f5f2306fc1 System GUI taskbar and progress reporter hooks (bug#79859)
Implement system GUI taskbar/dock/launcher icon badge, icon
progress indicator, icon attention alert features for D-Bus
platforms (tested on KDE and GNOME), NS (macOS/GNUstep),
MS-Windows.

Add 'progress-reporter-update-functions' abnormal hook to facilitate
taskbar progress display, and other custom progress reporters.
The default function list is 'progress-reporter-echo-area' which
is backward compatible.

* lisp/subr.el (progress-reporter-update-functions):
New defvar.
(progress-reporter-echo-area): New defun.
(progress-reporter-do-update): Run
progress-reporter-update-functions for both numerical and
pulsing reporters.
(progress-reporter-done): Run progress-reporter-done-functions.
* lisp/system-taskbar.el: New file.
* src/nsfns.m (Fns_badge, Fns_progress_indicator)
(Fns_request_user_attention): New function.
(syms_of_nsfns): Add defsubr Sns_badge,
Sns_request_user_attention, Sns_progress_indicator. Add DEFSYM
Qinformational, Qcritical.
* src/w32fns.c (rgb_list_to_colorref, Fw32_badge)
(Fw32_request_user_attention, Fw32_progress_indicator): New
function.
(syms_of_w32fns): Add defsubr Sw32_badge,
Sw32_progress_indicator, Sw32_request_user_attention. Add DEFSYM
Qinformational, Qcritical.
* doc/emacs/frames.texi: User documentation.
* doc/lispref/os.texi: Programmer documentation.
* etc/NEWS: Announce system-taskbar-mode.  Announce progress
reporter callback enhancements.
2025-12-21 12:55:10 +01:00
Eli Zaretskii
040374be2d ; Avoid compilation warnings in xwidget.c on macOS
* src/xwidget.c (Fxwidget_perform_lispy_event): Avoid compiler
warnings about set but not used variables.  (Bug#80044)
2025-12-21 08:15:55 +02:00
Jens Schmidt
0aabe62b64 Improve handling of non-ASCII characters in 'transpose-regions'
* src/editfns.c (Ftranspose_regions): Separate code related to character
semantics from that related to byte semantics and in that way leverage
optimizations for regions of equal length with respect to both
semantics.  Move and update comments dating back to the initial
implementation.
* test/src/editfns-tests.el (editfns-tests--transpose-regions-tests)
(editfns-tests--transpose-regions-markups)
(editfns-tests--transpose-regions): New test and accompanying variables.
2025-12-20 13:23:29 -05:00
Jens Schmidt
875e42d501 Fix byte-vs-char length issue in 'transpose-regions'
* src/editfns.c (Ftranspose_regions): Calculate length of range between
regions both in units of bytes and characters and use these values as
appropriate.
2025-12-20 13:23:21 -05:00
Martin Rudalics
cf2e676eca Don't change visibility of tty root frames (Bug#80032)
* src/frame.c (Fmake_frame_visible, Fmake_frame_invisible):
* doc/lispref/frames.texi (Visibility of Frames): Don't change
visibility of tty root frames.  (Bug#80032)
2025-12-20 15:12:39 +01:00
Paul Eggert
4d11449c96 Revert to simpler (and we hope faster) TAGGEDP
Suggested by Mattias Engdegård (bug#80021#17).
* src/lisp.h (lisp_h_FIXNUMP, lisp_h_TAGGEDP):
Go back to the simpler (X&7) == TAG approach for checking object tags.
This reverses my commit ccdb08ef4e
“Improve performance of CONSP, FIXNUMP, etc.”
dated 2018-08-25 13:39:18 -0700,
though it keeps the TAGGEDP function the older commit introduced.
Although the older commit improved performance on its circa 2010
platform, when I ran today’s ‘make -C lisp compile-always’
benchmark on Ubuntu 25.10 which uses gcc (Ubuntu 15.2.0-4ubuntu4)
on an circa-2021 Intel Xeon W-1350, this patch makes the
‘make -C lisp compile-always’ benchmark 3.1% faster.  Although the
patch unfortunately also makes the Emacs text segment 0.6% larger,
in this case speed and simplicity beat text size in importance.
2025-12-19 09:10:31 -08:00
Gerd Möllmann
a6c2ae3a3f Don't make tty child frames visible when selected (bug#80020)
* src/frame.c (do_switch_frame): Don't change visibility of tty
child frames.
(Fraise_frame): Doc string fix.
2025-12-19 14:12:33 +01:00
Paul Eggert
bc65fb7486 Remove no-longer needed MALLOC_0_IS_NONNULL macro.
* src/conf_post.h (MALLOC_0_IS_NONNULL): Remove.
Gnulib no longer needs this.
2025-12-09 13:27:28 -08:00
Paul Eggert
47073fa12d Port back to GTK2
Problem reported by Sven Joachim in:
https://lists.gnu.org/r/emacs-devel/2025-12/msg00225.html
* src/xterm.c (xi_frame_selected_for):
Also define if !(defined USE_GTK && defined HAVE_GTK3).
2025-12-09 09:11:27 -08:00
Paul Eggert
05c1f34036 ; Fix confusing comment in xmenu.c. 2025-12-09 09:11:26 -08:00
Eli Zaretskii
c5bc4082b5 ; Fix a typo in xterm.[ch]. 2025-12-09 14:31:14 +02:00
Paul Eggert
d10a649e1b Pacify -Wunused-function re get_conversion_field
* src/textconv.c (get_conversion_field): Define only if HAVE_ANDROID,
since it is unused on non-Android.
2025-12-08 18:32:01 -08:00
Po Lu
238c2dc3b6 ; * src/keyboard.c (make_lispy_event): Remove unused variable. 2025-12-09 09:49:23 +08:00
Po Lu
a9018ee498 Fix builds without toolkit menu bars
* src/keyboard.c (make_lispy_event): Call x_y_to_column_row when
building internal menu bar events.

* src/xdisp.c (x_y_to_column_row): Provide DX and DY parameters
to x_y_to_column_row.
2025-12-09 09:48:53 +08:00
Paul Eggert
1c43511dbc Fix xmenu.c USE_X_TOOLKIT duplication
* src/xmenu.c (Fx_menu_bar_open_internal):
Don’t say ‘#ifdef USE_X_TOOLKIT’ inside an #if where
it is already known that USE_X_TOOLKIT is defined.
2025-12-08 10:41:50 -08:00
Paul Eggert
855ad6d870 Fix some C symbol extern visibility
Make some C symbols static if they don’t need to be extern.
Also, remove a couple of functions that were discovered to be
unused as a result of this process, and mark two extern
functions intended to be usable from GDB.
* src/buffer.c (previous_overlay_change):
* src/composite.c (composition_lisp_table):
* src/fileio.c (file_name_directory):
* src/frame.c (check_tty):
* src/insdel.c (adjust_markers_for_insert):
* src/keyboard.c (unread_switch_frame, read_char)
(requeued_events_pending_p):
* src/sysdep.c (renameat_noreplace) [!HAVE_ANDROID]:
* src/textconv.c (get_conversion_field) [!HAVE_ANDROID]:
* src/treesit.c (TREESIT_BOB_LINECOL, TREESIT_TS_POINT_1_0)
(treesit_buf_tracks_linecol_p, make_treesit_parser)
(make_treesit_node):
* src/xdisp.c (x_y_to_hpos_vpos):
* src/xfaces.c (load_color) [!MSDOS]:
* src/xfns.c (x_real_pos_and_offsets):
* src/xterm.c (x_dnd_do_unsupported_drop):
Now static.  Move up if necessary.
* src/coding.c (utf8_string_p):
* src/keyboard.c (detect_input_pending_ignore_squeezables):
Remove; unused.
* src/frame.c (gui_set_alpha):
* src/textconv.c (start_batch_edit, end_batch_edit, commit_text)
(finish_composing_text, set_composing_text)
(set_composing_region, textconv_set_point_and_mark)
(delete_surrounding_text, request_point_update)
(textconv_barrier, replace_text, get_extracted_text)
(get_surrounding_text):
* src/xdisp.c (gui_union_rectangles):
* src/xterm.c (xi_frame_selected_for):
Define only if needed.
* src/treesit.c (treesit_debug_print_parser_list)
(treesit_debug_print_linecol): Declare EXTERNALLY_VISIBLE.
* src/xdisp.c (x_y_to_column_row): New function, defined
only if needed.  All external callers to x_y_to_hpos_vpos changed.
2025-12-08 10:41:50 -08:00
Sean Whitton
44d47caa86 New 'R' code letter for 'interactive' forms
* src/callint.c (callint_argfuns): Add use-region-beginning and
use-region-end.
(syms_of_callint): Protect use-region-beginning and
use-region-end.  Add DEFSYM for Quse_region_p.
(Fcall_interactively): New 'R' code letter.
* lisp/textmodes/paragraphs.el (repunctuate-sentences):
* lisp/vc/diff-mode.el (diff-delete-other-hunks, diff-apply-hunk)
(diff-revert-and-kill-hunk, diff-apply-buffer):
* lisp/vc/log-view.el (log-view-mark-entry)
(log-view-unmark-entry): Use it.
* doc/lispref/commands.texi (Interactive Codes):
* doc/lispref/markers.texi (The Region):
* etc/NEWS:
* lisp/simple.el (use-region-beginning, use-region-end)
(use-region-p):
* src/callint.c (Finteractive): Document it.
2025-12-08 15:01:50 +00:00
David Caldwell
15d9af4f5e NS: Fix compilation on pre macOS 11 macs
* src/nsterm.m ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
Add a compile check around setToolbarStyle since it is not available
until macOS 11.0 and a run-time check in case it was compiled on
macOS >= 11.0 but run on an earlier version.  (Bug#79951)
2025-12-08 16:22:42 +02:00
Eli Zaretskii
d50fde57ba ; Fix commentary in xfaces.c
* src/xfaces.c (face_at_buffer_position)
(face_at_string_position): Fix commentary.
2025-12-08 16:19:59 +02:00
Jeremy Bryant
22bf7158a5 ; * src/.gdbinit: Improve comments of .gdbinit helper functions (bug#79932)
xgetptr: Improve comment describing helper function.
xgetint: Add comment describing helper function.
xgettype: Add comment describing helper function.
xgetsym: Add comment describing helper function.
xprintstr: Add comment describing helper function.

Co-authored-by: Eli Zaretskii <eliz@gnu.org>
2025-12-08 16:11:50 +02:00
Paul Eggert
24297f6d9a Simplify conv_sockaddr_to_lisp via strnlen
* src/process.c (conv_sockaddr_to_lisp):
Use strnlen rather than a circumlocution.
2025-12-07 23:40:12 -08:00
Po Lu
15f9050ce5 Fix the DJGPP port
* msdos/sed2v2.inp (ALIGNOF_EMACS_INT): Define to 4.

* msdos/sedlibmk.inp (OMIT_GNULIB_MODULE_fchmodat)
(OMIT_GNULIB_MODULE_issymlinkat, OMIT_GNULIB_MODULE_issymlink)
(OMIT_GNULIB_MODULE_lchmod): Define to true.

* src/gmalloc.c (__morecore, __after_morecore_hook)
(__malloc_initialize_hook): Don't declare till stddef.h has been
included for `ptrdiff_t'.
2025-12-08 10:06:29 +08:00
Paul Eggert
0d43f2a562 Align config.h better to src/lisp.h
This is mostly a cleanup patch to fix growing discrepancies
between src/lisp.h and configure.ac in terms of how they deduce
how EMACS_INT aligns.  The patch includes a static check that the
two methods now agree.  It also speeds up ‘configure’ a bit.
* configure.ac (ALIGNOF_INT, ALIGNOF_LONG, ALIGNOF_LONG_LONG):
Remove; no longer used.
(ALIGNOF_EMACS_INT): New macro.
(system_malloc): Set to 'no' more consistently with what’s
in src/lisp.h.
* src/lisp.h (ALIGNOF_EMACS_INT): Do not define here, as config.h
defines it now.  Check that config.h’s definition equals the
actual alignof (EMACS_INT).
(USE_USB_TAG): Set more consistently with what’s in configure.ac.
(alignas): Don’t second-guess Gnulib.
2025-12-07 15:45:20 -08:00
Paul Eggert
f766e8a36b Work around GCC bug 123042
* src/ccl.c: The bug occurs in GCC versions after GCC 13.
2025-12-07 15:45:20 -08:00
Paul Eggert
2b7261d7f5 Include malloc.h early in alloc.c
* src/alloc.c, src/gmalloc.c: Include <malloc.h> before <stdlib.h>.
This mimics include patterns elsewhere, and avoids a problem if
malloc.h declares realloc (i.e., rpl_realloc) early as extern,
whereas Gnulib stdlib.h declares it later as inline which means it
is extern inline, which clashes with gmalloc’s definition of
rpl_realloc when gmalloc.o is used.  Problem discovered when
building Emacs on Ubuntu 25.10 with "./configure CC='gcc -m32'
emacs_cv_struct_alignment=no gl_cv_header_working_stdalign_h=no".
2025-12-07 15:45:20 -08:00
Paul Eggert
caf0941e56 Pacify -Werror=null-dereference in ralloc.c
* src/ralloc.c (find_heap, update_heap_bloc_correspondence):
Omit unnecessary comparisons to NULL that cause GCC to warn.
2025-12-07 15:45:19 -08:00
Eli Zaretskii
300c6dc2f9 Allow volume control of system audio device on MS-Windows
* src/sound.c (Fw32_sound_volume): New function.

* etc/NEWS: Announce it.
2025-12-07 11:31:40 +02:00
Gerd Möllmann
2d459d8377 * src/comp.c (emit_EQ): Make a declaration an assignment (bug#79722) 2025-12-07 03:43:51 +01:00
Eli Zaretskii
3945654f05 Merge from origin/emacs-30
998d45d5d1 ; * lisp/calc/calc-units.el: Better reference for CODATA ...
fae83f1eb8 ; Improve documentation of 'char-script-table'
3e489ed804 ; * src/font.c (Flist_fonts): Doc fix.
4c292b6f70 ; vc-dir-clean-files: Improve docstring and message (bug#...
8a6b84dbcb Fix doc string of 'display-buffer'
2025-12-06 08:58:57 -05:00
Eli Zaretskii
8f5c26cec2 ; * src/eval.c (Ffunc_arity): Doc fix (bug#79880). 2025-12-06 12:33:44 +02:00
Jeremy Bryant
ddcbab2809 ; * src/.gdbinit: Document xfmt, a user-defined function.
Proposed in (bug#79932).

Co-authored-by: Eli Zaretskii <eliz@gnu.org>
2025-12-06 11:15:11 +02:00
Martin Rudalics
da45a474d3 Fix root frame check in store_frame_param (Bug#79947)
* src/frame.c (store_frame_param): Make sure 'minibuffer',
'parent-frame' and 'delete-before' parameters reference frame on
same terminal.  Spare GUI frames when checking root frames of
tty frames and their surrogate minibuffer frames (Bug#79947).
2025-12-06 08:54:51 +01:00
Mattias Engdegård
5e7a71d0f4 Don't emit print-circle refs for empty string and vector
The empty vector and string(s) are immutable, contain no references and
always read as the same objects.

* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Turn macro into...
(print_circle_candidate_p): ...a function, and exclude [] and "".
* test/src/print-tests.el (print-circle): Add test case.
2025-12-04 17:52:14 +01:00
Andrea Corallo
d52bf63de2 * Have comp do not use builtin_expect with libgccjit < 14 (bug#79722)
* src/comp.c (emit_EQ): Do not use '__builtin_expect' with
libgccjit < 14.
2025-12-04 17:05:23 +01:00
Rudolf Adamkovič
cbf9c58730 NS: Fix toolbar style and position
* src/nsterm.m ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
Always show the toolbar below the window title.  This is needed on
Mac OS 11+ where the toolbar style is decided by the system (which
is unpredictable) and the newfangled "compact" toolbar may be chosen
(which is undesirable).  (Bug#79900)
2025-12-04 14:16:35 +02:00