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

154892 commits

Author SHA1 Message Date
Mattias Engdegård
213483124b Inline record_in_backtrace
It's critical in several function call paths.

* src/eval.c (grow_specpdl_allocation): Make non-static.
(grow_specpdl, record_in_backtrace): Move from here...
* src/lisp.h (grow_specpdl, record_in_backtrace): ... to here,
and declare inline.
2022-03-12 17:32:31 +01:00
Po Lu
6ef9dc7797 Fix the PGTK build
* src/gtkutil.c (xg_finish_scroll_bar_creation): Fix ifdefs
preventing x_window from being correctly set.
(xg_get_scroll_id_for_window): Ifdef out unused function.
2022-03-12 20:58:18 +08:00
Po Lu
82a454915c Try really hard to make GTK 3 scroll bars fit
* src/gtkutil.c (xg_get_widget_from_map): New argument DISPLAY.
All callers changed.
(find_scrollbar_cb): New function.
(xg_finish_scroll_bar_creation, xg_remove_scroll_bar)
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb)
(xg_set_toolkit_horizontal_scroll_bar_thumb, xg_initialize):
Stop using id_to_widget_map on X builds with GTK 3 and set the
event box as the x_window instead.
* src/xterm.c (x_window_to_scroll_bar): Don't look for ID on GTK
3.
(handle_one_xevent): If a ConfigureNotify event is found for a
scroll bar and the dimensions are wrong, resize the X window to
the right ones.
2022-03-12 20:44:35 +08:00
Stefan Kangas
3af12cb8f2 Merge from origin/emacs-28
dbe6a3ecf7 Fix regression in 'custom-prompt-customize-unsaved-options'
a9920473f6 Improve documentation of 'map-charset-chars'
2022-03-12 06:34:05 +01:00
Po Lu
b5ac604b15 Fix some issues with input methods that depend on button state
* src/xterm.c (handle_one_xevent): Translate button state before
filtering events.
2022-03-12 13:03:00 +08:00
Po Lu
d0ff20f2e6 Fix horizontal scroll bar updating on Haiku
* src/haikuterm.c (haiku_set_horizontal_scroll_bar_thumb): Just
take portion and position without adjustments.
2022-03-12 03:16:00 +00:00
Po Lu
37cda51353 Use more reasonable default timeouts in Haiku menu loop
* src/haiku_support.cc (BMenu_run): Set default timeout to 10
seconds.
2022-03-12 03:02:03 +00:00
Po Lu
3ba3fdf7aa Make C-mouse-3 on scroll bars work on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New field
`handle_button'.
(MouseDown, MouseUp): Pass button events with ControlMask to
parent view.
2022-03-12 02:47:03 +00:00
Po Lu
b279e1a5ec Slightly improve scrollbar position accounting on Haiku
* src/haiku_support.cc (MessageReceived): Use floats for
calculating portion and subtract proportion directly.
* src/haikuterm.c (haiku_set_scroll_bar_thumb): Take ceiling of
value instead of rounding it.
2022-03-12 00:46:39 +00:00
Thomas Fitzsimmons
0470a4a939 EUDC: Support querying all servers
* lisp/net/eudc.el (eudc-expand-try-all): New command.
(eudc-expand-inline): Add `try-all-servers' optional argument.
Update `eudc-query-with-words' call.
(eudc-query-with-words): Add `try-all-servers' optional argument.
Move response formatting into main query loop.  Query next server
if `try-all-servers' is non-nil.
(eudc-tail-menu): Add "Expand Inline Query Trying All Servers"
menu item.
* doc/misc/eudc.texi (Installation): Recommend
eudc-expand-try-all.
(Emacs-only Configuration): Likewise.
(Inline Query Expansion, Inline Query Expansion): Likewise.
Document `eudc-expand-try-all'.
* etc/NEWS (EUDC): Describe new 'eudc-expand-try-all' command.
2022-03-11 18:04:53 -05:00
Thomas Fitzsimmons
190e1fe94b EUDC: Update save-query-as-kill name and docstring
* lisp/net/eudc-vars.el (eudc-server): Fix quoting for checkdoc.
(eudc-expansion-save-query-as-kill): Rename from
`eudc-expansion-overwrites-query'.  Define obsolete variable
alias.  Update comment and documentation.
* lisp/net/eudc.el (eudc-expand-inline): Rename `replace' argument
to `save-query-as-kill'.  Update argument documentation.
* doc/misc/eudc.texi (Inline Query Expansion): Rename
`eudc-expand-inline' argument.
* etc/NEWS (EUDC): Document `eudc-expansion-overwrites-query'
rename to `eudc-expansion-save-query-as-kill'.
2022-03-11 17:40:18 -05:00
Po Lu
610d85782b Fix a crash inside Haiku popup menus
* src/haiku_support.cc (BMenu_run): Handle B_WOULD_BLOCK from
wait_for_objects loop.
2022-03-11 12:41:30 +00:00
Po Lu
0dcc9fdc17 Fix initial values of scroll bar foreground and background on GTK 3
* src/gtkutil.c (xg_create_frame_widgets): Stop creating
scrollbar stylesheet providers.
* src/xfns.c (Fx_create_frame): Create scroll bar stylesheet
providers here instead.
(x_set_scroll_bar_background):
(x_set_scroll_bar_foreground): Ignore tooltip frames.
2022-03-11 20:26:31 +08:00
Po Lu
7ad1df5e16 Implement customization of scroll bar colors on GTK 3
* src/gtkutil.c (xg_create_frame_widgets): Create CSS providers
for scroll bars.
(xg_finish_scroll_bar_creation): Attach created CSS providers.
* src/xfns.c (x_set_scroll_bar_foreground):
(x_set_scroll_bar_background): Put appropriate content into CSS
providers.
* src/xterm.c (x_free_frame_resources): Free CSS providers.
* src/xterm.h (struct x_output): New fields for scroll bar
stylesheet providers.
2022-03-11 20:10:23 +08:00
Po Lu
92ebfe7da4 * src/frame.c (scroll_bar_adjust_thumb_portion_p): Adjust doc string. 2022-03-11 19:38:45 +08:00
Po Lu
fc987de94b Improve scroll bar treatment on Haiku
* src/haiku_support.cc (MessageReceived): Subtract portion from
range of scroll bar.
* src/haikuterm.c (BE_SB_MAX): Adjust values for better
rounding.
(haiku_set_scroll_bar_thumb): Round values instead of
truncating them.
2022-03-11 10:44:33 +00:00
Po Lu
88d474308e Fix inconsistent thumb position on Haiku scroll bars
* src/haikuterm.c (haiku_set_scroll_bar_thumb): If
scroll_bar_adjust_thumb_portion is nil, directly calculate thumb
portions without setting page_size.
2022-03-11 08:57:06 +00:00
Po Lu
61a038bec0 Handle Wayland displays correctly in browse-url
* lisp/net/browse-url.el (browse-url-process-environment): Use
WAYLAND_DISPLAY as the display environment variable on
PGTK.  (bug#54333)
2022-03-11 16:36:11 +08:00
Po Lu
b1d0d8e1f7 Allow C-mouse-2 to split windows on XInput 2 builds
* src/xterm.c (handle_one_xevent): Use x_scroll_bar_handle_click
if ControlMask is set.
2022-03-11 13:59:42 +08:00
Po Lu
170cae0e90 Fix scroll bar portion on Haiku scroll bars
* src/haiku_support.cc (EmacsScrollBar): Set steps to
appropriate value.
(ValueChanged): Test new value against old value before sending
value event.
(MessageReceived): Handle portion and range.
(BView_scroll_bar_update): New argument for portion.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_set_scroll_bar_thumb):
(haiku_set_horizontal_scroll_bar_thumb): New functions.
(haiku_set_horizontal_scroll_bar):
(haiku_set_vertical_scroll_bar): Use those functions to set
scroll bar values.
(haiku_read_socket): Handle new meanings of scroll bar values.
* src/haikuterm.h (struct scroll_bar):
2022-03-11 01:33:24 +00:00
Alan Third
22dde4e621 Fix NS toolbar identifier (bug#54326)
* src/nsterm.m ([EmacsWindow createToolbar:]): Set the identifier to
something that will always be unique to that frame.
2022-03-10 21:23:55 +00:00
Eli Zaretskii
dbe6a3ecf7 Fix regression in 'custom-prompt-customize-unsaved-options'
* lisp/cus-edit.el (custom-prompt-customize-unsaved-options):
Don't depend on the value returned by 'customize-unsaved'.  Fix
the doc string.  Patch by Sebastian Miele <iota@whxvd.name>.
(Bug#54329)
2022-03-10 20:26:13 +02:00
Michael Albinus
c6e079ae15 Support remote home directories via connection property
* doc/misc/tramp.texi (Home directories): New section.
(Top, Usage): Add it to the menue.
(Predefined connection information): Mention "~".
(Multi-hops, File name syntax): Fix typos.

* lisp/net/tramp.el (tramp-handle-expand-file-name): Check for
remote home directory.  (Bug#53847)
2022-03-10 12:31:22 +01:00
Po Lu
1044338ae7 Fix display of minibuffer prompts in some circumstances on Haiku
* src/haikuterm.c (haiku_flush): Always flip buffers as long as
buffer flipping is not blocked.
2022-03-10 10:39:31 +00:00
Eli Zaretskii
a9920473f6 Improve documentation of 'map-charset-chars'
* doc/lispref/nonascii.texi (Character Sets):
* src/charset.c (Fmap_charset_chars): Clarify the codepoint issue
in using 'map-charset-chars'.
2022-03-10 09:29:29 +02:00
Po Lu
65fea3ff58 Fix menu bar activation on PGTK
* src/gtkutil.c (menu_bar_button_pressed_cb): Only update menu
bar if no menu is active, and the event window is not the widget
window itself.  Also make menu in use.
* src/pgtkmenu.c (popup_deactivate_callback): Make menu not in
use.
* src/xdisp.c (redisplay_internal): Return if popup_activated
also on PGTK.
2022-03-10 11:48:12 +08:00
Po Lu
4a845b2cd0 Fix stray button release events being reported on GTK 2
* src/xterm.c (handle_one_xevent): Drop ButtonRelease events
that are destined for a popup menu.
2022-03-10 09:16:39 +08:00
Po Lu
70d63ead21 Fix menu bar event detection on XI2 builds using Core Input
* src/gtkutil.c (xg_get_gdk_scale): Always return 1 on GTK+ 2.
(xg_event_is_for_menubar): Fix some ifdefs.
* src/xterm.c (handle_one_xevent): Update a comment.
2022-03-10 09:13:08 +08:00
Lars Ingebrigtsen
2353893bd0 Fix regression in vtable-goto-object
* lisp/emacs-lisp/vtable.el (vtable-goto-object): Fix moving to
the object.
2022-03-09 17:37:47 +01:00
Po Lu
94f3424381 Fix some issues with GTK native input and modifiers on GTK 2
* src/gtkutil.c (xg_widget_key_press_event_cb): Manually ignore
modifier keys on GTK 2.
2022-03-09 21:33:48 +08:00
Po Lu
fe8d49e1ad Make XInput 2 features work on GTK 2 builds
* src/xfns.c (setup_xi_event_mask): On GTK 2, select for
button, motion, entry/exit and key events.
* src/xmenu.c (create_and_show_popup_menu): Clear XI grab if
appropriate.
* src/xterm.c (handle_one_xevent): Pass some kinds of input
extension events to GTK manually on versions of GTK+ that don't
understand them.
2022-03-09 21:29:17 +08:00
Po Lu
b883e8bc65 Fix GTK widgets not appearing inside child frames
* src/xfns.c (x_set_parent_frame): Disable GTK's own frame
synchronization in child frames.
2022-03-09 20:43:59 +08:00
Po Lu
06d826d0ca Fix error when creating frames on NS with no main window
* nsfns.m (Fx_create_frame): If main window is not present,
center frame window instead of cascading it.
2022-03-09 16:28:33 +08:00
Po Lu
f599b58afe Don't update Haiku menu bar if nothing changed
* haikumenu.c (set_frame_menubar): If Lisp-level contents didn't
change, refrain from actually updating the menu bar.
2022-03-09 06:58:01 +00:00
Po Lu
e8d35b98bb Fix flicker during frame resize on Haiku
* haikuterm.c (haiku_update_end): Call BWindow_Flush directly.
(haiku_set_vertical_scroll_bar): Stop calling flush_frame.
(haiku_flush): Only flip buffer of tooltip frames.
2022-03-09 03:50:16 +00:00
Po Lu
51784551c5 Fix the MS-DOS build
* sed1v2.inp: Update for recent changes.
2022-03-09 11:43:22 +08:00
Po Lu
9cf69e1171 Improve handling of tooltips inside menus on Haiku
* src/haiku_support.cc (BMenu_run): Make
`process_pending_signals_function' return a struct timespec.
* src/haiku_support.h: Update prototypes.
* src/haikumenu.c (haiku_process_pending_signals_for_menu):
Return result of `timer_run'.
* src/haikuterm.c (haiku_flush): Flip buffers if frame is dirty.
2022-03-09 03:22:04 +00:00
Paul Eggert
6e66d1f90a Decouple mod-test.c from Gnulib
mod-test.c should not use Gnulib code, as that creates
unnecessary coupling between Emacs internals and this test module.
Also Gnulib code is compiled without -fPIC whereas mod-test.c
needs -fPIC and recompiling Gnulib with -fPIC would be too painful.
* src/Makefile.in (LIB_NANOSLEEP): New macro.
(LIBES): Use it.
* test/Makefile.in (REPLACE_FREE, FREE_SOURCE_0, FREE_SOURCE_0):
Remove.  All uses removed.
(LIB_CLOCK_GETTIME, LIB_NANOSLEEP): New macros.
(MODULE_CFLAGS): Do not -I from lib as that would include Gnulib
modifications to standard .h files (e.g., "#define nanosleep
rpl_nanosleep") and we don’t want the Gnulib replacements.
Instead, for gmp.h (on platforms lacking <gmp.h>) simply '-I.'
with a suitable gmp.h.
(gmp.h): New rule to create a suitable gmp.h.
($(test_module)): Depend on config.h since the code uses config.h.
Depend on gmp.h if we need to create a suitable one.
If compiling mini-gmp.h, compile the original one and not
the Emacs-specific one, to lessen coupling with Emacs internals.
Link with LIB_CLOCK_GETTIME and LIB_NANOSLEEP.
(clean): Remove gmp.h.
* test/src/emacs-module-resources/mod-test.c: Don’t include timespec.h.
All uses of timespec.h APIs changed to use system-supplied APIs.
Change _Static_assert to plain assert, so that we needn’t rely
on Gnulib’s _Static_assert.
(timespec_le) [CLOCK_REALTIME]: New function.
Change use of timespec_cmp changed to use this instead.
(Fmod_test_sleep_until, Fmod_test_nanoseconds):
Define these functions and their Lisp names mod-test-sleep-until
and mod-test-nanoseconds only if CLOCK_REALTIME,
since they now won’t work on platforms lacking CLOCK_REALTIME.
(Fmod_test_nanoseconds): Just use _Static_assert since it
should work on all platforms.
* test/src/emacs-module-tests.el (mod-test-sleep-until)
(mod-test-nanoseconds, mod-test-double):
Skip test if the corresponding functione is not defined.
2022-03-08 18:51:18 -08:00
Paul Eggert
ec35e2621a Do not include <attribute.h> from <config.h>
This is because mod-test.c shouldn’t use source code from lib,
but it does need to include <config.h>.
* lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
* lib-src/make-docfile.c, lib-src/movemail.c:
* lib-src/seccomp-filter.c, src/dynlib.h, src/lisp.h:
* src/syssignal.h, src/sysstdio.h, src/systhread.h, src/tparam.h:
Include <attribute.h>.
* src/conf_post.h: Do not include <attribute.h>.
All uses of attribute.h macros replaced with their _GL_ equivalents.
2022-03-08 18:51:17 -08:00
Po Lu
f7032bdafe * src/xterm.c (handle_one_xevent): Add more dead keys. 2022-03-09 08:50:24 +08:00
Lars Ingebrigtsen
45e78a57ff Mark tramp test unstable on EMBA
* test/lisp/net/tramp-tests.el
(tramp-test44-asynchronous-requests): Mark timed-out EMBA test as
unstable.
2022-03-08 21:11:18 +01:00
Michael Albinus
ed543ca3e0 Implement abbreviate-file-name in Tramp for Google drive
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-get-home-directory):
Implement for Google drive.
2022-03-08 17:28:30 +01:00
Jim Porter
6dc51d4cca Support applying indices to more Eshell dollar expansions
For example, '${echo -e "hi\nbye"}[1]' should expand to "bye".

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Support applying
indices to '${}', '$()', and '$<>' forms.
(Bug#54227)

* lisp/eshell/esh-var-tests.el (esh-var-test/interp-lisp-indices)
(esh-var-test/interp-cmd-indices)
(esh-var-test/interp-cmd-external-indices)
(esh-var-test/quoted-interp-lisp-indices)
(esh-var-test/quoted-interp-cmd-indices): New tests.
2022-03-08 15:55:41 +02:00
Jim Porter
58568033f4 Improve wording of Eshell variable interpolation code/documentation
* lisp/eshell/esh-arg.el (eshell-unescape-inner-double-quote): Rename
from 'eshell-parse-inner-double-quote'.

* lisp/eshell/esh-cmd.el (eshell-with-temp-command): Improve
docstring.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Use
'eshell-unescape-inner-double-quote' and improve robustness of quoted
variable name matching.
(eshell-parse-indices): Use 'eshell-unescape-inner-double-quote'.

* doc/misc/eshell.texi (Dollars Expansion): Improve wording of
subscript notation.
2022-03-08 15:54:16 +02:00
Eli Zaretskii
d509d1e1a8 Merge from origin/emacs-28
d184773 Avoid assertion violations in 'bidi_resolve_brackets'
2022-03-08 15:41:48 +02:00
Eli Zaretskii
d184773c2e Avoid assertion violations in 'bidi_resolve_brackets'
* src/bidi.c (bidi_resolve_brackets): Move assertion to where it
really matters.  (Bug#54295)
2022-03-08 15:35:39 +02:00
Po Lu
a7fdbed880 Handle XI focus change events that specify implicit focus correctly
* src/xterm.c (x_detect_focus_change): If detail is
XINotifyPointer, set focus type to implicit.
2022-03-08 21:26:37 +08:00
Po Lu
bbbb47704f Fix detection of modifier keys on XInput 2
* src/xterm.c (handle_one_xevent): Fix iteration over sets of
modifiers.
2022-03-08 18:33:23 +08:00
Michael Albinus
d0d7765f23 Handle bug#54294 in Tramp
* lisp/net/tramp.el (tramp-handle-file-locked-p, tramp-handle-lock-file):
Use `tramp-system-name'.  (Bug#54294)
2022-03-08 08:52:57 +01:00
Po Lu
212aa7748b Fix more uses of opaque Visual structure
* src/image.c (x_kill_gs_process):
* src/xfaces.c (x_free_colors):
(x_free_dpy_colors):
* src/xfns.c (Fxw_display_color_p):
(Fx_display_grayscale_p):
(Fx_display_visual_class):
* src/xterm.c (x_copy_color):
* src/xterm.h (x_mutable_colormap): Stop using private fields of
Visual.
2022-03-08 15:19:37 +08:00