From 0219c3e865967d6017e2e3c89a2b290eed202ef1 Mon Sep 17 00:00:00 2001 From: jcaw <40725916+jcaw@users.noreply.github.com> Date: Sat, 1 Jun 2019 08:03:02 -0700 Subject: [PATCH] Make Elnode work on Emacs 26.1 Elnode doesn't work on Emacs 26.1, because it disallows both the `:nowait` and `:server` parameters. Add a cautious fix for this, which flips `:nowait` to nil when Emacs is on 26.1 upwards. This is the same method used by `emacs-http-server` to fix the same bug. Initial fix: https://github.com/eschulte/emacs-web-server/pull/9 26.1-only patch: https://github.com/eschulte/emacs-web-server/commit/cafa5b7582c57252a0884b2c33da9b18fb678713 --- elnode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elnode.el b/elnode.el index 9d6cc91..9e465c9 100644 --- a/elnode.el +++ b/elnode.el @@ -1116,7 +1116,7 @@ is ignored." :name name :buffer an-buf :server (if (numberp port) 300 't) - :nowait 't + :nowait (< emacs-major-version 26) :host (cond ((not (numberp port)) nil) ((equal host "localhost") 'local) @@ -1266,7 +1266,7 @@ The port is chosen randomly from the ephemeral ports. " (make-network-process :name "*test-proc*" :server t - :nowait 't + :nowait (< emacs-major-version 26) :host 'local :service port :family 'ipv4))