aboutsummaryrefslogtreecommitdiffstats
path: root/test/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Allow creating a pipe process without a bufferSpencer Baugh2025-10-111-0/+6
| | | | | | | | | | | | | Previously, even passing :buffer nil to make-pipe-process would create a buffer. Now, if you explicitly call (make-pipe-process :buffer nil), it will create a pipe process without a buffer, just like all the other process creation functions. * src/process.c (Fmake_pipe_process): Check for explicit :buffer nil and don't make a buffer. (bug#79596) * doc/lispref/processes.texi (Asynchronous Processes): Update. * test/src/process-tests.el (process-test-make-pipe-process-no-buffer): Add test.
* Fix failed tests on embaMichael Albinus2025-09-181-0/+2
| | | | | | | * test/lisp/autorevert-tests.el (auto-revert-test05-global-notify) (auto-revert-test07-auto-revert-several-buffers): Adapt tests. * test/src/comp-resources/comp-test-funcs.el (foo): Define error symbol.
* ; even less test log spam from loadMattias Engdegård2025-09-121-2/+2
|
* Ignore keymaps at point for positions outside the bufferSpencer Baugh2025-09-091-0/+27
| | | | | | | | | | | | | | | | Correct a few edge cases where we used the keymaps at point when looking up keymaps for an event position which is outside the current buffer. Namely: - Clicking on a part of the mode line which is after the end of mode-line-format produces an event with non-nil posn-area but nil posn-string. - Even if posn-string doesn't have a local keymap, we should still ignore the keymaps at point if posn-string is non-nil. * src/keymap.c (Fcurrent_active_maps): Ignore keymaps at point for more positions outside the buffer. (bug#76620)
* Disallow string data resizing (bug#79784)Mattias Engdegård2025-08-242-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Only allow string mutation that is certain not to require string data to be resized and reallocated: writing bytes into a unibyte string, and changing ASCII to ASCII in a multibyte string. This ensures that mutation will never transform a unibyte string to multibyte, that the size of a string in bytes never changes, and that the byte offsets of characters remain the same. Most importantly, it removes a long-standing obstacle to reform of string representation and allow for future performance improvements. * src/data.c (Faset): Disallow resizing string mutation. * src/fns.c (clear_string_char_byte_cache): * src/alloc.c (resize_string_data): Remove. * test/src/data-tests.el (data-aset-string): New test. * test/lisp/subr-tests.el (subr--subst-char-in-string): Skip error cases. * test/src/alloc-tests.el (aset-nbytes-change): Remove test that is no longer relevant. * doc/lispref/strings.texi (Modifying Strings): * doc/lispref/sequences.texi (Array Functions): * doc/lispref/text.texi (Substitution): Update manual. * etc/NEWS: Announce.
* Speed up JSON parsing by not maintaining line and column (bug#79192)Mattias Engdegård2025-08-211-0/+29
| | | | | | | | | | | | | | | | | | | | | | We use the current parsing position instead. The line and column in the error weren't used (nor very accurate to begin with) and the user can easily compute them when needed. The line number calculation is kept just in case but deprecated, for removal in Emacs 32. * src/json.c (struct json_parser, json_parser_init): Update parser state. (json_signal_error): New position computation. (json_skip_whitespace_internal): Remove. (is_json_whitespace): New. (json_skip_whitespace, json_skip_whitespace_if_possible) (json_parse_unicode, json_parse_string, json_parse_number) (json_parse_value): Simplify and rewrite for efficiency. (count_chars, count_newlines) (string_byte_to_pos, string_byte_to_line) (buffer_byte_to_pos, buffer_byte_to_line): New. (Fjson_parse_string, Fjson_parse_buffer): Adapt to new parser state. * test/src/json-tests.el (json-tests--parse-string-error-pos) (json-tests--parse-buffer-error-pos, json-parse-error-position): New. * etc/NEWS: Note deprecation of line and column.
* ; Stabilize a Windows-specific process-testEli Zaretskii2025-08-161-6/+6
| | | | | * test/src/process-tests.el (process-sentinel-interrupt-event): Improve stability of results, and show all of the results.
* ; Skip a process-test that is unreliable on MS-WindowsEli Zaretskii2025-08-161-0/+3
| | | | | * test/src/process-tests.el (process-tests/multiple-threads-waiting): Skip on MS-Windows.
* ; Fix thread-testsEli Zaretskii2025-08-101-1/+3
| | | | | | * test/src/thread-tests.el (make-thread): Fix declaration. (thread-set-buffer-disposition, thread-buffer-disposition): Declare. (Bug#76969)
* Allow thread's buffer to be killed, by defaultDmitry Gutov2025-08-091-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/thread.c (Fmake_thread): Add new argument (bug#76969). (thread_set_error): New function, extracted from thread-signal. (Fthread_buffer_disposition): Add getter. (Fthread_set_buffer_disposition): And setter. (thread_check_current_buffer): Check the values of threads' buffer_disposition. (thread_all_before_buffer_killed): New function. (init_threads): Set buffer_disposition to nil for the main thread. (syms_of_threads): Add new symbols and define the error. * src/thread.h (thread_state): New field buffer_disposition. (thread_all_before_buffer_killed): Declare. * src/buffer.c (Fkill_buffer): Call thread_check_current_buffer one more time after all hooks and after that call thread_all_before_buffer_killed. * src/comp.c (ABI_VERSION): Increase the value. * test/src/thread-tests.el (thread-buffer-disposition-t) (thread-buffer-disposition-nil) (thread-buffer-disposition-silently) (thread-set-buffer-disposition) (thread-set-buffer-disposition-main-thread): New tests. * doc/lispref/threads.texi (Basic Thread Functions): Document buffer-disposition in make-thread and its getter and setter. * etc/NEWS: Add entry.
* Fix some tests on OpenBSDManuel Giraud2025-08-071-1/+5
| | | | | | | * test/lisp/eshell/em-script-tests.el (em-script-test/batch-file/shebang): "env -S" is not supported. * test/src/fns-tests.el (fns-tests-random): 'random' is non-deterministic on OpenBSD. (Bug#79190)
* Move keyboard input functions from lread.c to keyboard.cMattias Engdegård2025-07-302-6/+6
| | | | | | | | | | | | These have nothing to do with the Lisp reader at all. Suggested by Lynn Winebarger (bug#79035). * src/lread.c (read_filtered_event, Fread_char, Fread_event) (Fread_char_exclusive, Qascii_character): Move... * src/keyboard.c: ...here. * test/src/lread-tests.el (test-inhibit-interaction): Move... * test/src/keyboard-tests.el (keyboard-inhibit-interaction): ...here.
* Check for end-of-file when reading character escapes (bug#79097)Mattias Engdegård2025-07-251-0/+31
| | | | | * src/lread.c (read_char_escape): Add check. * test/src/lread-tests.el (lread-char-escape-eof): New test.
* ; Avoid lexical-binding warning in lread-testsEli Zaretskii2025-07-191-2/+6
| | | | | * test/src/lread-tests.el (lread-test-bug-31186) (lread-tests--unescaped-char-literals): Avoid lexical-binding warning.
* ; silence some compiler warnings in testsMattias Engdegård2025-07-191-0/+1
| | | | | | | * test/lisp/savehist-tests.el (savehist-test-saved-variables): (savehist-test-duplicated-saved-symbols): * test/src/data-tests.el (binding-test-toplevel-values): Suppress harmless warnings.
* Speed up unintern, and fix symbol shorthand edge case (bug#79035)Mattias Engdegård2025-07-191-0/+77
| | | | | | | | | | Don't do a full lookup if the argument is a symbol, and only compute the hash index once. Fix a bug that occurred when there is another symbol whose shorthand is equal to the true name of the symbol being removed. * src/lread.c (Funintern): Rewrite for speed and correctness. (oblookup_last_bucket_number, oblookup): Remove now unused variable. * test/src/lread-tests.el (lread-unintern): New test.
* ; Fix last change.Eli Zaretskii2025-07-171-0/+1
|
* ; * test/src/fileio-tests.el (fileio-tests--read-directory): New test.Eli Zaretskii2025-07-171-0/+15
|
* ; Fix 'threads-join-error' testEli Zaretskii2025-07-141-5/+10
| | | | | | | * test/src/thread-tests.el (threads-thread-sleeps): New helper function. (threads-join-error): Fix to work as intended, and remove the 'unstable' tag. (Bug#40823)
* * src/fns.c (Flength): Fix char table length off-by-one bug.Mattias Engdegård2025-07-111-1/+2
|
* Nativecomp don't materialize non-materializable objects (bug#78606)Andrea Corallo2025-07-092-0/+11
| | | | | | | | | | | | | | The native compiler should not try to generate in rendered code immediate floats produced by the constrain on the '=' operator. * test/src/comp-tests.el (comp-test-78606-1): Add test. * test/src/comp-resources/comp-test-funcs.el (comp-test-78606-1-f): New function. * src/comp.c (emit_mvar_rval): Check if an immediate is materializable. * lisp/emacs-lisp/comp.el (comp-ctxt): Add 'non-materializable-objs-h' slot. (comp--fwprop-insn): Update call. * lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Add parameter.
* Read non-ASCII chars from unibyte string sources as raw bytesMattias Engdegård2025-07-071-0/+6
| | | | | | | Previously, latin-1 was incorrectly assumed (bug#70988). * src/lread.c (readchar): Convert to raw byte. * test/src/lread-tests.el (lread-unibyte-string-source): New test.
* Print non-ASCII chars in unibyte symbols as raw bytesMattias Engdegård2025-07-071-0/+7
| | | | | | | Previously, latin-1 was incorrectly assumed (bug#70988). * src/print.c (print_object): Call the correct function. * test/src/print-tests.el (print-unibyte-symbols): New test.
* Read characters from functions as multibyteMattias Engdegård2025-07-071-0/+5
| | | | | | | Previously, latin-1 was incorrectly assumed (bug#70988). * src/lread.c (readchar): Set multibyte flag. * test/src/lread-tests.el (lread-function-source): New test.
* (Ftranspose_regions): Fix bug#76124Stefan Monnier2025-07-061-0/+25
| | | | | | | * src/editfns.c (Ftranspose_regions): Be careful that ELisp code could move the gap from under our feet. * test/src/editfns-tests.el (editfns-tests--bug76124): New test.
* Avoid extra output in Vprin1_to_string_buffer (bug#78842)Pip Cet2025-06-281-1/+3
| | | | | | | | | | | print_error_message can throw after producing some output, so use unwind-protect to ensure prin1-to-string-buffer is cleared. * src/print.c (erase_prin1_to_string_buffer): New. (Ferror_message_string): Use it to catch errors thrown in 'print_error_message'. * test/src/print-tests.el (error-message-string-circular): Expand test.
* (Finsert_file_contents): Refine commit d07af40d8826Stefan Monnier2025-06-271-0/+26
| | | | | | | | * src/fileio.c (Finsert_file_contents): Inhibit ask-supersession only if we're VISITing in a non-narrowed buffer (bug#78866). * test/src/fileio-tests.el (ert--tests-dir): New var. (fileio-tests--insert-file-contents-supersession): New test.
* Fix usage of 'treesit-defun-type-regexp' in treesit-tests.Juri Linkov2025-06-251-1/+2
| | | | | | | | * test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Replace 'treesit-defun-type-regexp' with '(or treesit-defun-type-regexp 'defun)' that fixes the tests for ts-modes that set up the 'defun' thing instead of 'treesit-defun-type-regexp'.
* Make nativecomp don't error when encountering undeclared types (bug#6573)Andrea Corallo2025-06-171-0/+3
| | | | | | | * test/src/comp-resources/comp-test-funcs.el (comp-test-76573-1-f): New function. * lisp/emacs-lisp/comp-cstr.el (comp-supertypes): Don't error if 'type' is unknown.
* Fix segfault in profiler-cpu-log and profiler-memory-log (bug#78763)Zach Shaftel2025-06-141-0/+58
| | | | | | | | * src/profiler.c (export_log): Check if a log has been allocated first, and return nil if it hasn't. (Fprofiler_cpu_log, Fprofiler_memory_log): Doc fix. * test/src/profiler-tests.el (profiler-tests-cpu-profiler) (profiler-tests-memory-profiler): New tests.
* Gather variable binding tests in data-tests.elSean Whitton2025-05-301-0/+44
| | | | | | | | | | | | | | * test/lisp/emacs-lisp/lisp-tests.el (c-e-x, c-e-l): Move to data-tests.el. (core-elisp-tests-2-window-configurations): Rename ... (core-elisp-tests-1-window-configurations): ... to this. (core-elisp-tests-3-backquote): Rename ... (core-elisp-tests-2-backquote): ... to this. (core-elisp-tests-1-defvar-in-let) (core-elisp-tests-4-toplevel-values): Move and rename ... * test/src/data-tests.el (binding-test-defvar-in-let) (binding-test-toplevel-values): ... to these. (c-e-x, c-e-l): Moved from data-tests.el.
* Fix unsafe SDATA usage in print.c (bug#78590)Pip Cet2025-05-281-0/+18
| | | | | | | * src/print.c (print_string_1): Renamed from 'print_string', with an extra argument to disable nonascii escaping. (print_string): New function. (print_object): Use 'print_string_1', not 'strout'.
* Fix filelock-tests on MS-WindowsEli Zaretskii2025-05-121-14/+5
| | | | | | | | * test/src/filelock-tests.el (filelock-tests-file-locked-p-spoiled) (filelock-tests-unlock-spoiled) (filelock-tests-kill-buffer-spoiled): Don't special-case MS-Windows, as it was evidently fixed to signal the same error as Posix systems.
* Add test for file time-stamp granularity on MS-WindowsEli Zaretskii2025-05-111-0/+19
| | | | | * test/src/fileio-tests.el (fileio-tests-w32-time-stamp-granularity): New test.
* ; More fixes for treesit testsEli Zaretskii2025-05-051-0/+9
| | | | | | | | * test/src/treesit-tests.el (treesit-parse-string) (treesit-parser-tracking-line-column-p) (treesit-tracking-line-column-p, treesit--linecol-at) (treesit--linecol-cache-set, treesit--linecol-cache) (treesit-languages-require-line-column-tracking): Declare.
* ; Fix recently added treesit testsEli Zaretskii2025-05-051-0/+3
| | | | | | | * test/src/treesit-tests.el (treesit-linecol-basic) (treesit-linecol-search-back-across-newline) (treesit-linecol-col-same-line): Skip tests if tree-sitter is not available.
* Add line-column tracking for tree-sitterYuan Fu2025-05-031-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add line-column tracking for tree-sitter parsers. Copied from comments in treesit.c: Technically we had to send tree-sitter the line and column position of each edit. But in practice we just send it dummy values, because tree-sitter doesn't use it for parsing and mostly just carries the line and column positions around and return it when e.g. reporting node positions[1]. This has been working fine until we encountered grammars that actually utilizes the line and column information for parsing (Haskell)[2]. [1] https://github.com/tree-sitter/tree-sitter/issues/445 [2] https://github.com/tree-sitter/tree-sitter/issues/4001 So now we have to keep track of line and column positions and pass valid values to tree-sitter. (It adds quite some complexity, but only linearly; one can ignore all the linecol stuff when trying to understand treesit code and then come back to it later.) Eli convinced me to disable tracking by default, and only enable it for languages that needs it. So the buffer starts out not tracking linecol. And when a parser is created, if the language is in treesit-languages-require-line-column-tracking, we enable tracking in the buffer, and enable tracking for the parser. To simplify things, once a buffer starts tracking linecol, it never disables tracking, even if parsers that need tracking are all deleted; and for parsers, tracking is determined at creation time, if it starts out tracking/non-tracking, it stays that way, regardless of later changes to treesit-languages-require-line-column-tracking. To make calculating line/column positons fast, we store linecol caches for begv, point, and zv in the buffer (buf->ts_linecol_cache_xxx); and in the parser object, we store linecol cache for visible beg/end of that parser. In buffer editing functions, we need the linecol for start/old_end/new_end, those can be calculated by scanning newlines (treesit_linecol_of_pos) from the buffer point cache, which should be always near the point. And we usually set the calculated linecol of new_end back to the buffer point cache. We also need to calculate linecol for the visible_beg/end for each parser, and linecol for the buffer's begv/zv, these positions are usually far from point, so we have caches for all of them (in either the parser object or the buffer). These positions are far from point, so it's inefficient to scan newlines from point to there to get up-to-date linecol for them; but in the same time, because they're far and outside the changed region, we can calculate their change in line and column number by simply counting how much newlines are added/removed in the changed region (compute_new_linecol_by_change). * doc/lispref/parsing.texi (Using Parser): Mention line-column tracking in manual. * etc/NEWS: Add news. * lisp/treesit.el: (treesit-languages-need-line-column-tracking): New variable. * src/buffer.c: Include treesit.h (for TREESIT_EMPTY_LINECOL). (Fget_buffer_create): (Fmake_indirect_buffer): Initialize new buffer fields. (Fbuffer_swap_text): Add new buffer fields. * src/buffer.h (ts_linecol): New struct. (buffer): New buffer fields. (BUF_TS_LINECOL_BEGV): (BUF_TS_LINECOL_POINT): (BUF_TS_LINECOL_ZV): (SET_BUF_TS_LINECOL_BEGV): (SET_BUF_TS_LINECOL_POINT): (SET_BUF_TS_LINECOL_ZV): New inline functions. * src/casefiddle.c (casify_region): Record linecol info. * src/editfns.c (Fsubst_char_in_region): (Ftranslate_region_internal): (Ftranspose_regions): Record linecol info. * src/insdel.c (insert_1_both): (insert_from_string_1): (insert_from_gap_1): (insert_from_buffer): (replace_range): (del_range_2): Record linecol info. * src/treesit.c (TREESIT_BOB_LINECOL): (TREESIT_EMPTY_LINECOL): (TREESIT_TS_POINT_1_0): New constants. (treesit_debug_print_linecol): (treesit_buf_tracks_linecol_p): (restore_restriction_and_selective_display): (treesit_count_lines): (treesit_debug_validate_linecol): (treesit_linecol_of_pos): (treesit_make_ts_point): (Ftreesit_tracking_line_column_p): (Ftreesit_parser_tracking_line_column_p): New functions. (treesit_tree_edit_1): Accept real TSPoint and pass to tree-sitter. (compute_new_linecol_by_change): New function. (treesit_record_change_1): Rename from treesit_record_change, handle linecol if tracking is enabled. (treesit_linecol_maybe): New function. (treesit_record_change): New wrapper around treesit_record_change_1 that handles some boilerplate and sets buffer state. (treesit_sync_visible_region): Handle linecol if tracking is enabled. (make_treesit_parser): Setup parser's linecol cache if tracking is enabled. (Ftreesit_parser_create): Enable tracking if the parser's language requires it. (Ftreesit__linecol_at): (Ftreesit__linecol_cache_set): (Ftreesit__linecol_cache): New functions for debugging and testing. (syms_of_treesit): New variable Vtreesit_languages_require_line_column_tracking. * src/treesit.h (Lisp_TS_Parser): New fields. (TREESIT_BOB_LINECOL): (TREESIT_EMPTY_LINECOL): New constants. * test/src/treesit-tests.el (treesit-linecol-basic): (treesit-linecol-search-back-across-newline): (treesit-linecol-col-same-line): (treesit-linecol-enable-disable): New tests. * src/lisp.h: Declare display_count_lines. * src/xdisp.c (display_count_lines): Remove static keyword.
* (decode_coding): Avoid nested *-change-functions (bug#78042)Stefan Monnier2025-05-021-4/+24
| | | | | | | | | | | | | * src/coding.c (decode_coding): Avoid nested *-change-functions (bug#78042). * test/src/editfns-tests.el (sanity-check-change-functions-before) (sanity-check-change-functions-after): Record notifications in `sanity-check-change-functions-op`. (sanity-check-change-functions-with-op): Don't rely on `sanity-check-change-functions-op` always holding only the `op`. (sanity-check-change-functions-errors): Include the sequence of notifications in the error info. (editfns-tests--before/after-change-functions): Add tests for (bug#78042).
* Don't escape "." in `prin1' when followed by a letterSpencer Baugh2025-04-281-2/+4
| | | | | | | | | | | | | | | | | | | Among other users, let-alist widely uses symbols which start with a ".". Make those symbols print more nicely by tweaking the escaping rules in print_object to not escape a leading "." followed by a letter. This is a conservative change to avoid constraining future lexer changes. This is a followup to 637dde4aba921435f78d0de769ad74c4f3230aa6, which removed some unnecessary escaping of "." and "?" when printing symbols in prin1. (Actually, if we always escaped "?" (which was the case before 637dde4aba92) then "." only ever needs to be escaped when string_to_number returns non-nil. So 637dde4aba92 could have just dropped the escaping of "." with no other changes, if it didn't also remove escaping of "?") * src/print.c (print_object): Don't escape "." as the first character in a symbol if followed by a letter. (bug#77656). * test/src/print-tests.el (test-dots): Update for new behavior.
* Use the first parser from 'treesit-parser-list' to fix tests.Juri Linkov2025-04-171-115/+120
| | | | | | | | | | | | * lisp/treesit.el (treesit-parsers-at): Add treesit-primary-parser only when it's non-nil. When the result list is still empty, add the first parser from 'treesit-parser-list'. https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00627.html * test/src/treesit-tests.el (treesit-node-supplemental) (treesit-node-at, treesit-node-check) (treesit-search-subtree-forward-1) (treesit-search-subtree-backward-1): Wrap test body in 'with-temp-buffer'.
* Respect narrowed buffers when parsing JSON (bug#77325)Pip Cet2025-03-301-0/+26
| | | | | | | | * src/json.c (Fjson_insert): Simplify 'memcpy' argument. (Fjson_parse_buffer): Only read to ZV, not all the way to Z. * test/src/json-tests.el (with-all-gap-positions-in-temp-buffer): New macro. (json-parse-buffer/restricted): New test.
* src/insdel.c (adjust_markers_for_replace): Fix insertion caseStefan Monnier2025-03-291-0/+14
| | | | test/src/editfns-tests.el (editfns-tests--insert-via-replace): New test
* (replace-region-contents): Improve and promote (bug#76313)Stefan Monnier2025-03-291-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swap the role of `replace-region-contents` and `replace-buffer-contents`, so `replace-region-contents` is the main function, implemented in C, and `replace-buffer-contents` is a mere wrapper (marked as obsolete). Also remove the need to rely on narrowing and on describing the new text as a function. Finally, allow MAX-SECS==0 to require a cheap replacement, and add an INHERIT argument. * src/editfns.c: Include `coding.h`. (Freplace_region_contents): Rename from `Freplace_buffer_contents`. Change calling convention to that of `replace-region-contents`. Add more options for the SOURCE argument. Add INHERIT argument. Skip the costly algorithm if MAX-SECS is 0. * src/insdel.c (replace_range): Allow NEW to be a buffer. * lisp/subr.el (replace-buffer-contents): New implementation. * lisp/emacs-lisp/subr-x.el (replace-region-contents): Delete. * doc/lispref/text.texi (Replacing): Document new API for `replace-region-contents`. Remove documentation of `replace-buffer-contents`. * test/src/editfns-tests.el (replace-buffer-contents-1) (replace-buffer-contents-2, replace-buffer-contents-bug31837): Use `replace-region-contents`. (editfns--replace-region): Delete. (editfns-tests--replace-region): Use `replace-region-contents`. Adds tests for new types of SOURCE args.
* Add basic and low-level tests for hash tablesStefan Kangas2025-03-241-0/+71
| | | | | | | * test/src/fns-tests.el (test-hash-table) (test-hash-table-wrong-keywords, test-remhash, test-clrhash) (test-hash-table-p, test-hash-table-count, test-maphash) (test-copy-hash-table): New tests.
* Fix a nativecomp type propagation bug (bug#74771)Andrea Corallo2025-03-231-1/+6
| | | | | | * lisp/emacs-lisp/comp.el (comp--add-cond-cstrs): Don't emit negated cstr. * test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
* Correctly unload variable aliases.Jens Schmidt2025-03-161-0/+12
| | | | | | | | | | | * src/eval.c (Finternal_delete_indirect_variable): Add function. * lisp/loadhist.el (loadhist-unload-element): Use it for variable aliases. * test/src/eval-tests.el (eval-tests--internal-delete-indirect-variable): Test function `internal-delete-indirect-variable'. * test/lisp/loadhist-tests.el (loadhist-test-unload-feature-alias): * test/lisp/loadhist-resources/loadhist--alias.el: Test unloading of features that define variable aliases. (Bug#76748)
* (Freplace_buffer_contents): Preserve markers more carefullyStefan Monnier2025-03-111-7/+9
| | | | | | | | | | | | | Use `replace_range` rather than `delete+insert`. * src/insdel.c (replace_range): Allow NEW to specify a chunk of buffer text. * src/editfns.c (Freplace_buffer_contents): Use it. * test/src/editfns-tests.el (replace-buffer-contents-1): Remove incorrect check which happened to succeed because point was not preserved carefully enough. Make the replacement text share a bit more content to make the test a bit more strict. (editfns-tests--replace-region): Doesn't fail any more.
* Merge from origin/emacs-30Eli Zaretskii2025-03-011-1/+1
|\ | | | | | | | | | | | | 62b3d3136fa Fix fns-tests-collate-strings failure with musl 840c6824589 ; (completion-preview-complete): Fix bug#76606 fa42626a6a8 ; Fix indentation in cl.texi example 7ff806da496 ; Fix my last commit
| * Fix fns-tests-collate-strings failure with muslPaul Eggert2025-02-271-1/+1
| | | | | | | | | | | | | | | | * test/src/fns-tests.el (fns-tests-collate-strings): Don’t assume "en_XY.UTF-8", or any particular string, is an invalid locale, as they all seem to be valid in musl. Instead, simply test that a non-string is invalid. (Bug#76550)
| * Update copyright year to 2025Stefan Kangas2025-01-0252-52/+52
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".