cab1ac6e682038b2ceca9d16f8c458c0e79149ca
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
emacs: use open frame if there is one present
Fixes #5779
Fixes #5405
Diff
1diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh
2index 26b28d495b6a63a8b88c1b0c056864a200a7e8d3..b4f49e12b197c53061706df3c88be5a61fee917c 100755
3--- a/plugins/emacs/emacsclient.sh
4+++ b/plugins/emacs/emacsclient.sh
5@@ -5,7 +5,7 @@ _emacsfun()
6 # get list of emacs frames.
7 frameslist=`emacsclient --alternate-editor '' --eval '(frame-list)' 2>/dev/null | egrep -o '(frame)+'`
8
9- if [ "$(echo "$frameslist" | sed -n '$=')" -ge 2 ] ;then
10+ if [ "$(echo "$frameslist" | sed -n '$=')" -ge 1 ] ;then
11 # prevent creating another X frame if there is at least one present.
12 emacsclient --alternate-editor "" "$@"
13 else