aboutsummaryrefslogtreecommitdiffstats
path: root/test/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into feature/pkgGerd Möllmann2022-11-282-17/+48
|\
| * Add sqlite library version string retrieval function (bug#58766)Mattias Engdegård2022-11-251-0/+1
| | | | | | | | | | | | | | | | | | | | * 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.
| * ; Fix warnings in builds without tree-sitterMattias Engdegård2022-11-221-17/+47
| |
* | Merge remote-tracking branch 'origin/master' into feature/pkgGerd Möllmann2022-11-227-56/+584
|\ \ | |/
| * ; * test/src/treesit-tests.el (treesit-misc): Remove test.Yuan Fu2022-11-211-21/+0
| | | | | | | | | | This test is for treesit--setting-for-mode, which is removed when we switched from using treesit-settings to using separate major modes.
| * Merge remote-tracking branch 'savannah/master' into feature/tree-sitterYuan Fu2022-11-2111-148/+6975
| |\
| | * ; Fix typosStefan Kangas2022-11-203-7/+7
| | |
| | * ; Fix typosStefan Kangas2022-11-182-2/+2
| | |
| | * Reduce buffer-tests noisiness even moreEli Zaretskii2022-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | * test/src/buffer-tests.el (test-kill-buffer-auto-save-default) (test-kill-buffer-auto-save-delete-yes) (test-kill-buffer-auto-save-delete-no) (test-buffer-modifications, test-restore-buffer-modified-p): Shut up auto-save messages. (Bug#59028)
| | * Reduce buffer-tests noisiness when run in batch mode.Matt Armstrong2022-11-161-42/+35
| | | | | | | | | | | | | | | | | | | | | * test/src/buffer-tests.el (overlay-modification-hooks): Remove noisy `message' calls and use `ert-info' to log context of test failures. (bug#59028) (overlay-tests-start-recording-modification-hooks): ditto.
| * | ; * test/src/treesit-tests.el (treesit-misc): Don't fail without tsMattias Engdegård2022-11-211-0/+1
| | |
| * | Allow checking for outdated nodes in tree-sitterYuan Fu2022-11-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now you can run (treesit-node-check node 'outdated). * doc/lispref/parsing.texi (Accessing Node Information): Update manual. * src/treesit.c (Ftreesit_node_check): Add new property 'outdated'. * test/src/treesit-tests.el (treesit-node-check): Add tests.
| * | ; Remove some tree-sitter testsYuan Fu2022-11-141-5/+1
| | | | | | | | | | | | | | | | | | * test/src/treesit-tests.el (treesit-parser-supplemental): Remove treesit-set-ranges, and treesit-get-ranges, as these functions are removed.
| * | ; * test/src/treesit-tests.el (treesit-node-check): New test.Yuan Fu2022-11-141-0/+18
| | |
| * | Improve treesit-node-atYuan Fu2022-11-111-0/+31
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/parsing.texi (Retrieving Node): Update manual. * lisp/treesit.el (treesit-node-at): Change semantic. It tries to return the node that a user would expect in various circumstances. * test/src/treesit-tests.el (treesit-node-at): New test.
| * | Revise tree-sitter facility for multi-language buffersYuan Fu2022-11-041-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/parsing.texi (Multiple Languages): Extend and update manual. * lisp/treesit.el (treesit-range-functions): Remove variable. (treesit-range-settings): New variable. (treesit-range-rules): New function. (treesit--merge-ranges): New function. (treesit-update-ranges): Use treesit-range-settings instead of treesit-range-functions. (treesit-font-lock-rules): Fix docstring. (treesit-indent) (treesit-indent-region): Only update ranges in a region. * test/src/treesit-tests.el (treesit-range): New test.
| * | Remove test of treesit-language-atYuan Fu2022-10-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Because now it just calls a user-supplied function rather than doing any work by itself. * test/src/treesit-tests.el (treesit-parser-supplemental): Remove the test.
| * | ; Update copyright yearsStefan Kangas2022-10-271-1/+1
| | | | | | | | | | | | | | | | | | * doc/lispref/parsing.texi: * src/treesit.h: * test/src/treesit-tests.el: Update copyright years.
| * | New tree-sitter toggle schemeYuan Fu2022-10-251-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version: central variable, everything controlled by treesit-settings. Major mode sets up tree-sitter/non-tree-sitter in a conditional branch, based on the setting. * lisp/treesit.el (treesit-settings): New option. (treesit-defun-type-regexp): Change docstring. (treesit-mode-supported) (treesit-required-languages) (treesit--local-variable-backup): Remove variables. (treesit--backup-local-variable) (treesit-mode) (global-treesit-mode--turn-on) (global-treesit-mode): Remove functions. (treesit--setting-for-mode): New function. (treesit-ready-p): New argument MODE, changed REPORT to QUIET, and LANGUAGEs to LANGUAGE (now it can be a single symbol or a list of them). (treesit-major-mode-setup): New function. Mostly comes from treesit-mode. * test/src/treesit-tests.el (treesit-misc): New test. * lisp/progmodes/python.el (python-mode): Move some setup code into the conditional branch at the end. * lisp/progmodes/js.el (js-json-mode) (js-mode): Move some setup code into the conditional branch at the end. * lisp/progmodes/ts-mode.el: Move tree-sitter setup into the conditional branch.
| * | Skip tree-sitter tests unless language definition is availableYuan Fu2022-10-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/treesit-tests.el (treesit-basic-parsing) (treesit-node-api) (treesit-query-api) (treesit-narrow) (treesit-cross-boundary) (treesit-multi-lang) (treesit-node-supplemental): Add skip-unless form.
| * | Merge branch 'master' into feature/tree-sitterYuan Fu2022-10-0510-330/+368
| |\ \
| * | | Add the treesit-search functions that supplant the removed onesYuan Fu2022-09-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signatures also changed. treesit-traverse-depth-first -> treesit-search-subtree treesit-traverse-breadth-first -> treesit-traverse-forward -> treesit-search-forward treesit-search-forward -> treesit-search-forward-goto treesit-search-beginning/end -> treesit-search-forward-goto -> treesit-induce-sparse-tree * doc/lispref/parsing.texi (Retrieving Node): Add relevant manual sections. * lisp/treesit.el (treesit-search-forward-goto): New function. * src/treesit.c (ts_traverse_sibling_helper) (ts_traverse_match_predicate) (ts_search_dfs) (ts_search_forward) (treesit-search-subtree) (treesit-search-forward) (ts_build_sparse_tree) (Ftreesit_induce_sparse_tree): Add functions. * test/src/treesit-tests.el (treesit-node-supplemental): Add comments.
| * | | Remove treesit-traverse functionsYuan Fu2022-09-241-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove before adding the replacements. * doc/lispref/parsing.texi (Retrieving Node): Remove relevant sections. * lisp/treesit.el (treesit-traverse-depth-first) (treesit--traverse-breadth-first-1) (treesit-traverse-breadth-first) (treesit-next-sibling-or-up) (treesit-traverse-forward) (treesit-search-forward) (treesit-search-beginning): (treesit-search-end): Remove functions. (treesit-defun-query): Remove variable. (treesit-beginning-of-defun) (treesit-end-of-defun): Remove functions. * test/src/treesit-tests.el: Remove comments.
| * | | Rename treesit-expand-query/patternYuan Fu2022-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/treesit.c (treesit-expand-pattern): Rename to treesit-patter-expand. (treesit-expand-query): Rename to treesit-query-expand. (make_ts_query): Use new name. * test/src/treesit-tests.el (treesit-query-api): Fix name.
| * | | Merge remote-tracking branch 'origin/master' into feature/tree-sitterYuan Fu2022-08-2918-169/+384
| |\ \ \
| * | | | Change treesit-parser-list from variable to functionYuan Fu2022-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Effectively making the list internal. Now Emacs user cannot shoot themselves in the foot by removing a parser from the list, make chaanges to buffer and add that parser back to the list. * doc/lispref/parsing.texi (Language Definitions, Using Parser) (Retrieving Node, Multiple Languages): Change variable to function. * lisp/treesit.el (treesit-language-at, treesit-node-on) (treesit-buffer-root-node, treesit-indent, treesit-check-indent) (treesit-search-forward, treesit-search-beginning) (treesit-end-of-defun, treesit-inspect-mode): Change variable to function. * src/buffer.c (bset_ts_parser_list, reset_buffer, init_buffer_once): Add ts_parser_list. * src/buffer.h (struct buffer): Add ts_parser_list. * src/treesit.c (ts_record_change, Ftreesit_parser_create): Use the buffer field instead of the old buffer local variable. (Ftreesit_parser_delete, Ftreesit_parser_list): New functions. (syms_of_treesit): Remove treesit-parser-list. * test/src/treesit-tests.el (treesit-basic-parsing): Use the new function.
| * | | | Add treesit test for previous changeYuan Fu2022-06-161-0/+83
| | | | | | | | | | | | | | | | | | | | * test/src/treesit-tests.el (treesit-cross-boundary): New test.
| * | | | Consolidate treesit parser create functionsYuan Fu2022-06-161-27/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge treesit-parser-create, treesit-get-parser, treesit-get-parser-create into one: treesit-parser-create. * src/treesit.c (Ftreesit_parser_language): make BUFFER parameter optional, add new parameter NO-REUSE. Optionally reuse parser. * test/src/treesit-tests.el: Change all parser creation to use treesit-parser-create. Remove tests for the removed functions. * lisp/treesit.el (treesit-get-parser, treesit-get-parser-create): Remove. * lisp/treesit.el (treesit-set-ranges, treesit-get-ranges) (treesit-buffer-root-node, treesit-query-string) (treesit-font-lock-fontify-region, treesit-search-forward) (treesit-query-validate): Change to use treesit-parser-create.
| * | | | Merge remote-tracking branch 'savannah/master' into feature/tree-sitterYuan Fu2022-06-148-3/+247
| |\ \ \ \
| * | | | | Add test for treesit-query-compileYuan Fu2022-06-141-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/treesit-tests.el (treesit-query-api): Rename pattern to query, and add treesit-query-compile into the mix.
| * | | | | Extract out treesit-search-forwardYuan Fu2022-05-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-search-forward, treesit-search-beginning, treesit-search-end): New functions. (treesit-traverse-defun): Remove function. (treesit-beginning-of-defun, treesit-end-of-defun): Replace 'treesit-traverse-defun' with 'treesit-search-forward' and fiends. * test/src/treesit-tests.el: Add reminder for tests.
| * | | | | Add defun navigationYuan Fu2022-05-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-defun-query): New variable. (treesit-traverse-defun, treesit-beginning-of-defun, treesit-end-of-defun): New functions. * test/src/treesit-tests.el: Add reminders for tests.
| * | | | | New node traversal functionsYuan Fu2022-05-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-traverse-parent): New alias. (treesit-traverse-depth-first, treesit--traverse-breadth-first-1, treesit-traverse-breadth-first, treesit-next-sibling-or-up, treesit-traverse-forward-depth-first): New functions. * test/src/treesit-tests.el (treesit-node-supplemental): Add reminders for tests.
| * | | | | Redefine treesit-node-atYuan Fu2022-05-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old 'treesit-node-at' becomes 'treesit-node-on'. The new 'treesit-node-at' has slightly different semantics. Now 'treesit-node-on' gets the smallest node covering a range and 'treesit-node-at' gets the smallest node after a position. The reason of change can be found in the docstring of 'treesit-node-on' (the BEWARE part): its result can be sometimes surprising/unexpected. * doc/lispref/parsing.texi (Retrieving Node): Update manual. * lisp/treesit.el (treesit-node-at): Change to new definition. (treesit-node-on): Inherits the old definition of 'treesit-node-at'. Parameter END is now mandatory. (treesit-language-at, treesit-node-field-name): Use the new '-on' function. (treesit-font-lock-fontify-region, treesit-simple-indent-presets, treesit-indent): Use the new '-at' function. * test/src/treesit-tests.el (treesit-node-supplemental): Update tests.
| * | | | | ; Merge from master.Yuan Fu2022-05-076-6/+187
| |\ \ \ \ \
| * | | | | | Add tree-sitter intergrationYuan Fu2022-05-071-0/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (HAVE_TREE_SITTER, TREE_SITTER_OBJ): New variables. (DYNAMIC_LIB_SUFFIX): new variable, I copied code from MODULES_SUFFIX so the diff looks this way. * doc/lispref/elisp.texi (Top): Add tree-sitter manual. * doc/lispref/modes.texi (Font Lock Mode): mention tree-sitter. (Parser-based Font Lock): New section. (Auto-Indentation): Mention tree-sitter. (Parser-based Indentation): New section. * doc/lispref/parsing.texi (Parsing Program Source): New chapter. * lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add treesit-parser and treesit-node type. * lisp/treesit.el: New file. * src/Makefile.in (TREE_SITTER_LIBS, TREE_SITTER_FLAGS, TREE_SITTER_OBJ): New variables. * src/alloc.c: (cleanup_vector): Add cleanup code for treesit-parser and treesit-node. * src/casefiddle.c (casify_region): Notify tree-sitter parser of buffer change. * src/data.c (Ftype_of): Add treesit-parser and treesit-node type (Qtreesit_parser, Qtreesit_node): New symbol. * src/emacs.c (main): Add symbols in treesit.c. * src/eval.c (define_error): Move the function to here. * src/insdel.c (insert_1_both, insert_from_string_1, insert_from_gap, insert_from_buffer_1, replace_range, del_range_2): Notify tree-sitter parser of buffer change. * src/json.c (define_error): Move this function out. * src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add treesit-parser and treesit-node. * src/lread.c (Vdynamic_library_suffixes): New variable. * src/print.c (print_vectorlike): Add code for printing treesit-parser and treesit-node. * src/treesit.c: New file. * src/treesit.h: New file. * test/src/treesit-tests.el: New file.
* | | | | | | Merge branch 'master' into feature/pkgGerd Möllmann2022-11-141-59/+186
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | |
| * | | | | | ; Fix typosStefan Kangas2022-11-111-1/+1
| | | | | | |
| * | | | | | Rewrite the `kill-buffer-delete-auto-save' tests (bug#59028)Matt Armstrong2022-11-101-58/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests had been annoying to me when run in interactive mode. They failed to bind `kill-buffer-delete-auto-save' as needed, so they depended on the user's settings, and they failed to mock out the "Buffer modified, save?" prompt. * test/src/buffer-tests.el (test-kill-buffer-auto-save): New helper function that mocks the two different kinds of prompts that occur when killing modified buffers that visit a file. Tests fail if expected prompts are not issued. (test-kill-buffer-auto-save-default): Use it, and explicitly bind `kill-buffer-delete-auto-save' to nil. (test-kill-buffer-auto-save-delete): Delete it. (test-kill-buffer-auto-save-delete-yes): New test for the "yes" half of the old `test-kill-buffer-auto-save-delete'. (test-kill-buffer-auto-save-delete-yes): Ditto for the "no" half.
| * | | | | | itree.c and buffer-tests.el: Incorporate code review feedbackMatt Armstrong2022-11-061-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/itree.c: Improve wording in `itree_insert_gap` comment. * test/src/buffer-tests.el (test-overlay-insert-before-markers-at-start): Don't rely on (point-min) being 1. (test-overlay-insert-before-markers-at-end): ditto. (test-overlay-insert-before-markers-empty): ditto.
| * | | | | | buffer.c: evaporate overlays in all indirect buffersStefan Monnier2022-11-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug#58928. The patch works by moving the `evaporate_overlays` check closer to `itree_delete_gap`. * src/buffer.c (adjust_overlays_for_delete_in_buffer): New function, integrating the functionality of `evaporate_overlays`. (adjust_overlays_for_delete): Use it. (evaporate_overlays): Delete function. * src/buffer.h (evaporate_overlays): Delete declaration. * src/insdel.c (adjust_markers_for_replace): Minor optimization. (adjust_after_replace, replace_range, replace_range_2, del_range_2): Don't call `evaporate_overlays`. * test/src/buffer-tests.el (buffer-tests--overlays-indirect-evaporate): Remove the `:expected-result :failed` attribute.
| * | | | | | Add a test for overlay evaporation across indirect buffersMatt Armstrong2022-11-051-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/buffer-tests.el (buffer-tests--overlays-indirect-evaporate): Test evaporation of overlays triggered by deleting text in base and in indirect buffers. Test doesn't pass at the moment.
| * | | | | | Tweak the overlay related `insert-before-markers' testsMatt Armstrong2022-11-051-22/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/buffer-tests.el (test-overlay-insert-before-markers-empty): Move code down to the other tests related to insertion. Test all front/rear insert combinations. To make the test more clear, at least to me, hard code all character positions. (test-overlay-insert-before-markers-at-start): For both front-advance modes verify that `insert-before-markers' at and overlay's start advances it. (test-overlay-insert-before-markers-at-end): For both rear-advance modes test that `insert-before-markers' at an overlay's end advances it. (test-overlay-insert-before-markers-non-empty): Delete, replaced by the two tests above.
| * | | | | | itree: Reproduce markers's behavior more faithfully (bug#58928)Stefan Monnier2022-11-031-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most obvious problem was the lack of support for `insert-before-markers`, but the behavior was also different in a few other cases. * src/itree.h (itree_insert_gap): * src/itree.c (itree_insert_gap): Add `before_markers` arg. * src/lisp.h (adjust_overlays_for_insert): * src/buffer.c (adjust_overlays_for_insert): Add `before_markers` arg. * src/insdel.c (adjust_markers_for_replace, adjust_markers_for_insert) (adjust_markers_for_delete): Adjust overlays directly from here. (insert_1_both, insert_from_string_1, insert_from_gap) (insert_from_buffer_1, adjust_after_replace, replace_range) (replace_range_2, del_range_2): Don't adjust overlays explicitly here any more. * test/src/buffer-tests.el (test-overlay-insert-before-markers-empty) (test-overlay-insert-before-markers-non-empty): New tests.
| * | | | | | src/buffer.c: Fix interaction between overlays & indirect buffers (bug#58928)Stefan Monnier2022-11-011-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/buffer.c (adjust_overlays_for_insert) (adjust_overlays_for_delete): Repeat for all buffers sharing the same text. * src/itree.c (itree_insert_gap, itree_delete_gap): Allow an empty tree. * test/src/buffer-tests.el (buffer-tests--overlays-indirect-bug58928): New test.
* | | | | | | Fix byte-compiler warnings in testsGerd Möllmann2022-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/pkg-tests.el (pkg-tests-*package*): Fix empty let. (pkg-tests-use-package): Make local var status ignored.
* | | | | | | Merge remote-tracking branch 'origin/master' into feature/pkgGerd Möllmann2022-10-293-2/+6667
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge remote-tracking branch 'origin/feature/noverlay'Stefan Monnier2022-10-281-0/+6665
| |\ \ \ \ \ \
| | * | | | | | Add `get-pos-property' tests covering bug#58706Matt Armstrong2022-10-221-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/buffer-tests.el (get-pos-property-overlay-beg): New test. (get-pos-property-overlay-empty-rear-advance): ditto. (get-pos-property-overlay-past-rear-advance): ditto. (get-pos-property-overlay-at-narrowed-end): ditto.
| | * | | | | | Fix a narrow-to-region vs. overlays-at bugMatt Armstrong2022-10-211-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See bug#58703. * src/buffer.c (overlays_in): Add a new TRAILING arg expressing the behavior wanted by `overlays-at', namely to include all overlays beginning at the POS passed to `overlays-at', even if POS is the end of the narrowed region. Pass true and the search range is extended to ZV+1 if END is greater than ZV, just as is done for EMPTY. (overlays_at): Pass 'true' for the new trailing arg. At present this is the only caller passing 'true'. (mouse_face_overlay_overlaps): Pass 'false' for the new trailing arg. (disable_line_numbers_overlay_at_eob): ditto. (Foverlays_in): ditto. * src/editfns.c (overlays_around): ditto. * test/src/buffer-tests.el (sorted-overlays): Add a spot test for this.