aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix `signal` calls where the data argument is not a listStefan Monnier30 hours1-3/+3
| | | | | | | | | | | * test/src/thread-tests.el (threads-join-error): * test/src/emacs-module-resources/mod-test.c (Fmod_test_signal): * src/print.c (print_bind_overrides): * lisp/url/url-future.el (url-future-finish, url-future-errored) (url-future-call, url-future-cancel): Make sure signal's data is a list. * test/src/emacs-module-tests.el (mod-test-non-local-exit-signal-test): Adjust accordingly.
* Improve the error APIStefan Monnier34 hours1-3/+9
| | | | | | | | | | | | | | | | | | | | Define new functions to manipulate error descriptors and add support for `signal` to *re*signal a previous error. * src/eval.c (Fsignal): Make the second arg optional and document the possibility of passing a whole error descriptor to re-signal it. (signal_or_quit): Fix a few corner case issues when DATA is `nil` and ERROR_SYMBOL is an error descriptor. * lisp/subr.el (error-type-p, error--p, error-type, error-data) (error-has-type-p, error-slot-value): New function. * doc/lispref/control.texi (Handling Errors): Prefer "error descriptor" to "error description". Use the new single-arg call to `signal` to re-throw an error. Document `error-type`, `error-data` and `error-slot-value`. (Error Symbols): Document the new functions `error-type-p` and `error-has-type-p`.
* Fix infloop when decoding incomplete embedded UTF-8 inputPip Cet3 days1-1/+5
| | | | | * src/coding.c (decode_coding_iso_2022): Record conversion result for incomplete data.
* Fix segfaults in 'kbd_buffer_get_event'Eli Zaretskii3 days1-1/+5
| | | | | | * src/keyboard.c (kbd_buffer_get_event): Ignore selection-request events when accessing the frame of an event. Suggested by dick r. chiang <dick.r.chiang@gmail.com>. (Bug#80558)
* ; Move ns_init_colors from Fns_list_colors to emacs.c (bug#80377)Stéphane Marks3 days3-10/+8
| | | | | | | | | | | Support calls to ns_lisp_to_color or Fns_list_colors in headless environments where ns_term_init is not called, and calls before ns_term_init runs. * src/emacs.c (main): Call ns_init_colors when not in dump mode. * src/nsfns.m (ns_init_colors): Make public function. (Fns_list_colors): Remove ns_init_colors call. * src/nsterm.h: extern ns_init_colors.
* Additional fixes for 'get-mru-frame' (Bug#80397)Martin Rudalics4 days1-1/+2
| | | | | | * src/frame.c (delete_frame): Call 'get-mru-frame' safely and with EXCLUDE-FRAME argument set up correctly. * lisp/frame.el (get-mru-frames, get-mru-frame): Fix doc-strings.
* Fix segfault introduced by recent 'get-mru-frame' changeMartin Rudalics5 days1-1/+2
| | | | | * src/frame.c (delete_frame): Fix segfault when deleting a frame and 'get-mru-frame' returns that frame.
* Fix seg fault when image dimensions don't match (bug#80518)Alan Third6 days1-1/+9
| | | | | | * src/image.c (four_corners_best): [USE_CAIRO] Reset the image dimensions to real values. (Fimage_transforms_p): Fix typo.
* Faster JSON string serialisation (bug#80529)Mattias Engdegård7 days1-5/+9
| | | | | | | | | | | * src/json.c (json_out_string): Optimise for runs of non-special ASCII chars. This seems to be a a substantial performance gain for long strings but a smaller regression for short strings (up to 6 chars or thereabouts, depending on cpu, compiler, and/or C library). Still likely worth it. Suggested by Pavel <cyberkm@gmail.com>.
* Add mirroring for special glyphs (bug#80440)Manuel Giraud7 days1-25/+171
| | | | | | | | | | | | | | | | | See initial discussion here: https://lists.gnu.org/archive/html/emacs-devel/2026-02/msg00400.html * lisp/international/characters.el (pairs): Populate special-mirror-table. * src/xdisp.c (produce_special_glyphs): Add two arguments. One to identify the paragraph direction and one to identify that the glyph is produced on the left hand side of a window. Mirror glyph defined in the display table according to the new special-mirror-table. Bidi mirroring always takes precedence. (init_iterator, insert_left_trunc_glyphs, display_line) (display_string): Call 'produce_special_glyphs' with new arguments. (syms_of_xdisp) <special-mirror-table>: New char-table. * etc/NEWS: Announce the change.
* ; Move documentation for multiple-terminals-merge-keyboards.Sean Whitton7 days1-30/+4
|
* ; * src/w32image.c (w32_gdip_export_frame): Add error checking.Eli Zaretskii8 days1-1/+5
|
* Teach Emacs on MS-Windows how to export frame screenshotsEli Zaretskii9 days3-1/+127
| | | | | | | | * src/w32image.c (w32_gdip_export_frame): New function. (gdiplus_init): Load 'GdipCreateBitmapFromHBITMAP' from GDI+ DLL. * src/w32fns.c (Fw32_export_frame): New primitive. * etc/NEWS: Announce the new primitive.
* New variable 'multiple-terminals-merge-keyboards'Sean Whitton10 days3-7/+44
| | | | | | | | | | | | | * src/keyboard.c (syms_of_keyboard): <multiple_terminals_merge_keyboards>: New variable. (read_event_from_main_queue): Mention it in message. * lisp/cus-start.el: Make it customizable. * src/callint.c (Ffuncall_interactively): * src/keyboard.c (Frecursive_edit): * src/minibuf.c (read_minibuf): When its value is true, don't enter single-kboard mode (bug#79892). * admin/notes/multi-tty: * etc/NEWS: Document it.
* Don’t stuff keyboard input uselesslyPaul Eggert10 days4-40/+31
| | | | | | | Also, document stuffing better. * src/keyboard.c (stuff_buffered_input): Give up on stuffing if it fails. * src/sysdep.c (stuff_char): Return failure indication.
* ; * src/callproc.c (command-line-max-length): Use DEFVAR_INT.Sean Whitton10 days1-3/+3
|
* Show a message in locked frames in single-kboard modeSean Whitton10 days3-32/+110
| | | | | | | | | | | | | | | | * src/keyboard.c (kbd_buffer_get_event): Pass the event's frame up to the caller by means of a new 'struct frame **' argument. (read_event_from_main_queue): Show a message in locked frames in single-kboard mode (bug#79892). * src/xdisp.c (log_message): Factor out of message3. (message3): Call it. (message3_nolog): Rename to ... (message3_frame_nolog): ... this. New 'struct frame *' argument which causes temporarily switching to another frame when displaying the message. (message3_frame, message3_nolog): New functions. * src/lisp.h: Declare message3_frame and message3_frame_nolog. * admin/notes/multi-tty: Remove notes on showing a message.
* Document that string ARG of 'kill-emacs' might not workEli Zaretskii10 days1-1/+3
| | | | | | * src/emacs.c (Fkill_emacs): * doc/lispref/os.texi (Killing Emacs): Document that EXIT-DATA being a string doesn't always work. (Bug#80435)
* ; Fix the documentation of 'overlays-in' etc.Eli Zaretskii10 days1-1/+3
| | | | | | | | * src/buffer.c (Foverlays_in): * lisp/subr.el (remove-overlays): * doc/lispref/display.texi (Finding Overlays, Managing Overlays): * etc/NEWS: Improve the documentation of recent changes in behavior of 'overlays-in' and 'remove-overlays'. (Bug#80242)
* ; Remove unused declarations from w32heap.cEli Zaretskii10 days1-39/+0
| | | | | * src/w32heap.c (RtlCreateHeap_Proc, PRTL_HEAP_COMMIT_ROUTINE) (RTL_HEAP_PARAMETERS): Remove unused declarations (bug#76041).
* ; * src/w32proc.c (new_child): Update comment (bug#76041).Eli Zaretskii10 days1-5/+3
|
* Initialize command-line-max-length with sysconf(3)Sean Whitton10 days1-0/+14
| | | | | | * lisp/subr.el (command-line-max-length): Move from here ... * src/callproc.c (syms_of_callproc): <Vcommand_line_max_length>: ... to here. Initialize by calling sysconf(3) if possible.
* Fix macOS 26 scrolling lag and input handling issues (bug#80268)Boris Buliga11 days1-0/+9
| | | | | | | | | | | | | | macOS 26 introduced new event processing behavior that causes scrolling lag and input handling problems in Emacs. This patch disables two features via NSUserDefaults when built against the macOS 26 SDK: - NSEventConcurrentProcessingEnabled - NSApplicationUpdateCycleEnabled This fix is based on the equivalent patch in emacs-mac by Mitsuharu Yamamoto. See: https://bitbucket.org/mituharu/emacs-mac/commits/e52ebfd * src/nsterm.m (ns_term_init): Disable problematic event processing when built for macOS 26+.
* ; Fix some comments.Sean Whitton11 days2-10/+10
|
* ; Copy out log message from when branch was first introduced.Sean Whitton11 days1-0/+3
|
* Fix bug on MS-Windows with frame title when system-name is non-ASCIIEli Zaretskii11 days1-10/+23
| | | | | | * src/w32.c (sys_gethostname): Convert system name to UTF-8. Ensure the buffer passed to 'gethostname' is large enough. (Bug#80472)
* ; Fix doc-string of 'window-combination-resize'Martin Rudalics12 days1-4/+4
| | | | | * src/window.c (syms_of_window): Fix doc-string of 'window-combination-resize'.
* Speed up 'equal'-comparison of vectorlike objectsMattias Engdegård14 days1-38/+35
| | | | | * src/fns.c (internal_equal_1): Switch on the vectorlike type instead of using a sequence of type predicates.
* Compare circular lists in 'equal' without error (bug#80456)Mattias Engdegård14 days2-10/+55
| | | | | | | | | | | | | | | | | | * src/lisp.h (FOR_EACH_TAIL_INTERNAL): Divvy up the code into... (FOR_EACH_TAIL_BASIC, FOR_EACH_TAIL_STEP_CYCLEP): ...these macros, so that they can be used in more flexible ways. * src/fns.c (internal_equal_1): Detect circular lists and call... (internal_equal_cycle): ...this function that keeps comparing but now detecting cycles in the other argument. * lisp/emacs-lisp/testcover.el (testcover-after): Remove unnecessary error handling. * test/src/fns-tests.el (test-cycle-equal): Adapt and extend. * test/lisp/emacs-lisp/testcover-resources/testcases.el (testcover-testcase-cyc1): Remove case that no longer applies. * doc/lispref/objects.texi (Equality Predicates): Update. * etc/NEWS: Announce.
* Add SHA-3 support to secure-hashCollin Funk2026-02-231-14/+44
| | | | | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add crypto/sha3-buffer. * lib/sha3.c: New file, imported by running admin/merge-gnulib. * lib/sha3.h: Likewise. * m4/sha3.m4: Likewise. * lib/gnulib.mk.in: Updated by admin/merge-gnulib. * m4/gnulib-comp.m4: Likewise. * src/fns.c: Include sha3.h (Fsecure_hash_algorithms): Add Qsha3_224, Qsha3_256, Qsha3_384, and Qsha3_512. (secure_hash): Likewise. (Fsecure_hash): List the SHA-3 algorithms in the docstring. (syms_of_fns): Define Qsha3_224, Qsha3_256, Qsha3_384, and Qsha3_512. * test/lisp/net/gnutls-tests.el (gnutls-tests-internal-macs-upcased): Filter out the new SHA-3 algorithms since they are currently not implemented in gnutls. * test/src/fns-tests.el (test-secure-hash): Add test cases for the new algorithms. * doc/lispref/text.texi (Checksum/Hash): List the SHA-3 algorithms. Mention that they are considered secure. * etc/NEWS: Mention the new feature.
* * src/dbusbind.c: Include fcntl.h if needed. (Bug#80373)Michael Albinus2026-02-221-0/+5
|
* New user option 'after-delete-frame-select-mru-frame' (bug#80397)Stéphane Marks2026-02-221-1/+10
| | | | | | | | | | | | Users can revert to the old 'delete-frame' behavior of selecting the oldest frame in 'frame-list' rather than the most-recently used frame. * src/frame.c (delete_frame): Consult 'after-delete-frame-select-mru-frame'. (syms_of_frame): New defvar 'after-delete-frame-select-mru-frame'. * etc/NEWS: Reflect the new user option.
* Stop ENUM_BF worrying about gcc -std=c89 -pedanticPaul Eggert2026-02-211-4/+4
| | | | | | | * src/lisp.h (ENUM_BF): Modernize ENUM_BF doc for latest compilers that still have a beef with enum bitfields. Simplify by dropping support for ‘gcc -std=c89 -pedantic’, as it’s been many years since Emacs worked with C89, for other reasons.
* Port Lisp_Fwd to strict C bitfieldsPaul Eggert2026-02-211-2/+2
| | | | | | | | ISO C does not require C compilers to support enum bitfields. Problem found with IBM XL C for AIX 16.1 (2018), which IBM supports through 2029. * src/lisp.h (struct Lisp_Fwd): Use ENUM_BF instead of declaring enum bitfields directly.
* Fix GNUstep width calculation (bug#80331)Alan Third2026-02-211-1/+1
| | | | | | * src/nsfns.m (Fx_display_mm_height): 'dpi' should have been 'px_to_mm'. Co-authored-by: Shay Elkin <shay@elkin.io>
* Use real display geometry on NS (bug#80331)Shay Elkin2026-02-211-2/+24
| | | | | | | | | | | | | | | | | | In nsfns.m, `x-display-mm-height' and `x-display-mm-weight' computes the display size by dividing its (logical) pixel dimensions by 92 dpi. This would often give wrong results: by default, logical pixels on in macOS are computed to 72 dpi, but that can be changed by the user. As macOS multi-screen geometry is all computed based on the main screen's cooridnate system, use its dpi to compute the physical size of the bounding box containing all the screens. * src/nsfns.m (Fx_display_mm_height): (Fx_display_mm_width): Calculate the total physical display size using the main-screen's geometry. Copyright-paperwork-exempt: yes
* Fix SVG CSS handling (bug#80384)Alan Third2026-02-211-26/+35
| | | | | | | | This reverts commit 9f5d17cd7219f72066488c6c57f77e4db9ca2563, but includes the fix for adding user CSS after the generated CSS. * src/image.c (svg_load_image): Set the CSS stylesheet using the librsvg functions, instead of inserting it into the wrapper.
* Avoid segfaults if someone sets 'composition-function-table' to nilEli Zaretskii2026-02-211-0/+6
| | | | | | * src/composite.c (composition_compute_stop_pos) (composition_reseat_it): Recreate 'composition-function-table' if it ever becomes garbled. (Bug#80462)
* Fix predicate of `plist-member` on `function-history`Stefan Monnier2026-02-201-1/+1
| | | | | | | | | The keys of this plist are strings and should thus be compared with `equal`. `eq` works surprisingly often (because we often happen to use exactly the same string) but not always. * lisp/loadhist.el (loadhist-unload-element): * src/data.c (add_to_function_history): Pass `equal` to `plist-member`.
* Add frame-use-time, get-mru-frame, use mru frame in delete-frame (bug#80397)Stéphane Marks2026-02-181-35/+56
| | | | | | | | | | * lisp/frame.el (get-mru-frame): New defun. * src/frame.c (delete_frame): Call 'get-mru-frame' (when force is not Qnoelisp) to select the most recently used frame that is not the deleted frame as the candidate to select. (syms_of_frame): Qget_mru_frame new DEFSYM. * doc/lispref/frames.texi: Document the new functions. * etc/NEWS: Announce the new functions.
* ; Fix last change in treesit.cEli Zaretskii2026-02-181-0/+10
| | | | | | | * src/treesit.c (ts_tree_cursor_copy) [WINDOWSNT]: Define and load from the DLL if 'ts_tree_cursor_goto_previous_sibling' is not available. This fixes the MS-Windows build broken by the last change here. (Bug#80108)
* Change back tree-sitter version requirement (bug#80108)Yuan Fu2026-02-171-0/+56
| | | | | | | | | | | | | Now we use treesit_traverse_sibling_helper when it exists, and use the old code otherwise. So we still support older tree-sitter versions. * configure.ac (LIBSYSTEMD_CFLAGS): Add back old config checking for the malloc function. Add another check for ts_tree_cursor_goto_previous_sibling. * src/treesit.c: (treesit_traverse_sibling_helper): Add back the old code that doesn't require ts_tree_cursor_goto_previous_sibling.
* ; Remove stale commentary in dispnew.c.Basil L. Contovounesios2026-02-171-3/+0
| | | | | * src/dispnew.c: Remove commentary that used to relate to WINDOW_TO_FRAME_VPOS and WINDOW_TO_FRAME_HPOS.
* ; Fix typo in struct image commentary.Basil L. Contovounesios2026-02-171-1/+1
|
* ; Fix image_error argument in webp_load.Basil L. Contovounesios2026-02-171-1/+1
|
* Fix handling of window-specific overlays in buffer iteration for displayEli Zaretskii2026-02-143-24/+44
| | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (compute_display_string_pos): Pay attention to 'display' properties that come from overlays, in case the overlays are window-specific. Call 'handle_display_prop' with the argument OVERLAY non-nil, if the property is from an overlay. (compute_display_string_end): Accept an additional argument, a pointer to the window; all callers changed. Pay attention to 'display' properties that come from overlays, in case the overlays are window-specific. In particular, if the property comes from an overlay, use that overlay's end position as the next place where the 'display' property changes, effectively disregarding any properties on buffer text that is replaced by this overlay's 'display' property. (handle_single_display_spec): Always use the end position of the overlay which determined the 'display' property as the end of the property, to make sure we obey windows-specific overlays. * src/bidi.c (bidi_fetch_char): Adapt to the above change. * src/dispextern.h: Adjust prototype of 'compute_display_string_end'. (Bug#80255)
* ; * src/xfaces.c (face_at_buffer_position): Fix next_overlay per bug#80242.Eli Zaretskii2026-02-141-0/+4
|
* Adjust documentation to changes in 'overlays-in' and 'overlays-at'Eli Zaretskii2026-02-141-16/+25
| | | | | | | | | | | | * src/buffer.c (overlays_in): Fix commentary to match the code. (Foverlays_in, Foverlays_at): Doc fixes. (Bug#80242) * test/src/buffer-tests.el (test-overlays-at-2): Add one test. * doc/lispref/display.texi (Finding Overlays): Update and improve the documentation of 'overlays-in' and 'overlays-at'. * etc/NEWS: Announce the changes.
* Pacify GCC with gdk-pixbuf 2.44Paul Eggert2026-02-132-0/+34
| | | | | | | | * src/pgtkfns.c (xg_set_icon_from_xpm_data): * src/xfns.c (xg_set_icon_from_xpm_data): gdk-pixbuf 2.44 (2025-09) deprecated xg_set_icon_from_xpm_data, and this breaks --enable-gcc-warnings builds. For now, pacify GCC by using a pragma.
* Remove vla.hPaul Eggert2026-02-132-2/+0
| | | | | | | | Uses of <vla.h>’s macro VLA_ELEMS were removed some time ago. * admin/merge-gnulib (GNULIB_MODULES): Remove vla. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/vla.h: Remove. * src/fns.c, src/lread.c: Do not include <vla.h>.