From cf9dd26378d99a0f06a6dd89287a709bd3813274 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 9 Sep 2019 17:44:32 +0200 Subject: [PATCH] Fix whitespaces in xdg-paths.el --- lisp/xdg-paths.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lisp/xdg-paths.el b/lisp/xdg-paths.el index ea6186f..228f320 100644 --- a/lisp/xdg-paths.el +++ b/lisp/xdg-paths.el @@ -151,7 +151,7 @@ This directory is added to \\[load-path].") If the command fails, return NIL." (let ((command (concat "xdg-user-dir " dirname))) (if (zerop (shell-command command)) - (substring (shell-command-to-string command) 0 -1) + (substring (shell-command-to-string command) 0 -1) nil))) @@ -171,13 +171,13 @@ If 'documents, it will be located in user-documents-directory. If the category is wrong, an error will be signaled. " (expand-file-name filename - (case type - ((nil data) user-emacs-data-directory) - ('config user-emacs-config-directory) - ('lisp user-emacs-lisp-directory) - ('cache user-emacs-cache-directory) - ('documents user-documents-directory) - (t (error "The category %s is not valid" type))))) + (case type + ((nil data) user-emacs-data-directory) + ('config user-emacs-config-directory) + ('lisp user-emacs-lisp-directory) + ('cache user-emacs-cache-directory) + ('documents user-documents-directory) + (t (error "The category %s is not valid" type))))) (defun locate-user-config-file (filename) @@ -208,10 +208,10 @@ it to `load-path`." ;; Set the default variables if they have no name. (macrolet ((setq-if-null (variable value) - `(if (null ,variable) - (setf ,variable ,value))) - (getdir (variable fallback) - `(expand-file-name "emacs/" (or (getenv ,variable) ,fallback)))) + `(if (null ,variable) + (setf ,variable ,value))) + (getdir (variable fallback) + `(expand-file-name "emacs/" (or (getenv ,variable) ,fallback)))) (setq-if-null user-emacs-config-directory (getdir "XDG_CONFIG_HOME" "~/.config/")) (setq-if-null user-emacs-data-directory (getdir "XDG_DATA_HOME" "~/.local/share/")) (setq-if-null user-emacs-cache-directory (getdir "XDG_CACHE_HOME" "~/.cache/"))