aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Rearrange Android splash screen messagesPo Lu2024-03-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/startup.el (fancy-startup-tail, fancy-startup-screen) (normal-splash-screen): Adjust for function renaming; move the storage permissions notice to the top of the splash screen. * lisp/term/android-win.el (android-after-splash-screen): Rename from android-before-splash-screen and adjust layout lightly. * src/android.c (android_wc_lookup_string): Terminate character composition after a character is returned, whether it contain a Unicode character or not.
* | Revert "Replace XSETSYMBOL with make_lisp_symbol"Mattias Engdegård2024-03-045-21/+31
| | | | | | | | | | | | | | | | This reverts commit de6b1e1efb1a36c69e7a6e09297e1de5b1477121. While it did simplify code, there aren't much in the way of technical benefits the change at this time, and there were protest against the unwarranted style change.
* | Avoid crashes due to base-less indirect bufferEli Zaretskii2024-03-041-2/+10
| | | | | | | | | | * src/buffer.c (Fkill_buffer): Prevent killing a buffer if its indirect buffer refuses to be killed. (Bug#69529)
* | Fix 'set-window-configuration' and 'window-state-put'Martin Rudalics2024-03-042-6/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some bugs with 'window-state-put' (Bug#69093). Add new hook 'window-kept-windows-functions' (Bug#68235). * doc/lispref/windows.texi (Window Configurations): Mention 'window-kept-windows-functions'. (Window Hooks): Describe new abnormal hook 'window-kept-windows-functions'. * src/marker.c (Fmarker_last_position): New function to return the last position of a marker even if its buffer is now dead. * src/window.c (Fset_window_configuration): If 'window-kept-windows-functions' is non-nil, do not delete any window whose buffer is now dead but remember all such windows in a list to pass to 'window-kept-windows-functions'. Run 'window-kept-windows-functions' if it is non-nil. (Vwindow_kept_windows_functions): New abnormal hook run by Fset_window_configuration and 'window-state-put' with two arguments - the frame whose configuration is restored and a list of entries for each window whose buffer was found dead during restoration. Each entry is a list of four elements, the window, the dead buffer, and the last know positions of the start and point of that window. * lisp/window.el (window-state-put-kept-windows) (window-state-put-selected-window): New variables. (window--state-put-2): Make sure buffer is live before restoring its state. Set 'window-state-put-selected-window' to state's selected window. If 'window-kept-windows-functions' is non-nil, do not delete any windows whose buffer is found dead but remember all such windows in a list to pass to 'window-kept-windows-functions'. (window-state-put): Run 'window-kept-windows-functions' if it is non-nil. Select window recorded in 'window-state-put-selected-window'.
* | Merge from origin/emacs-29Eli Zaretskii2024-03-022-3/+10
|\ \ | |/ | | | | | | | | | | | | | | ae80192d97b ; * src/buffer.c (Fmake_indirect_buffer): Doc fix. 2549eabc97f Fix typos in vnvni.el. 647cecc853e ; * lisp/vc/vc.el (vc-clone): Fix wording of doc string. 383ccf6d51f Avoid assertion violations in bidi.c b7cef701cb5 * lisp/files.el (hack-one-local-variable): Use `set-auto-... 05308001759 Fix infinite recursion in gdb-mi.el
| * ; * src/buffer.c (Fmake_indirect_buffer): Doc fix.Eli Zaretskii2024-03-011-2/+8
| |
| * Avoid assertion violations in bidi.cEli Zaretskii2024-02-271-1/+2
| | | | | | | | | | | | | | * src/bidi.c (bidi_resolve_brackets): Move assertion about 'resolved_level' to where it belongs. This avoids unnecessary aborts when the character is not a bracket type and doesn't need BPA resolution. (Bug#69421)
| * Fix "emacs -nw" on MS-WindowsEli Zaretskii2024-01-282-2/+7
| | | | | | | | | | | | | | | | | | * src/w32term.c (w32_flip_buffers_if_dirty): Do nothing if F is not a GUI frame. This avoids rare crashes in "emacs -nw". * src/w32console.c (initialize_w32_display): Set the ENABLE_EXTENDED_FLAGS bit in 'prev_console_mode'. (cherry picked from commit e1970c99f097715fc5bb3b88154799bfe13de90f)
| * Simplify 'without-restriction'Gregory Heytings2024-01-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplification is symmetrical to 01fb898420. * src/editfns.c: (Finternal__labeled_widen): Add a call to 'Fwiden', and rename from 'internal--unlabel-restriction'. (unwind_labeled_narrow_to_region): Use the renamed function, and remove the call to 'Fwiden'. (syms_of_editfns): Rename the symbol. * lisp/subr.el (internal--without-restriction): Use the renamed function. (cherry picked from commit 9e9e11648d3d5514de85edfb69f0949a062f4716)
* | Implement dead key combination on AndroidPo Lu2024-03-023-5/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/android.c (android_init_key_character_map) (android_get_dead_char): New functions. (android_wc_lookup_string): New argument COMPOSE_STATE. Ignore key events with the COMBINING_ACCENT flag set while recording their character values there, and combine such characters with the key event when processing a subsequent key event. * src/androidgui.h (struct android_compose_status): New structure. * src/androidterm.c (handle_one_android_event): Port dead key combination code from X. (bug#69321)
* | Merge remote-tracking branch 'origin/master' into 'feature/type-hierarchy'Andrea Corallo2024-02-2845-1071/+1860
|\ \
| * | ; Update Lisp_Obarray hash for CHECK_STRUCTSBasil L. Contovounesios2024-02-281-3/+3
| | | | | | | | | | | | | | | This follows commit 462d8ba813 of 2024-02-23 "Add a proper type for obarrays".
| * | Fix display of reordered Arabic textEli Zaretskii2024-02-261-5/+4
| | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (compute_stop_pos): Fix a year-old thinko in handling auto-composed characters. It was introduced as part of solving bug#62780, which optimized the search for composable characters. (Bug#69384)
| * | Replace XSETSYMBOL with make_lisp_symbolMattias Engdegård2024-02-245-31/+21
| | | | | | | | | | | | | | | * src/lisp.h (XSETSYMBOL): Remove. All callers changed to use make_lisp_symbol.
| * | * src/editfns.c (Fget_pos_property): Fix thinko (bug#69358)Stefan Monnier2024-02-241-2/+5
| | |
| * | ; Fix last change in lisp.h.Eli Zaretskii2024-02-241-1/+1
| | |
| * | Check daemon is initialized before suppressing its init errorsSpencer Baugh2024-02-242-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the default error handler would correctly suppress unhandled errors raised when IS_DAEMON and the initial frame was current, since this is the normal state of operation for a daemon-mode Emacs. However, this also incorrectly suppressed errors raised while a daemon-mode Emacs was starting up. Now, errors raised while a daemon-mode Emacs is starting up will be handled just like errors when a non-daemon Emacs is starting up. This was previously the case before changes for bug#1310 and bug#1836, which added the suppression of errors when IS_DAEMON. DAEMON_RUNNING didn't exist at the time of those changes, but now it does, so we can do better. * src/keyboard.c (Fcommand_error_default_function): Check !DAEMON_RUNNING in addition to IS_DAEMON. (Bug#68799) * src/lisp.h (DAEMON_RUNNING): Add a clarifying comment about what this #define means.
| * | Use the new obarray type for the initial obarrayMattias Engdegård2024-02-231-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This can improve performance a lot, especially after the obarray has been fed many symbols. * src/lread.c (OBARRAY_SIZE): Remove. (load_path_check): Create an obarray object instead of a vector.
| * | Add a proper type for obarraysMattias Engdegård2024-02-238-182/+463
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new opaque type replaces the previous use of vectors for obarrays. `obarray-make` now returns objects of this type. Functions that take obarrays continue to accept vectors for compatibility, now just using their first slot to store an actual obarray object. obarray-size and obarray-default-size now obsolete. * lisp/obarray.el (obarray-default-size, obarray-size): Declare obsolete. (obarray-make, obarrayp, obarray-clear): Remove from here. * src/fns.c (reduce_emacs_uint_to_hash_hash): Remove from here. * src/lisp.h (struct Lisp_Obarray, OBARRAYP, XOBARRAY, CHECK_OBARRAY) (make_lisp_obarray, obarray_size, check_obarray) (obarray_iter_t, make_obarray_iter, obarray_iter_at_end) (obarray_iter_step, obarray_iter_symbol, DOOBARRAY, knuth_hash): New. (reduce_emacs_uint_to_hash_hash): Moved here. * src/lread.c (check_obarray): Renamed and reworked as... (checked_obarray_slow): ...this. (intern_sym, Funintern, oblookup, map_obarray) (Finternal__obarray_buckets): Adapt to new type. (obarray_index, allocate_obarray, make_obarray, grow_obarray) (obarray_default_bits, Fobarray_make, Fobarrayp, Fobarray_clear): New. * etc/emacs_lldb.py (Lisp_Object): * lisp/emacs-lisp/cl-macs.el (`(,type . ,pred)): * lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): * lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers): * lisp/emacs-lisp/comp.el (comp-known-predicates): * src/alloc.c (cleanup_vector, process_mark_stack): * src/data.c (Ftype_of, syms_of_data): * src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion): * src/pdumper.c (dump_obarray_buckets, dump_obarray, dump_vectorlike): * src/print.c (print_vectorlike_unreadable): * test/lisp/abbrev-tests.el (abbrev-make-abbrev-table-test): * test/lisp/obarray-tests.el (obarrayp-test) (obarrayp-unchecked-content-test, obarray-make-default-test) (obarray-make-with-size-test): Adapt to new type.
| * | * src/pdumper.c (dump_subr): Rename 'native_comp' -> 'non_primitive'.Andrea Corallo2024-02-231-5/+5
| | |
| * | * src/fns.c (sxhash_bignum): Include sign bit in hash.Mattias Engdegård2024-02-231-1/+1
| | |
| * | * src/fns.c (hash_string): Suppress warning on 32-bit platformsMattias Engdegård2024-02-231-0/+3
| | | | | | | | | | | | | | | Remove a shift-too-wide complaint by GCC in code that is never reached on platforms where that shift is too wide.
| * | Fix bug#69140Po Lu2024-02-231-1/+8
| | | | | | | | | | | | | | | | | | * src/window.c (grow_mini_window): Don't adjust frame matrices or force redisplay if the provided window cannot be resized. (bug#69140)
| * | ; Insert missing JNI prologuesPo Lu2024-02-222-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | * src/android.c (shouldForwardMultimediaButtons) (shouldForwardCtrlSpace, notifyPixelsChanged, setupSystemThread): * src/androidvfs.c (safSyncAndReadInput, safSync, safPostRequest) (ftruncate): Insert absent JNI prologues.
| * | Enable inotify on systems with inotify_init yet no init1 variantPo Lu2024-02-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (HAVE_INOTIFY): Check for the presence of inotify_init in addition to inotify_init1. * src/inotify.c (Finotify_add_watch): Implement with inotify_init if inotify_init1 is absent.
| * | Remove redundant call to 'eln_load_path_final_clean_up'Eli Zaretskii2024-02-211-4/+0
| | | | | | | | | | | | | | | | | | * src/emacs.c (shut_down_emacs): Remove redundant call to 'eln_load_path_final_clean_up'. We call it from 'kill-emacs' right before the call to 'exit'.
| * | ; * src/lisp.h: Add Lisp_Object tagging scheme overviewMattias Engdegård2024-02-211-0/+10
| | |
| * | Slight switch byte op speedupMattias Engdegård2024-02-191-18/+19
| | | | | | | | | | | | | | | * src/bytecode.c (exec_byte_code): Hoist symbols_with_pos_enabled check from fast loop, and eliminate the initial index check.
| * | Replace XSET_HASH_TABLE with make_lisp_hash_tableMattias Engdegård2024-02-193-15/+9
| | | | | | | | | | | | | | | * src/lisp.h (XSET_HASH_TABLE): Remove, replace with... (make_lisp_hash_table): ...this. All callers adapted.
| * | Use -Wanalyzer-deref-before-check in GCC 14Paul Eggert2024-02-181-1/+1
| | | | | | | | | | | | | | | * src/marker.c: Work around GCC bug 113253 only if GCC 13. The GCC bug reportedly will be fixed in GCC 14.
| * | Do not ignore -Wanalyzer-allocation-size in GCC 14Paul Eggert2024-02-181-1/+1
| | | | | | | | | | | | | | | | | | * src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): Use pragma to ignore the warning only in GCC 13, as the GCC developers say GCC bug 109577 is fixed in GCC 14.
| * | Remove no-longer-needed pdumper_load workaroundPaul Eggert2024-02-181-4/+1
| | | | | | | | | | | | | | | | | | | | | * src/pdumper.c (pdumper_load): Revert my commit "Pacify GCC 12.1.1 in default developer build" dated 2022-06-13 13:21:18 -07, as GCC bug 105961 is fixed, and this workaround is not needed for unfixed GCC as these builds should not use --enable-gcc-warnings.
| * | Ignore fewer GCC -fanalyzer diagnostics in ccl.cPaul Eggert2024-02-181-6/+1
| | | | | | | | | | | | | | | | | | | | | * src/ccl.c: Do not ignore -Wanalyzer-use-of-uninitialized-value, as that bug has been fixed in GCC. Ignore -Wanalyzer-out-of-bounds only if GCC 13, as the bug will reportedly be fixed when GCC 14 comes out.
| * | Implement tooltip_reuse_hidden_frame for AndroidPo Lu2024-02-181-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (findSuitableActivityContext): Return Activity rather than Context. (mapWindow): Provide window token manually. * src/androidfns.c (Fx_show_tip, Fx_hide_tip): Respect tooltip_reuse_hidden_frame.
| * | ; Don't use non-ASCII characters in C comments in xdisp.c.Eli Zaretskii2024-02-171-1/+1
| | |
| * | Properly record mtime after insert-file-contents on AndroidPo Lu2024-02-171-1/+9
| | | | | | | | | | | | | | | * src/fileio.c (write_region): Do not verify file identity after retreiving file status for the second time if st_ino is 0.
| * | * src/androidvfs.c (android_scan_directory_tree): Get rid of xstrdup.Po Lu2024-02-161-13/+11
| | |
| * | Fix the MS-DOS buildPo Lu2024-02-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (REQUIRE_GNUISH_STRFTIME_AM_PM): Move definition to... * src/conf_post.h (REQUIRE_GNUISH_STRFTIME_AM_PM): ...conf_post.h.
| * | Handle /assets and /content file names in `android-browse-url'Po Lu2024-02-151-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/browse-url.el (android-browse-url): New function. * lisp/term/android-win.el (android-browse-url-internal): Update function declaration. * src/androidselect.c (Fandroid_browse_url): Rename to... (Fandroid_browse_url_internal): ... this. (syms_of_androidselect): Adjust to match.
| * | String hashing improvements (spread and performance)Mattias Engdegård2024-02-141-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix gaps in hashing coverage in the middle and end of even fairly short strings. E.g., `outline-1`, `outline-2` etc all hashed to the exact same value but with the patch, there are no collisions among the ~160000 symbols in the Emacs tree. This change also improves average hashing speed by using fewer mixing operations. * src/fns.c (hash_string): Use unit stride for fairly short strings, while retaining the cap of 8 samples for long ones. Always hash the last word to ensure that the end of the string is covered. For strings shorter than a word, use fewer loads and a single reduction step.
| * | Simplify position-symbolPaul Eggert2024-02-131-8/+1
| | | | | | | | | | | | | | | * src/data.c (Fposition_symbol): Simplify by calling Fbare_symbol rather than open-coding it.
| * | XSYMBOL eassume speedupsPaul Eggert2024-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL): Help the compiler by using eassume instead of eassert for XSYMBOL postconditions likely to be useful for optimization later. With gcc 13.2 -O2 x86-64 this improved speed on my usual “compile all .el files” benchmark by 0.7% and shrank the text size of Emacs by 0.09%.
| * | Remove SYMBOL_WITH_POS_{POS,SYM}Paul Eggert2024-02-135-57/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fns.c (internal_equal): Turn comment into eassert that !symbols_with_pos_enabled. (sxhash_obj): Simplify case of symbol with pos (when enabled). * src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL_WITH_POS_POS) (maybe_remove_pos_from_symbol): New inline functions. (SYMBOL_WITH_POS_SYM, SYMBOL_WITH_POS_POS): Remove. All uses replaced by the new functions. This avoids some double-checking in the source code, simplifies the code overall, and avoids the need for "Type checking is done in the following macro" comments to explain unusual code.
| * | Remove lisp_h_XCONS etcPaul Eggert2024-02-131-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When configured with --enable-checking and compiled with gcc -O0, these macros evaluated arguments multiple times, which made it too easy to mistakenly write code that behaves differently when debugging. This patch does not affect performance in normal builds. In --enable-checking builds with gcc -O0 it slows down my usual benchmark (remove all '*.elc’ files and then 'make') by 4.4%. I hope that’s good enough; if not I can complicate the macros to tune better for debugging builds. * src/lisp.h (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_VAL) (lisp_h_XCONS): Remove, moving each definiens to the corresponding inline function. All uses removed.
| * | Remove lisp_h_PSEUDOVECTORP etcPaul Eggert2024-02-131-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (lisp_h_PSEUDOVECTORP, lisp_h_EQ, lisp_h_SYMBOLP): Refactor by removing these macros, moving each definiens to its only use. Now that we have symbols with position so that there is no longer a non-lisp_h_* macro counterpart if DEFINE_KEY_OPS_AS_MACROS, there’s no need to separate these definiens from their inline function bodies.
| * | Remove BASE2_EQPaul Eggert2024-02-133-19/+9
| | | | | | | | | | | | | | | | | | | | | * src/lisp.h (lisp_h_BASE2_EQ, BASE2_EQ): Remove. All uses removed. BASE2_EQ was present only for minor optimization and with current gcc -O2, BASE2_EQ does not affect performance, so it’s not worth the hassle.
| * | Simplify and speed up EQ againPaul Eggert2024-02-131-11/+6
| | | | | | | | | | | | | | | | | | * src/lisp.h (lisp_h_BASE2_EQ, lisp_h_EQ): Simplify and refactor. On x86-64 with GCC 3.2 this shrinks temacs text by 0.055% and after removing all *.elc files speeds up 'make' by 1.0%.
| * | Simplify and speed up EQPaul Eggert2024-02-131-17/+9
| | | | | | | | | | | | | | | | | | | | | * src/lisp.h (lisp_h_BASE2_EQ, lisp_h_EQ): Simplify by testing symbols_with_pos_enabled first. On x86-64 with GCC 13.2 this shrinks temacs text by 1.5% and after removing all *.elc files speeds up 'make' by 1.2%.
| * | ; * src/lread.c (Finternal__obarray_buckets): Fix coding style.Po Lu2024-02-131-1/+1
| | |
| * | lread.c: Use bare symbol operationsMattias Engdegård2024-02-121-65/+59
| | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (read0, intern_sym, intern_driver, intern_1) (intern_c_string_1, Fintern, Fintern_soft, Funintern, oblookup) (map_obarray, init_obarray_once, defvar_int, defvar_bool) (defvar_lisp_nopro, defvar_kboard, syms_of_lread): Use the faster bare-symbol operations where provably correct to do so.