1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-06 14:22:31 -07:00
Commit graph

47962 commits

Author SHA1 Message Date
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
Gregory Heytings
ea8e0f67bb Minor improvements to locked narrowing.
* lisp/subr.el (with-locked-narrowing): Add 'save-restriction' around
the macro body.  Update docstring.

* src/editfns.c (Fwiden, Fnarrowing_lock): Docstring improvements.
2022-08-21 23:26:14 +02:00
Gregory Heytings
2342fb052b ; * src/editfns.c (Fnarrowing_lock): Minor docstring improvement. 2022-08-21 22:42:35 +02:00
Gregory Heytings
890d6c15a7 ; * src/editfns.c (Fnarrow_to_region): Two forgotten cases. 2022-08-21 21:46:21 +02:00
Gregory Heytings
01efdbd336 Better way to protect redisplay routines from locked narrowings.
* src/xdisp.c (reset_outermost_narrowing,
unwind_reset_outermost_narrowing): New functions.
(redisplay_internal): Use the new functions.

* src/editfns.c (Fnarrow_to_region): Use the limits of the
locked restriction instead of the position arguments if necessary.
Update docstring.
(Fnarrowing_lock): Update docstring.
2022-08-21 21:35:42 +02:00
Gregory Heytings
22375315f1 Revert 4f19e1a5d1 2022-08-21 21:35:14 +02: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
Gregory Heytings
4f19e1a5d1 Fix mode line redisplay bug when locked narrowing is in effect.
* src/xdisp.c (decode_mode_spec): Use the actual narrowing bounds when
redisplay is called while a locked narrowing is in effect.
2022-08-21 13:16:00 +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
Gregory Heytings
e41e9740fb Fix user narrowing handling.
* src/editfns.c (syms_of_editfns): New 'outermost-narrowing' internal
variable.
(Fwiden, Fnarrow_to_region): Set and reset the variable.
(Fnarrowing_lock): Use it.
2022-08-21 00:56:01 +02:00
Gregory Heytings
2727af3fd4 Improved locked narrowing.
* src/editfns.c (Fnarrowing_lock, Fnarrowing_unlock,
narrow_to_region_locked, unwind_narrow_to_region_locked):
New functions.
(Fnarrow_to_region, Fwiden): Adapt, and make it possible to use
these functions within the bounds of the locked narrowing.
(syms_of_editfns): Change the name of the variable, make it
buffer-local, and add the two Snarrowing_lock and Snarrowing_unlock
subroutines.

* src/lisp.h: Prototype of 'narrow_to_region_locked'.

* src/xdisp.c (handle_fontified_prop):
* src/keyboard.c (safe_run_hooks_maybe_narrowed): Use
'narrow_to_region_locked'.

* lisp/subr.el (with-locked-narrowing): New macro.
2022-08-20 18:08:41 +02: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
Yuan Fu
f543a1ca0e Add treesit-parser-delete
* src/treesit.c (ts_record_change): Replace CHECK_TS_PARSER with
ts_check_parser.
(make_ts_parser): Initialize deleted field.
(Ftreesit_parser_delete): Replace CHECK_TS_PARSER with
ts_check_parser. Set deleted field.
(Ftreesit_parser_buffer, Ftreesit_parser_language): Replace
CHECK_TS_PARSER with ts_check_parser.
(ts_check_parser): New function.
(Ftreesit_parser_root_node, Ftreesit_parser_set_included_ranges)
(Ftreesit_parser_included_ranges): Replace CHECK_TS_PARSER with
ts_check_parser.
(Qtreesit_parser_deleted): New symbol.
(Qtreesit_parser_deleted): New error.
* src/treesit.h (Lisp_TS_Parser): New field 'deleted'.
2022-08-18 01:56:48 -07: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