diff options
| author | Mark Oteiza | 2015-09-07 17:56:06 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2015-09-10 13:41:09 -0400 |
| commit | 2a79268725c2d5602e9bc4a512bee7510bfbfa18 (patch) | |
| tree | d14ed934e730c8ee68c14b8c81d5612e482b964d | |
| parent | 0fafb582957135a16a9603c420e992dc46a50544 (diff) | |
| download | emacs-2a79268725c2d5602e9bc4a512bee7510bfbfa18.tar.gz emacs-2a79268725c2d5602e9bc4a512bee7510bfbfa18.zip | |
lisp/mpc.el (mpc-file-local-copy): check more config locations
| -rw-r--r-- | lisp/mpc.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/mpc.el b/lisp/mpc.el index b7c19a967fa..205c94b4965 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -910,7 +910,11 @@ If PLAYLIST is t or nil or missing, use the main playlist." | |||
| 910 | ;; Try to set mpc-mpd-music-directory. | 910 | ;; Try to set mpc-mpd-music-directory. |
| 911 | (when (and (null mpc-mpd-music-directory) | 911 | (when (and (null mpc-mpd-music-directory) |
| 912 | (string-match "\\`localhost" mpc-host)) | 912 | (string-match "\\`localhost" mpc-host)) |
| 913 | (let ((files '("~/.mpdconf" "/etc/mpd.conf")) | 913 | (let ((files `(,(let ((xdg (getenv "XDG_CONFIG_HOME"))) |
| 914 | (concat (if (and xdg (file-name-absolute-p xdg)) | ||
| 915 | xdg "~/.config") | ||
| 916 | "/mpd/mpd.conf")) | ||
| 917 | "~/.mpdconf" "~/.mpd/mpd.conf" "/etc/mpd.conf")) | ||
| 914 | file) | 918 | file) |
| 915 | (while (and files (not file)) | 919 | (while (and files (not file)) |
| 916 | (if (file-exists-p (car files)) (setq file (car files))) | 920 | (if (file-exists-p (car files)) (setq file (car files))) |