aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix display of raised/lowered composed textEli Zaretskii2023-02-051-0/+5
| | | | | * src/xdisp.c (fill_gstring_glyph_string): Adjust the base line of the glyph string due to subscript/superscript. (Bug#61290)
* Fix bidi reordering of sequence of whitespace characters before a TABEli Zaretskii2023-02-041-6/+9
| | | | | * src/bidi.c (bidi_level_of_next_char): Test the current level only for characters whose original type is BN. (Bug#61269)
* Improve documentation of 'header-line-indent-mode'Eli Zaretskii2023-02-031-2/+2
| | | | | | | | | | | | | | | * doc/lispref/modes.texi (Header Lines): Rewrite the documentation of 'header-line-indent-mode' and its two variables. Fix the example. * doc/lispref/display.texi (Pixel Specification): More accurate description of what happens with :align-to in header-lines. Improve indexing. (Bug#61239) * src/buffer.c (syms_of_buffer) <header-line-format>: * lisp/display-line-numbers.el (header-line-indent) (header-line-indent-width, header-line-indent-mode): Doc fixes. * etc/NEWS: Enhance the announcement of 'header-line-indent-mode'.
* Call treesit_record_change in insert_from_gap_1Yuan Fu2023-02-021-6/+13
| | | | | | | | | | | | | | | Before this change, insert_from_gap calls treesit_record_change but insert_from_gap_1 doesn't. However, insert_from_gap_1 is a public function and is called in many other places outside of insdel.c. This could lead to tree-sitter's parse tree becoming out-of-sync with the buffer content. This change might fix bug#60650. * src/insdel.c (insert_from_gap_1): Call treesit_record_change. (insert_from_gap): Remove call to treesit_record_change. * admin/notes/tree-sitter/treesit_record_change: New file.
* ; * src/treesit.c (treesit_predicate_match): Simplify last change.Eli Zaretskii2023-02-021-8/+5
|
* Minor improvements in sqlite.cEli Zaretskii2023-02-021-3/+7
| | | | | | | | * src/sqlite.c (Fsqlite_next): Doc fix. Return nil if SQLITE_DONE was once seen for this statement. (Bug#61151) (row_to_value): Cons the value in reverse, to avoid the Fnreverse call. Patch by Helmut Eller <eller.helmut@gmail.com>. (Bug#61165)
* (treesit_predicate_match): Match node text against regexp without consingDmitry Gutov2023-02-023-6/+38
| | | | | | | | | | | | | | * src/treesit.c (treesit_predicate_match): Match node text against regexp without creating a new string object (bug#60953). * src/search.c (search_buffer): Make not static. Delete declaration near the beginning of the file. * src/lisp.h: Declare it here. * lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-method-p): Remove function. (ruby-ts--font-lock-settings): Use the regexp with :match directly.
* Avoid spurious pause in kill-ring-save (Bug#60841)Kévin Le Gouguec2023-02-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'indicate-copied-region' checks whether the region is "highlighted" and if not, briefly moves point to mark to give a visual cue of the extent of text that was saved to the kill ring. The region is considered "highlighted" if (a) it is active and (b) its face specifies a :background. That latter condition does not account for the multiple ways in which the face can make the region "visually distinct" from the default face, so switch to the more extensive predicate face-differs-from-default-p. The patch also fixes a couple of issues with the predicate's implementation, and introduces a new user option in case anyone happened to enjoy unconditional blinking. * lisp/faces.el (face-differs-from-default-p): Filter out :extend; add rationale for the attributes we ignore. * lisp/simple.el (copy-region-blink-predicate): Add option to let users explicitly opt into or out of blinking point and mark. (region-indistinguishable-p): New function to detect "if there is currently no active region highlighting", leveraging face-differs-from-default-p. (indicate-copied-region): Use it. * src/xfaces.c (merge_face_ref): Allow :stipple to be nil, since it is a documented valid value for that attribute. * etc/NEWS: Announce user option.
* Unbreak the MS-Windows buildEli Zaretskii2023-02-011-0/+4
| | | | | * src/treesit.c (ts_query_pattern_count) [WINDOWSNT]: Load from the library and define as macro.
* ; (Ftreesit_query_capture): Fix typoDmitry Gutov2023-02-011-1/+2
|
* (Ftreesit_query_capture): Cache list of predicates for given pattern indexDmitry Gutov2023-02-011-3/+8
| | | | | * src/treesit.c (Ftreesit_query_capture): Cache list of predicates for given pattern index (bug#60953).
* Fix cursor-in-echo-area on TTY framesEli Zaretskii2023-01-311-0/+4
| | | | | * src/dispnew.c (update_frame_1): Fix off-by-one error when positioning the cursor in the echo-area. (Bug#61184)
* Add treesit-subtree-statYuan Fu2023-01-291-0/+63
| | | | | * src/treesit.c (Ftreesit_subtree_stat): New function. * lisp/treesit.el (treesit): Add to shortdoc.
* ; * src/comp.c: Remove Local Variables section to avoid warnings.Eli Zaretskii2023-01-281-3/+0
|
* ; * src/insdel.c (insert_from_buffer): Fix assertions.Eli Zaretskii2023-01-261-1/+2
|
* Fix call to treesit_record_change in insdel.cYuan Fu2023-01-251-6/+10
| | | | | | | | The start position of the change shouldn't be PT_BYTE, IIUC PT_BYTE is actually the end position. * src/insdel.c (insert_from_buffer): Move to here. (insert_from_buffer_1): Remove call to treesit_record_change.
* Pacify --without-x unused function warningBasil L. Contovounesios2023-01-251-1/+1
| | | | | | * src/xfaces.c (font_maybe_unset_attribute): Move definition... [HAVE_WINDOW_SYSTEM] (font_maybe_unset_attribute): ...to here, since the function is used only when we HAVE_WINDOW_SYSTEM (bug#61049).
* ; Fix last change (bug#60556).Eli Zaretskii2023-01-221-12/+13
|
* Avoid crashes in batch Emacs sub-processes on MS-WindowsEli Zaretskii2023-01-222-25/+47
| | | | | | | | * src/w32.c (shutdown_handler): When run in a separate thread, don't call functions that only the main (a.k.a. "Lisp") thread can call; instead, arrange for maybe_quit to kill Emacs. * src/w32fns.c (emacs_abort): Don't show GUI Abort dialogs in non-interactive sessions. (Bug#60556)
* ; * src/treesit.c: Remove unused boilerplate.Yuan Fu2023-01-171-8/+0
| | | | These two functions are not used after 7c61a304104.
* Fix buffer-list-update-hook for indirect buffersBasil L. Contovounesios2023-01-171-5/+5
| | | | | | | | | | | | | | | | | | Fmake_indirect_buffer can be told whether to run buffer hooks since bug#49160, but until now it ran buffer-list-update-hook irrespective of this. * src/buffer.c (Fmake_indirect_buffer): Don't run buffer-list-update-hook when called with a non-nil INHIBIT-BUFFER-HOOKS argument. (run_buffer_list_update_hook): Don't special-case NULL argument, as no such callers remain. * test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks-indirect): Test whether indirect buffer hooks are run regardless of whether base buffer hooks are inhibited. Check that all three buffer hooks, not just kill-buffer-query-functions, are inhibited.
* Fix treesit-node-first-child-for-pos (bug#60127)Yuan Fu2023-01-171-8/+44
| | | | | | | | | The problem is due to a bug in ts_node_first_child_for_pos, but tree-sitter is moving pretty slowly right now so I reimplemented a correct version of it in treesit.c. * src/treesit.c (treesit_cursor_first_child_for_byte): New function. (Ftreesit_node_first_child_for_pos): Use the new function.
* ; * src/treesit.c (Ftreesit_induce_sparse_tree): Minor change.Yuan Fu2023-01-171-3/+3
|
* ; Fix more quoting in w32fns.c.Eli Zaretskii2023-01-161-2/+2
|
* ; * src/w32fns.c: Fix quoting. Patch by Arash Esbati <arash@gnu.org>.Eli Zaretskii2023-01-161-6/+6
|
* ; Fix typosStefan Kangas2023-01-153-3/+3
|
* Fix use of build_pure_c_string in treesit.cYuan Fu2023-01-131-42/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is brought up in bug#60691. build_pure_c_string should only be used in places such as syms_of_treesit, which are called just once, during dumping. * src/treesit.c (Vtreesit_str_libtree_sitter): (Vtreesit_str_tree_sitter): (Vtreesit_str_dot): (Vtreesit_str_question_mark): (Vtreesit_str_star): (Vtreesit_str_plus): (Vtreesit_str_pound_equal): (Vtreesit_str_pound_match): (Vtreesit_str_pound_pred): (Vtreesit_str_open_bracket): (Vtreesit_str_close_bracket): (Vtreesit_str_open_paren): (Vtreesit_str_close_paren): (Vtreesit_str_space): (Vtreesit_str_equal): (Vtreesit_str_match): (Vtreesit_str_pred): New variables. (treesit_load_language): (Ftreesit_pattern_expand): (Ftreesit_query_expand): (treesit_eval_predicates): Use new varaibles. (treesit_check_buffer_size): (treesit_compose_query_signal_data): (treesit_check_range_argument): (Ftreesit_parser_set_included_ranges): (treesit_predicate_capture_name_to_node): (treesit_predicate_equal): (treesit_predicate_match): (treesit_predicate_pred): Use build_string for signal message. (syms_of_treesit): Initialize new variables.
* ; Improve documentation of tree-sitter node comparisonEli Zaretskii2023-01-131-2/+4
| | | | | | * doc/lispref/parsing.texi (Accessing Node Information): * src/treesit.c (Ftreesit_node_eq): Improve documentation of node comparison.
* ; Fix non-tree-sitter buildsEli Zaretskii2023-01-131-3/+4
| | | | | * src/fns.c (internal_equal): Call treesit_node_eq only if tree-sitter was compiled in.
* Equal now recognizes tree-sitter nodes (bug#60659)Yuan Fu2023-01-123-7/+22
| | | | | | | | | | | Now equal uses ts_node_eq to check equality between nodes. * doc/lispref/parsing.texi: (Accessing Node Information): Update manual. * src/fns.c (internal_equal): Handle tree-sitter nodes. * src/treesit.c (treesit_node_eq): New function. (Ftreesit_node_eq): Factor out. Update docstring. * src/treesit.h (treesit_node_eq): Declare new function.
* Fix encoding with 'utf-8-auto'Eli Zaretskii2023-01-121-1/+1
| | | | | | | | | | | | * src/coding.c (encode_coding_utf_8): Fix encoding with 'utf-8-auto': it should produce BOM, per the documentation of the :bom attribute. (Bug#60750) * lisp/international/mule.el (define-coding-system): Doc fix. * test/src/coding-tests.el (coding-tests): Use 'with-coding-priority' instead of 'prefer-coding-system', as the latter has global persistent effect and affects further tests.
* Report cursor correctly on PGTK when there is a marginPo Lu2023-01-121-1/+2
| | | | | * src/pgtkterm.c (pgtk_draw_window_cursor): Adjust frame_x by the margin width as well.
* Don't print named tree-sitter nodes with parenthesizes (bug#60696)Yuan Fu2023-01-091-2/+7
| | | | | * src/print.c (print_vectorlike): Use empty string as delimiters if the node is named.
* ; * src/callint.c (Finteractive): Doc string clarification.Eli Zaretskii2023-01-091-7/+6
|
* ; * src/pgtkfns.c (parse_resource_key): Use recursive schema lookupTad Fisher2023-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | XDG_DATA_DIRS may consist of multiple directories, and g_settings_schema_source_get_default composes these into a recursive schema source. One must pass TRUE to g_settings_schema_source_lookup, otherwise only the first directory in XDG_DATA_DIRS is searched. It follows that in the case that the directory containing the compiled GSettings schema for Emacs is not the first in XDG_DATA_DIRS, parse_resource_key will not accept any resource key, which causes pgtk_get_defaults_value and pgtk_set_defaults_value to fail. This impacts systems that compose multiple GSettings schema sources via XDG_DATA_DIRS, such Flatpak and NixOS. Supporting GIO documentation for g_settings_schema_source_get_default: > The returned source may actually consist of multiple schema sources > from different directories, depending on which directories were given > in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all > lookups performed against the default source should probably be done > recursively. Bug#60565 Copyright-paperwork-exempt: yes
* ; * src/callint.c (Finteractive): Fix the doc string (bug#60645).Eli Zaretskii2023-01-081-3/+6
|
* Avoid assertion violation due to fill-column indicator faceEli Zaretskii2023-01-051-6/+9
| | | | | | * src/xdisp.c (extend_face_to_end_of_line): Use the original iterator metrics for the stretch glyph, the one unaffected by the 'fill-column-indicator' face. (Bug#60580)
* ; * src/gnutls.c (Fgnutls_deinit): Fix typo in doc string (bug#60579).Eli Zaretskii2023-01-051-1/+1
|
* ; Fix documentation of y-or-n-p/yes-or-no-pEli Zaretskii2023-01-041-2/+1
| | | | | * lisp/subr.el (y-or-n-p): * src/fns.c (Fyes_or_no_p): Doc fix.
* Fix shrinking of the tab-barEli Zaretskii2023-01-025-35/+35
| | | | | | | | | | * src/haikufns.c (haiku_change_tab_bar_height): * src/pgtkfns.c (pgtk_change_tab_bar_height): * src/nsfns.m (ns_change_tab_bar_height): * src/w32fns.c (w32_change_tab_bar_height): * src/xfns.c (x_change_tab_bar_height): Don't let the number of tab-bar lines degenerate to zero due to integer division. (Bug#60210)
* ; Clarify doc strings of 'call-process' and 'call-process-region'Eli Zaretskii2023-01-021-2/+3
| | | | | | * src/callproc.c (Fcall_process, Fcall_process_region): Document that the destination buffer can be specified by its name. (Bug#60477)
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01259-260/+260
|
* ; Fix typosStefan Kangas2022-12-311-1/+1
|
* ; Fix recent treesit-related changesEli Zaretskii2022-12-311-5/+5
| | | | | | | | | | | | * lisp/treesit.el (treesit-language-source-alist) (treesit--install-language-grammar-1): Doc fixes. * src/treesit.c (Ftreesit_language_abi_version): Fix a typo in function's Lisp name. Doc fix. (Ftreesit_language_available_p): Fix a typo in the function's C name. * doc/lispref/parsing.texi (Language Grammar): Fix wording.
* Show tree-sitter query source when signaling query errorYuan Fu2022-12-301-4/+7
| | | | | | | * src/treesit.c (treesit_compose_query_signal_data): Add QUERY_SOURCE parameter. (treesit_ensure_query_compiled) (Ftreesit_query_capture): Add query source.
* Add treesit-language-abi-versionYuan Fu2022-12-301-4/+27
| | | | | | | | | Also rename treesit-language-version to treesit-library-abi-version, because the old name is somewhat misleading. * doc/lispref/parsing.texi (Language Grammar): Update. * src/treesit.c (Ftreesit_library_abi_version): Rename. (Ftreesit_language_abi_version): New function.
* * src/keyboard.c (echo_add_key): Use recently rebound C-h key C-q (bug#60249)Juri Linkov2022-12-291-3/+2
|
* Avoid assertion violations in treesit.c with --enable-checkingEli Zaretskii2022-12-291-4/+3
| | | | | | | * src/treesit.c (Ftreesit_node_first_child_for_pos) (Ftreesit_node_descendant_for_range): Check validity of buffer positions before converting them to byte-positions, to avoid assertion violations in buf_charpos_to_bytepos.
* Call tree-sitter parser notifier on the first parseYuan Fu2022-12-281-9/+19
| | | | | | * src/treesit.c (treesit_call_after_change_functions): Handle NULL old_tree. (treesit_ensure_parsed): Remove check for NULL tree.
* Fix tree-sitter parser notifier recursionYuan Fu2022-12-281-5/+14
| | | | | | | | See the comment for detail. * src/treesit.c (treesit_ensure_parsed): Move the need_reparse short circuit to the very beginning. Move the call to treesit_call_after_change_functions to the very end.