Commit da3e1016 authored by Mark Oteiza's avatar Mark Oteiza
Browse files

; Try not to affect match data

* lisp/xdg.el (xdg-user-dir): Use save-match-data.
parent 01a82957
......@@ -140,9 +140,10 @@ This should be called at the beginning of a line."
(defun xdg-user-dir (name)
"Return the path of user directory referred to by NAME."
(when (null xdg-user-dirs)
(setq xdg-user-dirs
(expand-file-name "user-dirs.dirs" (xdg-config-home)))))
(setq xdg-user-dirs
(expand-file-name "user-dirs.dirs" (xdg-config-home))))))
(let ((dir (cdr (assoc name xdg-user-dirs))))
(when dir (expand-file-name dir))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment