From 697977c0b13824e90e8c622c5f54d83e53d07c6b Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Sun, 5 Dec 2021 17:01:56 +0900 Subject: [PATCH] emacs: Assume UTF-8 keyboard input for emacsclient --- packages/emacs/build.sh | 2 +- packages/emacs/site-start.el | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/emacs/build.sh b/packages/emacs/build.sh index ca9bf1e66..25707469d 100644 --- a/packages/emacs/build.sh +++ b/packages/emacs/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=27.2 -TERMUX_PKG_REVISION=6 +TERMUX_PKG_REVISION=7 TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9 TERMUX_PKG_DEPENDS="ncurses, gnutls, libxml2, libjansson" diff --git a/packages/emacs/site-start.el b/packages/emacs/site-start.el index f93baebab..54df28965 100644 --- a/packages/emacs/site-start.el +++ b/packages/emacs/site-start.el @@ -1,4 +1,9 @@ -; Enable terminal mouse events: +;; Enable terminal mouse events: (xterm-mouse-mode 1) (global-set-key [mouse-4] 'scroll-down-line) (global-set-key [mouse-5] 'scroll-up-line) + +;; Assume UTF-8 keyboard input for emacsclient: +(add-hook 'server-visit-hook + '(lambda () + (set-keyboard-coding-system 'utf-8-unix)))