1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 13:40:36 -08:00
Commit graph

155467 commits

Author SHA1 Message Date
Po Lu
07ee24d83d Fix event source attribution for GTK input methods
* src/gtkutil.c (xg_im_context_commit): Use pending keystroke
source if it exists.
2022-04-11 19:27:48 +08:00
Lars Ingebrigtsen
11080420dd Improve gif_load error messages
* src/image.c (gif_load): Improve error reporting (bug#54848).
2022-04-11 12:32:55 +02:00
Lars Ingebrigtsen
7d5d0abd2d Ensure shell.el loading properly
* lisp/shell.el (subr-x): Require for string-chop-newline
(bug#54834).
2022-04-11 12:12:49 +02:00
Po Lu
7140b1e82d Always cascade from toplevel frames on Haiku
* src/haikufns.c (haiku_create_frame): Cascade from toplevel
frames, since otherwise the positions are wrong anyway, and it
doesn't make sense to cascade from a frame that disappears when
it becomes deactivated.
2022-04-11 07:45:37 +00:00
Po Lu
a6bfc3cb87 Fix IM event source attribution on GTK
* src/xterm.c (handle_one_xevent): Set pending times on GTK as
well.
* src/gtkutil.c (xg_widget_key_press_event_cb): Respect pending
keystroke time on XI2.
2022-04-11 12:25:51 +08:00
Po Lu
bdd7cd0d2e * src/xterm.c (handle_one_event): Make event attribution more accurate. 2022-04-11 09:16:22 +08:00
Augusto Stoffel
48cb9c4aaa Add lazy highlight when reading 'query-replace' arguments
* lisp/replace.el (query-replace-read-args):  Use
'minibuffer-lazy-highlight-setup' to highlight the text to be replaced
in the original buffer (and a match count, if applicable).
(replace--region-filter): New function for code that
used to be inlined in perform-replace but is useful elsewhere.
(perform-replace): Use 'replace--region-filter'.
2022-04-10 22:37:04 +03:00
Augusto Stoffel
4c0c9d23ab Rewrite the minibuffer lazy highlight feature
The new API was discussed in bug#53126.  It's more robust and easier
to use in complex cases like that of 'query-replace'.

* etc/NEWS: Amend the feature announcement
* lisp/isearch.el (isearch-edit-string): Use new API.
(minibuffer-lazy-highlight-transform,
minibuffer-lazy-highlight--overlay, minibuffer-lazy-highlight--count,
minibuffer-lazy-highlight--after-change,
minibuffer-lazy-highlight--exit) Remove helper functions, which are
now kept together with the lazy highlight configuration variables
within a closure.
(minibuffer-lazy-highlight-setup): This function now takes the lazy
highlighting configuration variables as argument, and returns a
closure that is intended to run as part of the minibuffer setup.
2022-04-10 22:36:47 +03:00
Lars Ingebrigtsen
7c6cdc1eff Fix markup in Drag and Drop
* doc/emacs/frames.texi (Drag and Drop): Fix markup.
2022-04-10 16:15:29 +02:00
Eli Zaretskii
8addfafc2a Fix WebP image support on MS-Windows
* src/image.c (init_webp_functions) [WINDOWSNT]: Load Demux
functions from the WebPDemux DLL.  Load internal functions where
the public APIs are inline functions defined in the WebP headers.
(WebPAnimDecoderOptionsInit) [WINDOWSNT]: Define to call
'WebPAnimDecoderOptionsInitInternal'.
(WebPDemux): Define to call 'WebPDemuxInternal'.
(WebPAnimDecoderNew): Define to call
'WebPAnimDecoderNewInternal'.
(syms_of_image) <webpdemux>: New symbol.

* lisp/term/w32-win.el (dynamic-library-alist): Add a member for
'webpdemux'.
2022-04-10 16:45:43 +03:00
Kévin Le Gouguec
a64e5a3a84 Fix a ja-dic compilation warning
* leim/Makefile.in (${leimdir}/ja-dic/ja-dic.el): Increase
specpdl-size to avoid a compilation warning (bug#54816).
2022-04-10 14:43:02 +02:00
Alan Mackenzie
02b521ad74 CC Mode: Fix unwanted fontification of function call as function declaration
This happens when the enclosing function's return type is a struct, etc.  This
fixes bug #54743;

* lisp/progmodes/cc-engine.el (c-update-brace-stack): Replace "(" by ")" in a
`member' call.
2022-04-10 12:20:39 +00:00
Kaushal Modi
cca47ae555 Update docstrings for shortdoc.el FUNC lisp form API
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group):
Updated docstrings.
2022-04-10 13:52:49 +02:00
Po Lu
59186acf70 Attribute filtered events to the right source device
* src/xterm.c (handle_one_xevent): Attribute core events sent by
input methods like I-Bus to the extension device that caused
them to be sent.
* src/xterm.h (struct x_display_info): New fields
`pending_keystroke_time' and `pending_keystroke_source'.
2022-04-10 19:34:31 +08:00
Lars Ingebrigtsen
d82e1a873d Add support for animated webp images
* configure.ac (HAVE_RSVG): Also include the webpdemux library.
It was new in version 0.4.4, and we require 0.6.0, so it should be
safe.
* src/image.c: Include demux.h.
(enum webp_keyword_index, webp_format): Include :index for
animations.
(init_webp_functions): Add Windows LOAD_DLLs.
(struct webp_cache, webp_create_cache)
(webp_prune_animation_cache, webp_get_animation_cache): New
functions.
(webp_load): Support animated webp images (bug#54242).
2022-04-10 13:12:41 +02:00
Juri Linkov
735b451910 Allow non-interactive uses of minibuffer-next-completion
* lisp/minibuffer.el (minibuffer-previous-completion)
(minibuffer-next-completion): Use 1 for n by default.
2022-04-10 10:37:55 +03:00
Po Lu
f29fd102d7 Add missing details to filter event on XI2
* src/xterm.c (handle_one_xevent): Pass coordinates when
translating XI2 key events to core key events.
2022-04-10 13:55:18 +08:00
Po Lu
75bdf15c29 Update XI2 device use on slave attachment and detachment
* src/xterm.c (handle_one_xevent): Update whether device is a
master device when it's detached or attached.
2022-04-10 11:06:41 +08:00
Po Lu
fea97e2989 Try harder to own DND selections
* src/xterm.c (x_dnd_do_unsupported_drop): Fix computation of
local value.
(x_dnd_begin_drag_and_drop): Try to own the selection if we do
have a local value.
2022-04-10 09:31:42 +08:00
Lars Ingebrigtsen
b69e8bade6 Fix mode-line doc string
* lisp/faces.el (mode-line): Fix doc string.
2022-04-10 03:15:12 +02:00
Vincent Belaïche
0b5c959db5 ses-test Prefix used symbols by ses--
* test/lisp/ses-tests.el: Rename cell symbols of renamed cells so
that they are in the SES namespace, as recommended by Stefan.
2022-04-10 00:26:33 +02:00
Lars Ingebrigtsen
8b3748c234 Fix sql-mode comment-end parsing
* lisp/progmodes/sql.el (sql-mode): Fix /* ... -*/ parsing
(bug#54769).
2022-04-09 12:28:58 +02:00
Po Lu
40c2bfdae1 Avoid sync when allowing touch events in handle_one_xevent
* src/xterm.c (handle_one_xevent): Don't catch errors around
XIAllowTouchEvents.
(x_error_handler): Ignore Device errors here instead.
2022-04-09 18:26:19 +08:00
Eli Zaretskii
d327fd594d ; * doc/emacs/trouble.texi (Memory Full): Minor copyedits. 2022-04-09 12:57:08 +03:00
Po Lu
f3f20a37fb Handle hierarchy events for updating scroll valuators correctly
* src/keyboard.c (gen_help_event, kbd_buffer_store_help_event):
Make sure to initialize the event buffer correctly.

* src/xterm.c (xi_populate_device_from_info): New function.
(x_init_master_valuators): Factor out most of the valuator
tracking code to that function.
(handle_one_xevent): Handle device enable and disable events in
a more detailed fashion.
2022-04-09 13:30:32 +08:00
Po Lu
378b4ccd4b Fix DND leave events not being sent to toplevel after returning frame
* src/xterm.c (x_dnd_update_state, handle_one_xevent): Make sure
to send leave events to the previous toplevel when cancelling to
return a frame.
2022-04-09 11:43:23 +08:00
Po Lu
72782ca182 Use right frame when computing mouse movement device
* src/keyboard.c (kbd_buffer_get_event): Use the frame on which
the mouse actually moved to compute the last mouse device.
2022-04-09 11:37:56 +08:00
Po Lu
cb45fff0cb Minor cleanups in X Windows drag-and-drop code
* src/keyboard.c (kbd_buffer_get_event): Don't dereference f if
nil when generating mouse motion event.
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave, x_dnd_send_drop, x_send_scroll_bar_event):
Use NoEventMask instead of 0.
2022-04-09 11:35:08 +08:00
Po Lu
f1bf1a0698 Fix source reporting for focus in and focus out events
* src/xterm.c (handle_one_xevent): Report source name for
FocusIn and FocusOut events.
2022-04-09 09:12:24 +08:00
Po Lu
33d68da534 Clean up XI2 scroll valuator tracking code
* src/xterm.c (x_get_scroll_valuator_delta): Accept a pointer to
a device instead of the device id.
(handle_one_xevent): Pass the previously found device.
2022-04-09 09:02:24 +08:00
Po Lu
6449179822 * src/pgtkterm.c (pgtk_set_cr_source_with_color): Fix default operator. 2022-04-09 08:48:45 +08:00
Po Lu
bb7623b9be Fix subpixel AA with alpha-background on Cairo on X
* xterm.c (x_set_cr_source_with_gc_foreground)
(x_set_cr_source_with_gc_background): Set operator back to OVER
if alpha-background isn't to be respected.
2022-04-09 08:41:00 +08:00
Paul Eggert
0b16e4e1f1 Update from Gnulib by running admin/merge-gnulib 2022-04-08 17:33:16 -07:00
Paul Eggert
68bc144685 Pacify clang -Wunused-variable
* src/coding.c (detect_coding_utf_8):
* src/process.c (Finternal_default_process_filter):
Remove unused local vars.
2022-04-08 17:33:16 -07:00
Paul Eggert
d9bffa1f3b ebrowse dumping need not return int
* lib-src/ebrowse.c (dump_members, dump_tree): Return void, not
int, since callers never actually use returned value.  All uses
changed.
2022-04-08 17:33:15 -07:00
Alan Third
9d20b47ad3 Fix scrollbars on macOS 10.13 and below (bug#54623)
Make any build on macOS 10.13 and below follow the same drawing path
as the GNUstep port.  macOS 10.14 and above will use EmacsLayer.

* src/nsterm.h (EmacsLayer):
* src/nsterm.m ([EmacsView makeBackingLayer]):
([EmacsView unlockFocus]):
([EmacsView windowDidChangeBackingProperties:]):
([EmacsView copyRect:to:]): Remove any code required for macOS 10.13
and below, and fix the #if's to enforce strict separation of the
drawing paths.
(ns_update_end):
(ns_unfocus): Fix #ifs so that flushWindow is called on old macOS
versions as well as GNUstep.
2022-04-08 22:43:05 +01:00
Paul Eggert
022a1f48a4 Fix pacifying gcc -Wanalyzer-null-dereference
* src/xterm.c (handle_one_xevent): Use eassume not eassert.
eassert (X)’s suppress_checking does not let GCC assume X.
2022-04-08 10:19:21 -07:00
Mattias Engdegård
c2d78d09c1 Rename mark_stack to mark_c_stack
This is the function that marks the C stack.  Avoid confusion with the
new mark stack, a stack used in the GC mark phase.

* src/alloc.c (SETJMP_WILL_LIKELY_WORK, SETJMP_WILL_NOT_WORK)
(mark_stack, mark_c_stack):
* src/lisp.h:
* src/thread.c (mark_one_thread): Rename mark_stack to mark_c_stack.
2022-04-08 15:34:57 +02:00
Mattias Engdegård
13c8cc58bb Enable warnings when building as a developer with Clang
The configure-script logic that automatically enables warnings when
building in a development tree didn't work for Clang because it was
identified as an old GCC version.

* configure.ac: Don't test Clang version as if it were GCC.
2022-04-08 15:00:38 +02:00
Lars Ingebrigtsen
e2f3b0f16e Improve package.el error messages on too-old Emacsen
* lisp/emacs-lisp/package.el (package-compute-transaction): Give a
better error message on too-old Emacs versions (bug#54747).
2022-04-08 14:46:14 +02:00
Po Lu
5c532fe303 Recommend that the user turn off memory overcommit
* doc/emacs/trouble.texi (Memory Full): Tell the user that Emacs
behaves best with overcommit off, and how to turn it off.
2022-04-08 19:36:34 +08:00
Mattias Engdegård
deb40b2267 ; * src/nsterm.m: Remove stray semicolon 2022-04-08 13:13:24 +02:00
Po Lu
410690085e Interpolate scrolls coming from mice by default
* lisp/pixel-scroll.el
(pixel-scroll-precision-interpolate-mice): New
user option.
(pixel-scroll-precision): If the class of the last event device
is `mouse', interpolate the next scroll.
2022-04-08 18:57:29 +08:00
Michael Albinus
d9851c6df2 Ensure local default-directory' when calling process-attributes'.
* lisp/server.el (server-running-p):
* lisp/subr.el (memory-limit): Ensure local `default-directory'
when calling `process-attributes'.
2022-04-08 12:47:53 +02:00
Po Lu
c4921d1157 Fix GC marking of input events with devices
* src/keyboard.c (mark_kboards):
* src/pgtkterm.c (mark_pgtkterm): Mark `device' as well.
2022-04-08 17:00:37 +08:00
Po Lu
ac2708bf6f Implement support for reporting device names on PGTK
* lisp/frame.el (device-class): Add new function.
* lisp/term/pgtk-win.el (pgtk-device-class): New function.
* src/pgtkterm.c (pgtk_device_added_or_removal_cb)
(pgtk_seat_added_cb, pgtk_seat_removed_cb)
(pgtk_enumerate_devices)
(pgtk_free_devices, pgtk_regenerate_devices)
(pgtk_get_device_for_event): New functions.
(mark_pgtkterm): Mark device data.
(pgtk_delete_terminal): Delete device data.
(pgtk_handle_event, key_press_event, note_mouse_movement)
(construct_mouse_click, button_event, scroll_event)
(drag_data_received): Set device correctly.
(pgtk_term_init): Initialize device data and seat tracking.
(pgtk_delete_display): Delete device data.
* src/pgtkterm.h (struct pgtk_device_t): New struct.
(struct pgtk_display_info): New field `devices'.  Delete lots of
unused macros and reformat comments.
2022-04-08 13:37:16 +08:00
Po Lu
e984993954 * lisp/term/x-win.el (x-device-class): Detect more keyboards. 2022-04-08 12:12:08 +08:00
Sean Whitton
d8b7771418 ; * src/emacs.c (main): Reword & reflow description of PGTK problem. 2022-04-07 21:09:14 -07:00
Po Lu
c42ef4e7c1 Ignore input extension errors caused by grabbing
* src/xterm.c (x_error_handler): Ignore GrabDevice and
UngrabDevice errors.
2022-04-08 11:22:06 +08:00
Po Lu
598d1a2aa3 * lisp/term/x-win.el (x-device-class): Detect "USB USB Keykoard"s. 2022-04-08 11:03:27 +08:00