diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2023-08-27 12:40:51 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2023-08-27 12:40:51 +0200 |
| commit | 10ecb9e75c5944d4b4a08e063f00736aa6345bfb (patch) | |
| tree | 0fb4c136405a7c86c01258cfbb8166c3c7ecf28b /lisp | |
| parent | 2dc557b668203e718502e28573c45659cc8c0a78 (diff) | |
Use emacsclient-program-name if that is bound
This should make it possible to use `with-editor' on Android.
For Remacs continue to hardcode "remacsclient" because it has not
been updated since this variable was introduced and is unlikely to
be updated any time soon.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/with-editor.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/with-editor.el b/lisp/with-editor.el index e0f78dd..853e608 100644 --- a/lisp/with-editor.el +++ b/lisp/with-editor.el @@ -117,9 +117,10 @@ please see https://github.com/magit/magit/wiki/Emacsclient.")))) (let* ((version-lst (cl-subseq (split-string emacs-version "\\.") 0 depth)) (version-reg (concat "^" (mapconcat #'identity version-lst "\\.")))) (or (locate-file - (if (equal (downcase invocation-name) "remacs") - "remacsclient" - "emacsclient") + (cond ((equal (downcase invocation-name) "remacs") + "remacsclient") + ((bound-and-true-p emacsclient-program-name)) + ("emacsclient")) path (cl-mapcan (lambda (v) (cl-mapcar (lambda (e) (concat v e)) exec-suffixes)) |
