Po Lu [Wed, 10 Nov 2021 01:22:38 +0000 (09:22 +0800)]
Set embedder correctly to fix menus appearing in the wrong location
* src/xwidget.c (record_osr_embedder, from_embedder, to_embedder): New
functions.
(Fmake_xwidget): Attach from-embedder and to-embedder signals.
(find_widget_for_offscreen_window): New function.
(xwidget_button, xwidget_motion_or_crossing): Set embedder on event.
(Fdelete_xwidget_view): Remove embedder status if applicable.
* src/xwidget.h (struct xwidget): New fields `embedder' and
`embedder-view'.
oldosfan [Mon, 1 Nov 2021 00:19:32 +0000 (08:19 +0800)]
Add support for event processing via XInput 2
* configure.ac: Add an option to use XInput 2 if available
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables
(EMACS_CFLAGS): Add Xinput CFLAGS
(LIBES): Add XInput libs
* src/xmenu.c (popup_activated_flag): Expose flag if XInput 2 is
available
* src/xfns.c (x_window): Set XInput 2 event mask
* src/xterm.c (x_detect_focus_change): Handle XInput 2 GenericEvents
(handle_one_xevent): Handle XInput 2 events
(x_term_init): Ask the server for XInput 2 support and set xkb_desc if
available
(x_delete_terminal): Free XKB kb desc if it exists, and free XI2
devices if they exist
(x_free_xi_devices, x_init_master_valuators): New functions
(x_get_scroll_valuator_delta): New function
(init_xterm): Don't tell GTK to only use Core Input when built with
XInput 2 support
* src/xterm.h (struct x_display_info): Add fields for XKB and XI2
support
* src/gtkutil.c (xg_event_is_for_menubar): Handle XIDeviceEvents
(xg_is_menu_window): New function
(xg_event_is_for_scrollbar): Handle XIDeviceEvents
Tom Levy [Tue, 9 Nov 2021 12:25:24 +0000 (12:25 +0000)]
Remove spurious %S from 'define-error' messages
; The MESSAGE arg of 'define-error' does not support format specifiers
; (unlike the 'error' function). The signal data is automatically
; appended to the error message.
Po Lu [Tue, 9 Nov 2021 06:46:48 +0000 (07:46 +0100)]
Always set xwidget title if the event was "load-finished"
* lisp/xwidget.el (xwidget-webkit-callback): Always set title upon
load completion. This prevents loading pages such as "about:blank"
from not setting the buffer name (bug#51702).
Optionally use use xwidgets to display <video> elements in shr
* doc/misc/eww.texi (Advanced): Document it.
* lisp/net/shr.el (shr-use-xwidgets-for-media): New user option.
(shr-tag-video): Use xwidgets to display <video> elements.
Feng Shu [Tue, 9 Nov 2021 03:52:59 +0000 (04:52 +0100)]
xwidget.el: limit buffer-name flicker in mode-line
* lisp/xwidget.el (xwidget-webkit): New customization group.
(xwidget-webkit-buffer-name-prefix): New user option.
(xwidget-webkit-callback): with-current-buffer only after get title,
which can limit buffer-name change in mode-line.
(xwidget-webkit-new-session, xwidget-webkit-import-widget): Use
current buffer to generate a temp xwidget-webkit buffer.
Fix local variables overwritten when diff-mode is set
* lisp/vc/diff-mode.el (diff-mode):
(diff-setup-buffer-type): Defun to initialize `diff-buffer-type'
* lisp/vc/vc.el (vc-diff-finish): Set `diff-buffer-type' after content
inserted
(vc-diff-internal): Restore `diff-mode' being set before local
variables (bug#51016).
Use word boundaries in the "Version Control" regexp to match mode names
"Log-Edit", "Log-View", "Git-Log-View", "Change Log", "VC dir",
but not "Verilog", "Prolog", "Rlogin" (bug#51337).
Remove code what would always maximize xwidgets on Macos
* src/xwidget.c (x_draw_xwidget_glyph_string): Remove code that
would always maximize the widget on Macos (bug#51674). This code
was probably added to work around a resizing bug that has since
been fixed.
akater [Mon, 8 Nov 2021 06:37:51 +0000 (07:37 +0100)]
lisp/emacs-lisp/lisp-mode.el: Fix parser state corruption.
* lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Preserve
the point.
* test/lisp/progmodes/elisp-mode-resources/flet.erts: Add corresponding
test example (bug#9622).
Stefan Kangas [Mon, 8 Nov 2021 05:42:44 +0000 (06:42 +0100)]
; * lisp/image-dired.el: Add some basic sections.
This file is currently rather hard to follow due to things just being
thrown in at random by many different contributors, with seemingly no
overall plan or idea. This is the first step towards giving it some
kind of organization.
* lisp/yank-media.el (yank-media--get-selection): Put the
nul-massaging code...
(yank-media-types--format): ... here instead, and decode utf-16
better.
* lisp/textmodes/sgml-mode.el (html-mode):
* lisp/gnus/message.el (message-mode):
* doc/lispref/frames.texi (Yanking Media): Adjust.
* lisp/yank-media.el (yank-media): Adjust doc string.
(yank-media-handler): Rename from `register-' because that may
cause confusion with register.el functions.
* lisp/yank-media.el (yank-media--get-selection): Use
gui-backend-get-selection instead of the higher-level function
which guesses wrong on the charset on many types.
(yank-media): Fix the case where there's only one match.
Miha Rihtaršič [Sun, 7 Nov 2021 23:10:03 +0000 (00:10 +0100)]
Improve undoing of RET in comint and eshell
* lisp/comint.el (comint-send-input):
(comint-accumulate):
* lisp/eshell/esh-mode.el (eshell-send-input): Before sending input to
the process, delete it and reinsert it again. Undoing this
insertion with 'C-/' will delete the region, moving the process mark
back to its original position (bug#49484).
* lisp/textmodes/texinfo.el (texinfo-mode): Set
beginning/end-of-defun functions to allow narrowing to the current
node.
(texinfo--beginning-of-defun, texinfo--end-of-defun): New functions.
Make paragraph/filling functions in texinfo-mode work better
* lisp/textmodes/texinfo.el (texinfo-mode): Make paragraph
definitions more traditional. This makes (forward-paragraph 1)
behave better.
(texinfo-mode): Set a new filling function.
(texinfo--fill-paragraph): New filling function.
(texinfo-fillable-commands): New variable (bug#49558).
Alan Mackenzie [Sun, 7 Nov 2021 20:44:46 +0000 (20:44 +0000)]
Amend Follow Mode to handle header lines and tab lines correctly
This fixes bug #51590.
list/follow.el (follow-scroll-down): Incorporate the height of the tab line
into the calculation of the window height.
(follow-calc-win-end): Incorporate the pixel heights of the header line and
the tab line the calculation of the buffer position of the bottom screen line.
* lisp/isearch.el (isearch-filter-visible): Add check if there are
no properties 'inhibit-isearch' in the search range,
instead of code of c8acc5fd92ad9979fc5870623014290cad998337.
Michael Albinus [Sun, 7 Nov 2021 17:06:24 +0000 (18:06 +0100)]
Merge from origin/emacs-28
7fdb2ae412 Add some unit tests for 'abbreviate-file-name' 21de5e7b2e Fix compilation MinGW warnings 54b726c815 ; * etc/PROBLEMS: More specific recipe for WebKit-related ... d85cf33e49 Escape '%' in filenames to fix flymake warnings 6243a43ac2 Fix search string generation in nnimap-make-thread-query f05b8a939b Update to Org 9.5-68-g77e2ec