Skip to content

Commit

Permalink
with-editor-locate-emacsclient: don't assume version string length
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tarsius committed Aug 16, 2017
1 parent 4d3d50b commit b591c28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion with-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b591c28

Please sign in to comment.