summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when handling "swallowed" generic eventsPo Lu2022-08-272-40/+71
| | | | | | | * src/xmenu.c (x_menu_translate_generic_event, x_menu_show): Pass through more events, correctly. * src/xterm.c (handle_one_xevent): Don't abort if must_free_data and xi_event is NULL; this is an Xlib bug.
* Restore old code in x_sync_trigger_fencePo Lu2022-08-261-2/+8
| | | | | | | | * src/xterm.c (x_sync_trigger_fence): Restore old code, since that makes it easier to adapt to more than 2 sync fences (which might be necessary in the future, if we ever decide to do frame handling asynchronously), and is much more recognizable for people coming from other programs.
* ; * src/xterm.h (struct x_display_info): Update comment.Po Lu2022-08-261-1/+2
|
* Fix overflows in HAVE_XSYNC timestamp handlingPaul Eggert2022-08-252-37/+49
| | | | | | | | | | | | | | | | | | | | | | | Also, port to platforms lacking CLOCK_MONOTONIC and int64_t, and use 0 more consistently to represent missing timestamps. * src/xterm.h (struct x_display_info): Omit server_time_monotonic_p and server_time_offset if !HAVE_CLOCK_GETTIME since they are unused in that case. * src/xterm.h (struct x_display_info, struct x_output): * src/xterm.c (x_sync_get_monotonic_time) (x_sync_current_monotonic_time, x_sync_note_frame_times): Use int_fast64_t instead of int64_t as POSIX doesn't guarantee the latter. Similarly for uint_fast64_t. (x_sync_get_monotonic_time, x_sync_current_monotonic_time) (x_sync_note_frame_times, x_display_set_last_user_time): Check for integer overflow in time arithmetic. (CLOCK_MONOTONIC): Define to CLOCK_REALTIME if absent. (x_sync_current_monotonic_time): Check for clock_gettime failure and fall back on CLOCK_REALTIME if CLOCK_MONOTONIC does not work, which POSIX allows. (x_sync_current_monotonic_time, x_sync_note_frame_times) (x_display_set_last_user_time): Use 0 more consistently to represent missing timestamps.
* Allow symlink creation on MS-Windows without Administrator privilegesKien Nguyen2022-08-251-2/+12
| | | | | | * src/w32.c (symlink): Use the SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag when available. (Bug#57386)
* Fix various problems with mouse highlight on XI2 buildsPo Lu2022-08-253-13/+87
| | | | | | | | | | * src/dispextern.h (reset_mouse_highlight): Fix coding style. * src/xterm.c (xi_position_changed): New functions. (xi_report_motion_window_clear, handle_one_xevent): Don't report motion events if the pixel position did not actually change. * src/xterm.h (struct xi_device_t): New fields `last_motion_window', `last_motion_x' and `last_motion_y'.
* Fix input extension focus tracking with some window managersPo Lu2022-08-241-0/+30
| | | | | | | * src/xterm.c (handle_one_xevent): If a window manager sends us FocusIn and FocusOut with XSendEvent (they do that), don't detect focus changes when XInput 2 is enabled. The X server will tell us the actual truth if the focus really did change.
* ; * src/buffer.h (struct buffer_text): Improve commentary.Eli Zaretskii2022-08-231-1/+3
|
* Improve detection of long lines.Gregory Heytings2022-08-234-1/+13
| | | | | | | | | | | | | | * src/buffer.h (struct buffer_text): New field. (BUF_CHARS_UNCHANGED_MODIFIED, CHARS_UNCHANGED_MODIFIED): New macros. * src/buffer.c (Fget_buffer_create): Initialize the new field. * src/xdisp.c (mark_window_display_accurate_1): Set the new field. (redisplay_window): Use it, together with CHARS_MODIFF, instead of MODIFF and UNCHANGED_MODIFIED to decide whether to check for long lines. * src/pdumper.c (dump_buffer): Dump the new field.
* ; * src/xterm.c (x_free_frame_resources): Fix typo.Po Lu2022-08-231-1/+1
|
* Make frame synchronization conditional on clock_gettimePo Lu2022-08-233-4/+6
| | | | | | | | | * src/xfns.c (x_set_parent_frame) (x_set_use_frame_synchronization): * src/xterm.c (x_update_begin, show_back_buffer, x_update_end) (x_display_set_last_user_time, handle_one_xevent): * src/xterm.h (struct x_output): Define out vsync code when !HAVE_CLOCK_GETTIME. (bug#57346)
* Make frame synchronization conditional on clock_gettimePo Lu2022-08-233-10/+10
| | | | | | | | | * src/xfns.c (x_set_parent_frame) (x_set_use_frame_synchronization): * src/xterm.c (x_update_begin, show_back_buffer, x_update_end) (x_display_set_last_user_time, handle_one_xevent): * src/xterm.h (struct x_output): Define out vsync code when !HAVE_CLOCK_GETTIME.
* Allow disabling the input extension at runtime on GTK 3Po Lu2022-08-231-2/+47
| | | | | | * src/xterm.c (xi_check_toolkit): New function. (x_term_init): Do not enable the input extension should that fail.
* Make start/end in libxml-parse-html-region optionalLars Ingebrigtsen2022-08-221-2/+14
| | | | | | | | * doc/lispref/text.texi (Parsing HTML/XML): Adjust. * src/xml.c (parse_region): Default start/end to point-min/point-max. (Flibxml_parse_html_region, Flibxml_parse_xml_region): Make start/end optional.
* Fix child frame focus for MPX environmentsPo Lu2022-08-221-2/+20
| | | | | * src/xterm.c (handle_one_xevent): Set child frame click-to focus on the pointer device's attachment.
* Remove a newline from the end of an error messageLars Ingebrigtsen2022-08-211-1/+1
| | | | | * src/pdumper.c (dump_native_comp_unit): Remove newline from end of error message.
* ; Complete renaming to pos-bol and pos-eolMattias EngdegÄrd2022-08-211-2/+2
|
* ; * src/xterm.c (handle_one_xevent): Avoid compiler warning.Eli Zaretskii2022-08-211-1/+2
|
* Rename newly-added eol/bol functions to pos-eol/pos-bolLars Ingebrigtsen2022-08-211-4/+4
| | | | | | | * lisp/emacs-lisp/shortdoc.el (buffer): * doc/lispref/positions.texi (Text Lines): Adjust. * src/editfns.c (Fpos_bol): Rename from Fpos. (Fpos_eol): Rename from Feol.
* Minor optimization to x_query_pointer_1Po Lu2022-08-211-4/+14
| | | | | * src/xterm.c (x_query_pointer_1): Clear client pointer if it disappeared.
* Fix crash when the keymap changesPo Lu2022-08-201-6/+5
| | | | | * src/xterm.c (handle_one_xevent): Call XkbRefreshKeyboardMapping first before trying to update the map.
* Delete two functions obsolete since Emacs 23Stefan Kangas2022-08-191-42/+0
| | | | | | | | | | | | | | | These were announced as removed in Emacs 28.1 NEWS, but apparently never actually deleted: only their obsoletion warning was removed. So the warnings were reintroduced in Emacs 28.2, and we now actually delete them here instead. * src/process.c (Fset_process_filter_multibyte) (Fprocess_filter_multibyte_p): Delete functions obsolete since Emacs 23. (syms_of_process): Delete corresponding defsubrs. * lisp/subr.el (process-filter-multibyte-p) (set-process-filter-multibyte): Delete obsoletion. * lisp/erc/erc-dcc.el (erc-dcc-server): Don't use obsolete functions.
* Merge from origin/emacs-28Stefan Kangas2022-08-191-1/+3
|\ | | | | | | | | | | | | | | | | f2c0fb2615 Resurrect obsoletion warning for two functions 9c0eec4ed8 * src/window.c (select_window): Fix assert for buffer = no... 16dfe04be2 Find libgccjit on macOS with Homebrew differently # Conflicts: # etc/NEWS
| * * src/window.c (select_window): Fix assert for buffer = non-active minibufferAlan Mackenzie2022-08-191-1/+3
| |
* | Improve 'ns-read-file-name' docstringRobert Pluim2022-08-191-1/+1
| | | | | | | | | | * src/nsfns.m (Fns_read_file_name): Use '-' instead of '_' when naming args.
* | ; * src/editfns.c (Fline_beginning_position): Remove redundant parens.Eli Zaretskii2022-08-191-1/+1
| |
* | Add new functions eol and bolLars Ingebrigtsen2022-08-191-32/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/positions.texi (Text Lines): Document them * lisp/emacs-lisp/shortdoc.el: Mention them, and also the buffer/line predicates. * src/editfns.c (bol): New function. (Fbol): New defun. (Fline_beginning_position): Use `bol'. (eol): New function. (Feol): New defun. (Fline_end_position): Use `eol'.
* | * src/pdumper.c (dump_native_comp_unit): Error if CU is not fixed-upAndrea Corallo2022-08-191-0/+3
| |
* | * src/alloc.c (pure_alloc): Warn for pure space overflowAndrea Corallo2022-08-191-0/+7
| |
* | * src/pdumper.c (Fdump_emacs_portable): Check and warn for pure space overflowAndrea Corallo2022-08-192-5/+2
| |
* | Fix more calls to XQueryPointer for MPXPo Lu2022-08-191-17/+60
| | | | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_dnd_begin_drag_and_drop): Set DND devices to -1 if XI2 is not supported on the given display. (x_query_pointer): Make wrapper around x_query_pointer_1. (x_query_pointer_1): Split off most of x_query_pointer to this function. Allow a specific client pointer to be specified. (x_dnd_update_tooltip_now, x_dnd_update_state): Use x_query_pointer_1 with the right device instead of XQueryPointer.
* | Copy-edit doc strings and comments wrt bignum and fixnumMattias EngdegÄrd2022-08-186-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't say that a value is a fixnum if small enough and a bignum otherwise, because that is now how Lisp integers always work, and we generally don't expose the fixnum/bignum difference to the user unless really necessary. * src/charset.c (Fencode_char): * src/editfns.c (Fuser_uid, Fuser_real_uid, Fgroup_gid) (Fgroup_real_gid, Femacs_pid): * src/font.c (Ffont_variation_glyphs): * src/process.c (Fprocess_id): Edit doc strings. * src/pgtkselect.c: * src/xselect.c: Edit comments.
* | * Expose `comp-loaded-comp-units-h'Andrea Corallo2022-08-181-9/+10
| | | | | | | | | | | | * src/comp.c : remove 'all_loaded_comp_units_h'. (syms_of_comp): Define `comp-loaded-comp-units-h'. (register_native_comp_unit, Fnative_elisp_load): Use it.
* | Fix broken build on Solaris 10 emacs_spawnPaul Eggert2022-08-171-1/+1
| | | | | | | | | | | | * src/callproc.c (emacs_spawn) [SETUP_SLAVE_TTY]: pty_flag no longer exists. Use pty_in && std_in >= 0, which at least compiles.
* | ; * src/xterm.c (xi_select_hierarchy_events): Fix typo.Po Lu2022-08-181-1/+1
| |
* | ; * src/xterm.c (xi_select_hierarchy_events): Fix typo.Po Lu2022-08-181-0/+2
| |
* | Avoid disabling device multiple times while handling XI attachment eventsPo Lu2022-08-171-3/+6
| | | | | | | | | | | | * src/xterm.c (handle_one_xevent): Avoid disabling devices if we notice it has been disabled while handling XISlaveDetached or XISlaveAttached.
* | * src/buffer.c (Frename_buffer): Fix bug#56693Stefan Monnier2022-08-161-2/+4
| |
* | Fix XInput hierarchy events not being delivered in daemon modePo Lu2022-08-162-8/+39
| | | | | | | | | | | | | | | | * src/xfns.c (setup_xi_event_mask): Stop selecting for device hierarchy events. * src/xterm.c (xi_select_hierarchy_events, x_term_init): Select those here instead, on the default root window.
* | Don't look for long lines beyond the narrowed regionEli Zaretskii2022-08-161-1/+1
| | | | | | | | | | * src/xdisp.c (redisplay_window): Don't scan for newlines outside the current buffer's restriction.
* | Make the bookmark fringe icon look like a bookmarkJim Porter2022-08-151-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fringe.c (large_circle_bits): New variable. (standard_bitmaps): Add large_circle_bits. * lisp/fringe.el (fringe-bitmaps): Add 'large-circle'. (fringe-custom-set-bitmap): New function. * lisp/cus-edit.el (widget-fringe-bitmap-prompt-value-history): New variable. (fringe-bitmap): New widget. * lisp/bookmark.el (bookmark-set-fringe-mark): Obsolete in favor of... (bookmark-fringe-mark): ... this. (bookmark-fringe-mark): Rename this fringe bitmap to... (bookmark-mark): ... and change it to look like a bookmark. (bookmark-face): Don't set the ':background' of the face. Instead, set ':distant-foreground'. (bookmark--set-fringe-mark, bookmark--remove-fringe-mark) (bookmark-store, bookmark--jump-via): Consult the 'bookmark-fringe-mark' option. * doc/lispref/customize.texi (Simple Types): Document 'fringe-bitmap' type. * doc/lispref/display.texi (Fringe Bitmaps): Mention 'large-circle'. * etc/NEWS: Announce this change (bug#56896).
* | Avoid lowering child frames below scroll bars on XPo Lu2022-08-161-7/+41
| | | | | | | | | | | | * src/xterm.c (x_lower_frame_1): New function. (x_lower_frame): Avoid calling XLowerFrame when there is a parent with scroll bars.
* | Produce TAGS in 'lib' as well and include them in src/TAGSEli Zaretskii2022-08-151-4/+5
| | | | | | | | | | | | * src/Makefile.in (TAGS): Include ../lib/TAGS. ($(lib)/TAGS): New target. (tags): Depend on $(lib)/TAGS.
* | Fix fix_command for non-symbol functionsLars Ingebrigtsen2022-08-151-1/+1
| | | | | | | | | | * src/callint.c (fix_command): Don't bug out on commands that aren't symbols (like lambdas, for instance).
* | Enhance safe_run_hooks_1 and safe_run_hook_funcall to handle more argumentsAlan Mackenzie2022-08-151-6/+30
| | | | | | | | | | | | | | | | This fixes bug #57179. * src/keyboard.c (safe_run_hooks_1, safe_run_hook_funcall): Enhance these functions so that nargs == 3 or 4 is handled as well as nargs == 2. This allows them to be used to call hooks with 1 or 2 arguments.
* | Pacify warnings from gcc 12 in encode_coding_objectMatt Armstrong2022-08-151-1/+1
| | | | | | | | | | | | | | * src/coding.c (encode_coding_object): Mark saved_pt_byte with UNINIT to silence a false alarm from -Wmaybe-uninitialized. This was already done in decode_coding_object. The fix is correct because saved_pt is used as a sentinel before saved_pt_byte is used (bug#57219).
* | Fix uninitialized variable false-positivesPo Lu2022-08-151-2/+2
| | | | | | | | | | | | * src/xterm.c (xm_setup_dnd_targets): (x_dnd_free_toplevels): Mark dpy and recs UNINIT, since GCC thinks they can be used uninitialized. (bug#57208)
* | Improve timefns speed on integersPaul Eggert2022-08-141-4/+15
| | | | | | | | | | | | * src/timefns.c (decode_lisp_time) [FASTER_TIMEFNS]: Speed up when SPECIFIED_TIME is an integer. (time_cmp) [FASTER_TIMEFNS]: Speed up when comparing integers.
* | Decode time conses before floatsPaul Eggert2022-08-141-11/+11
| | | | | | | | | | * src/timefns.c (decode_lisp_time): Test for conses before floats, as conses are more common.
* | Work around Bug#57211Paul Eggert2022-08-141-1/+2
| | | | | | | | * src/buffer.c (Fgenerate_new_buffer_name): Allocate a bigger buffer.