|
@@ -20,7 +20,8 @@ _emacsfun()
|
|
# tempfile. (first argument will be `--no-wait` passed in by the plugin.zsh)
|
|
# tempfile. (first argument will be `--no-wait` passed in by the plugin.zsh)
|
|
if [ "$#" -ge "2" -a "$2" = "-" ]
|
|
if [ "$#" -ge "2" -a "$2" = "-" ]
|
|
then
|
|
then
|
|
- tempfile="$(mktemp emacs-stdin-$USER.XXXXXXX --tmpdir)"
|
|
|
|
|
|
+ tempfile="$(mktemp --tmpdir emacs-stdin-$USER.XXXXXXX 2>/dev/null \
|
|
|
|
+ || mktemp -t emacs-stdin-$USER)" # support BSD mktemp
|
|
cat - > "$tempfile"
|
|
cat - > "$tempfile"
|
|
_emacsfun --no-wait $tempfile
|
|
_emacsfun --no-wait $tempfile
|
|
else
|
|
else
|