summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix building --with-native-compilation=aot from release tarballEli Zaretskii2023-06-221-0/+8
| | | | | | | | | | | * lisp/Makefile.in (%.eln): Pattern rule for AOT native compilation. (compile-eln-targets, compile-eln-aot): New targets for AOT native compilation. * src/Makefile.in (../native-lisp): If NATIVE_COMPILATION_AOT is set, also native-compile all the other Lisp files. (Bug#64167)
* Fix bug#64152 (Minibuffer sometimes goes "modal")Alan Mackenzie2023-06-216-11/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, when a frame has no minibuffer and is using that of a different "normal" frame, C-x 5 o, etc., and GUI operations fail. Fix by partially reverting the commit from 2022-07-07 15:38:09 +0000 "Remove obscure, obsolete code from do_switch_frame". As a consequent change, also revert the commit from 2022-07-08 20:19:03 +0000 "Remove now unused parameter TRACK from do_switch_frame". * src/frame.c (do_switch_frame): Restore the TRACK parameter. Restore the code which redirects the frame focus when a new frame gets selected. * src/frame.c (Fselect_frame, Fhandle_switch_frame) (delete_frame) * src/keyboard.c (quit_throw_to_read_char) * src/lisp.h (do_switch_frame prototype) * src/minibuf.c (read_minibuf_unwind) * src/window.c (Fset_window_configuration): Restore the TRACK argument to do_switch_frame. * src/xterm.c (x_try_restore_frame): Add a zero TRACK argument to do_switch_frame.
* After minibuffer action, don't make the minibuffer currentAlan Mackenzie2023-06-171-3/+0
| | | | | | | | | | This fixes bug#63967. * src/minibuf.c (minibuffer_unwind): After restoring the next minibuffer outwards to the mini window (when enable-recursive-minibuffers is non-nil), don't call Fset_frame_selected_window, which used to set the current window to be the mini window.
* ; * src/lread.c (bytecode_from_rev_list): Avoid C++ comment.Po Lu2023-06-141-1/+1
|
* ; * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Fix typoGregory Heytings2023-06-131-1/+1
|
* Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has startedMichael Albinus2023-06-121-1/+1
| | | | | | | * doc/misc/dbus.texi (Alternative Buses): Explain using $DBUS_SESSION_BUS_ADDRESS after Emacs has started. * src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Use egetenv.
* ; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a comment.Eli Zaretskii2023-06-091-1/+1
|
* ; Update my mail addressAndrea Corallo2023-06-081-1/+1
| | | | | | | | | | | * lisp/emacs-lisp/comp-cstr.el: Update author mail. * lisp/emacs-lisp/comp.el: Likewise. * src/comp.c: Likewise. * test/lisp/emacs-lisp/comp-cstr-tests.el: Likewise. * test/src/comp-resources/comp-test-funcs-dyn.el: Likewise. * test/src/comp-resources/comp-test-funcs.el: Likewise. * test/src/comp-resources/comp-test-pure.el: Likewise. * test/src/comp-tests.el: Likewise.
* ; * src/lread.c (read0, skip_lazy_string): Fix commentary again.Eli Zaretskii2023-05-261-2/+2
|
* ; * src/lread.c (read0, skip_lazy_string): Fix commentary wording.Eli Zaretskii2023-05-261-2/+2
|
* Handle #@00 in new reader in a compatible way (bug#63722)Mattias EngdegÄrd2023-05-261-6/+11
| | | | | | | | | | This was a regression from Emacs 28. * src/lread.c (skip_lazy_string, read0): Make #@00 read as nil, which is a quirk from the old reader that we preserve for compatibility. * test/src/lread-tests.el (lread-skip-to-eof): Verify it. Reported by Richard Newton.
* Don't mark selection request eventsPo Lu2023-05-261-0/+7
| | | | | * src/pgtkterm.c (mark_pgtkterm): Prevent crash by not marking selection request events, which don't have Lisp_Object members.
* Fix rare crashes in 'try_window_reusing_current_matrix'Eli Zaretskii2023-05-251-1/+3
| | | | | | * src/xdisp.c (try_window_reusing_current_matrix): Make sure we never use a mode-line glyph row to start displaying scrolled-in rows. (Bug#63711)
* ; Support SQLite3 extensions on macOSEli Zaretskii2023-05-231-4/+6
| | | | | * src/sqlite.c (Fsqlite_load_extension): Support *.dylib extensions. (Bug#63653)
* Fix 'use-dialog-box-p' and friendsEli Zaretskii2023-05-231-5/+11
| | | | | | | | | | | | | | | * lisp/subr.el (use-dialog-box-p): Use dialog boxes also when invoked from some window-system gesture. (Bug#63655) (y-or-n-p): Fix the description in the doc string of conditions under which a dialog box will be used. * src/fns.c (Fyes_or_no_p): Use the same condition for dialog boxes as in 'use-dialog-box-p'. Fix the description in the doc string of conditions under which a dialog box will be used. * doc/lispref/minibuf.texi (Multiple Queries, Yes-or-No Queries): Fix the description of conditions under which a dialog box will be used.
* Disable loading SQLite3 extensions when SQLite3 version is too oldEli Zaretskii2023-05-231-5/+16
| | | | | | | | * src/sqlite.c (HAVE_LOAD_EXTENSION): Define to 1 only if enabling/disabling extension loading is supported as well. (load_dll_functions, Fsqlite_load_extension): Condition on HAVE_LOAD_EXTENSION, not on HAVE_SQLITE3_LOAD_EXTENSION. (Bug#63653)
* Fix loading SQLite extensionsEli Zaretskii2023-05-201-9/+44
| | | | | | | | | | * src/sqlite.c (sqlite3_db_config) [WINDOWSNT]: Load from the DLL. (Fsqlite_load_extension): Use 'sqlite3_db_config' to enable and disable loading of extensions. Add a few free extensions to the allow-list. Fix testing for the ".dll" extension. (Bug#63590) * test/src/sqlite-tests.el (sqlite-load-extension): Fix the test to require successful load if the extension does exist.
* Attempt to fix redisplay problems on macOSAaron Jensen2023-05-181-1/+2
| | | | | * src/nsterm.m (ns_scroll_run): Attempt to fix redisplay artifacts. (Bug#63187)
* Merge branch 'scratch/long-lines-cleanup' into 'emacs-29'Gregory Heytings2023-05-1311-231/+389
|\
| * Add an assertion in, and a commentary for, 'get_nearby_bol_pos'Gregory Heytings2023-05-131-3/+9
| | | | | | | | | | | | * src/xdisp.c: (get_nearby_bol_pos): Document the function, and add an assertion on its return value.
| * Fix the return type of 'labeled_restrictions_get_bound'Gregory Heytings2023-05-131-41/+42
| | | | | | | | | | | | | | | | * src/editfns.c: (labeled_restrictions_get_bound): Return a Lisp_Object instead of a pointer to a struct Lisp_Marker. (unwind_reset_outermost_restriction, reset_outermost_restrictions) (Fwiden, Fnarrow_to_region): Adapt to the new return type.
| * Another final fix to last changesGregory Heytings2023-04-021-1/+1
| | | | | | | | * src/xdisp.c (get_small_narrowing_begv): Refine the value of 'bol_pos'.
| * Three final fixes to last changesGregory Heytings2023-04-011-3/+3
| | | | | | | | | | | | | | | | * src/xdisp.c (get_nearby_bol_pos): Initialize 'bol' to BEGV - 1 instead of 0 (which fixes cursor motion commands in the presence of a narrowing), adapt the return condition accordingly, and do not restart the loop when BEGV has been reached. (get_small_narrowing_begv): Use correct type.
| * Two further fixes to last changesGregory Heytings2023-04-011-2/+3
| | | | | | | | | | | | * src/xdisp.c (get_narrowed_width): Use FRAME_WINDOW_P instead of Fterminal_live_p. Also take WINDOW_LEFT_FRINGE_WIDTH into account.
| * Improve and fix last changesGregory Heytings2023-04-011-12/+21
| | | | | | | | | | | | | | | | | | | | * src/xdisp.c (get_narrowed_width): Use WINDOW_RIGHT_FRINGE_WIDTH, which works both for character-only terminals and for GUI frames without fringes. (get_nearby_bol_pos): Instead of searching for BOL in [pos-500000..pos], gradually extend the region, starting with [pos-500..pos]. This is much faster in buffers with some long lines in the middle of lots of short lines.
| * Fix cursor motion in character-only terminalsGregory Heytings2023-03-291-2/+6
| | | | | | | | | | * src/xdisp.c (get_narrowed_width): Subtract 1 from window_body_width to account for the '\' line wrapping indication.
| * Make get_medium_narrowing_begv/zv staticGregory Heytings2023-03-292-4/+2
| | | | | | | | | | | | | | | | * src/xdisp.c (get_medium_narrowing_begv): (get_medium_narrowing_zv): Make these two functions static, they are only used in xdisp.c. * src/dispextern.h: Remove the prototypes.
| * Improve accuracy of cursor motion commands in long linesGregory Heytings2023-03-291-2/+21
| | | | | | | | | | | | | | * src/xdisp.c (get_nearby_bol_pos): New function. (get_small_narrowing_begv): Use it. This makes cursor motion commands much more accurate in the first 500K characters of each long line.
| * Remove labeled restrictions before calling FwidenGregory Heytings2023-03-298-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (labeled_restrictions_remove_in_current_buffer): New function. * src/lisp.h: Make it externally visible. * src/xdisp.c (display_count_lines_logically): * src/lread.c (readevalloop): * src/indent.c (line_number_display_width): * src/fileio.c (write_region): * src/callproc.c (Fcall_process_region): * src/buffer.c (Ferase_buffer): Use it.
| * Code cleanup for long line optimizationsGregory Heytings2023-03-296-207/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does not change any code, it merely renames functions and clarifies the documentation, to make the code hopefully easier to grasp. * src/dispextern.h (struct it): Rename the 'narrowed_begv', 'narrowed_zv', 'locked_narrowing_begv', 'locked_narrowing_zv' to 'medium_narrowing_begv', 'medium_narrowing_zv', 'large_narrowing_begv', 'large_narrowing_zv'. Clarify the comments. Update the prototypes of the functions renamed in xdisp.c. * src/lisp.h: Update the prototypes of the functions renamed in editfns.c. Remove the prototype of 'safe_run_hooks_maybe_narrowed', which is used only in keyboard.c. * src/xdisp.c (get_small_narrowing_begv): Renamed from 'get_closer_narrowed_begv'. (get_medium_narrowing_begv): Renamed from 'get_narrowed_begv'. (get_medium_narrowing_zv): Renamed from 'get_narrowed_zv'. (get_large_narrowing_begv): Renamed from 'get_locked_narrowing_begv'. (get_large_narrowing_zv): Renamed from 'get_locked_narrowing_zv'. (SET_WITH_NARROWED_BEGV): Use the new field names. (handle_fontified_prop): Use the new function and new field names. (back_to_previous_line_start): Use the new field name. (back_to_previous_visible_line_start): Use the new field name. (reseat): Use the new function and new field names. (get_visually_first_element): Use the new field name. (move_it_vertically_backward): Use the new function name. (redisplay_internal): Use the new function name. Also add a large comment to explain how Emacs deals with long lines. * src/keyboard.c: (safe_run_hooks_maybe_narrowed): Use the new function names from xdisp.c and editfns.c. Make the function static, and add a prototype. * src/editfns.c: (labeled_restrictions): Renamed from 'narrowing_locks'. (labeled_restrictions_add): Renamed from 'narrowing_locks_add'. (labeled_restrictions_remove): Renamed from 'narrowing_locks_remove'. (labeled_restrictions_get_bound): Renamed from 'narrowing_lock_get_bound'. (labeled_restrictions_peek_label): Renamed from 'narrowing_lock_peek_tag'. (labeled_restrictions_push): Renamed from 'narrowing_lock_push'. (labeled_restrictions_pop): Renamed from 'narrowing_lock_pop'. (unwind_reset_outermost_restriction): Renamed from 'unwind_reset_outermost_narrowing'. (reset_outermost_restrictions): Renamed from 'reset_outermost_narrowings'. (labeled_restrictions_save): Renamed from 'narrowing_locks_save'. (labeled_restrictions_restore): Renamed from 'narrowing_locks_restore'. (unwind_labeled_narrow_to_region): Renamed from 'unwind_narrow_to_region_locked'. (labeled_narrow_to_region): Renamed from 'narrow_to_region_locked'. (Finternal__label_restriction): Renamed from 'Finternal__lock_narrowing'. (Finternal__unlabel_restriction): Renamed from 'Finternal__unlock_narrowing'. (Fwiden): Use the new function names. (Fnarrow_to_region): Use the new function names. (save_restriction_save): Use the new function names. (syms_of_editfns): Use the new function names. <outermost-restriction>: Renamed from 'outermost-narrowing'. * lisp/subr.el (internal--with-restriction): Use the new internal function name. (internal--without-restriction): Use the new internal function name. * src/composite.c (composition_compute_stop_pos): (find_automatic_composition): Use the new function name. * doc/lispref/positions.texi (Narrowing): Add index entry.
* | Fix mouse highlight with some fonts in Cairo buildsEli Zaretskii2023-05-121-1/+0
| | | | | | | | | | * src/ftcrfont.c (ftcrfont_draw): Don't set the 'background_filled_p' flag of the glyph string. (Bug#63271)
* | with-display-message: Workaround for bug#63253Stefan Monnier2023-05-092-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | Running arbitrary ELisp code from an atimer is still dangerous, at least because the regexp engine is not-reentrant, so let's patch up the case we bumped into. There are probably many other such holes :-( * src/alloc.c (garbage_collection_inhibited): Make it non-static. * src/xdisp.c (garbage_collection_inhibited): Declare it. (set_message, clear_message): Use it as a proxy for "we're in a dangerous context like within `probably_quit`".
* | Avoid crashes in --without-all build trying to scale non-ASCII charEli Zaretskii2023-05-091-0/+9
| | | | | | | | | | * src/fontset.c (face_for_char): Display a non-ASCII character as glyphless if the ASCII face has no fontset. (Bug#63283)
* | Fix crash when creating a child frame in NS (bug#63107)Alan Third2023-05-081-1/+12
| | | | | | | | | | | | | | | | | | * src/nsterm.m ([EmacsView initFrameFromEmacs:]): Have a second go at creating the toolbar. ([EmacsWindow createToolbar:]): If there is already a toolbar or the EmacsView's layer is not an EmacsLayer, then do nothing. (cherry picked from commit 3adc1e7f37901235bda83ea65a90644b7b0a8dbf)
* | More fixes for NetBSD/vaxPo Lu2023-05-051-0/+7
| | | | | | | | | | | | * src/sysdep.c (init_signals) [__vax__]: Treat SIGILL as a floating point error on VAXen. Otherwise, (log 0.0) crashes Emacs.
* | Fix vertical-motion when tab-line is displayed in a windowEli Zaretskii2023-05-011-3/+11
| | | | | | | | | | | | * src/xdisp.c (try_window, try_window_id): Account for tab-line, if present, when converting scroll-margin at the top of the window to vertical pixel coordinate. (Bug#63201)
* | Fix redisplay of mode line after its format changes from nilEli Zaretskii2023-04-301-0/+8
| | | | | | | | | | | | * src/dispnew.c (update_window): Make sure a mode-line's row of the current glyph matrix is disabled when the mode line is not being displayed. (Bug#63186)
* | Fix documentation of libxml-parse-* functionsEli Zaretskii2023-04-291-2/+8
| | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing HTML/XML): * src/xml.c (Flibxml_parse_html_region, Flibxml_parse_xml_region): Update the documentation regarding the use of BASE-URL argument. (Bug#63125)
* | ; * src/treesit.c (syms_of_treesit): Fix error messages.Eli Zaretskii2023-04-281-2/+2
| |
* | Fix two crashes upon startupPo Lu2023-04-281-3/+6
| | | | | | | | | | | | | | * src/image.c (image_create_bitmap_from_data) (image_create_bitmap_from_file): Specify a Window or a Pixmap describing the screen, not a back buffer drawable which may not exist. Otherwise, Emacs crashes on startup when a bitmap icon is in use.
* | Don't support versioned grammar libraries on MS-WindowsEli Zaretskii2023-04-241-4/+10
| | | | | | | | | | * src/treesit.c (treesit_load_language_push_for_each_suffix): Don't append ".0.0" on WINDOWSNT.
* | Accept versioned tree-sitter language grammar filesYuan Fu2023-04-241-2/+16
| | | | | | | | | | | | | | | | | | | | By discussion on emacs-devel, titled "Versioned Tree-sitter parser libraries". * src/treesit.c (Vtreesit_str_dot_0): New variable. (treesit_load_language_push_for_each_suffix): Additionally look for lib_base_name.0 and lib_base_name.0.0. (syms_of_treesit): Initialize Vtreesit_str_dot_0.
* | Fix line-number-at-pos when POSITION is out of narrowingEli Zaretskii2023-04-221-12/+23
| | | | | | | | | | | | | | * src/fns.c (Fline_number_at_pos): Don't signal an error when ABSOLUTE is nil and POSITION is outside of the narrowing, like the original Lisp implementation did. Minor speedup by using the byte position where it is available from the get-go. (Bug#62857)
* | ; * src/fringe.c: Fix description of large circle. (Bug#62961)Eli Zaretskii2023-04-201-2/+2
| |
* | ; * src/term.c (init_tty): Fix last change. (Bug#62877)Eli Zaretskii2023-04-161-1/+1
| |
* | Fix strike-through attribute support on TTY framesEli Zaretskii2023-04-161-0/+8
| | | | | | | | | | * src/term.c (init_tty): Fix setting the strike-through capability with "smxx". (Bug#62265)
* | Avoid crashes in 'describe-keymap' due to shadowingEli Zaretskii2023-04-161-7/+12
| | | | | | | | | | * src/keymap.c (describe_vector): Handle shadowing by something other than a symbol. (Bug#62867)
* | Fix style and unwinding code in treesit.cEli Zaretskii2023-04-141-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | This was supposed to be a cherry-pick from master, but isn't, due to the unnecessary rush to fix master without cleaning up the mess first and without separating changes that can and cannot be backported. * src/treesit.c (treesit_traverse_cleanup_cursor): Fix indentation style. (Ftreesit_search_subtree, Ftreesit_search_forward) (Ftreesit_induce_sparse_tree): Fix specpdl unwinding. (Bug#62823) Do not merge to master.
* | Catch signals produced by PRED in tree-sitter search functionsYuan Fu2023-04-141-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier we switched to using cursors rather than nodes to traverse the parse tree. Because cursors need cleanup, we have to catch signals thrown by the predicate functions and free the cursor. Failing to do this will result in leaking the cursor whenever the predicate function signals in a search function. This change fixes the leak. * src/treesit.c (treesit_traverse_cleanup_cursor): New function. (Ftreesit_search_subtree) (Ftreesit_search_forward) (Ftreesit_induce_sparse_tree): Catch signals. (Bug#62823) (cherry picked from commit a5eb9f6ad4e6f5a2819b540a477f1e889f6ef355)
* | Fix compilation of w32.c with old MinGW system headersEli Zaretskii2023-04-131-1/+8
| | | | | | | | | | | | * src/w32.c (CONSOLE_FONT_INFO): Make sure the definition is not visible for MinGW versions whose w32api's version is before 5.2.0. (Bug#52792)