LdBeth [Sun, 19 Dec 2021 11:26:15 +0000 (12:26 +0100)]
Add a shr-allowed-images user option
* lisp/net/shr.el (shr-allowed-images): New variable (bug#52594).
(shr-image-is-blocked): New function to use it.
(shr-tag-img): Use it.
* doc/misc/eww.texi (Advanced): Document it.
This optimisation is of very limited utility and miscompiles top-level
code having the form (eval 'CODE t) by replacing it with CODE which
will then, as things currently stand, be evaluated with dynamic binding.
Michael Albinus [Sat, 18 Dec 2021 17:43:18 +0000 (18:43 +0100)]
Make generation of JUnit test reports more robust.
* lisp/emacs-lisp/ert.el (ert-load-file-name): New defvar.
(ert-write-junit-test-report): Use it. Make detection of selector
more robust. Protect calls of `xml-escape-string' with 'noerror.
* test/infra/Makefile.in (subdir_template): Use "make -k ...".
* test/infra/gitlab-ci.yml (test-filenotify-gio):
Adapt make_params in order to get a JUnit test report.
(test-native-comp-speed0): Use "make -k ...".
* test/infra/test-jobs.yml: Regenerate.
* test/lisp/progmodes/perl-mode-tests.el (top):
Set `ert-load-file-name'.
Po Lu [Sat, 18 Dec 2021 12:45:11 +0000 (20:45 +0800)]
Work around some mysterious touch ownership race on GNOME Shell
* src/xterm.c (x_unlink_touch_point): Return if touchpoint was
actually unlinked.
(handle_one_xevent): Catch and ignore errors during touch
sequence grabbing.
Eli Zaretskii [Sat, 18 Dec 2021 11:56:10 +0000 (13:56 +0200)]
; Fix last change
* src/xdisp.c (window_text_pixel_size): Fix whitespace and braces.
* src/xdisp.c (Fwindow_text_pixel_size):
* etc/NEWS:
* doc/lispref/display.texi (Size of Displayed Text): Improve
wording of the documentation of the new argument of
'window-text-pixel-size'.
Po Lu [Sat, 18 Dec 2021 10:48:11 +0000 (18:48 +0800)]
Add new argument `ignore-line-at-end' to `window-text-pixel-size'
* doc/lispref/display.texi (Size of Displayed Text): Update
documentation.
* etc/NEWS: Announce new argument.
* src/xdisp.c (window_text_pixel_size): Allow controlling if
the iterator's ascent and descent will be appended to the
pixel height returned. All callers changed.
(Fwindow_text_pixel_size): New argument `ignore-line-at-end'.
All callers changed.
Eli Zaretskii [Sat, 18 Dec 2021 09:03:48 +0000 (11:03 +0200)]
Fix display of window-specific overlays with 'display' property
* src/xdisp.c (handle_display_prop): Pass the window to
'get_char_property_and_overlay', not the buffer. (Bug#52385)
The assignment of the buffer to OBJECT was moved to before
the call to 'get_char_property_and_overlay', for unknown
reasons, as part of installing the support for the
'min-width' space spec.
Po Lu [Sat, 18 Dec 2021 00:58:51 +0000 (08:58 +0800)]
Don't abort upon untracked TouchUpdate events
Emacs might get an untracked TouchUpdate event in the unlikely
event of a device hierarchy change during a touch sequence, in
which case all devices and touchpoints will be reset.
* src/xterm.c (handle_one_xevent): Don't abort when receiving
a TouchUpdate that isn't part of a touch sequence.
Paul Eggert [Fri, 17 Dec 2021 09:11:54 +0000 (01:11 -0800)]
Port tramp-adb.el back to Emacs 26
* lisp/net/tramp-adb.el (tramp-adb-ls-output-time-less-p):
Revert previous change since Tramp code should still be backward
compatible to Emacs 26. But add a comment about this.
Problem reported by Michael Albinus in:
https://lists.gnu.org/r/emacs-devel/2021-12/msg01623.html
Eli Zaretskii [Fri, 17 Dec 2021 08:35:44 +0000 (10:35 +0200)]
Fix selection of fonts that don't have regular weight
* src/font.c (font_delete_unmatched): The kludge of allowing
inexact matches of the font weight is now used for non-NTGUI
platforms as well. (Bug#52493)
* lisp/emacs-lisp/multisession.el: Don't require url -- this pulls
in gnus-util, which requires rmail, which depends on
rmail-loaddefs being generated, which our Makefiles doesn't guarantee.
Po Lu [Thu, 16 Dec 2021 07:15:28 +0000 (15:15 +0800)]
Add support for touchscreen events generated by XInput 2
* doc/lispref/commands.texi (Input Events): Add "Touchscreen
Events" to menu.
(Touchscreen Events): New node.
* etc/NEWS: Announce new event types.
* src/keyboard.c (make_lispy_event): Handle touchscreen events.
(syms_of_keyboard): New symbols `touchscreen-begin',
`touchscreen-end' and `touchscreen-update'.
* src/termhooks.h (enum event_kind): New touchscreen events.
* src/xfns.c (setup_xi_event_mask): Set up touch event mask if
appropriate.
(x_window) [USE_GTK]: Call `setup_xi_event_mask'.
* src/xterm.c (x_free_xi_devices): Free touchpoints.
(x_init_master_valuators): Handle all devices and set master and
touch mode flags appropriately.
(xi_reset_scroll_valuators_for_device_id):
(x_get_scroll_valuator_delta): Ignore slave devices.
(xi_link_touch_point):
(xi_unlink_touch_point):
(xi_find_touch_point): New functions.
(handle_one_xevent): Handle XI touch events and events from
non-master devices.
Paul Eggert [Thu, 16 Dec 2021 17:40:22 +0000 (09:40 -0800)]
Simplify epa-ks--parse-buffer timestamp handling
* lisp/epa-ks.el (epa-ks--parse-buffer): Omit unnecessary calls to
seconds-to-time, and prefer the unaliased name time-convert when
calls are necessary.
Paul Eggert [Thu, 16 Dec 2021 17:40:22 +0000 (09:40 -0800)]
Omit temporary warning re obsolete timestamps
Do not warn about timestamps like (1 . 1000). This warning was added
in Emacs 27 as a temporary transition aid, and has now served its
purpose. These timestamps, which Emacs 26 and earlier treated as (HI
. LO) instead of as (TICKS . HZ), were never generated by Emacs
primitives, and in practice the warning seems to have been triggered
only by test cases designed to generate it.
* src/timefns.c (WARN_OBSOLETE_TIMESTAMPS): Remove.
All uses changed to assume it’s false.
(decode_lisp_time): Simplify by taking a bool instead of an
integer bitmask. All uses changed.
Paul Eggert [Thu, 16 Dec 2021 17:40:21 +0000 (09:40 -0800)]
Fix icalendar time zone parsing glitch
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Use pcase instead of cl-case, as cl-macs might not be loaded.
Otherwise, a build complains “calendar/icalendar.el:618:57:
Warning: ‘90’ is a malformed function” and some
icalendar--decode-isodatetime tests fail. This fixes a bug
introduced in 2021-11-21T08:18:57Z!dick.r.chiang@gmail.com.
* lisp/international/emoji.el (emoji--recent): Make into a
multisession variable.
(emoji-recent, emoji--recent-transient): Use it.
(emoji--add-recent): Update it.
Martin Rudalics [Wed, 15 Dec 2021 17:53:49 +0000 (18:53 +0100)]
Fix control buffer window height in 'ediff-setup-control-buffer' (Bug#49277)
* lisp/vc/ediff-util.el (ediff-setup-control-buffer): Emulate
original 'shrink-window-if-larger-than-buffer' call by calling
'fit-window-to-buffer' with an appropriate maximum height
argument (Bug#49277).
Andrea Corallo [Wed, 15 Dec 2021 14:47:14 +0000 (15:47 +0100)]
Have 'dlopen' use RTLD_GLOBAL in 'dynlib_open'
* src/pdumper.c (dump_do_dump_relocation): Use 'dynlib_open_for_eln'
in place of 'dynlib_open'.
* src/dynlib.h (dynlib_open_for_eln): Declare it.
* src/dynlib.c (dynlib_open_for_eln): New function.
(dynlib_open): Add RTLD_GLOBAL.
* src/comp.c (Fnative_elisp_load): Use 'dynlib_open_for_eln' in place
of 'dynlib_open'.
Stefan Kangas [Wed, 15 Dec 2021 05:30:41 +0000 (06:30 +0100)]
Merge from origin/emacs-28
7078f32b5b Fix crash when dumping charset_table with portable dumper ... a4fcbf46a7 ; etc/NEWS: Move the note about Xref EIEIO change to the p... f88c1d222f Remove maintainer comment from Emacs 28 module snippet.
Stefan Monnier [Tue, 14 Dec 2021 22:01:34 +0000 (17:01 -0500)]
eieio-compat.el: Move to lisp/obsolete
The file only contains obsolete definitions, so it really belongs in
`lisp/obsolete`. Moving it there will also signal a warning for those
people who run old `.elc` files using EIEIO and generated with
Emacs<25 and who otherwise might not know about the obsolescence of
some of the functions they use.
* lisp/emacs-lisp/eieio-compat.el: Move to ...
* lisp/obsolete/eieio-compat.el: ... here.
Philipp Stephani [Tue, 14 Dec 2021 10:17:37 +0000 (11:17 +0100)]
Remove maintainer comment from Emacs 28 module snippet.
This is the same as 44c13eefe8d30841000a96d82f467fb8d222e365 on
master. We should also remove this comment on the release branch,
otherwise it ends up in the emacs-module.h shipped to users.
* test/infra/gitlab-ci.yml (variables): Set EMACS_TEST_JUNIT_REPORT.
(.job-template): Use it in script and after_script.
(.build-template, .gnustep-template, .filenotify-gio-template)
(.native-comp-template): Adapt rules.
(.test-template): Trigger JUnit test report.