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.
Stefan Monnier [Mon, 13 Dec 2021 14:29:42 +0000 (09:29 -0500)]
lisp/pcomplete.el: Mark obsolete some unused functions
* lisp/pcomplete.el (pcomplete-match-beginning, pcomplete-match-end):
Mark as obsolete.
(pcomplete-opt, pcomplete--here, pcomplete--help): Use lexical-binding.
Stefan Kangas [Mon, 13 Dec 2021 05:30:58 +0000 (06:30 +0100)]
Merge from origin/emacs-28
9bd3f78645 Make `M-x run-python' select the window again 62139aeb42 * lisp/tab-bar.el (tab-bar-switch-to-last-tab): Add 'abs' ... ea8422204f * make-dist (manifest): Filter out msdos/autogen/* files. b5354e989d Rewrite the "Quitting Windows" section of Emacs Lisp Refer... 64ea1a178c Fix eshell for systems that do not have subprocesses
* doc/lispref/text.texi (Database): Document it.
* src/sqlite.c (Fsqlite_pragma): Add a separate command for
pragmas. These can be done via sqlite-execute, but it's less
confusing to have them in a separate command.
* src/sqlite.c (Fsqlite_execute): Use it.
(syms_of_sqlite): Introduce a new error for locked databases so
that we can catch that condition on higher levels.
Kévin Le Gouguec [Mon, 13 Dec 2021 04:17:00 +0000 (05:17 +0100)]
Make `M-x run-python' select the window again
Interactively, we want M-x run-python to focus the interpreter buffer.
The previous code failed in two ways:
- the call to 'display-buffer' was not reached if an interpreter
was already running,
- set-buffer is ineffectual if the interpreter's window is not
selected: once Emacs returns to the command loop, the current buffer
will revert back to what the selected window contains.
* lisp/progmodes/python.el (python-shell-make-comint): Handle the SHOW
argument regardless of whether an interpreter buffer exists, and use
pop-to-buffer to select the window.
(run-python): Delegate buffer management to
'python-shell-make-comint'.
* test/lisp/progmodes/python-tests.el
(python-tests--run-python-selects-window): Rename from
'python-tests--bug31398', and adjust assertions (bug#52380).
Po Lu [Mon, 13 Dec 2021 01:59:39 +0000 (09:59 +0800)]
Work around pixel scrolling issues when org-indent-mode is on
* lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line):
Subtract line height of window start when it doesn't appear
at the 0th pixel of the line.
Po Lu [Mon, 13 Dec 2021 01:17:55 +0000 (09:17 +0800)]
Stop using XI focus events on non-GTK builds
* src/xfns.c (setup_xi_event_mask): Stop setting XI_FocusIn
and XI_FocusOut.
* src/xterm.c (x_detect_focus_change) <GenericEvent>: Don't
handle XI_FocusIn and XI_FocusOut events when not on GTK.
Juri Linkov [Sun, 12 Dec 2021 19:11:47 +0000 (21:11 +0200)]
* lisp/char-fold.el (char-fold-override): New defcustom (bug#52394).
(char-fold--default-override): New defconst with the default value nil.
(char-fold--previous): Add char-fold--default-override.
(char-fold--make-table): Don't populate the table with default chars
when char-fold-override or char-fold--default-override is non-nil.
(char-fold-update-table): Add char-fold--default-override.
Juri Linkov [Sun, 12 Dec 2021 17:48:40 +0000 (19:48 +0200)]
* lisp/startup.el: Let-bind browse-url-browser-function instead of setq-local
* lisp/startup.el (fancy-startup-text, fancy-about-text)
(fancy-splash-head, normal-about-screen): Let-bind browse-url-browser-function
to eww-browse-url around functions that use browse-url.
(fancy-startup-screen, fancy-about-screen): Don't set buffer-local
browse-url-browser-function.
https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00939.html
Po Lu [Sun, 12 Dec 2021 13:33:56 +0000 (21:33 +0800)]
Fix overline display over stretch glyphs with box on NS
* src/nsterm.m (ns_dumpglyphs_stretch): Don't draw text
decorations when there is a box.
(ns_draw_glyph_string): Draw text decorations after the box
in stretch glyph that have one.
* lib-src/etags.c (TEX_decode_env): Fix off-by-one parsing of
TEXTAGS environment variable (bug#52438). Based on a patch by
David Fussner <dfussner@googlemail.com> and amended by Andreas
Schwab <schwab@linux-m68k.org>.