diff options
| author | Philipp Stephani <phst@google.com> | 2017-08-17 21:39:47 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2017-08-17 21:40:36 +0200 |
| commit | 241726118dee067a8d9880d53c6a781d580ba8a1 (patch) | |
| tree | f368be4216923193de107d9ef01dddb500d97863 | |
| parent | b591c286c9487dd37fa212ea888f2fcffbaab931 (diff) | |
Guard against nonexistent default directoryv2.6.0
Fixes #34.
Modified-by: Jonas Bernoulli <jonas@bernoul.li>
| -rw-r--r-- | with-editor.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/with-editor.el b/with-editor.el index af8fc25..83b4b92 100644 --- a/with-editor.el +++ b/with-editor.el @@ -139,8 +139,9 @@ please see https://github.com/magit/magit/wiki/Emacsclient.")))) (with-editor-locate-emacsclient-1 path (1- depth)))))) (defun with-editor-emacsclient-version (exec) - (ignore-errors - (cadr (split-string (car (process-lines exec "--version")))))) + (let ((default-directory (file-name-directory exec))) + (ignore-errors + (cadr (split-string (car (process-lines exec "--version"))))))) (defun with-editor-emacsclient-path () (let ((path exec-path)) |
