lisp/mpc.el (mpc--proc-connect): use file-name-absolute-p

This commit is contained in:
Mark Oteiza 2015-09-07 18:01:00 -04:00
parent 2cf2b19985
commit 76093858d2

View file

@ -268,7 +268,10 @@ defaults to 6600 and HOST defaults to localhost."
(if (string-match "[^[:digit:]]" v)
(string-to-number v)
v)))))
(when (string-prefix-p "/" host) ;FIXME: Use file-name-absolute-p?
(when (file-name-absolute-p host)
;; Expand file name because `file-name-absolute-p'
;; considers paths beginning with "~" as absolute
(setq host (expand-file-name host))
(setq local t))
(mpc--debug "Connecting to %s:%s..." host port)