From 6f6a35fd07559aa484a59c4b6267e01db41921a3 Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <dnbarbato@posteo.de>
Date: Fri, 7 Feb 2020 17:59:31 +0100
Subject: [PATCH v3 3/3] gnu: emacs-telega: Test Emacs environment on startup.
Print a more helpful error message when someone attempts to run Telega on an
incompatible Emacs (e.g a 32-bit Emacs without wide ints).
* gnu/packages/patches/telega-test-env.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/emacs-xyz.scm (emacs-telega): Use it.
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 2 ++
gnu/packages/patches/telega-test-env.patch | 14 ++++++++++++++
3 files changed, 17 insertions(+)
create mode 100644 gnu/packages/patches/telega-test-env.patch
@@ -1470,6 +1470,7 @@ dist_patch_DATA = \
%D%/packages/patches/tcsh-fix-autotest.patch \
%D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \
%D%/packages/patches/teensy-loader-cli-help.patch \
+ %D%/packages/patches/telega-test-env.patch \
%D%/packages/patches/texinfo-5-perl-compat.patch \
%D%/packages/patches/texlive-bin-CVE-2018-17407.patch \
%D%/packages/patches/texlive-bin-luatex-poppler-compat.patch \
@@ -21328,6 +21328,8 @@ fish-completion. It can be used in both Eshell and M-x shell.")
(sha256
(base32
"0mv6i80958d9crzspzik5xh5g8326115bvg2frgv0dp9p6rm86m3"))
+ (patches
+ (search-patches "telega-test-env.patch"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
new file mode 100644
@@ -0,0 +1,14 @@
+Test Emacs environment on startup.
+
+Patch by Diego N. Barbato
+
+--- a/telega.el 2020-02-07 17:07:18.549970090 +0100
++++ b/telega.el 2020-02-07 17:10:08.383499765 +0100
+@@ -82,6 +82,7 @@
+ "Start telegramming.
+ If prefix ARG is given, then will not pop to telega root buffer."
+ (interactive "P")
++ (telega-test-env t)
+ (telega--create-hier)
+
+ (unless (telega-server-live-p)
--
2.26.0