summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* ; * src/treesit.c: Fix typos and wording in comments.Eli Zaretskii2022-11-26
|
* Reduce wasted cycles in x*.cPo Lu2022-11-26
| | | | | | * src/xfns.c (compute_tip_xy, Fx_show_tip): * src/xselect.c (x_own_selection, x_get_local_selection) (x_clear_frame_selections): Call CAR and CDR, not Fcar and Fcdr.
* Fix tree-sitter assertion error (bug#59574)Yuan Fu2022-11-25
| | | | | * src/treesit.c (treesit_sync_visible_region): Initialize visible_beg/end when tree is NULL.
* Rename treesit_ensure_position_synced to treesit_sync_visible_regionYuan Fu2022-11-25
| | | | * src/treesit.c: Rename to better convey the purpose of the function.
* ; Add comments in treesit.c and treesit.hYuan Fu2022-11-25
| | | | | * src/treesit.c * src/treesit.h: Add (and fix) comments.
* Fix no-accept-focus handling for embedded framesPo Lu2022-11-26
| | | | | * src/xterm.c (handle_one_xevent): Don't focus embedded frames on click if they have `no-accept-focus' set.
* ; * src/sqlite.c (Fsqlite_version): Doc fix.Eli Zaretskii2022-11-25
|
* Add sqlite library version string retrieval function (bug#58766)Mattias EngdegÄrd2022-11-25
| | | | | | | | | | * src/sqlite.c (sqlite3_libversion, load_dll_functions): Make sqlite3_libversion available. (Fsqlite_version): New. (syms_of_sqlite): Define sqlite-version. * doc/lispref/text.texi (Database): Document. * test/src/sqlite-tests.el (sqlite-returning): `RETURNING` was added in sqlite 3.35; skip the test for older versions.
* Remove unused parameter from image_create_pix_containerStefan Kangas2022-11-25
| | | | | * src/image.c (image_create_pix_container): Remove unused frame parameter. Update callers.
* Work around lsp-mode compatibility bugPaul Eggert2022-11-24
| | | | | * src/timefns.c (Ftime_subtract): Respect current-time-list when args are eq (Bug#59506).
* ; * src/emacs.c (usage_message): Fix typoPhilip Kaludercic2022-11-24
| | | | Author:
* * src/emacs.c (usage_message): Add missing --init-directory entryPhilip Kaludercic2022-11-24
|
* Fix reentrancy problem/crash in xterm.cPo Lu2022-11-24
| | | | | | | * src/xterm.c (x_ignore_errors_for_next_request) (x_stop_ignoring_errors): Be paranoid and block input inside the protected section. (x_focus_frame): Block input around critical section.
* Avoid assertion violations in treesit.c when editing non-ASCIIEli Zaretskii2022-11-24
| | | | | | * src/treesit.c (make_treesit_parser): Use byte positions when initializing 'lisp_parser'. This avoids assertion violations when the buffer has non-ASCII characters.
* ; * src/treesit.c (treesit_predicate_match): Move use below check.Yuan Fu2022-11-23
|
* ; * src/treesit.c: Minor comment improvement.Yuan Fu2022-11-23
|
* ; * src/pdumper.c (dump_buffer, dump_vectorlike): Update hashes.Eli Zaretskii2022-11-23
|
* Improve documentation of locale-specific string comparisonEli Zaretskii2022-11-23
| | | | | | * doc/lispref/strings.texi (Text Comparison): * src/fns.c (Fstring_collate_equalp): Improve documentation of 'string-collate-equalp' and 'string-collate-lessp'. (Bug#59275)
* Fix error signaled by mouse-highlight on mode lineEli Zaretskii2022-11-23
| | | | | | * src/xdisp.c (note_mode_line_or_margin_highlight): Avoid signaling args-out-of-range errors when mode-line format uses min-width 'display' property. (Bug#59452)
* Improve last change to xterm.cPo Lu2022-11-23
| | | | | | | * src/xfns.c (Fx_display_last_user_time): Reject overly large timestamps. * src/xterm.c (x_display_set_last_user_time, handle_one_xevent): New functions.
* ; Fix typosStefan Kangas2022-11-23
|
* ; * src/casefiddle.c (casify_region): Stylistic change.Yuan Fu2022-11-22
|
* Fix 'treesit-max-buffer-size' and its useEli Zaretskii2022-11-22
| | | | | | | | | | | * lisp/treesit.el (treesit-max-buffer-size): Avoid overflow in computing buffer-size limit. Account for 32-but systems built "--with-wide-int". Extend doc string. (treesit-ready-p): Compare the limit with the size of the buffer in bytes, not in characters. * src/treesit.c (treesit_check_buffer_size): Measure buffer size in bytes.
* ; Fix comparisons in treesit.cEli Zaretskii2022-11-22
| | | | | | * src/treesit.c (Ftreesit_parser_add_notifier) (Ftreesit_parser_remove_notifier): Fix comparison with Lisp objects. (Bug#59483)
* Adjust x_display_set_last_user_time for Xlib sign-extensionPo Lu2022-11-22
| | | | | | | * src/xterm.c (x_display_set_last_user_time): Adjust for Xlib sign extending fields in client messages to 64 bit long, which then break x_display_set_last_user_time after 24 days, as Time is unsigned long for historical reasons. (bug#59480)
* Improve the doc string of 'string-collate-lessp'Ihor Radchenko2022-11-22
| | | | | | | * src/fns.c (Fstring_collate_lessp): Clarify that IGNORE-CASE argument might be ignored when the operating system does not implement string collation for the specified locale. (Bug#59275)
* Avoid potentially expensive XFlush and fix orderingPo Lu2022-11-22
| | | | | | * src/xterm.c (x_raise_frame): Don't call XFlush without a request being made. (x_lower_frame): Fix ordering wrt to xwidget view lowering.
* Fix treesit_record_change in casify_regionYuan Fu2022-11-22
| | | | | | This fixes bug#59455. * src/casefiddle.c: Always record changes.
* ; Fix typosStefan Kangas2022-11-22
|
* Merge remote-tracking branch 'savannah/master' into feature/tree-sitterYuan Fu2022-11-21
|\
| * Avoid native compiler setting user-init-file to warnings.el (bug#59358)Juanma Barranquero2022-11-20
| | | | | | | | | | | | | | * src/lread.c (maybe_swap_for_eln): Use a delayed warning instead of `display-warning' to avoid a recursive call to Fload while loading the init file that sets `user-init-file' to a bogus value.
| * Coalesce duplicate scroll valuator handling codePo Lu2022-11-20
| | | | | | | | | | | | | | | | | | Also, write more commentary. * src/xterm.c (xi_populate_scroll_valuator): New function. Describe the meaning of each field in xi_scroll_valuator_t. (xi_populate_device_from_info, xi_handle_new_classes): Factor out duplicate code to that function.
| * ; Fix typosStefan Kangas2022-11-20
| |
| * Advise against using too-high GC thresholdsEli Zaretskii2022-11-20
| | | | | | | | | | | | | | * doc/lispref/internals.texi (Garbage Collection): * src/alloc.c (syms_of_alloc) <gc-cons-threshold> <gc-cons-percentage>: Advise against enlarging the GC thresholds more than needed and for prolonged periods of time.
| * Fix error trapping in x_set_mouse_colorPo Lu2022-11-19
| | | | | | | | | | | | | | * src/xfns.c (x_set_mouse_color): Use x_uncatch_errors_after_check right after x_had_errors_p. Then, trap errors around FreeCursor requests, since some of the IDs may not name valid cursors.
| * Fixes to fast mouse position reportingPo Lu2022-11-19
| | | | | | | | | | | | | | | | * src/xterm.c (x_fast_mouse_position): New function. Factor out most of the fast mouse position code here. Correctly port some Haiku code to take into account multiple displays. Report scroll bar coordinates correctly. (XTmouse_position): Call it.
| * Fix automatic DPI adjustment and add workarounds for some systemsPo Lu2022-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/faces.el (x-create-frame-with-faces): New field `delayed-font'. Set the `font-parameter' property to `font' in the given parameter list after face-set-after-frame-default is called. * src/fontset.c (Fset_fontset_font): Avoid changing `font-parameter' with the call to Fmodify_frame_parameters. * src/frame.c (gui_set_frame_parameters_1): New function. Factor out gui_set_frame_parameters here, and add an argument DEFAULT_PARAMETER. If the `font' parameter is set, and `default_parameter' is not, then set the `font-parameter' frame parameter to the `font' parameter as well, to keep track of which user-specified `font' frame parameter set the default face's font on the frame. (gui_set_frame_parameters): Call gui_set_frame_parameters_1 with new arg set to false. (gui_set_font): Remove broken implementation of `font-parameter'. (gui_default_parameter): If the default value was used, then call gui_set_frame_parameters_1 with the new argument set to false. This is because no font was specified as a frame parameter by the user, so Freconsider_frame_fonts is free to do anything it wants. (Freconsider_frame_fonts): If `font-parameter' is set, then use it. (syms_of_frame): New defsym Qfont_parameter. * src/frame.h: Update prototypes. * src/haikuterm.c (haiku_default_font_parameter): * src/pgtkfns.c (pgtk_default_font_parameter): * src/w32fns.c (w32_default_font_parameter): Stop setting `font-parameter' here. This code resulted in decades of automatic font rescaling not working correctly. * src/xfaces.c (set_font_frame_param): Clear the `font-parameter' frame parameter. (Finternal_merge_in_global_face): * src/xfns.c (x_default_font_parameter): Avoid changing `font-parameter' in response to changes to face attributes. * src/xsettings.c (apply_xft_settings): Add workaround for Cairo. (bug#59371, bug#59347, bug#59283, bug#59271, bug#59285, bug#59306.)
| * Fix bug#59371Po Lu2022-11-19
| | | | | | | | | | | | | | * src/frame.c (Freconsider_frame_fonts): If a font parameter was set, create a params alist with it. Then, pass it to both default_font_parameter and face-set-after-frame-default. (bug#59371)
| * Fix earlier changes to keyboard.cPo Lu2022-11-19
| | | | | | | | | | | | | | * src/keyboard.c (coords_in_menu_bar_window): New function. (make_lispy_event): Do not process menu bar events on window system frames if there is no menu bar window or the click lies outside.
| * Fix build with ext menu barPo Lu2022-11-19
| | | | | | | | | | * src/keyboard.c (make_lispy_event): Don't access menu_bar_window when !HAVE_EXT_MENU_BAR.
| * Fix click position to menu bar entry with no-toolkitManuel Giraud2022-11-19
| | | | | | | | | | | | | | * src/keyboard.c (make_lispy_event): Use x_y_to_hpos_vpos to compute correct menu bar position should the menu face change. * src/xdisp.c (x_y_to_hpos_vpos): Not static anymore. * src/dispextern.h: Export x_y_to_hpos_vpos.
| * itree: Make sure a deleted overlay has NULL pointer fieldsStefan Monnier2022-11-18
| | | | | | | | | | | | | | * src/buffer.c (delete_all_overlays): Use POST_ORDER to set the node's pointers to NULL, as god intended. * src/itree.c (itree_insert_node): Uncomment the assertion accordingly.
| * ; Fix typosStefan Kangas2022-11-18
| |
| * ; Fix typos (prefer US spelling)Stefan Kangas2022-11-18
| |
| * Add knob to make `mouse-position' faster on XPo Lu2022-11-18
| | | | | | | | | | | | | | | | | | * etc/PROBLEMS (Improving performance with slow X connections): Add new advice. * src/xterm.c (XTmouse_position): Add alternative implementations for slow connections. (syms_of_xterm): Add new variable to enable them. * src/xterm.h (struct x_display_info): Update commentary.
| * Merge remote-tracking branch 'origin/scratch/noverlay'Stefan Monnier2022-11-17
| |\
| | * itree.c: Get rid of the old iterator codeStefan Monnier2022-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only use the new iterator which relies on a fixed size (and small) state in the iterator. This makes non-local exits safe within ITREE_FOREACH loops. * src/itree.c (make_nav, nav_nodeptr, nav_flag, itree_stack_clear) (itree_stack_push_flagged): Delete functions. (nodeptr_and_flag): Delete type. (struct itree_stack): Make the array hold plain pointers instead. (itree_stack_push): Inline the former code of `itree_stack_push_flagged`. (itree_stack_pop): Change return type. (itree_contains): Don't call `ITREE_FOREACH_ABORT` any more. (itree_insert_gap): Simplify access to the stack of nodes. (itree_delete_gap, itree_insert_gap): Adjust code to new return type of `itree_stack_pop`. (itree_iterator_finish): Delete function. (itree_iterator_start): Don't setup the `stack` field any more. (itree_iterator_next): Delete function. (itree_iter_next): Rename to `itree_iterator_next` and make it non-static. (itree_iterator_narrow): Don't check the `running` flag any more. * src/itree.h (itree_iterator_finish): Remove declaration. (struct itree_iterator): Remove the `stack` and `running` fields. (ITREE_FOREACH_ABORT): Delete macro. (ITREE_FOREACH): Don't call `itree_iterator_finish` any more. * src/xdisp.c (strings_with_newlines): * src/buffer.c (overlays_in, next_overlay_change, overlay_touches_p): Don't call `ITREE_FOREACH_ABORT` any more.
| | * itree.c: Make the iterator reentrant (bug#59183)Stefan Monnier2022-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the global iterator object and instead allocate a separate iterator for every loop. This still uses the "duplicate iterator" code, including the old iterator which needs a stack, make ITREE_FOREACH a bit more expensive than we'd like. * src/itree.h (init_itree, forget_itree, itree_iterator_busy_p): Delete declarations. (itree_iterator_start): Add iterator arg and remove `line` and `file` args. (struct itree_iterator): Move from `itree.c`. Remove `line` and `file` fields. (ITREE_FOREACH): Stack allocate an iterator object and pass it to `itree_iterator_start`. * src/itree.c (struct itree_iterator): Move to itree.h. (iter): Delete global variable. (itree_iterator_create, init_itree, forget_itree, itree_iterator_busy_p): Delete functions. (itree_contains): Adjust assertion. (itree_iterator_finish): Deallocate the iterator's stack. (itree_iterator_start): Take the (uninitialized) iterator as argument. Allocate a fresh new stack. Remove `file` and `line` arguments. Don't check `running` any more since the iterator is not expected to be initialized at all. * src/eval.c (signal_or_quit): * src/alloc.c (garbage_collect): Don't check `itree_iterator_busy_p` any more. * src/emacs.c (main): No need to `init_itree` any more. (Fdump_emacs): No need to `forget_itree` any more.
| | * itree.c: Add new "stateless" iterator code and post-order traversalStefan Monnier2022-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This still uses the old iterator code, but runs the new code alongside to make sure they behave identically. * src/itree.c (struct itree_iterator): New field `node`. (itree_iterator_create): Give it a sane default value. (itree_iterator_busy_p, itree_iterator_start, itree_iterator_finish): Move down to the "iterator" section of the file. (itree_iter_next_in_subtree, itree_iterator_first_node) (itree_iter_next): New functions. (itree_iterator_start): Initialize the new `node` field. (itree_iterator_next): Add post-order case. Call the new "stateless" `itree_iter_next` function and check that it agrees. * src/itree.h (enum itree_order): New value for post-order traversals.
| * | Fix display of mode line when the right divider is usedEli Zaretskii2022-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (init_iterator): For the mode-line, adjust last_visible_x due to the right divider and the 'box' attribute, if any, of the mode-line face. (display_min_width): Update current_x after producing the stretch glyph, to mimic PRODUCE_GLYPHS. (display_mode_line): Widen the last glyph to account for adding the right box line to it. (Bug#5930)