1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 16:51:46 -07:00
Commit graph

47128 commits

Author SHA1 Message Date
Po Lu
34686263b7 Fix various problems with mouse highlight on XI2 builds
* 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'.
2022-08-25 12:24:34 +08:00
Po Lu
e518146a30 Fix input extension focus tracking with some window managers
* 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.
2022-08-24 19:12:16 +08:00
Eli Zaretskii
b48bf42fc2 ; * src/buffer.h (struct buffer_text): Improve commentary. 2022-08-23 19:30:18 +03:00
Gregory Heytings
1c837c42c2 Improve detection of long lines.
* 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.
2022-08-23 17:48:51 +02:00
Po Lu
76982f0868 ; * src/xterm.c (x_free_frame_resources): Fix typo. 2022-08-23 20:56:12 +08:00
Po Lu
a328bf65ef Make frame synchronization conditional on clock_gettime
* 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)
2022-08-23 20:53:24 +08:00
Po Lu
3b7fb723e6 Make frame synchronization conditional on clock_gettime
* 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.
2022-08-23 20:53:24 +08:00
Po Lu
e425b7d231 Allow disabling the input extension at runtime on GTK 3
* src/xterm.c (xi_check_toolkit): New function.
(x_term_init): Do not enable the input extension should that
fail.
2022-08-23 09:30:25 +08:00
Lars Ingebrigtsen
cc33c6cf3a Make start/end in libxml-parse-html-region optional
* 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.
2022-08-22 12:48:37 +02:00
Po Lu
e154ba196a Fix child frame focus for MPX environments
* src/xterm.c (handle_one_xevent): Set child frame click-to
focus on the pointer device's attachment.
2022-08-22 09:50:45 +08:00
Lars Ingebrigtsen
fe194f179d Remove a newline from the end of an error message
* src/pdumper.c (dump_native_comp_unit): Remove newline from end
of error message.
2022-08-21 18:01:40 +02:00
Mattias Engdegård
563ec6abc4 ; Complete renaming to pos-bol and pos-eol 2022-08-21 16:18:03 +02:00
Eli Zaretskii
982bd69520 ; * src/xterm.c (handle_one_xevent): Avoid compiler warning. 2022-08-21 16:12:03 +03:00
Lars Ingebrigtsen
2614e53216 Rename newly-added eol/bol functions to pos-eol/pos-bol
* 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.
2022-08-21 14:04:52 +02:00
Po Lu
8d4789c072 Minor optimization to x_query_pointer_1
* src/xterm.c (x_query_pointer_1): Clear client pointer if it
disappeared.
2022-08-21 14:06:22 +08:00
Po Lu
b2f9c4c6d4 Fix crash when the keymap changes
* src/xterm.c (handle_one_xevent): Call
XkbRefreshKeyboardMapping first before trying to update the map.
2022-08-20 10:32:09 +08:00
Stefan Kangas
043ae1f53a Delete two functions obsolete since Emacs 23
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.
2022-08-19 17:57:42 +02:00
Stefan Kangas
d0bb333efc Merge from origin/emacs-28
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
2022-08-19 17:30:18 +02:00
Alan Mackenzie
9c0eec4ed8 * src/window.c (select_window): Fix assert for buffer = non-active minibuffer 2022-08-19 15:06:38 +00:00
Robert Pluim
7c793c55cf Improve 'ns-read-file-name' docstring
* src/nsfns.m (Fns_read_file_name): Use '-' instead of '_' when naming
args.
2022-08-19 16:05:40 +02:00
Eli Zaretskii
6a1e3e8684 ; * src/editfns.c (Fline_beginning_position): Remove redundant parens. 2022-08-19 16:55:19 +03:00
Lars Ingebrigtsen
f117b5df4d Add new functions eol and bol
* 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'.
2022-08-19 15:22:36 +02:00
Andrea Corallo
5dc2745939 * src/pdumper.c (dump_native_comp_unit): Error if CU is not fixed-up 2022-08-19 10:22:32 +02:00
Andrea Corallo
9297a9c45e * src/alloc.c (pure_alloc): Warn for pure space overflow 2022-08-19 10:09:38 +02:00
Andrea Corallo
095ea82120 * src/pdumper.c (Fdump_emacs_portable): Check and warn for pure space overflow 2022-08-19 10:09:38 +02:00
Po Lu
b90192b50e Fix more calls to XQueryPointer for MPX
* 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.
2022-08-19 10:06:29 +08:00
Mattias Engdegård
f33a429a53 Copy-edit doc strings and comments wrt bignum and fixnum
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.
2022-08-18 17:10:46 +02:00
Andrea Corallo
aea05a5dec * Expose `comp-loaded-comp-units-h'
* 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.
2022-08-18 11:03:25 +02:00
Paul Eggert
7406ae4c98 Fix broken build on Solaris 10 emacs_spawn
* src/callproc.c (emacs_spawn) [SETUP_SLAVE_TTY]:
pty_flag no longer exists.  Use pty_in && std_in >= 0,
which at least compiles.
2022-08-17 23:12:55 -07:00
Po Lu
d0e126b6ed ; * src/xterm.c (xi_select_hierarchy_events): Fix typo. 2022-08-18 10:32:49 +08:00
Po Lu
79050eeeaf ; * src/xterm.c (xi_select_hierarchy_events): Fix typo. 2022-08-18 10:32:24 +08:00
Po Lu
ed9adafc0b Avoid disabling device multiple times while handling XI attachment events
* src/xterm.c (handle_one_xevent): Avoid disabling devices if we
notice it has been disabled while handling XISlaveDetached or
XISlaveAttached.
2022-08-17 10:20:25 +08:00
Stefan Monnier
b24f7667ad * src/buffer.c (Frename_buffer): Fix bug#56693 2022-08-16 17:29:26 -04:00
Po Lu
b4879603fd Fix XInput hierarchy events not being delivered in daemon mode
* 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.
2022-08-16 21:11:50 +08:00
Eli Zaretskii
ad2dba38b2 Don't look for long lines beyond the narrowed region
* src/xdisp.c (redisplay_window): Don't scan for newlines outside
the current buffer's restriction.
2022-08-16 15:27:15 +03:00
Jim Porter
b87400c78b Make the bookmark fringe icon look like a bookmark
* 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).
2022-08-15 21:15:42 -07:00
Po Lu
1973d4ac1b Avoid lowering child frames below scroll bars on X
* src/xterm.c (x_lower_frame_1): New function.
(x_lower_frame): Avoid calling XLowerFrame when there is a
parent with scroll bars.
2022-08-16 09:30:08 +08:00
Eli Zaretskii
82635f40ed Produce TAGS in 'lib' as well and include them in src/TAGS
* src/Makefile.in (TAGS): Include ../lib/TAGS.
($(lib)/TAGS): New target.
(tags): Depend on $(lib)/TAGS.
2022-08-15 22:12:58 +03:00
Lars Ingebrigtsen
5025b2566e Fix fix_command for non-symbol functions
* src/callint.c (fix_command): Don't bug out on commands that
aren't symbols (like lambdas, for instance).
2022-08-15 16:18:45 +02:00
Alan Mackenzie
629f980fad Enhance safe_run_hooks_1 and safe_run_hook_funcall to handle more arguments
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.
2022-08-15 12:18:01 +00:00
Matt Armstrong
79c0e78460 Pacify warnings from gcc 12 in encode_coding_object
* 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).
2022-08-15 08:56:57 +02:00
Po Lu
4bee89b73f Fix uninitialized variable false-positives
* 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)
2022-08-15 08:55:26 +08:00
Paul Eggert
a64fe6f319 Improve timefns speed on integers
* 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.
2022-08-14 13:49:33 -07:00
Paul Eggert
15aba5e644 Decode time conses before floats
* src/timefns.c (decode_lisp_time): Test for conses before floats,
as conses are more common.
2022-08-14 13:49:33 -07:00
Paul Eggert
23561f9665 Work around Bug#57211
* src/buffer.c (Fgenerate_new_buffer_name): Allocate a bigger buffer.
2022-08-14 13:49:33 -07:00
Paul Eggert
9664b8c8e1 Fix selection preservation bug when USE_XCB
* src/xterm.c (x_preserve_selections) [USE_XCB]: Fix bug: use of
wrong ‘tem’ value.  Found by GCC -Wanalyzer-use-of-uninitialized-value.
Move decl of local to make the (former) bug more obvious.
2022-08-14 11:14:17 -07:00
Stefan Monnier
397fdc22eb * lisp/calendar/time-date.el (seconds-to-time): Use the original arg list 2022-08-14 10:41:40 -04:00
Stefan Kangas
096c081e51 * src/Makefile.in (elnlisp): Delete autoload.eln from list. 2022-08-14 16:06:06 +02:00
Eli Zaretskii
a71c05b44d Further speedups of redisplay of long and truncated lines
* src/xdisp.c (mode_line_update_needed, redisplay_window)
(decode_mode_spec): Don't avoid calling current_column, as it is
now fast enough.
(redisplay_window) <optional_new_start>: Don't call 'move_it_to'
if its result will not be used.
(Flong_line_optimizations_p): New primitive.
* src/indent.c (Fcurrent_column): Doc fix.
(current_column, scan_for_column): When in a buffer with long
and/or truncated lines, quickly return an approximate value.
* src/window.c (Frecenter): Use the old text-mode code when the
buffer has very long lines.

* lisp/simple.el (line-move): Avoid costly calls to
'line-move-partial' and 'line-move-visual' when lines are
truncated and/or very long.
(move-beginning-of-line): Call 'line-beginning-position' instead
of the slower 'skip-chars-backward'.

* etc/NEWS: Announce 'long-line-optimizations-p'.
2022-08-14 15:49:37 +03:00
Eli Zaretskii
0df8f481dd ; * src/xdisp.c (display_line): Fix a typo. 2022-08-14 09:34:37 +03:00