emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor b591c28 050/140: with-editor-locate-emacsclien


From: Jonas Bernoulli
Subject: [nongnu] elpa/with-editor b591c28 050/140: with-editor-locate-emacsclient: don't assume version string length
Date: Fri, 6 Aug 2021 12:51:18 -0400 (EDT)

branch: elpa/with-editor
commit b591c286c9487dd37fa212ea888f2fcffbaab931
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    with-editor-locate-emacsclient: don't assume version string length
    
    Emacs usually identifies itself as "N.M.1" or "N.0.[59][0-9]"
    but at least one users Emacs identifies itself as just "N.M",
    so stop assuming that the version string always consist of at
    least three elements.
    
    Fixes #33.
---
 with-editor.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/with-editor.el b/with-editor.el
index fb60724..af8fc25 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -106,7 +106,9 @@
 
 (defun with-editor-locate-emacsclient ()
   "Search for a suitable Emacsclient executable."
-  (or (with-editor-locate-emacsclient-1 (with-editor-emacsclient-path) 3)
+  (or (with-editor-locate-emacsclient-1
+       (with-editor-emacsclient-path)
+       (length (split-string emacs-version "\\.")))
       (prog1 nil (display-warning 'with-editor "\
 Cannot determine a suitable Emacsclient
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]