summaryrefslogtreecommitdiff
path: root/src/emacs.c
AgeCommit message (Collapse)Author
2026-05-26ARRAYELTS → countofPaul Eggert
C2y will standardize countof as the macro that Emacs uses the name ARRAYELTS for. Switch to the standard name, which is supported by GCC 16+, by Clang 21, and by the Gnulib stdcountof-h module already in use for compilers that do not support countof. Also, use countof in a few places where we missed using ARRAYELTS. * admin/coccinelle/arrayelts.cocci: Suggest countof, not ARRAYELTS. * admin/merge-gnulib (GNULIB_MODULES): Add stdcountof-h, as it is now a direct rather than an indirect dependency. * exec/trace.c, src/lisp.h, src/sfnt.c: Include <stdcountof.h>. (ARRAYELTS): Remove. All uses replaced by countof. * lib-src/ebrowse.c, lib-src/etags.c, lib-src/make-docfile.c: * lib-src/seccomp-filter.c, lwlib/lwlib-Xaw.c: Prefer <stdcountof.h> and countof to doing things by hand.
2026-05-26Omit useless casts found by GCC 16Paul Eggert
GCC 16’s -Wuseless-cast warning can be useful. Fix the useless casts it identifies, and also fix false positives by using compound literals, which are safer anyway than casts. * src/composite.c (composition_adjust_point) (Ffind_composition_internal): * lwlib/xlwmenu.c (xlwMenuResources, xlwMenuClassRec) (resource_widget_value, XlwMenuDestroy, Select): * src/alloc.c (process_mark_stack): * src/data.c (Faref): * src/emacs-module.c (module_extract_big_integer): * src/fileio.c (Finsert_file_contents): * src/frame.h (FRAME_MESSAGE_BUF_SIZE): * src/gtkutil.c (xg_tool_item_stale_p, update_frame_tool_bar): * src/image.c (pbm_load, png_load_body, jpeg_load_body) (tiff_load, gif_load): * src/pdumper.c (ptrdiff_t_to_dump_off, dump_queue_dequeue) (field_relpos, dump_field_emacs_ptr) (dump_object_start_pseudovector, pdumper_remember_scalar_impl) (pdumper_load, syms_of_pdumper): * src/regex-emacs.c (BUF_PUSH, BUF_PUSH_2, POINTER_TO_OFFSET): * src/xdisp.c (remember_mouse_glyph, pint2str): * src/xterm.c (cvt_string_to_pixel, handle_one_xevent): Omit useless casts. Perhaps they were formerly needed, but they should not be needed now. * src/alloc.c (Fmemory_info): * src/category.c (Fdefine_category, Fmodify_category_entry): * src/data.c (Fash): * src/dispextern.h (GLYPH_CODE_P): * src/emacs.c (load_seccomp): * src/fns.c (Flocale_info, maybe_resize_hash_table): * src/indent.c (check_display_width): * src/json.c (symset_size): * src/lisp.h (XUNTAG, BOOL_VECTOR_LENGTH_MAX, obarray_size) (hash_table_index_size): * src/lread.c (make_obarray, grow_obarray, Fobarray_clear): * src/menu.c (digest_single_submenu, x_popup_menu_1): * src/term.c (init_tty): * src/widget.c (update_wm_hints): * src/xdisp.c (truncate_echo_area): * src/xfns.c (x_set_border_pixel): * src/xfont.c (xfont_match, xfont_open): * src/xmenu.c (set_frame_menubar): * test/src/emacs-module-resources/mod-test.c (emacs_module_init): Use compound literal instead of a cast that is useless in some platforms but not others. * src/dispextern.h, src/haikugui.h, src/w32gui.h: (WINDOW_HANDLE_UINTPTR): New macro. * src/frame.c (gui_report_frame_params): * src/xterm.c (x_try_cr_xlib_drawable): Use it. * src/lisp.h (XUNTAG): And tag with UINTPTR_MAX to pacify gcc warning about a constant out of range. (hash_idx_t): Make it int_least32_t, as it need not be exactly 32 bits. (PRIdHASH_IDX): New macro. * src/pdumper.c (dump_queue_dequeue): Use it. * src/profiler.c (setup_cpu_timer): Make a local EMACS_INT rather than int, to avoid need for casting later. * src/syntax.c (uninitialized_interval): Use 1u rather than 1 so the cast is always useful. A compound literal wouldn’t do here, as this macro needs to be an integer constant expression. * src/xfns.c (XICCallback, XICProc): Remove macros. (Xxic_preedit_start_callback): Use a cleaner way to specify it, avoiding the need for type macros, and for a cast if HAVE_XICCALLBACK_CALLBACK. * src/xterm.c (handle_one_xevent): 2nd arg is now XEvent * on all platforms, as there is no need to diverge, and diverging meant we needed lots of unnecessary casts.
2026-05-23Prefer ptrdiff_t to size_t when either will doPaul Eggert
Signed types are a bit safer, as they avoid some comparison confusion and -fsanitize=undefined can check more misuses of them. * src/alloc.c (lisp_malloc, lisp_align_malloc) (allocate_string_data, allocate_vector_from_block, object_bytes): * src/coding.c (from_unicode_buffer): * src/decompress.c (acc_size, accumulate_and_process_md5): * src/emacs.c (load_seccomp, shut_down_emacs): * src/fns.c (sxhash_bignum): * src/ftfont.c (get_adstyle_property): * src/image.c (lookup_image, xpm_init_color_cache) (xpm_cache_color): * src/json.c (json_out_str, struct json_parser) (json_make_object_workspace_for_slow_path) (json_make_object_workspace_for, json_parse_array) (json_parse_object): * src/sysdep.c (get_current_dir_name_or_unreachable) (init_sys_modes, convert_speed): * src/termchar.h (struct tty_display_info): * src/textconv.h (struct textconv_conversion_text): * src/xfns.c (struct x_xim_text_conversion_data) (x_encode_xim_text): * src/xselect.c (struct transfer, c_size_for_format) (x_size_for_format, selection_data_for_offset) (selection_data_size, x_start_selection_transfer) (x_continue_selection_transfer): Prefer ptrdiff_t to size_t when either will do. * src/term.c (Ftty__set_output_buffer_size): Limit output buffer size to PTRDIFF_MAX as well as to SIZE_MAX.
2026-05-23Coalesce load_seccomp comparisonsPaul Eggert
* src/emacs.c (load_seccomp): One comparison, not two.
2026-05-23Plug default_PATH memory leakPaul Eggert
* src/emacs.c (default_PATH): Fix very-unlikely memory leak.
2026-05-07Move ns_init_colors() after init_callproc() (bug#80752)Zeke Dou
'data-directory' needs to be established in advance of 'ns_init_colors' to ensure the file "etc/rgb.txt" is read. This was encountered on an out-of-tree Nix build. * src/emacs.c (main): Move the 'ns_init_colors' after 'init_callproc'. Copyright-paperwork-exempt: yes
2026-04-30Always compile w32image.c on MinGW (Bug#80924)Randy Taylor
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.
2026-03-07; Move ns_init_colors from Fns_list_colors to emacs.c (bug#80377)Stéphane Marks
Support calls to ns_lisp_to_color or Fns_list_colors in headless environments where ns_term_init is not called, and calls before ns_term_init runs. * src/emacs.c (main): Call ns_init_colors when not in dump mode. * src/nsfns.m (ns_init_colors): Make public function. (Fns_list_colors): Remove ns_init_colors call. * src/nsterm.h: extern ns_init_colors.
2026-02-28Don’t stuff keyboard input uselesslyPaul Eggert
Also, document stuffing better. * src/keyboard.c (stuff_buffered_input): Give up on stuffing if it fails. * src/sysdep.c (stuff_char): Return failure indication.
2026-02-28Document that string ARG of 'kill-emacs' might not workEli Zaretskii
* src/emacs.c (Fkill_emacs): * doc/lispref/os.texi (Killing Emacs): Document that EXIT-DATA being a string doesn't always work. (Bug#80435)
2026-01-01; Add 2026 to copyright years.Sean Whitton
2025-08-02Port better to Linux with 1 MiB pagesPaul Eggert
* src/lisp.h: Include <sys-limits.h>. (MAX_RW_COUNT): Remove, as it is the same thing as sys-limits.h’s SYS_BUFSIZE_MAX. All uses replaced by SYS_BUFSIZE_MAX.
2025-07-27; * src/emacs.c (default_PATH) [DOS_NT]: Add commentary.Eli Zaretskii
2025-07-27Better default PATH on MS-WindowsPaul Eggert
* src/emacs.c (default_PATH): Use a more-reasonable default for MS-Windows and DOS. Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2025-07/msg00384.html
2025-07-26Add readlink, realpath startup commentsPaul Eggert
This does not change behavior. * src/emacs.c (follow_if_symlink): New static function, as a vehicle for commentary explaining the deal with readlink and realpath. (find_emacs_executable): Use it.
2025-07-24PATH defaults now act more like GNU and POSIXPaul Eggert
When PATH is unset or empty, use the system default, to be consistent with GNU/Linux and with POSIX. If there is no system default do not default to "." as that can be dangerous. * src/callproc.c (init_callproc_1, init_callproc): Default PATH to the null pointer, not the empty string. * src/emacs.c (default_PATH): New function. (find_emacs_executable, decode_env_path): Be consistent with POSIX and with glibc about what to do when PATH is unset or empty.
2025-07-24Treat ‘.../emacs’ like ‘emacs’ in realpath startupPaul Eggert
* src/emacs.c (find_emacs_executable): If the executable name contains a slash, use the same optimization for symlink resolution that we already use when the executable name has no slash.
2025-07-24Prefer readlink to lstat in find_emacs_executablePaul Eggert
* src/emacs.c (find_emacs_executable): Prefer readlink to lstat when testing whether a file is a symlink. This avoids EOVERFLOW issues.
2025-07-24Fix minor memory leak in find_emacs_executablePaul Eggert
* src/emacs.c (find_emacs_executable): Free candidate if unused.
2025-07-21Refactor by coalescing MAX_RW_COUNT definitionsPaul Eggert
* src/emacs.c (read_full): Simplify by assuming MAX_RW_COUNT is defined. * src/lisp.h (MAX_RW_COUNT): Move here from src/sysdep.c. * src/pdumper.c (dump_read_all): Use MAX_RW_COUNT rather than defining our own equivalent.
2025-04-19Pacify GCC 15 -Wanalyzer-null-dereferencePaul Eggert
* src/emacs.c (find_emacs_executable): Add an eassume. This pacifies -Wanalyzer-null-dereference with gcc (GCC) 15.0.1 20250329 (Red Hat 15.0.1-0).
2025-04-13Use a pristine copy of argv to restart EmacsJens Schmidt
argv as left after main has proccessed the command-line can differ both in order and contents of the original command-line arguments, which can lead to surprising results when restarting emacs on the cooked argv through `kill-emacs'. Starting from that observation, consistenly use variables 'initial_cmdline' on Windows, 'initial_argc', 'initial_argv' on non-Windows, and 'initial_argv0' in all ports. * src/lisp.h: Declare 'initial_argv0', limit declaration of 'initial_argv' and 'initial_argc' to non-Windows ports. * src/emacs.c: Likewise, but for the definitions. (init_cmdargs): Move initialization of 'initial_argv' and 'initial_argc' ... (copy_args) [!WINDOWSNT]: ... to this new function ... (main): ... and call that in 'main', also initializing 'initial_argv0' before the command-line processing. * src/emacs.c (Fkill_emacs): * src/pgtkterm.c (pgtk_term_init): * src/sysdep.c (emacs_perror): * src/xterm.c (x_term_init): Use 'initial_argv0' where only that is required. (Bug#77389)
2025-03-09Re-port to 32-bit systems without alignment primitivesPo Lu
* configure.ac (ALIGNOF_INT, ALIGNOF_LONG, ALIGNOF_LONG_LONG): New variables. (emacs_cv_alignas_unavailable): Define if alignas and structure alignment primitives are unavailable. In such an environment, the MSB tagging scheme must be enabled, as must the GNU malloc. * msdos/sed2v2.inp: Adjust correspondingly. * src/alloc.c (union emacs_align_type): Remove types which contain flexible array members. The address of a field subsequent to an aggregate with flexible array members cannot validly be taken. (mark_memory) [!USE_LSB_TAG && !WIDE_EMACS_INT]: Strip type bits before scanning memory. * src/emacs.c (main): * src/eval.c (Fautoload_do_load): * src/fns.c (Frequire): Rename a number of illogically named fields. * src/lisp.h (ALIGNOF_EMACS_INT): Define to the natural alignment of EMACS_INT. (IDEAL_GCALIGNMENT): New macro. (USE_LSB_TAG): Disable if no alignment specifiers are available, WIDE_EMACS_INT is undefined, and the natural alignment of EMACS_INT falls short of LSB tagging's requirements. (gflags): Rename illogically named fields and don't define them as bitfields, which runs afoul of certain compiler issues. (will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p) (dumped_with_pdumper_p): Adjust accordingly. * src/pdumper.c (VM_SUPPORTED): Define to 0 when !USE_LSB_TAG. It is better to read dump files into the heap by hand than to be supplied with an address that is not representable. (_dump_object_start_pseudovector): Rename to dump_object_start_pseudovector, to avoid encroaching on reserved names. (START_DUMP_PVEC): Adjust correspondingly. (dump_mmap_contiguous_vm): Preserve errno around failure cleanup. (dump_bitset_bit_set_p): Work around certain compiler issues. (pdumper_load) [!USE_LSB_TAG]: Reject dump file allocations that are not representable as Lisp_Objects. Tested on i386-unknown-solaris2.10, sparc-sun-solaris2.10.
2025-02-22; Fix typosStefan Kangas
2025-02-20Port to modern GCC and pdumper on MS-DOSPo Lu
* config.bat (mvOk): Protoize. (djgppOk): Include sys/version.h for _DJGPP_MINOR. * lisp/loadup.el: If system-type is ms-dos, dump bootstrap-emacs as b-emacs.dmp. * msdos/INSTALL: Document new versions of tools that have been verified successfully to compile Emacs. * msdos/emacs.djl: New linker script that arranges to link symbols in `.subrs' in a contiguous part of data, as the DJGPP runtime appears to treat any non-data and non-text section as allocatable. * msdos/mainmake.v2 (install): Install emacs.dmp alongside emacs.exe. * msdos/sed1v2.inp (CFLAGS): Define to -O2 -g3. (LDFLAGS): Provide the said linker script. (HAVE_PDUMPER): Define to yes. (UNEXEC_OBJ, PAXCTL_dumped, PAXCTL_notdumped): Delete. (DUMPING): Set to pdumper. (MAKE_PDUMPER_FINGERPRINT): Don't erase this variable. Don't stubify or set minstack. Remove native-comp specific directives. Don't remove temacs prior to copying and replace `pdmp' extension with DOS-conformant `dmp'. * msdos/sed2v2.inp (HAVE_UNEXEC): Remove definition. (HAVE_PDUMPER): Define to 1. * msdos/sed6.inp (top_srcdir): Define appropriately. * msdos/sedlibmk.inp (HAVE_BLKCNT_T): Define to 1. * src/emacs.c (load_pdump) [MSDOS]: Use `dmp' suffix. * src/pdumper.c (Fdump_emacs_portable) [MSDOS]: Replace ".pdmp" suffixes with ".dmp".
2025-02-01Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas
2025-01-19Remove workaround for AIX 3.2 crashesStefan Kangas
Emacs does not support AIX 3.2 since 2008. This workaround for AIX 3.2.3 and 3.2.4 (released in 1992) was introduced in 1999 and was only active with #ifdef AIX3_2. In 2008, the condition was changed to #ifdef AIX when support for these older AIX versions was dropped. I couldn't find any justification for why this workaround was retained (instead of being removed) in the commit message or mailing list archives. Given that users of AIX 4.0 (released in 1995) or later have not had this workaround for over a decade (1999-2008), it seems safe to assume that it is no longer necessary. Removing it will also prevent the incorrect overriding of the LANG variable on those systems. * src/emacs.c [AIX] (main): Remove workaround for AIX 3.2. (Bug#75153)
2025-01-19Replace call[1-8] with callnStefan Kangas
Since the introduction of the 'calln' macro, the 'call1', 'call2', ..., 'call8' macros are just aliases for the former. This is slightly misleading and potentially unhelpful. The number of arguments N can also easily go out-of-synch with the used alias callN. There is no reason not to replace these aliases with using 'calln' directly. To reduce the risk for mistakes, the tool Coccinelle was used to make these changes. See <https://coccinelle.gitlabpages.inria.fr/website/>. * src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c: * src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c: * src/chartab.c, src/cmds.c, src/coding.c, src/composite.c: * src/data.c, src/dbusbind.c, src/dired.c, src/doc.c: * src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c: * src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c: * src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c: * src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c: * src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c: * src/pgtkselect.c, src/print.c, src/process.c, src/sort.c: * src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c: * src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c: * src/xmenu.c, src/xselect.c, src/xterm.c: Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
2025-01-05Fix setup of coding-systems on MS-WindowsEli Zaretskii
* src/emacs.c (main) [HAVE_PDUMPER] [WINDOWSNT]: Call 'w32_init_file_name_codepage' again after loading the pdumper file. * src/w32.c (w32_init_file_name_codepage) [HAVE_PDUMPER]: Reinitialize additional variables. (Bug#75207)
2025-01-01Update copyright year to 2025Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2024-12-16Invert preprocessor condition to fix 'C-x 4 a'Stefan Kangas
Typing 'C-x 4 a' in the main function now correctly adds 'main' to the generated ChangeLog, whereas before it added 'andreid_emacs_init'. Inverting the preprocessor condition seems like an easier fix than changing the add-change-log-entry-other-window heuristic. * src/emacs.c (main): Invert preprocessor condition to appease the 'add-change-log-entry-other-window' heuristic.
2024-12-12Don't recognize "bootstrap" option for --temacsPip Cet
This option only makes sense for unexec dumping. * src/emacs.c (main): Recognize "pbootstrap" only, not "bootstrap".
2024-12-12Pure storage removal: Main partPip Cet
* src/alloc.c (pure, PUREBEG, purebeg, pure_size) (pure_bytes_used_before_overflow, pure_bytes_used_lisp) (pure_bytes_used_non_lisp): Remove definitions. (init_strings): Make empty strings impure. (cons_listn): Drop 'cons' argument. (pure_listn): Remove function. (init_vectors): Allocate zero vector manually to avoid freelist issues. (pure_alloc, check_pure_size, find_string_data_in_pure) (make_pure_string, make_pure_c_string, pure_cons, make_pure_float) (make_pure_bignum, make_pure_vector, purecopy_hash_table): Remove functions. (purecopy): Reduce to hash consing our argument. (init_alloc_once_for_pdumper): Adjust to lack of pure space. (pure-bytes-used): Adjust docstring to mark as obsolete. (purify-flag): Keep for hash consing, but adjust docstring. * src/bytecode.c: * src/comp.c: Don't include "puresize.h". * src/conf_post.h (SYSTEM_PURESIZE_EXTRA): Remove definition. * src/data.c (pure_write_error): Remove function. * src/deps.mk: Remove puresize.h dependency throughout. * src/emacs.c: * src/fns.c: * src/intervals.c: * src/keymap.c: Don't include "puresize.h". * src/lisp.h (struct Lisp_Hash_Table): Adjust comment. (pure_listn, pure_list, build_pure_c_string): Remove. * src/w32heap.c (FREEABLE_P): Don't do use 'dumped_data'. (malloc_before_dump, realloc_before_dump, free_before_dump): Remove functions. * src/w32heap.h: Adjust prototype. * lisp/loadup.el: * lisp/startup.el: Remove purespace code.
2024-12-12Unexec removal: Adjust and simplify W32-specific codePip Cet
* src/emacs.c (main): Unconditionally call 'init_heap' without an argument. Adjust comment. * src/w32heap.c (dumped_data, DUMPED_HEAP_SIZE): Remove definitions. (heap): Remove variable. (dumped_data_commit): Remove function. (init_heap): Drop unexec-specific code.
2024-12-12Unexec removal: Remove HYBRID_MALLOC supportPip Cet
* src/gmalloc.c (gdefault_morecore): Remove HYBRID_MALLOC code. (allocated_via_gmalloc, hybrid_malloc, hybrid_calloc, hybrid_free_1) (hybrid_free, hybrid_aligned_alloc, hybrid_realloc): Remove functions. * msdos/sed1v2.inp: * msdos/sedlibmk.inp: * src/alloc.c (GC_MALLOC_CHECK, USE_ALIGNED_ALLOC) (refill_memory_reserve, aligned_alloc): * src/emacs.c (main): * src/lastfile.c (my_edata): * src/lisp.h: * src/ralloc.c: * src/sysdep.c (get_current_dir_name_or_unreachable): * src/xdisp.c (decode_mode_spec): Remove HYBRID_MALLOC conditions. * configure.ac (hybrid_malloc, HYBRID_MALLOC): Remove variables and dependent code. * src/conf_post.h (hybrid_malloc, hybrid_calloc, hybrid_free) (hybrid_aligned_alloc, hybrid_realloc): Remove conditional prototypes. * src/Makefile.in (HYBRID_MALLOC): Remove variable. (base_obj): Remove sheap.o (LIBEGNU_ARCHIVE): * lib/Makefile.in (libgnu_a_OBJECTS): Remove libegnu.a support.
2024-12-12Unexec removal: Main partPip Cet
* configure.ac: Remove unexec-specific parts. (EMACS_CONFIG_FEATURES): Always report that we do not have the UNEXEC feature. (AC_ECHO): No longer display a line about the unexec feature. * lisp/loadup.el: * lisp/startup.el: Remove unexec-specific code. * src/Makefile.in (base_obj): Drop 'UNEXEC_OBJ'. * src/alloc.c (staticvec): Never initialize this variable. (BLOCK_ALIGN): Always allow large blocks. (mmap_lisp_allowed_p): Remove unexec-specific code. * src/buffer.c (init_buffer): * src/conf_post.h (ADDRESS_SANITIZER): * src/emacs.c (load_pdump, main): Remove unexec-specific code. (Fdump_emacs): Remove function. (syms_of_emacs): Remove 'Fdump_emacs'. * src/lastfile.c: Remove unexec-specific code. * src/lisp.h (gflags): Remove unexec-specific flags. (will_dump_p, will_bootstrap_p, will_dump_with_unexec_p) (dumped_with_unexec_p, definitely_will_not_unexec_p): Remove or adjust predicates. (SUBR_SECTION_ATTRIBUTE): Remove unexec-specific definition. * src/pdumper.c (Fdump_emacs_portable): Remove unexec-specific warning. * src/process.c (init_process_emacs): Remove !unexec condition * src/sysdep.c (maybe_disable_address_randomization): Adjust comment. (init_signals): * src/timefns.c (init_timefns): Remove unexec-specific code. * src/w32heap.c (report_temacs_memory_usage): Remove function. * src/w32heap.h: Adjust comment. * src/w32image.c (globals_of_w32image): Remove unexec-specific code.
2024-10-26Fix bootstrap on MS-WindowsEli Zaretskii
* src/w32uniscribe.c (syms_of_w32uniscribe): Don't call 'syms_of_w32dwrite' here... * src/emacs.c (main): ...call it here. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2024-08-17Merge from savannah/emacs-30Po Lu
6a512ab032e Fix a typo in Eglot manual 7b752a93a46 Fix dumping of Lisp profiles bfe07eca598 Fix 'apropos-library' for 'define-symbol-props' 5c1bd991396 Fix 'forward-comment' in 'toml-ts-mode' e966dd5ee2c Document spell-checking of multiple languages 8a072d1f05b Apply --display kluge for PGTK too
2024-08-17Apply --display kluge for PGTK tooPeter Oliver
* src/emacs.c (main): The --display option needs the same handling with the PGTK backend as it does with the X11 backends. (Bug#72118)
2024-07-18Merge from savannah/emacs-30Po Lu
4c35382e983 ; * src/emacs.c (syms_of_emacs) <Vsystem_type>: Fix doc s... 34882d52432 Port better to Android 3.0 765cfaed775 ; * doc/emacs/anti.texi (Antinews): Fix typos (bug#72167). 7093504da2d ; Fix typos (bug#72167) 8c7c4f4baaa New Tramp tests 85d2d7982d4 Update Tramp manual 504bdd560af ; Fix last change 3ccebbe17b7 Fix 'toggle-window-dedicated' documentation 719d5753ca6 ; * doc/lispref/help.texi (Keys in Documentation): Add cr... e3bba63ecb9 Checkdoc fixes in transient.el
2024-07-18; * src/emacs.c (syms_of_emacs) <Vsystem_type>: Fix doc string indentation.Po Lu
2024-07-05Merge from savannah/emacs-30Po Lu
334d5132207 (edebug--called-interactively-skip): Fix bug#71934 6e8b9ccaec2 ; * lisp/ibuffer.el (ibuffer-mode): Doc fix. 3eaf1abbff8 Fix MS-Windows build with native-compilation fc375359edd Tag dbus-test05-register-signal-with-nils as unstable 99230d7080f ; * src/w32fns.c (funhook): Restore mistakenly lost line. 81a7358a33b Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... b085d683962 Fix treesit test (bug#71907) f39cf0beb74 Focus more on MS-Windows than MS-DOS in FAQ d64396b8e42 Autoload some string functions bd482b745aa Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... b5341831353 * etc/NEWS: Fix typos. 850fc68481a ; (grep-read-files): Fix completion table 28532599358 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... 921d40759e5 Remove a reference to a non-existant variable from a doc-... 5d2a115ab03 ; * src/fns.c (value_cmp): ASCIIfy.
2024-07-03Fix MS-Windows build with native-compilationEli Zaretskii
* src/w32.c (globals_of_w32): Move re-initialization of Vlibrary_cache from here... * src/emacs.c (main): ...to here, as it must be after load_pdump. (Bug#71916)
2024-06-30Merge from savannah/emacs-30Po Lu
64851d101a8 Improve Android "adaptive icon" 9b294059d71 Fix documentation for Emacs 30 f50167ab95e ; Update NEWS and corresponding manuals 4e22ef870c4 Add D-Bus test f784d946d44 ; Repair corruption in etc/DEBUG c750fbb539e ; * etc/DEBUG: Advice for debugging Emacs on OpenBSD (bug... 38179f85f8f Merge remote-tracking branch 'savannah/scratch/windows-98... 72cf9964f3c Inaccuracy in efaq.texi fc48e9e8ed5 ; Fix typos in DOS Makefile scripts 9b8d754579f ; * etc/NEWS: Explain Nextstep. 8819e5a45d5 Fix treesit crash (bug#71681) eaf2dc96c1f ; Fix SHR test on MS-Windows 57880f597c5 Delete redundant mention of `with-eval-after-load' ea8ce984342 * doc/misc/efaq.texi (New in Emacs 30): Fix typos. 45a20d781a9 ; Fix typos in symbols d95f039af43 Document security fixes in FAQ d063af203c8 Add "New in Emacs 30" to FAQ ca6b484162b ; * etc/NEWS: Move "Minibuffer and Completions" 35c46663e49 ; * etc/NEWS: Move item to "Lisp Changes". 0515b38d289 ; * etc/NEWS: Move keyboard macro items closer together. 22af3a71039 ; * etc/NEWS: More copy-edits. 000ef8876ae ; * etc/NEWS: Move items to "Incompatible Lisp Changes". 4088dc8e4ce ; * etc/NEWS: Rearrange "Incompatible Lisp Changes". 179800f36bb ; * lisp/epg.el (epg--start): Add commentary about encoding. 73898f0214c Fix non-ASCII filename operatiion on EasyPG (bug#71500) a65b6aac6b5 Silence warning with global minor mode :predicate f5f7343ac41 ; * etc/NEWS: Move an item to "Startup Changes" c95066bf188 ; * etc/NEWS: Move some Lisp items to better place. bf7db88ce1f ; * etc/NEWS: Rearrange "Editing Changes in Emacs 30.1" 000424eb9eb ; * etc/NEWS: Make touch screen support more prominent. 5b5671587fb ; * etc/NEWS: Rearrange "Changes in Emacs 30.1". 31124abdefe ; * lisp/thingatpt.el (sexp-at-point): Doc fix (bug#71777). 44f269d6e60 Fix: make 'xwidget-webkit-scroll-backward' scroll backwards 358085997c6 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... 736b7cad406 Add jsdoc support to php-ts-mode in <script> element 5f3d964e397 Update to Transient v0.7.2-4-gf75bc48d 2d8881d5267 Fix typo incurring leaks of face structures 219501dd629 ; Fix use of @footnote in cc-mode.texi c7be2dcac44 Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ... f0a48799756 Sync with Tramp 2.7.1 53dcf2b9492 ; * etc/NEWS: Move the mwheel entry to a better place. a5726782d03 ; Sort tree-sitter modes in NEWS daa89dc939e ; * etc/NEWS: Rearrange "New Modes and Packages in Emacs ... 4ddbf4f70ef ; * etc/NEWS: Move many items. 437b1ced268 ; * etc/NEWS: Copy-edits. 7372b2eb302 Expand docstring of which-key-mode df0eb5be1ea Improve documentation of 'remove-overlays' in ELisp manual 73c1252bb6b Fix link to major mode variable in docstring c4ad54812ac Make `shell-mode' more robust c4ec905c9a9 Correct ommissions in rmc.el bf862fc2770 * lisp/hi-lock.el: More fixes related to revert-buffer. 6cc8ffae9a6 Update to Org 9.7.5-9-ga091ca c477443ab80 ; Fix typo in lua-ts-mode.el 6e5e4d61939 ; Add 'eglot-ensure' option to 'lua-ts-mode-hook' 58a2f36a8b9 ; * etc/NEWS: Copy edit. df53ef176ac Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... 039e6ffd866 Write Antinews for Emacs 30 ELisp Reference bf8c9f702ba (eval-last-sexp): Fix bug#71774 6d94090cadc * lisp/hi-lock.el: More fixes for revert-buffer (bug#57534) 280c91782af * lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Im... 339310d0205 * lisp/tab-bar.el (tab-bar-select-restore-windows): Impro... c1e7569a925 Write Antinews for Emacs 30 user manual 233f683da8f ; * lisp/erc/erc-backend.el (erc-server-reconnect-timeout... 20a672b3b2b Change ERC version for Emacs 30 to 5.6.0.30.1 cbede3d43df * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper): ... 6f9f9a21555 Fix two tests for --without-all build 98daa10f065 ; * etc/PROBLEMS (PGTK): Remove redundant 2nd PGTK section. ced33bc2397 Fix handling of non-nil 'dired-movement-style' b1e9b6fd67d ; * lisp/gnus/message.el (message-idna-to-ascii-rhs): Doc... 5eb9a0d2c79 ; * etc/NEWS: Fix last change (bug#71720). 6ec77f580dd Do not prematurely truncate python eldoc string f475a1a2544 ; Fix simple-tests as fallout of last change aa10d0c5ac1 Add tests for `kill-whole-line' (bug#65734) 058bb4ca25a kill-whole-line: Honor visibility; fix kill-ring when rea... e45173d114e * lisp/hi-lock.el (hi-lock-file-patterns-policy): Add val... d6afb017deb * lisp/progmodes/xref.el (xref-revert-buffer-restore-poin... 8d55b38e2a1 Fix Cygwin build 82125b1a661 Use 'revert-function' in *xref* buffer 860840621a1 Prevent crashes and related issues if initial activity is... d5c6eb1f964 Doc fix in 'php-ts-mode' fb15affde8c Avoid compiler warnings in the Cygwin-w32 build 8d354925ddb Add new face 'widget-unselected' to wid-edit.el 1809f6a93ef Always perform Eshell process cleanup runs in the Eshell ... 8b1841021c0 Avert crash in store_mode_line_string on Android 5.0 and ... e7c85f9235a Use HarfBuzz in Cygwin-w32 build 8e3e206bd32 ; * src/buffer.c (syms_of_buffer) <mode-line-format>: ASC... fe0d9dfb3b1 ; * lisp/treesit.el (treesit--syntax-propertize-start): F... 2f18929319a Fix tabbing between widgets (bug#70594) 6ad6507532b ; * lisp/which-key.el (which-key-dont-use-unicode): Add :... 60b38c317bb * lisp/touch-screen.el (touch-screen-inhibit-drag): Anoth... a4ca30ac2e0 Fix rescaling of images via 'text-scale-mode' in EWW 0e43606b20d * lisp/touch-screen.el (touch-screen-inhibit-drag): Fix t... 1b4c5627211 Fix latent side-effects of respecting field boundaries in... e4046f33ab8 ; * lisp/simple.el (undo-auto--boundaries): Doc fix (bug#... 008eeb21fdb ; * lisp/language/cyrillic.el: Delete obsolete commentary... 680155d3f03 Add missing builtin package declarations ce4f56caf71 Extend treesitter tests on emba 7e8a97ac788 Show entries from key-translation-map in which-key mode 4a0958642d9 * lisp/tab-bar.el (tab-bar-tab-group-face-function): Impr... a769f171e7e ; Fix flymake tests with GCC 14. 96e27c2ecf9 Don't show char name for multi-char translations 0715abfa86a Reset ls-lisp-use-string-collate when ls-lisp-emulation c... 4fcc38966bf Update to Transient v0.7.2-1-gf273c0c8 b7d5ca3a8fb * doc/misc/calc.texi (Musical Notes): Fix typo. 164f75822b2 ; Fix typos 768e92b9c02 Update options that depend on 'which-key-dont-use-unicode' 4b2682b17cd ; Remove debugging message in Completion Preview test 73a58329a69 Fix omission of updates to child frames on Android 0edacf2aa7e Add jsdoc support to js-ts-mode cace0cbee93 ; Restore inadvertently removed line. 2b04effb13d ; * test/lisp/net/shr-tests.el (shr-test--rendering-check... 6619aec6bca ; Don't run new 'shr-test/zoom-image' when built without ... 5d19bfda321 ; * admin/release-branch.txt: Update and fix typo. fb11294d415 ; Fix typos d9bd1718f9a Backport: Minor changes in tramp-tests.el 1728de5a776 Backport: Tramp: Fix bug#71709, and other minor changes dd0fc6aff60 New branch emacs-30 bc72c33ac38 * admin/admin.el: (set-version): Fix regexp for configure... 60475a73d17 Disable Ffile_system_info for Android special directories 18e7a9f3d0c Restore functionality on Windows 98 5f8a9cd4b6f Fix a bug in 'switch-to-buffer' 5f9b5803bea Fix zooming images in SHR 6f2036243f2 ; Doc fix in 'php-ts-mode'. 2f1c882a16e Colorize CSS property value like `css--fontify-region' dd0994aa36c Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 486ea8ef5ac * configure.ac: Disable kqueue on Haiku. 737fa7c5292 Fix 'Customize' menu entry for 'php-ts-mode' cb7be6035ee Fix compilation on prerelease versions of Haiku 2b848a4e504 Fix FIXME in comment 77e3a56507d Update SKK-JISYO.L from upstream e5bae788614 Update publicsuffix.txt from upstream bf5f74288b7 Add assignment form as `etc/copyright-assign.txt` fcd37988048 ; Merge from origin/emacs-29 0f01cb0ebd1 Bump Emacs version to 29.4.50 014aab9847a Fix for grammar change of keyword "virtual" in tree-sitte... fa364a0d469 Revert "; * etc/HISTORY: Delete never-released Emacs 28.3." a81417e5766 Update Tramp version (don't merge to master) ff389163ee8 Manually merge NEWS.29 from emacs-29 ea057131220 ; * etc/HISTORY: Delete never-released Emacs 28.3. d3469978b89 Merge from origin/emacs-29 3739342a4e9 ; Merge from origin/emacs-29 38e738a35eb Merge from origin/emacs-29 4c4c94fa105 ; Merge from origin/emacs-29 1313b8966ae Merge from origin/emacs-29 4a76af51bb6 Replace literal whitespace with `\s` e41dd2241f7 ; Merge from origin/emacs-29 8520ec829d3 ; * lisp/editorconfig.el (editorconfig-indentation-alist)... 99161fb7140 Fix non-existing `editorconfig-set-indentation-python-mode` fd15d89ec51 Merge remote-tracking branch 'origin/emacs-29' into emacs-29 6a299b3cace Release Emacs 29.4 3f3c08bcc76 Add before-save-hook to man page files 7b0e6cb3ffa Use UTC when generating man page timestamps a7cb642a9fc Merge from origin/emacs-29 6491d11b53a ; Merge from origin/emacs-29 2f39a4b28a9 Merge from origin/emacs-29 150e2b979c1 ; * src/xfns.c (unwind_create_frame): Add missing definit... 75fdeef7b49 Allow to expand truncated long lines in *Compilation* buf... fb1b188e1ad Eglot: Fix command execution (bug#71642) 155cc89de02 Support for indentation of PHP alternative syntax control... 7f7b28a2500 ; Wayland SECONDARY selection problem 11fb3510f48 Prevent auto-revert when deleting entry (bug#71264) a4fe4ca93cf Fix font lock regex for user defined constant in PHP e1ba4ebb495 Make Compilation mode recognize non-legacy Kotlin/Gradle ... 4f030834994 ; Improve documentation of EditorConfig support c0bfe429485 List Andrea Corallo as co-maintainer in ack.texi b3d6880512f * admin/MAINTAINERS: Add myself in (co-)maintainers. 7cc939bf27e ; * lisp/ldefs-boot.el: Regenerated for Emacs 29.4 959eacc2a70 Bump Emacs version to 29.4 9a02fce714c Update files for Emacs 29.4 d96c54d3883 * admin/authors.el: Update for Emacs 29.4 fd207432e50 * etc/NEWS: Update for Emacs 29.4 c645e1d8205 org-link-expand-abbrev: Do not evaluate arbitrary unsafe ... 50a237c4689 Update Tramp version (don't merge to master) f3e80dd0f70 * admin/emacs-shell-lib: Backport to Bash 4.4 or older. ce85d3811da Fix bug#49289 also for other auth-source backends # Conflicts: # etc/NEWS
2024-06-30Assume setlocale existsPaul Eggert
Like locale.h, it was standardized by C89, is universally available now, and some code already assumes it. * configure.ac: Do not check for setlocale. * src/emacs.c (setlocale) [!HAVE_SETLOCALE]: Remove. (fixup_locale, synchronize_locale, Vprevious_system_time_locale) (synchronize_system_time_locale): Define even if !HAVE_SETLOCALE. * src/sysdep.c (emacs_setlocale): Simplify by assuming HAVE_SETLOCALE.
2024-06-30Do not worry about whether locale.h is includablePaul Eggert
* src/emacs.c, src/lread.c, src/sysdep.c: Remove preconditions from including locale.h. It was standardized in C89, is universal now, and some code already assumes it.
2024-06-23Restore functionality on Windows 98Po Lu
* configure.ac (W32_LIBS): Don't link with -lusp10 on non-Cygwin systems. * src/emacs.c (main): Call globals_of_w32 before the startup directory is initialized. * src/w32.c (maybe_load_unicows_dll): Call load_unicows_dll_for_w32fns. * src/w32.h: Update prototypes. * src/w32fns.c (Fx_create_frame, w32_create_tip_frame): Do not register the Uniscribe font driver when unavailable. (pfnSHFileOperationW): New function pointer. (Fsystem_move_file_to_trash): Load UNICOWS.DLL if not yet loaded. Call SHFileOperationW through said function pointer. (pfnShellExecuteExW): New function pointer. (Fw32_shell_execute) [!CYGWIN]: Load UNICOWS.DLL if not yet loaded. Call ShellExecuteExW through said function pointer. (pfnShell_NotifyIconW): New function pointer. (add_tray_notification, delete_tray_notification): Call Shell_NotifyIconW through said function pointer. (Fw32_notification_notify): Load UNICOWS.DLL. (Fw32_notification_close): Return if Shell_NotifyIconW is unavailable, as when UNICOWS.DLL has yet to be loaded. (load_unicows_dll_for_w32fns): New function. * src/w32notify.c (pfnReadDirectoryChangesW): New function pointer. (watch_completion, remove_watch, Fw32notify_add_watch) (Fw32notify_rm_watch, Fw32notify_valid_p): Call ReadDirectoryChangesW through said function pointer, and assert its presence. (globals_of_w32notify): Load ReadDirectoryChangesW from KERNEL32.DLL. * src/w32uniscribe.c (pfnScriptItemize, pfnScriptShape) (pfnScriptPlace, pfnScriptGetGlyphABCWidth, pfnScriptFreeCache) (pfnScriptGetCMap): New function pointers. (uniscribe_close, uniscribe_shape, uniscribe_encode_char) (uniscribe_check_otf_1): Call Uniscribe functions through the same. (syms_of_w32uniscribe_for_pdumper): Load Uniscribe library and required functions from the same, and if unavailable, return while leaving uniscribe_available intact. On Cygwin, simply assign USP10.DLL functions to the said new function pointers.
2024-06-11; * src/emacs.c (Fkill_emacs): Doc fix.Eli Zaretskii
2024-06-07Unbreak the Cygw32 buildEli Zaretskii
It was broken by latest changes to w32image.c. * src/emacs.c (main): Call 'syms_of_w32image' and 'globals_of_w32image' only if native image APIs are enabled. (Bug#71412)
2024-05-30Support built-in thumbnail creation on MS-WindowsEli Zaretskii
* src/w32image.c (get_encoder_clsid, Fw32image_create_thumbnail) (globals_of_w32image, syms_of_w32image): New functions. * src/emacs.c (main): Call 'syms_of_w32image' and 'globals_of_w32image'. * src/w32term.h (syms_of_w32image, globals_of_w32image): Add prototypes. * lisp/image/image-dired.el (image-dired-thumbnail-display-external): Add a fallback for MS-Windows. * lisp/image/image-dired-external.el (image-dired--probe-thumbnail-cmd): New function. (image-dired--check-executable-exists): Call it to verify that "convert" is indeed an Imagemagick program. New argument FUNC specifies a function that can be used as an alternative to running EXECUTABLE. (image-dired-create-thumb-1): Don't call 'image-dired--check-executable-exists' here, ... (image-dired-thumb-queue-run): ...call it here, with 'w32image-create-thumbnail' as the alternative function. If on MS-Windows and no "convert" command, call 'image-dired-create-thumb-2' instead. (image-dired-create-thumb-2): New function. * etc/NEWS: Announce the thumbnail support.