aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; A test commitscratch/test-remoteGerd Möllmann2025-09-161-1/+1
|
* Merge from origin/emacs-30Eli Zaretskii2025-09-131-3/+3
|\ | | | | | | | | | | 47454566772 ; * lisp/dired-x.el (dired-find-subdir): Doc fix (bug#794... 0832e5fec56 ; * lisp/vc/vc.el (vc-print-root-log): Improve docstring ... 2fafcdbf6ac ; Minor copyedits in src/editfns.c
| * ; Minor copyedits in src/editfns.cEli Zaretskii2025-09-091-3/+3
| | | | | | | | | | | | * src/editfns.c (Fbuffer_string, Freplace_buffer_contents) (styled_format): Avoid using non-ASCII characters in doc strings and comments.
* | Allow disabling of reloading files on doc read failureSpencer Baugh2025-09-131-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Reloading a byte-compiled file when we fail to fetch some docstring in it is not guaranteed to work and can cause subtle bugs which are worse than simply not having a docstring. Add 'documentation-dynamic-reload' variable to allow disabling this behavior. See the discussion in https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00304.html for more details. * src/doc.c (syms_of_doc): Add 'documentation-dynamic-reload'. (Fdocumentation, Fdocumentation_property): Check value of 'documentation-dynamic-reload'.
* | Ignore keymaps at point for positions outside the bufferSpencer Baugh2025-09-091-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | Allow use of \N{...} earlier to help fix bug#79353Stefan Monnier2025-09-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/shorthands.el (hack-read-symbol-shorthands): Avoid inf-loops during bootstrap. E.g. this can occur while loading `uni-special-lowercase.el` where `hack-local-variables--find-variables` uses `downcase` which triggers loading `uni-special-lowercase.el`, ... * lisp/international/mule-cmds.el (ucs-names): Explicitly require `charprop`. * src/Makefile.in ($(lispsource)/loaddefs.el): Depend on `charprop`.
* | Harmonise doc strings for {re-,posix-,}search-{forward,backward}Mattias Engdegård2025-09-071-61/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The doc strings for re-search-forward and re-search-backward have been improved (bug#25193, bug#31584) but the corresponding posix- and non-regexp search functions still have the original text, despite describing the exact same mechanism. There is no reason for them to differ, so we make them all use the updated version which also is more readable. Any future doc string improvements should be made to all of them in the same way for consistency. * src/search.c (Fsearch_backward, Fsearch_forward) (Fposix_search_backward, Fposix_search_forward): Use text from Fre_search_forward and Fre_search_backward.
* | ; * src/process.c (deactivate_process): Fix last change.Eli Zaretskii2025-09-061-2/+5
| |
* | Avoid assertion violations when starting client network processEli Zaretskii2025-09-061-1/+5
| | | | | | | | | | * src/process.c (deactivate_process): Clear the callback info of descriptors we are closing. (Bug#79367)
* | (redisplay_internal): Fix `follow-mode` (bug#79306)Stefan Monnier2025-09-051-2/+2
| | | | | | | | | | * src/xdisp.c (redisplay_internal): Don't increment `redisplay_counter` if we ail out before starting an actual redisplay.
* | Fix locking to threads of the client network processEli Zaretskii2025-09-051-0/+15
| | | | | | | | | | | | * src/process.c (server_accept_connection): Make the client process be locked to the same thread as the parent server process, or unlocked if the server process was unlocked. (Bug#79367)
* | Fix crash when the same XI device appears in multiple hierarchy eventsPo Lu2025-09-041-4/+4
| | | | | | | | | | * src/xterm.c (xi_disable_devices): Move `out' label into the outermost loop. (bug#79343)
* | ; * src/data.c (Fash): GCC argument signedness quibbleMattias Engdegård2025-09-011-1/+1
| |
* | * src/data.c (Fash): Speed up when argument and result are fixnums.Mattias Engdegård2025-09-011-9/+17
| |
* | bug#79241: Fix incorrect handling of overlays in `vertical-motion'Sergio Pastor Pérez2025-08-301-0/+3
| | | | | | | | | | | | | | | | | | * src/indent.c (vertical-motion): If iterator is inside an overlay, reset it to the beginning of line before trying to reach goal column. This prevents point from being stuck at the beginning of overlay strings during upward motions. Copyright-paperwork-exempt: yes
* | ; Fix formattingRobert Pluim2025-08-271-3/+3
| | | | | | | | | | * src/process.c (clear_fd_callback_data, delete_write_fd, delete_keyboard_wait_descriptor): Space before paren.
* | Fix last change in 'next_element_from_display_vector'Eli Zaretskii2025-08-261-2/+8
| | | | | | | | | | | | | | * src/xdisp.c (next_element_from_display_vector): Only switch the iterator from unibyte to multibyte, never in the other direction, and not if the original character came from a unibyte buffer. (Bug#79317)
* | Fix use of display-table for mode-line displayEli Zaretskii2025-08-251-0/+4
| | | | | | | | | | | | * src/xdisp.c (next_element_from_display_vector): Fix handling non-ASCII characters in display-table cells corresponding to ASCII characters. (Bug#79311)
* | Fix assertion violations caused by recent redisplay changesEli Zaretskii2025-08-251-2/+0
| | | | | | | | | | * src/xdisp.c (push_it): Don't rest the string_from_prefix_prop_p flag. (Bug#79304)
* | Attempt to fix assertion violations in bug#79304Eli Zaretskii2025-08-251-21/+8
| | | | | | | | | | | | | | | | | | | | The following changes make the changes for bug#79275 less radical, closer to their previous shape, while still fixing that bug. * src/xdisp.c (push_prefix_prop, get_it_property): Restore original code that determined the object and position on it. (get_line_prefix_it_property): Take FROM_BUFFER from the actual object of the prefix property.
* | Disallow string data resizing (bug#79784)Mattias Engdegård2025-08-244-87/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix line-prefix display when there's a 'display' string at BOLEli Zaretskii2025-08-231-19/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (push_it): Reset the 'string_from_prefix_prop_p' flag. (try_window_id): Disable this optimization if the last unchanged at-beg row begins with a display or overlay string and there;s a line/wrap-prefix property on the row. (push_prefix_prop): Accept an additional argument FROM_BUFFER to indicate that the prefix property was found on buffer text underlying a display or overlay property, and set up the position to pop to accordingly. Reset the 'string_from_display_prop_p' flag of the iterator after pushing IT to set up for iterating the prefix string. (get_it_property): Use it->string, not it->object, as indication that prefix property is on a string. (get_line_prefix_it_property): Accept an additional argument: pointer to a flag indicating that the prefix property was found on buffer text underlying a display or overlay property. Callers adjusted. (handle_line_prefix): Use the FROM_BUFFER flag to correctly handle prefix properties on buffer text at the same position as a display string. (Bug#79275)
* | Speed up JSON parsing by not maintaining line and column (bug#79192)Mattias Engdegård2025-08-211-88/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | ; * src/lread.c (from_buffer_p): New abstraction.Mattias Engdegård2025-08-211-2/+8
| |
* | Signal end-of-file with more correct dataSpencer Baugh2025-08-191-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | end_of_file_error previously always signaled end-of-file with load-true-file-name if that was non-nil (and a string). However, this might be the wrong thing to do; for example, if a file being loaded calls read on a buffer. * src/lread.c (end_of_file_error): <source>: New argument; check it to determine what data to signal with. (bug#68546) (read_char_escape, read_char_literal, read_string_literal) (skip_space_and_comments, read0): Pass source to end_of_file_error.
* | Reject invalid error symbols (Bug#76447)Stefan Monnier2025-08-171-0/+2
| | | | | | | | | | * src/eval.c (signal_or_quit): Signal an error if 'signal' gets called with an invalid error symbol.
* | ; * src/process.c (set_proc_thread): Fix assertion.Eli Zaretskii2025-08-161-1/+2
| |
* | Make sure 'make-process' locks the process to the current threadEli Zaretskii2025-08-161-6/+15
| | | | | | | | | | * src/process.c (set_proc_thread): New function. (Fset_process_thread, create_process): Use it.
* | Zero fd_callback_info when deleting an fdSpencer Baugh2025-08-161-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | .waiting_thread and .thread could be left set to non-NULL values in a deleted fd_callback_info entry. These would never be cleared by e.g. clear_waiting_thread_info since that only clears fd_callback_info entries up to max_desc. Clear fd_callback_info entirely when deleting an entry. * src/process.c (clear_fd_callback_data): Add. (delete_write_fd, delete_keyboard_wait_descriptor): Call clear_fd_callback_data. (bug#79201) (delete_read_fd): Remove duplicated clearing code. (deactivate_process): Remove duplicate recompute_max_desc.
* | New user option 'treesit-enabled-modes' (bug#79180)Juri Linkov2025-08-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-enabled-modes): New user option. * src/treesit.c (treesit-major-mode-remap-alist): New variable. * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/mhtml-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: Add ts-mode mapping to 'treesit-major-mode-remap-alist' for ts-modes that already have the corresponding non-ts mode association in 'auto-mode-alist'. * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode-maybe): * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode-maybe): * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-maybe): * lisp/progmodes/go-ts-mode.el (go-ts-mode-maybe) (go-mod-ts-mode-maybe, go-work-ts-mode-maybe): * lisp/progmodes/heex-ts-mode.el (heex-ts-mode-maybe): * lisp/progmodes/lua-ts-mode.el (lua-ts-mode-maybe): * lisp/progmodes/php-ts-mode.el (php-ts-mode-maybe): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode-maybe): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode-maybe) (tsx-ts-mode-maybe): * lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode-maybe): * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode-maybe): Add a wrapper function to 'auto-mode-alist' for ts-modes that have no corresponding non-ts mode. Also add a mapping to 'treesit-major-mode-remap-alist' for the case when a non-ts mode is installed from an external source to be able to customize it with 'treesit-enabled-modes'.
* | Fix file notification problem on Windows.Michael Albinus2025-08-122-5/+5
| | | | | | | | | | | | | | * src/inotify.c (inotify_callback): Set event.frame_or_window to Qnil. * src/keyboard.c (make_lispy_event): Make a better check for the HAVE_W32NOTIFY case when creating a Qfile_notify event.
* | Fix NS frame position update after resize/moveDr.Sc.KAWAMOTO,Takuji2025-08-111-26/+37
| | | | | | | | | | | | | | | | | | | | | | Fixes bug#74074, bug#79164. * src/nsterm.m ([EmacsView windowDidEndLiveResize:]): ([EmacsView updateFramePosition]): New functions. ([EmacsView windowDidMove:]): Move contents of this function into updateFramePosition and call it. Copyright-paperwork-exempt: yes
* | ; Coding style fixDmitry Gutov2025-08-111-2/+2
| |
* | Allow thread's buffer to be killed, by defaultDmitry Gutov2025-08-094-9/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 last changeEli Zaretskii2025-08-091-0/+2
| | | | | | | | | | * src/print.c (print_create_variable_mapping): Add back the wrong spelling as compatibility measure (bug#75784).
* | Improve Vprint_variable_mappingZach Shaftel2025-08-091-1/+2
| | | | | | | | | | | | * src/print.c (print_create_variable_mapping): Fix a typo, `unreadeable-function' to `unreadable-function'. Add `symbols-bare' as an override for `print-symbols-bare'. (Bug#79161)
* | Variable to control overshoot and backup for TTY cursor motionManuel Giraud2025-08-092-19/+35
| | | | | | | | | | | | | | | | * src/term.c (syms_of_term): New variable. * src/cm.c (calccost): Control overshooting with new variable. * etc/NEWS: Document new variable. * lisp/term/rxvt.el (terminal-init-rxvt): Force no TAB+BS for rxvt. (Bug#78474)
* | ; * src/android.c (android_url_encode): Typo in comment.Po Lu2025-08-091-3/+3
| |
* | ; Fix last changeEli Zaretskii2025-08-071-6/+6
| | | | | | | | | | | | | | * src/eval.c (Fdebugger_trap): Minor wording changes in doc string. * etc/DEBUG: Some copyedits of a recently-added text.
* | New debugger-trap function to break to GDBJeremy Bryant2025-08-072-0/+21
| | | | | | | | | | | | | | | | | | | | * src/eval.c: new primitive debugger-trap * src/.gdbinit: set breakpoint to Fdebugger_trap * etc/DEBUG: document it. Remove suggestion to use Fredraw_display. This do-nothing primitive gives control to GDB, and for debugging convenience a breakpoint is set by default in .gdbinit.
* | Handle inhibiting implied resizing for frames without initial tool barMartin Rudalics2025-08-052-2/+21
| | | | | | | | | | | | | | | | | | * src/xfns.c (x_set_tool_bar_lines, x_change_tool_bar_height) * src/pgtkfns.c (x_change_tool_bar_height) (pgtk_set_tool_bar_lines): Set f->tool_bar_resized to true so inhibiting implied resizing works for frames without initial tool bar too. See the thread https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00034.html.
* | Port better to Linux with 1 MiB pagesPaul Eggert2025-08-025-22/+12
| | | | | | | | | | | | * src/lisp.h: Include <sys-limits.h>. (MAX_RW_COUNT): Remove, as it is the same thing as sys-limits.h’s SYS_BUFSIZE_MAX. All uses replaced by SYS_BUFSIZE_MAX.
* | NS: Correct the accessibility role of Emacs windows (bug#77062)Rudolf Adamkovič2025-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the accessibility role of Emacs windows to be "standard window" (AXWindow) instead of "text field" (AXTextField). This matches other applications on NS, as can be verified with any accessibility inspector. All widely used NS ports, such as Emacs Plus, have this patch already applied. As for practical impact, this change makes Emacs, for example, work with tiling window managers, such as Yabai, where many users report problems with Emacs specifically, and are instructed to simply avoid the official NS port of GNU Emacs due to this problem. * src/nsterm.m: ([EmacsWindow accessibilityAttributeValue:]): Make the accessibility role of Emacs windows to be "standard window" (AXWindow) instead of "text field" (AXTextField).
* | Refactor reader to use readbuf_t in more placesMattias Engdegård2025-07-301-98/+68
| | | | | | | | | | | | | | | | | | | | Simplify the code by using the already existing dynamic string buffer type. This is a refactoring; performance isn't measurably affected. * src/lread.c (grow_read_buffer): Dissolve into... (readbuf_grow): ...here, simplifying the code. (add_char_to_buffer): Check for growth before adding char, not after. (read_integer, read_string_literal): Use readbuf_t.
* | Move keyboard input functions from lread.c to keyboard.cMattias Engdegård2025-07-302-270/+270
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | ; * src/bytecode.c: remove unneeded includesMattias Engdegård2025-07-301-4/+0
| |
* | Disable Gnulib’s non-Gregorian calendarsPaul Eggert2025-07-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare for the next Gnulib merge by disabling the optional support for non-Gregorian calendars recently added to Gnulib’s nstrftime module. This would be tricky to integrate with Emacs, as Emacs has its own (much fancier) calendar system, one that at least for the Persian calendar sometimes disagrees with Gnulib’s, and it’s likely not worth the trouble of reconciling the conflicts. * src/conf_post.h (SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME): New macro, defined to false. * admin/merge-gnulib (GNULIB_MODULES): nstrftime → nstrftime-limited. (AVOIDED_MODULES): Add localcharset. Near the end, also remove the files lib/calendar-ethiopian.h, lib/calendar-persian.h, lib/calendar-thai.h, lib/calendars.h.
* | ; * src/pdumper.c (dump_buffer): Update HASH_buffer.Eli Zaretskii2025-07-281-1/+1
| |
* | ; * src/emacs.c (default_PATH) [DOS_NT]: Add commentary.Eli Zaretskii2025-07-271-0/+3
| |
* | Better default PATH on MS-WindowsPaul Eggert2025-07-271-0/+3
| | | | | | | | | | | | * src/emacs.c (default_PATH): Use a more-reasonable default for MS-Windows and DOS. Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2025-07/msg00384.html