diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2017-07-07 23:01:25 +0200 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2017-07-07 23:01:25 +0200 |
commit | 791f985f63abe7f10de3fbd6fd49f9efac05a285 (patch) | |
tree | e0ca559967bc62cc36d7447c850f8d96d8e1a211 /with-editor.el | |
parent | e300dab6c4be06ae42bc2f1919ed37e8624c3605 (diff) |
with-editor-locate-emacsclient: fix previous commit
If `*-1' fails, then we have to return nil. To make it clear
that this is what happens, show the return value (nil) before
the sexp-wise confusing multi-line warning text.
Also remove the unnecessary `format'.
Diffstat (limited to 'with-editor.el')
-rw-r--r-- | with-editor.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/with-editor.el b/with-editor.el index 54b43b9..c522bed 100644 --- a/with-editor.el +++ b/with-editor.el @@ -108,13 +108,12 @@ (defun with-editor-locate-emacsclient () "Search for a suitable Emacsclient executable." (or (with-editor-locate-emacsclient-1 (with-editor-emacsclient-path) 3) - (display-warning 'with-editor (format "\ + (prog1 nil (display-warning 'with-editor "\ Cannot determine a suitable Emacsclient Determining an Emacsclient executable suitable for the current Emacs instance failed. For more information -please see https://github.com/magit/magit/wiki/Emacsclient.")) - nil)) +please see https://github.com/magit/magit/wiki/Emacsclient.")))) (defun with-editor-locate-emacsclient-1 (path depth) (let* ((version-lst (-take depth (split-string emacs-version "\\."))) |