From 25c69809a1a811768e2ebe5d4205b71cb8991f82 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Thu, 7 Dec 2017 03:44:06 +0100 Subject: [PATCH] emacs: Backport bugfix for clicks in the modeline See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29104 and #1910. --- packages/emacs/build.sh | 2 +- packages/emacs/src-keyboard.c.patch | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 packages/emacs/src-keyboard.c.patch diff --git a/packages/emacs/build.sh b/packages/emacs/build.sh index 650f32d2c..941e419dc 100644 --- a/packages/emacs/build.sh +++ b/packages/emacs/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/emacs/ TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more" TERMUX_PKG_VERSION=25.3 -TERMUX_PKG_REVISION=0 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=253ac5e7075e594549b83fd9ec116a9dc37294d415e2f21f8ee109829307c00b TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_DEPENDS="ncurses, gnutls, libxml2" diff --git a/packages/emacs/src-keyboard.c.patch b/packages/emacs/src-keyboard.c.patch new file mode 100644 index 000000000..da61b9170 --- /dev/null +++ b/packages/emacs/src-keyboard.c.patch @@ -0,0 +1,22 @@ +https://github.com/emacs-mirror/emacs/commit/18b235941109ab9e7a405cbe950886c97e897e11 + +diff --git a/src/keyboard.c b/src/keyboard.c +index 57757cf2112..f32b1560133 100644 +--- a/src/keyboard.c ++++ b/src/keyboard.c +@@ -8916,7 +8916,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, + ptrdiff_t keys_start; + + Lisp_Object current_binding = Qnil; +- Lisp_Object first_event = Qnil; + + /* Index of the first key that has no binding. + It is useless to try fkey.start larger than that. */ +@@ -9026,6 +9025,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, + + starting_buffer = current_buffer; + first_unbound = bufsize + 1; ++ Lisp_Object first_event = mock_input > 0 ? keybuf[0] : Qnil; + + /* Build our list of keymaps. + If we recognize a function key and replace its escape sequence in