emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2a79268 1/3: lisp/mpc.el (mpc-file-local-copy): che


From: Mark Oteiza
Subject: [Emacs-diffs] master 2a79268 1/3: lisp/mpc.el (mpc-file-local-copy): check more config locations
Date: Thu, 10 Sep 2015 17:41:19 +0000

branch: master
commit 2a79268725c2d5602e9bc4a512bee7510bfbfa18
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>

    lisp/mpc.el (mpc-file-local-copy): check more config locations
---
 lisp/mpc.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lisp/mpc.el b/lisp/mpc.el
index b7c19a9..205c94b 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."
   ;; 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]