]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoPass options from make to configure through a variable.
Gregory Heytings [Wed, 24 Nov 2021 06:58:11 +0000 (07:58 +0100)]
Pass options from make to configure through a variable.

* GNUmakefile (configure): Use the variable.

* INSTALL.REPO: Document the variable (bug#51965).

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 24 Nov 2021 06:00:27 +0000 (07:00 +0100)]
Merge from origin/emacs-28

756b8a5f1b Fix typos in documentation
38fdeaef46 ; * etc/DEBUG: Fix last change.

2 years agoFix mouse-wheel-text-scale
Po Lu [Wed, 24 Nov 2021 01:49:39 +0000 (09:49 +0800)]
Fix mouse-wheel-text-scale

* lisp/mwheel.el (mouse-wheel-text-scale): Test for alternative
events correctly.

2 years agoRemove extraneous code left over from the ftbe font driver
Po Lu [Wed, 24 Nov 2021 01:46:33 +0000 (01:46 +0000)]
Remove extraneous code left over from the ftbe font driver

* src/haikuterm.c (syms_of_haikuterm): Remove dead code.

2 years agoUse only effective modifiers when handling XI2 button events
Po Lu [Wed, 24 Nov 2021 01:09:45 +0000 (09:09 +0800)]
Use only effective modifiers when handling XI2 button events

* src/xterm.c (handle_one_xevent): Use mods.effective when
constructing button events.

2 years agoAdapt artifacts paths in emba testjobs
Michael Albinus [Tue, 23 Nov 2021 15:25:41 +0000 (16:25 +0100)]
Adapt artifacts paths in emba testjobs

* test/infra/Makefile.in (subdir_template): Adapt artifacts paths.

* test/infra/test-jobs.yml: Regenerate.

2 years agoFix typos in documentation
Takesi Ayanokoji [Tue, 23 Nov 2021 14:30:23 +0000 (23:30 +0900)]
Fix typos in documentation

* doc/lispref/anti.texi:
* doc/misc/efaq.texi: Fix typos.

Copyright-paperwork-exempt: yes

2 years ago; * etc/DEBUG: Fix last change.
Eli Zaretskii [Tue, 23 Nov 2021 14:25:48 +0000 (16:25 +0200)]
; * etc/DEBUG: Fix last change.

2 years agoMerge from origin/emacs-28
Eli Zaretskii [Tue, 23 Nov 2021 13:11:14 +0000 (15:11 +0200)]
Merge from origin/emacs-28

bdb489a ; * etc/DEBUG: Adjust instructions for libgccjit reproducer.
b4fb381 ; * src/xdisp.c (produce_stretch_glyph): Avoid compilation wa...

2 years ago; * etc/DEBUG: Adjust instructions for libgccjit reproducer.
Eli Zaretskii [Tue, 23 Nov 2021 12:44:45 +0000 (14:44 +0200)]
; * etc/DEBUG: Adjust instructions for libgccjit reproducer.

2 years ago; * src/xdisp.c (produce_stretch_glyph): Avoid compilation warning.
Eli Zaretskii [Tue, 23 Nov 2021 12:37:53 +0000 (14:37 +0200)]
; * src/xdisp.c (produce_stretch_glyph): Avoid compilation warning.

2 years agoPrefer locate-user-emacs-file in gitmerge.el
Stefan Kangas [Tue, 23 Nov 2021 10:39:21 +0000 (11:39 +0100)]
Prefer locate-user-emacs-file in gitmerge.el

* admin/gitmerge.el (gitmerge-status-file): Prefer
'locate-user-emacs-file' to fiddling with 'user-emacs-directory'.

2 years agoFix compilation with XInput 2 but without XKB
Po Lu [Tue, 23 Nov 2021 09:57:09 +0000 (17:57 +0800)]
Fix compilation with XInput 2 but without XKB

* src/xterm.c (handle_one_xevent): Remove extraneous
conditional.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 23 Nov 2021 07:49:49 +0000 (08:49 +0100)]
Merge from origin/emacs-28

d791cd556d Fix '(space :relative-width N)' display spec w/non-ASCII c...
712898210f * lisp/proced.el (proced-sort-header): Fix event positions...

# Conflicts:
# lisp/proced.el

2 years agoOnly reset scroll valuators on real enter events
Po Lu [Tue, 23 Nov 2021 03:08:45 +0000 (11:08 +0800)]
Only reset scroll valuators on real enter events

* src/xterm.c (handle_one_xevent): Test event detail and mode
before resetting scroll valuators.

2 years agoFix delay between tool bar clicks and visual feedback
Po Lu [Tue, 23 Nov 2021 01:20:15 +0000 (01:20 +0000)]
Fix delay between tool bar clicks and visual feedback

* src/haikuterm.c (haiku_read_socket): Redisplay after tool
bar click.

2 years agoFix XI2 keysym translation
Po Lu [Tue, 23 Nov 2021 01:01:33 +0000 (09:01 +0800)]
Fix XI2 keysym translation

* src/xterm.c (handle_one_xevent): Handle XI_KeyPress events
that can't be translated into strings.

2 years ago* lisp/subr.el (event-start, event-end): Handle `(menu-bar)` events
Stefan Monnier [Mon, 22 Nov 2021 19:23:26 +0000 (14:23 -0500)]
* lisp/subr.el (event-start, event-end): Handle `(menu-bar)` events

* lisp/net/browse-url.el (browse-url-interactive-arg): Simplify accordingly

2 years ago* lisp/textmodes/flyspell.el: Pop up the menu under cursor from keyboard.
Juri Linkov [Mon, 22 Nov 2021 19:05:15 +0000 (21:05 +0200)]
* lisp/textmodes/flyspell.el: Pop up the menu under cursor from keyboard.

* lisp/textmodes/flyspell.el (flyspell-emacs-popup):
Use popup-menu-normalize-position with point when no mouse is involved,
instead of the incorrect use of mouse-position (bug#52025).

2 years agosrc/indent.c, src/xdisp.c: Questions about with_echo_area_buffer_unwind_data
Stefan Monnier [Mon, 22 Nov 2021 19:06:14 +0000 (14:06 -0500)]
src/indent.c, src/xdisp.c: Questions about with_echo_area_buffer_unwind_data

2 years ago; Remove "needs" from emba jobs
Michael Albinus [Mon, 22 Nov 2021 18:40:56 +0000 (19:40 +0100)]
; Remove "needs" from emba jobs

2 years ago* lisp/tab-bar.el: 'C-x t RET' creates a new tab for non-existent tab name.
Juri Linkov [Mon, 22 Nov 2021 18:15:28 +0000 (20:15 +0200)]
* lisp/tab-bar.el: 'C-x t RET' creates a new tab for non-existent tab name.

* lisp/tab-bar.el (tab-bar-switch-to-tab): Create a new tab and
rename it to NAME when can't find the tab with the given NAME (bug#51935).

2 years agoSimplify `gnu` compilation-mode regexp
Mattias Engdegård [Mon, 22 Nov 2021 18:07:32 +0000 (19:07 +0100)]
Simplify `gnu` compilation-mode regexp

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Remove the pattern ostensibly added for Ruby, because at closer
inspection it could never have matched anything.  This lessens the
performance impact of the pattern added for GCC's -fanalyzer,
now slightly tweaked.

2 years agoFix '(space :relative-width N)' display spec w/non-ASCII chars
Eli Zaretskii [Mon, 22 Nov 2021 18:00:48 +0000 (20:00 +0200)]
Fix '(space :relative-width N)' display spec w/non-ASCII chars

* src/xdisp.c (produce_stretch_glyph): Use the correct face for
non-ASCII characters.  Support :relative-width display spec on
Lisp strings, not just on buffer text.

2 years ago* lisp/tab-bar.el (tab-bar-history-old-minibuffer-depth): Remove variable.
Juri Linkov [Mon, 22 Nov 2021 17:57:59 +0000 (19:57 +0200)]
* lisp/tab-bar.el (tab-bar-history-old-minibuffer-depth): Remove variable.

(tab-bar--history-pre-change, tab-bar--history-change): Use minibuffer-depth
instead of this variable (bug#51370).

2 years ago* lisp/proced.el (proced-sort-header): Fix event positions (bug#1779).
Juri Linkov [Mon, 22 Nov 2021 17:39:28 +0000 (19:39 +0200)]
* lisp/proced.el (proced-sort-header): Fix event positions (bug#1779).

The logic was copied from 'tabulated-list-col-sort'.

2 years ago; Fix error in artifacts paths of emba jobs
Michael Albinus [Mon, 22 Nov 2021 15:47:23 +0000 (16:47 +0100)]
; Fix error in artifacts paths of emba jobs

2 years agoAdapt emba jobs
Michael Albinus [Mon, 22 Nov 2021 15:33:16 +0000 (16:33 +0100)]
Adapt emba jobs

* admin/notes/emba (Emacs jobset): Precise.

* test/infra/Makefile.in (tn): New variable.
(subdir_template): Use it.  Handle eieio-tests, faceup-tests and
so-long-tests.  Rearrange .PHONY entry.  Add needs and artifacts
to emba job.

* test/infra/gitlab-ci.yml (test-filenotify-gio): Move up.

* test/infra/test-jobs.yml: Regenerate.

2 years ago; Improve recent NEWS entry
Stefan Kangas [Mon, 22 Nov 2021 15:27:55 +0000 (16:27 +0100)]
; Improve recent NEWS entry

* etc/NEWS: Improve recently added entry on substitution of
literal key sequences.  Thanks to Eli Zaretskii <eliz@gnu.org>.

2 years ago; Further minor simplification of rx form in bytecomp.el
Stefan Kangas [Mon, 22 Nov 2021 15:11:45 +0000 (16:11 +0100)]
; Further minor simplification of rx form in bytecomp.el

* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Simplify even more.  Thanks to Mattias Engdegård <mattiase@acm.org>.

2 years agoImprove recently installed documentation
Eli Zaretskii [Mon, 22 Nov 2021 15:05:40 +0000 (17:05 +0200)]
Improve recently installed documentation

* doc/lispref/display.texi (Size of Displayed Text): Move to
description of 'buffer-text-pixel-size' to preserve previous text;
mention the importance of WINDOW.

2 years ago; * etc/NEWS: Fix some typos and improve some entries.
Robert Pluim [Mon, 22 Nov 2021 13:20:45 +0000 (14:20 +0100)]
; * etc/NEWS: Fix some typos and improve some entries.

2 years ago; Fix typo
Stefan Kangas [Mon, 22 Nov 2021 11:12:25 +0000 (12:12 +0100)]
; Fix typo

* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Fix typo.

2 years agoFix compiler warning in image.c
Po Lu [Mon, 22 Nov 2021 11:13:03 +0000 (11:13 +0000)]
Fix compiler warning in image.c

* src/image.c (webp_load): Initialize `mask_img' to NULL.

2 years ago; Very minor simplification in bytecomp.el
Stefan Kangas [Mon, 22 Nov 2021 10:55:24 +0000 (11:55 +0100)]
; Very minor simplification in bytecomp.el

* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Very minor simplification of 'rx' form.

2 years agoUse substitute-command-keys for literal key sequences
Stefan Kangas [Mon, 22 Nov 2021 10:45:44 +0000 (11:45 +0100)]
Use substitute-command-keys for literal key sequences

* lisp/abbrev.el (expand-region-abbrevs):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-help-for-help):
* lisp/calc/calc-mode.el (calc-auto-why):
* lisp/calc/calc.el (calc-do):
* lisp/calculator.el (calculator-mode):
* lisp/dired-aux.el (dired-create-files)
(dired-do-create-files-regexp, dired-create-files-non-directory):
* lisp/dired-x.el (dired-virtual):
* lisp/dired.el (dired-mark-region, dired-unmark-all-files):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/epa-ks.el (epa-ks--display-keys):
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol):
* lisp/files.el (save-some-buffers):
* lisp/gnus/gnus-dired.el (gnus-dired-find-file-mailcap)
(gnus-dired-print):
* lisp/gnus/gnus-group.el (gnus-keep-same-level):
* lisp/gnus/gnus-score.el (gnus-score-find-trace):
* lisp/gnus/gnus.el (to-list):
* lisp/gnus/message.el (message--send-mail-maybe-partially):
* lisp/mail/supercite.el (sc-set-variable):
* lisp/minibuffer.el (minibuffer-inactive-mode):
* lisp/progmodes/etags.el (select-tags-table):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-char-mode-loop):
* lisp/replace.el (query-replace-help):
* lisp/simple.el (set-variable):
* lisp/subr.el (read-char-from-minibuffer):
* lisp/textmodes/ispell.el (ispell-help, ispell-message):
* lisp/textmodes/reftex-global.el (reftex-find-duplicate-labels):
* lisp/textmodes/reftex-vars.el
(reftex-toc-include-file-boundaries)
(reftex-toc-include-labels, reftex-toc-include-index-entries)
(reftex-toc-include-context, reftex-toc-follow-mode)
(reftex-index-include-context, reftex-index-follow-mode)
(reftex-enable-partial-scans)
(reftex-auto-update-selection-buffers)
(reftex-highlight-selection):
* lisp/time.el (display-time-update):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-keep-variants):
* lisp/vc/ediff-ptch.el (ediff-fixup-patch-map)
(ediff-patch-file-internal):
* lisp/windmove.el (windmove-delete-default-keybindings): Use
'substitute-command-keys' for literal key sequences.

* lisp/userlock.el (userlock--fontify-key): Remove function.
(ask-user-about-lock, ask-user-about-lock-help)
(ask-user-about-supersession-threat)
(ask-user-about-supersession-help): Use 'substitute-command-keys' for
literal key sequences.

* lisp/ibuffer.el (ibuffer-unmark-all): Use 'substitute-command-keys'
for command.

2 years agoAvoid false positives about wide docstrings for key sequences
Stefan Kangas [Mon, 22 Nov 2021 07:08:11 +0000 (08:08 +0100)]
Avoid false positives about wide docstrings for key sequences

* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Ignore literal key sequence substitutions.
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-substitutions.el:
New file.
* test/lisp/emacs-lisp/bytecomp-tests.el
("warn-wide-docstring-ignore-substitutions.el"): New test.

2 years agoAdd new function buffer-text-pixel-size
martin rudalics [Mon, 22 Nov 2021 11:02:35 +0000 (12:02 +0100)]
Add new function buffer-text-pixel-size

* doc/lispref/display.texi (Size of Displayed Text): Document it.

* lisp/emacs-lisp/subr-x.el (string-pixel-width): Use
buffer-text-pixel-size (bug#51995).

* src/xdisp.c (window_text_pixel_size): Factor out from
Fwindow_text_pixel_size.
(Fbuffer_text_pixel_size): New function.

2 years agoFix mouse movement event generation on Haiku
Po Lu [Mon, 22 Nov 2021 07:10:57 +0000 (07:10 +0000)]
Fix mouse movement event generation on Haiku

* src/haikuterm.c (haiku_mouse_position): Set timestamp.
(haiku_read_socket): Set last_mouse_movement_time.

* src/haikuterm.h (struct haiku_display_info): Add field
`last_mouse_movement_time'.

2 years agoDon't set button event modifiers twice on Haiku
Po Lu [Mon, 22 Nov 2021 06:33:22 +0000 (06:33 +0000)]
Don't set button event modifiers twice on Haiku

* src/haikuterm.c (haiku_read_socket): Simplify.

2 years agoMove XI2 event filtering to a more appropriate location
Po Lu [Mon, 22 Nov 2021 06:06:18 +0000 (14:06 +0800)]
Move XI2 event filtering to a more appropriate location

* src/xterm.c (handle_one_xevent): Filter all key press events
even if no frame is found.

2 years agoAdd new format for literal key sequences to substitute-command-keys
Stefan Kangas [Mon, 22 Nov 2021 05:44:10 +0000 (06:44 +0100)]
Add new format for literal key sequences to substitute-command-keys

* lisp/help.el (substitute-command-keys): Add new format "\\`f'" for
literal key sequences.  (Bug#50804)
* doc/lispref/help.texi (Keys in Documentation): Document the above
new substitution.

* test/lisp/help-tests.el
(help-tests-substitute-command-keys/literal-key-sequence):
(help-tests-substitute-command-keys/literal-key-sequence-errors): New
tests.
(help-tests-substitute-key-bindings/face-help-key-binding): Extend test.

2 years agoUse more precise test for emulated wheel events in XI2
Po Lu [Mon, 22 Nov 2021 05:24:59 +0000 (13:24 +0800)]
Use more precise test for emulated wheel events in XI2

* src/xterm.c (handle_one_xevent): Ignore button events
that have XIPointerEmulated set.

2 years agoMake `xwidget-display-event' a special event as well
Po Lu [Mon, 22 Nov 2021 02:42:46 +0000 (10:42 +0800)]
Make `xwidget-display-event' a special event as well

* doc/lispref/commands.texi (Xwidget Events): Document that
`xwidget-display-event' is a special event, and that it should
be handled through callbacks.

* etc/NEWS: Update NEWS entry.

* lisp/xwidget.el (xwidget-webkit-new-session)
(xwidget-webkit-import-widget): Attach display callback.
(xwidget-webkit-display-event): Call display callback instead.
(xwidget-webkit-display-callback): New function.

* src/keyboard.c (make_lispy_event): Store
source information for XWIDGET_DISPLAY_EVENT correctly.

* src/xwidget.c (store_xwidget_display_event): Store
source of the display request.
(webkit_ready_to_show): Store source if available.
(webkit_create_cb_1): Store source if available.
(kill_xwidget): Remove dead widget from internal_xwidget_list.

2 years agoFix recent compile-tests addition
Glenn Morris [Mon, 22 Nov 2021 02:29:24 +0000 (18:29 -0800)]
Fix recent compile-tests addition

* test/lisp/progmodes/compile-tests.el (compile-test-error-regexps):
Bump number of expected errors.

; Surely running the tests before committing would have flagged this?

2 years agoAlso filter XI_KeyRelease events
Po Lu [Mon, 22 Nov 2021 01:40:47 +0000 (09:40 +0800)]
Also filter XI_KeyRelease events

* src/xterm.c (handle_one_xevent): Also filter XI_KeyRelease
events through the X input method.

2 years agoUse only effective modifiers for XI2 key press events
Po Lu [Mon, 22 Nov 2021 01:34:39 +0000 (09:34 +0800)]
Use only effective modifiers for XI2 key press events

* src/xterm.c (handle_one_xevent): Use only effective modifiers
in XI_KeyPress events.

2 years agoRemove variable that no longer exists from manual
Po Lu [Mon, 22 Nov 2021 00:24:26 +0000 (00:24 +0000)]
Remove variable that no longer exists from manual

* doc/emacs/haiku.texi: Remove nonexistent variable.

2 years agoAdapt isearch help screen for variable-pitch-mode
Stefan Kangas [Sun, 21 Nov 2021 20:05:47 +0000 (21:05 +0100)]
Adapt isearch help screen for variable-pitch-mode

* lisp/isearch.el (isearch-help-for-help-internal): Adapt for
'variable-pitch-mode', now that 'make-help-screen' uses that.

2 years ago; Simplify rcirc authentication querying functions
Omar Polo [Mon, 15 Nov 2021 21:49:23 +0000 (21:49 +0000)]
; Simplify rcirc authentication querying functions

2 years agoimplement certfp authentication to rcirc
Omar Polo [Mon, 15 Nov 2021 17:40:58 +0000 (17:40 +0000)]
implement certfp authentication to rcirc

* lisp/net/rcirc.el (rcirc-connect): Use the provided client certs
* doc/misc/rcirc.texi (Configuration): Document the change

2 years agoMove the sasl section after the bitlbee text
Omar Polo [Mon, 15 Nov 2021 17:33:51 +0000 (17:33 +0000)]
Move the sasl section after the bitlbee text

2 years agoImprove error parsing for GCC -fanalyzer output
Philip Kaludercic [Mon, 15 Nov 2021 23:05:11 +0000 (00:05 +0100)]
Improve error parsing for GCC -fanalyzer output

* compile.el (compilation-error-regexp-alist-alist): Adjust gnu rule
* compile-tests.el (compile-tests--test-regexps-data): Add testcase

2 years agoFix positioning of pop-up menus when there are window-margins
Eli Zaretskii [Sun, 21 Nov 2021 17:07:10 +0000 (19:07 +0200)]
Fix positioning of pop-up menus when there are window-margins

* src/menu.c (x_popup_menu_1): Calculate X and Y correctly for
clicks in the text area.  (Bug#51782)

2 years agoAdd :version tags to new mwheel defcustoms
Robert Pluim [Sun, 21 Nov 2021 15:20:20 +0000 (16:20 +0100)]
Add :version tags to new mwheel defcustoms

* lisp/mwheel.el (mouse-wheel-down-alternate-event):
(mouse-wheel-up-alternate-event): Add :version tag.

2 years ago; Fix a few haiku typos
Robert Pluim [Sun, 21 Nov 2021 15:00:11 +0000 (16:00 +0100)]
; Fix a few haiku typos

* lisp/net/browse-url.el (browse-url-webpositive-program): Correct
:version tag.
* src/frame.c (Fframep): Fix quoting of "haiku".

2 years agoMinor cleanup in w32inevt.c
Eli Zaretskii [Sun, 21 Nov 2021 14:57:12 +0000 (16:57 +0200)]
Minor cleanup in w32inevt.c

* src/w32inevt.c (w32_console_mouse_position, mouse_moved_to)
(do_mouse_event): Use 'get_frame' to obtain the frame pointer.

2 years agoUse variable-pitch-mode in 'C-h C-h'
Stefan Kangas [Sun, 21 Nov 2021 13:44:41 +0000 (14:44 +0100)]
Use variable-pitch-mode in 'C-h C-h'

* lisp/faces.el (help-key-binding): Inherit 'fixed-pitch'.
* lisp/help-macro.el (make-help-screen): Use
'variable-pitch-mode'.

This was discussed in
https://lists.gnu.org/r/emacs-devel/2021-11/msg01378.html

2 years agoReorganize emba control files
Michael Albinus [Sun, 21 Nov 2021 13:39:29 +0000 (14:39 +0100)]
Reorganize emba control files

Using dynamic job generation in GitLab does not work sufficiently.  So
we generate the jobs in the Emacs sources.

* configure.ac (SUBDIR_MAKEFILES): Add test/infra/Makefile.

* test/Makefile.in (subdirs, generate-test-jobs): New targets.

* test/infra/Makefile.in:
* test/infra/test-jobs.yml: New files.

* test/infra/default-gitlab-ci.yml:
* test/infra/test-jobs-generator.sh: Remove.

* test/infra/gitlab-ci.yml: Insert contents of default-gitlab-ci.yml.
(stages): Remove generator and trigger.  Add normal.
(test-jobs-generator, test-jobs-pipeline): Remove jobs.
(top): Include test-jobs.yml.

2 years agoFix double and triple click in Haiku.
Po Lu [Sun, 21 Nov 2021 13:14:06 +0000 (13:14 +0000)]
Fix double and triple click in Haiku.

* src/haikuterm.c (haiku_read_socket): Record timestamp
in events.

2 years agoReport time in XInput 2 button events
Po Lu [Sun, 21 Nov 2021 13:07:58 +0000 (21:07 +0800)]
Report time in XInput 2 button events

* src/xterm.c (handle_one_xevent): Report time in XI button
events.

2 years agoFix horizontal wheel events on Haiku
Po Lu [Sun, 21 Nov 2021 12:43:53 +0000 (12:43 +0000)]
Fix horizontal wheel events on Haiku

* src/haikuterm.c (haiku_read_socket): Fix modifier
calculation for horizontal wheel events.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 21 Nov 2021 10:18:23 +0000 (11:18 +0100)]
Merge from origin/emacs-28

0dd3883def Update to Org 9.5-72-gc5d6656
e3d5337970 Fix mouse handling with several TTY frames on MS-Windows
7e437af413 Fix temacs invocation from outside of the 'src' directory
0fbfd4253e ; Avoid byte-compilation warnings in edmacro.el
c22c988b1f Fix mouse events on tab bar or tool bar when 'track-mouse'...
354c834fba Fix `browse-url-interactive-arg' for certain kinds of events

# Conflicts:
# lisp/mouse.el

2 years agoFill the Emacs version on the splash page
Lars Ingebrigtsen [Sun, 21 Nov 2021 10:04:35 +0000 (11:04 +0100)]
Fill the Emacs version on the splash page

* lisp/startup.el (fancy-startup-tail):
(normal-mouse-startup-screen):
(normal-no-mouse-startup-screen): Fill the Emacs version data,
since it's usually longer than a single line, anyway.

2 years agoImplement `pick_embedded_child' for offscreen xwidgets
Po Lu [Sun, 21 Nov 2021 09:38:41 +0000 (17:38 +0800)]
Implement `pick_embedded_child' for offscreen xwidgets

* src/xwidget.c (pick_embedded_child): New function.
(Fmake_xwidget): Connect `pick-embedded-child' signal
to offscreen window.

2 years agoRevert "* admin/gitmerge.el (gitmerge-mode-map): Convert to defvar-keymap."
Stefan Kangas [Sun, 21 Nov 2021 09:10:07 +0000 (10:10 +0100)]
Revert "* admin/gitmerge.el (gitmerge-mode-map): Convert to defvar-keymap."

This reverts commit 4c467e4aff12e65fa4fa62d7f4bdcbf4a2bcd92c.

2 years agoFix icalendar time zone parsing
dickmao [Sun, 21 Nov 2021 08:18:57 +0000 (09:18 +0100)]
Fix icalendar time zone parsing

* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Parse time zones more correctly.
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--decode-isodatetime): Fix tests so that they work
in other time zones than Europe/Berlin (bug#51959).

2 years agoFix documentation string of x_coalesce_scroll_events
Po Lu [Sun, 21 Nov 2021 08:05:13 +0000 (08:05 +0000)]
Fix documentation string of x_coalesce_scroll_events

* src/xterm.c (x_coalesce_scroll_events): Update doc string to
reflect that this option is now supported under Haiku.

2 years agoImprove the fix for bug#51864
Eli Zaretskii [Sun, 21 Nov 2021 07:52:43 +0000 (09:52 +0200)]
Improve the fix for bug#51864

* src/xfaces.c (face_at_buffer_position): Call
FACE_FROM_ID_OR_NULL just once.
(face_at_string_position): Make sure we have a usable base face.

2 years agoImprove Haiku documentation
Po Lu [Sun, 21 Nov 2021 05:37:50 +0000 (05:37 +0000)]
Improve Haiku documentation

* doc/emacs/haiku.texi: Remove duplicate text and
extraneous pxref.

2 years agoAdd a user command to stop page loading in xwidget-webkit
Po Lu [Sun, 21 Nov 2021 05:32:03 +0000 (13:32 +0800)]
Add a user command to stop page loading in xwidget-webkit

* lisp/xwidget.el: Add `xwidget-webkit-stop' to menu.
(xwidget-webkit-stop): New command.
(xwidget-webkit-tool-bar-map): New tool bar item.

2 years agoFix compiler warnings
Po Lu [Sun, 21 Nov 2021 03:48:27 +0000 (03:48 +0000)]
Fix compiler warnings

* src/haikuterm.c (haiku_read_socket): Fix compiler
warnings intoduced by last change.

2 years agoAdd pixel delta support for wheel events on Haiku
Po Lu [Sun, 21 Nov 2021 03:40:36 +0000 (03:40 +0000)]
Add pixel delta support for wheel events on Haiku

* src/haiku_support.cc (EmacsWindow.MessageReceived): Stop
adjusting scroll deltas.
* src/haikuterm.c (haiku_read_socket): Handle pixel deltas
correctly.

2 years agoAttach download-started signals to correct WebKit context
Po Lu [Sun, 21 Nov 2021 03:14:14 +0000 (11:14 +0800)]
Attach download-started signals to correct WebKit context

* src/xwidget.c (Fmake_xwidget): Use correct context.

2 years agoAllow handling smooth scroll events in xwidgets
Po Lu [Sun, 21 Nov 2021 03:04:29 +0000 (11:04 +0800)]
Allow handling smooth scroll events in xwidgets

* src/xterm.c (handle_one_xevent): Pass through XI2 motion
events to xwidgets.
* src/xterm.c (xwidget_button): Don't handle legacy scroll
events on XInput 2.
(xwidget_motion_notify, xwidget_scroll): New functions.

2 years agoSelect device notification events correctly
Po Lu [Sun, 21 Nov 2021 01:32:46 +0000 (09:32 +0800)]
Select device notification events correctly

* src/xfns.c (setup_xi_event_mask): Select PropertyEvent,
HierarchyChanged and DeviceChanged for all devices.

2 years agoAdd XInput 2 input method support
Po Lu [Sun, 21 Nov 2021 01:22:31 +0000 (09:22 +0800)]
Add XInput 2 input method support

* src/xterm.c (handle_one_xevent): Let input methods filter
events first before trying to handle an XI2 key press event.

2 years ago* test/infra/test-jobs-generator.sh: Generate also stages entry.
Michael Albinus [Sat, 20 Nov 2021 20:50:20 +0000 (21:50 +0100)]
* test/infra/test-jobs-generator.sh: Generate also stages entry.

2 years agoRevert last change on emba files
Michael Albinus [Sat, 20 Nov 2021 19:05:52 +0000 (20:05 +0100)]
Revert last change on emba files

2 years agoUpdate to Org 9.5-72-gc5d6656
Kyle Meyer [Sat, 20 Nov 2021 18:12:18 +0000 (13:12 -0500)]
Update to Org 9.5-72-gc5d6656

2 years agoFix mouse handling with several TTY frames on MS-Windows
Eli Zaretskii [Sat, 20 Nov 2021 18:08:06 +0000 (20:08 +0200)]
Fix mouse handling with several TTY frames on MS-Windows

* src/w32inevt.c (do_mouse_event): Reset the 'mouse_moved' flag of
the selected frame.  Without that, this flag might remain set on a
TTY frame that is not displayed.

2 years agoFix temacs invocation from outside of the 'src' directory
Eli Zaretskii [Sat, 20 Nov 2021 16:17:59 +0000 (18:17 +0200)]
Fix temacs invocation from outside of the 'src' directory

* src/emacs.c (main) [HAVE_NATIVE_COMP]: Recompute the value of
native-comp-eln-load-path if about to load loadup in uninitialized
Emacs.  (Bug#51999)

2 years agoAdd support for the Haiku operating system and its window system
Po Lu [Sat, 20 Nov 2021 13:30:08 +0000 (21:30 +0800)]
Add support for the Haiku operating system and its window system

* .gitignore: Add binaries specific to Haiku.

* Makefie.in (HAVE_BE_APP): New variable.
(install-arch-dep): Install Emacs and Emacs.pdmp when
using Haiku.

* configure.ac: Detect and configure for Haiku and
various related configurations.
(be-app, be-freetype, be-cairo): New options.
(HAVE_BE_APP, HAIKU_OBJ, HAIKU_CXX_OBJ)
(HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(HAIKU, HAVE_TINY_SPEED_T): New define.
(emacs_config_features): Add BE_APP.

* doc/emacs/Makefile.in (EMACSSOURCES): Add Haiku
appendix.

* doc/emacs/emacs.texi: Add Haiku appendix to menus and
include it.

* doc/emacs/haiku.texi: New Haiku appendix.

* doc/lispref/display.texi (Defining Faces, Window Systems):
Explain meaning of `haiku' as a window system identifier.
(haiku-use-system-tooltips): Explain meaning of system
tooltips on
Haiku.

* doc/lispref/frames.texi (Multiple Terminals): Explain
meaning of haiku as a display type.
(Frame Layout): Clarify section for Haiku frames.
(Size Parameters): Explain limitations of fullwidth and
fullheight on Haiku.
(Management Parameters): Explain limitations of
inhibiting double buffering on builds with Cairo,
and the inability of frames with no-accept-focus to
receive keyboard input on Haiku.
(Font and Color Parameters): Explain the different font
backends available on Haiku.
(Raising and Lowering): Explain that lowering and
restacking frames doesn't work on Haiku.
(Child Frames): Explain oddities of child frame
visibility on Haiku.

* doc/lispref/os.texi (System Environment): Explain
meaning of haiku.
* etc/MACHINES: Add appropriate notices for Haiku.
* etc/NEWS: Document changes.
* etc/PROBLEMS: Document font spacing bug on Haiku.

* lib-src/Makefile.in: Build be-resources binary on
Haiku.
(CXX, CXXFLAGS, NON_CXX_FLAGS, ALL_CXXFLAGS)
(HAVE_BE_APP, HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(DONT_INSTALL): Add be-resources binary if on Haiku.
(be-resources): New target.

* lib-src/be_resources: Add helper binary for setting
resources on the Emacs application.

* lib-src/emacsclient.c (decode_options): Set
alt_display to "be" on Haiku.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-unraised, custom-button-pressed): Update
face definitions for Haiku.

* lisp/cus-start.el: Add haiku-debug-on-fatal-error and
haiku-use-system-tooltips.

* lisp/faces.el (face-valid-attribute-values): Clarify
attribute comment for Haiku.
(tool-bar): Add appropriate toolbar color for Haiku.

* lisp/frame.el (haiku-frame-geometry)
(haiku-mouse-absolute-pixel-position)
(haiku-set-mouse-absolute-pixel-position)
(haiku-frame-edges)
(haiku-frame-list-z-order): New function declarations.

(frame-geometry, frame-edges)
(mouse-absolute-pixel-position)
(set-mouse-absolute-pixel-position)
(frame-list-z-order): Call appropriate window system
functions on Haiku.

(display-mouse-p, display-graphic-p)
(display-images-p, display-pixel-height)
(display-pixel-width, display-mm-height)
(display-mm-width, display-backing-store)
(display-save-under, display-planes)
(display-color-cells, display-visual-class): Update type
tests for Haiku.

* lisp/international/mule-cmds.el
(set-coding-system-map): Also
prevent set-terminal-coding-system from appearing in the menu
bar on Haiku.

* lisp/loadup.el: Load Haiku-specific files when built
with Haiku, and don't rename newly built Emacs on Haiku as BFS
doesn't support hard links.

* lisp/menu-bar.el (menu-bar-open): Add for Haiku.

* lisp/mwheel.el (mouse-wheel-down-event): Expect
wheel-up on Haiku.
(mouse-wheel-up-event): Expect wheel-down on Haiku.
(mouse-wheel-left-event): Expect wheel-left on Haiku.
(mouse-wheel-right-event): Expect wheel-right on Haiku.

* lisp/net/browse-url.el
(browse-url--browser-defcustom-type):
Add option for WebPositive.
(browse-url-webpositive-program): New variable.
(browse-url-default-program): Search for WebPositive.
(browse-url-webpositive): New function.

* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select): Define faces
appropriately for Haiku.

* lisp/term/haiku-win.el: New file.

* lisp/tooltip.el (menu-or-popup-active-p): New function
declaration.
(tooltip-show-help): Don't use tooltips on Haiku when a
menu is active.

* lisp/version.el (haiku-get-version-string): New
function declaration.
(emacs-version): Add Haiku version string if
appropriate.

* src/Makefile.in: Also produce binary named "Emacs"
with Haiku resources set.

(CXX, HAIKU_OBJ, HAIKU_CXX_OBJ, HAIKU_LIBS)
(HAIKU_CFLAGS, HAVE_BE_APP, NON_CXX_FLAGS)
(ALL_CXX_FLAGS): New variables.

(.SUFFIXES): Add .cc.
(.cc.o): New target.
(base_obj): Add Haiku C objects.
(doc_obj, obj): Split objects that should scanned for
documentation into doc_obj.
(SOME_MACHINE_OBJECTS): Add appropriate Haiku C objects.
(all): Depend on Emacs and Emacs.pdmp on Haiku.
(LIBES): Add Haiku libraries.
(gl-stamp)
($(etc)/DOC): Scan doc_obj instead of obj
(temacs$(EXEEXT): Use C++ linker on Haiku.
(ctagsfiles3): New variable.
(TAGS): Scan C++ files.

* src/alloc.c (garbage_collect): Mark Haiku display.

* src/dispextern.h (HAVE_NATIVE_TRANSFORMS): Also enable
on Haiku.
(struct image): Add fields for Haiku transforms.
(RGB_PIXEL_COLOR): Define to unsigned long on Haiku as
well.
(sit_for): Also check USABLE_SIGPOLL.
(init_display_interactive): Set initial window system to
Haiku on Haiku builds.

* src/emacs.c (main): Define Haiku syms and init haiku
clipboard.
(shut_down_emacs): Quit BApplication on Haiku and
trigger debug
on aborts if haiku_debug_on_fatal_error.
(Vsystem_type): Update docstring.

* src/fileio.c (next-read-file-uses-dialog-p): Enable on
Haiku.

* src/filelock.c (WTMP_FILE): Only define if BOOT_TIME
is also defined.

* src/floatfns.c (double_integer_scale): Work around
Haiku libroot brain damage.

* src/font.c (syms_of_font): Define appropriate font
driver symbols for Haiku builds with various options.

* src/font.h: Also enable ftcrfont on Haiku builds with
Cairo.
(font_data_structures_may_be_ill_formed): Also enable on
Haiku builds that have Cairo.

* src/frame.c (Fframep): Update doc-string for Haiku
builds and return haiku if appropriate.
(syms_of_frame): New symbol `haiku'.

* src/frame.h (struct frame): Add output data for Haiku.
(FRAME_HAIKU_P): New macro.
(FRAME_WINDOW_P): Test for Haiku frames as well.

* src/ftcrfont.c (RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG): New macros.
(ftcrfont_draw): Add haiku specific code for Haiku
builds with Cairo.

* src/ftfont.c (ftfont_open): Set face.
(ftfont_has_char, ftfont_text_extents): Work around
crash.
(syms_of_ftfont): New symbol `mono'.

* src/ftfont.h (struct font_info): Enable Cairo-specific
fields for Cairo builds on Haiku.

* src/haiku_draw_support.cc:
* src/haiku_font_support.cc:
* src/haiku_io.c:
* src/haiku_select.cc:
* src/haiku_support.cc:
* src/haiku_support.h:
* src/haikufns.c:
* src/haikufont.c:
* src/haikugui.h:
* src/haikuimage.c:
* src/haikumenu.c:
* src/haikuselect.c:
* src/haikuselect.h:
* src/haikuterm.c:
* src/haikuterm.h: Add new files for Haiku windowing
support.

* src/haiku.c: Add new files for Haiku operating system
support.

* src/image.c: Implement image transforms and native XPM
support
on Haiku.

(GET_PIXEL, PUT_PIXEL, NO_PIXMAP)
(PIX_MASK_RETAIN, PIX_MASK_DRAW)
(RGB_TO_ULONG, RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG, RED16_FROM_ULONG, GREEN16_FROM_ULONG)
(BLUE16_FROM_ULONG): Define to appropriate values on
Haiku.

(image_create_bitmap_from_data): Add Haiku support.
(image_create_bitmap_from_file): Add TODO on Haiku.
(free_bitmap_record): Free bitmap on Haiku.
(image_size_in_bytes): Implement for Haiku bitmaps.
(image_set_transform): Implement on Haiku.
(image_create_x_image_and_pixmap_1): Implement on Haiku,
24-bit or 1-bit only.
(image_destroy_x_image, image_get_x_image): Use correct
img and pixmap values on Haiku.
(lookup_rgb_color): Use correct macro on Haiku.
(image_to_emacs_colors): Implement on Haiku.
(image_disable_image): Disable on Haiku.
(image_can_use_native_api): Test for translator presence
on Haiku.
(native_image_load): Use translator on Haiku.
(imagemagick_load_image): Add Haiku-specific quirks.
(Fimage_transforms_p): Allow rotate90 on Haiku.
(image_types): Enable native XPM support on Haiku.
(syms_of_image): Enable XPM images on Haiku.

* src/keyboard.c (kbd_buffer_get_event)
(handle_async_input, handle_input_available_signal)
(handle_user_signal, Fset_input_interrupt_mode)
(init_keyboard): Check for USABLE_SIGPOLL along with
USABLE_SIGIO.

* src/lisp.h (pD): Work around broken Haiku headers.
(HAVE_EXT_MENU_BAR): Define on Haiku.
(handle_input_available_signal): Enable if we just have
SIGPOLL as well.

* src/menu.c (have_boxes): Return true on Haiku.
(single_menu_item): Enable toolkit menus on Haiku.
(find_and_call_menu_selection): Also enable on Haiku.

* src/process.c (keyboard_bit_set): Enable with only
usable SIGPOLL.
(wait_reading_process_output): Test for SIGPOLL as well
as SIGIO availability.

* src/sound.c (sound_perror, vox_open)
(vox_configure, vox_close): Enable for usable SIGPOLL as
well.

* src/sysdep.c (sys_subshell): Enable for usable SIGPOLL.
(reset_sigio): Make conditional on F_SETOWN.
(request_sigio, unrequest_sigio)
(emacs_sigaction_init): Also handle SIGPOLLs.
(init_sys_modes): Disable TCXONC usage on Haiku, as it
doesn't have any ttys other than pseudo ttys, which don't
support C-s/C-q flow control, and causes compiler warnings.
(speeds): Disable high speeds if HAVE_TINY_SPEED_T.

* src/termhooks.h (enum output_method): Add output_haiku.
(struct terminal): Add Haiku display info.
(TERMINAL_FONT_CACHE): Enable for Haiku.

* src/terminal.c (Fterminal_live_p): Return `haiku' if
appropriate.
* src/verbose.mk.in (AM_V_CXX, AM_V_CXXLD): New logging
variables.

* src/xdisp.c (redisplay_internal)
(note_mouse_highlight): Return on Haiku if a popup is activated.
(display_menu_bar): Return on Haiku if frame is a Haiku
frame.

* src/xfaces.c (GCGraphicsExposures): Enable correctly on Haiku.
(x_create_gc): Enable dummy GC code on Haiku.

* src/xfns.c (x-server-version, x-file-dialog): Add
Haiku specifics to doc strings.

* src/xterm.c (syms_of_xterm): Add Haiku information to
doc string.

2 years ago; Rearrange normal stage in emba files
Michael Albinus [Sat, 20 Nov 2021 12:29:33 +0000 (13:29 +0100)]
; Rearrange normal stage in emba files

2 years ago; Fix my last commit
Stefan Kangas [Sat, 20 Nov 2021 12:18:17 +0000 (13:18 +0100)]
; Fix my last commit

* lisp/play/animate.el (animate-string): Ensure the delay is always a
float.

2 years agoMake string-animate smoother
Stefan Kangas [Sat, 20 Nov 2021 12:12:38 +0000 (13:12 +0100)]
Make string-animate smoother

* lisp/play/animate.el (animate-total-added-delay): New defcustom.
(animate-n-steps): Double the default value.  Use :type 'natnum'.
(animate-string): Make the delay depend on the above new defcustom
divided by the number of steps.

2 years agoPrevent crashes when scrolling in an unknown Window on XI2
Po Lu [Sat, 20 Nov 2021 12:00:45 +0000 (20:00 +0800)]
Prevent crashes when scrolling in an unknown Window on XI2

* src/xterm.c (handle_one_xevent): Fix XI2 frame lookup to
handle foreign windows.

2 years agoFix xwidgets with XInput 2 builds
Po Lu [Sat, 20 Nov 2021 11:54:51 +0000 (19:54 +0800)]
Fix xwidgets with XInput 2 builds

* src/xwidget.c (Fmake_xwidget): Refrain from synthesizing
a focus event here on XI2 builds.
(Fxwidget_perform_lispy_event): Try to set embedder on XI2
builds and do nothing otherwise.
(synthesize_focus_in_event): Use focus_change.window as opposed
to any.window.
(x_draw_xwidget_glyph_string): Synthesize focus event here
instead on XI2 builds.

2 years agoMake 'eval' use lexical scoping in most tests
Stefan Kangas [Sat, 20 Nov 2021 11:54:48 +0000 (12:54 +0100)]
Make 'eval' use lexical scoping in most tests

* test/lisp/electric-tests.el (electric-pair-define-test-form)
(define-electric-pair-test):
* test/lisp/emacs-lisp/backtrace-tests.el
(backtrace-tests--uncompiled-functions):
* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs-test--symbol-macrolet):
* test/lisp/emacs-lisp/let-alist-tests.el
(let-alist-list-to-sexp):
* test/lisp/emacs-lisp/lisp-tests.el
(elisp-tests-with-temp-buffer, core-elisp-tests-3-backquote):
* test/lisp/emacs-lisp/testcover-resources/testcases.el
(testcover-testcase-nth-case):
* test/lisp/ffap-tests.el (ffap-ido-mode):
* test/lisp/files-tests.el (file-test--do-local-variables-test):
* test/lisp/net/tramp-tests.el (tramp--test-utf8):
* test/lisp/progmodes/elisp-mode-tests.el
(find-defs-defgeneric-eval, find-defs-defun-eval)
(find-defs-defvar-eval, find-defs-face-eval)
(find-defs-feature-eval): Give 'eval' non-nil LEXICAL argument.
* test/lisp/subr-tests.el
(subr-tests--dolist--wrong-number-of-args):
* test/src/eval-tests.el (eval-tests--if-dot-string)
(eval-tests--mutating-cond)
(eval-tests-19790-backquote-comma-dot-substitution): Test 'eval'
using LEXICAL as both nil and non-nil.
(eval-tests--let-with-circular-defs): Give explicit nil to 'eval'.

2 years agoimage-dired: Improve some messages
Stefan Kangas [Sat, 20 Nov 2021 10:09:23 +0000 (11:09 +0100)]
image-dired: Improve some messages

* lisp/image-dired.el (image-dired-dir)
(image-dired-create-thumb-1): Improve messages.
(image-dired-rotate-original): Signal 'user-error' instead of 'error'.

2 years agoConvert snake and tetris keymaps to defvar-keymap
Stefan Kangas [Sat, 20 Nov 2021 10:00:19 +0000 (11:00 +0100)]
Convert snake and tetris keymaps to defvar-keymap

* lisp/play/snake.el (snake-mode-map, snake-null-map):
* lisp/play/tetris.el (tetris-mode-map, tetris-null-map): Convert
to defvar-keymap.

2 years ago; Rearrange include in emba scripts
Michael Albinus [Sat, 20 Nov 2021 11:14:49 +0000 (12:14 +0100)]
; Rearrange include in emba scripts

2 years ago; Avoid byte-compilation warnings in edmacro.el
Eli Zaretskii [Sat, 20 Nov 2021 11:00:42 +0000 (13:00 +0200)]
; Avoid byte-compilation warnings in edmacro.el

* lisp/edmacro.el (mouse-wheel-down-event, mouse-wheel-up-event)
(mouse-wheel-right-event, mouse-wheel-left-event): Defvar them, to
avoid compilation warnings in --without-x builds.

2 years ago; * configure.ac (emacs_config_features): Add XINPUT2.
Eli Zaretskii [Sat, 20 Nov 2021 10:44:13 +0000 (12:44 +0200)]
; * configure.ac (emacs_config_features): Add XINPUT2.

2 years agoMake shr render text with superscripts prettier
Lars Ingebrigtsen [Sat, 20 Nov 2021 10:42:38 +0000 (11:42 +0100)]
Make shr render text with superscripts prettier

* lisp/net/shr.el (shr-sup): New face.
(shr-tag-sup, shr-tag-sub): Use it to make the super/subscripts
slightly smaller so that we don't get uneven line heights with
text that uses these.

2 years agoFix a comment in XInput related code
Po Lu [Sat, 20 Nov 2021 10:35:45 +0000 (18:35 +0800)]
Fix a comment in XInput related code

* src/xterm.c (x_term_init): Fix comment to say "XInput 2.1"
instead of "XInput 1.1".

2 years agoExpose pixel-wise wheel events to Lisp
Po Lu [Tue, 16 Nov 2021 11:39:50 +0000 (19:39 +0800)]
Expose pixel-wise wheel events to Lisp

* doc/lispref/commands.texi (Misc Events): Document changes to
wheel events.

* src/keyboard.c (make_lispy_event): Handle wheel events with
pixel delta data.
* src/termhooks.h (WHEEL_EVENT): Document changes to
WHEEL_EVENT args.
* src/xfns.c (syms_of_xfns): Declare new symbols.
* src/xterm.c (handle_one_xevent): Give wheel events pixel delta
data.
(x_coalesce_scroll_events): New user option.

2 years agoAdd support for event processing via XInput 2
Po Lu [Sat, 16 Oct 2021 05:15:36 +0000 (13:15 +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.
(setup_xi_event_mask): New function.
(syms_of_xfns): Provide XInput 2 feature.
* 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.
(xi_grab_or_ungrab_device)
(xi_reset_scroll_valuators_for_device_id)
(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.
* etc/NEWS: Document changes.

* lisp/mwheel.el (mouse-wheel-down-alternate-event)
(mouse-wheel-up-alternate-event)
(mouse-wheel-left-alternate-event)
(mouse-wheel-right-alternate-event): New user options.

(mouse-wheel-text-scale)
(mwheel-scroll): Test for alternate events.
(mouse-wheel--setup-bindings): Set up bindings for alternate
buttons.

2 years agoAllow terminating page loading operations in webkit xwidgets
Po Lu [Sat, 20 Nov 2021 10:23:02 +0000 (18:23 +0800)]
Allow terminating page loading operations in webkit xwidgets

* doc/lispref/display.texi (Xwidgets): Document new function.
* etc/NEWS: Announce `xwidget-webkit-stop-loading'.
* src/xwidget.c (Fxwidget_webkit_stop_loading): New function.
(syms_of_xwidget): Define new subr.

2 years agoFix mouse events on tab bar or tool bar when 'track-mouse' is t
martin rudalics [Sat, 20 Nov 2021 09:56:13 +0000 (10:56 +0100)]
Fix mouse events on tab bar or tool bar when 'track-mouse' is t

* lisp/mouse.el (mouse-drag-track):
* lisp/mouse-drag.el (mouse-drag-drag): Set 'track-mouse' to some
value neither t nor nil.
* src/keyboard.c (make_lispy_position): If track_mouse is Qt,
report event on tool or tab bar (Bug#51794).