]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/mpc.el (mpc-file-local-copy): check more config locations
authorMark Oteiza <mvoteiza@udel.edu>
Mon, 7 Sep 2015 21:56:06 +0000 (17:56 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Thu, 10 Sep 2015 17:41:09 +0000 (13:41 -0400)
lisp/mpc.el

index b7c19a967fa2910605d36b875dc94e5d22844049..205c94b496552ea28fcfa24960a251cc3725ee96 100644 (file)
@@ -910,7 +910,11 @@ If PLAYLIST is t or nil or missing, use the main playlist."
   ;; Try to set mpc-mpd-music-directory.
   (when (and (null mpc-mpd-music-directory)
              (string-match "\\`localhost" mpc-host))
-    (let ((files '("~/.mpdconf" "/etc/mpd.conf"))
+    (let ((files `(,(let ((xdg (getenv "XDG_CONFIG_HOME")))
+                      (concat (if (and xdg (file-name-absolute-p xdg))
+                                  xdg "~/.config")
+                              "/mpd/mpd.conf"))
+                   "~/.mpdconf" "~/.mpd/mpd.conf" "/etc/mpd.conf"))
           file)
       (while (and files (not file))
         (if (file-exists-p (car files)) (setq file (car files)))