diff --git a/core/autoload/format.el b/core/autoload/format.el index 534950bd6..7de5af711 100644 --- a/core/autoload/format.el +++ b/core/autoload/format.el @@ -50,15 +50,24 @@ and `format!' into colored output, where COLOR is any car of this list.") (concat "- " (if args (apply #'format str args) str)))) (start . (lambda (str &rest args) (concat "> " (if args (apply #'format str args) str)))) - (debug . (lambda (str &rest args) (if doom-debug-mode (apply #'format str args) ""))) + (debug . (lambda (str &rest args) + (if doom-debug-mode + (if args + (apply #'format str args) + (format "%s" str)) + ""))) (path . abbreviate-file-name) (symbol . symbol-name) (relpath . (lambda (str &optional dir) - (let ((dir (or dir (file-truename default-directory))) - (str (file-truename str))) - (if (file-in-directory-p str dir) - (file-relative-name str dir) - (abbreviate-file-name str))))) + (if (or (not str) + (not (stringp str)) + (string-empty-p str)) + str + (let ((dir (or dir (file-truename default-directory))) + (str (file-truename str))) + (if (file-in-directory-p str dir) + (file-relative-name str dir) + (abbreviate-file-name str)))))) (filename . file-name-nondirectory) (dirname . (lambda (path) (unless (file-directory-p path)