From: Eli Zaretskii Date: Sat, 3 Dec 2022 10:21:00 +0000 (+0200) Subject: Fix handling of relative directories in "--init-directory=DIR" X-Git-Tag: emacs-29.0.90~1365 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11c3c54d8ade69003f441918b607f073e6fa39f1;p=emacs.git Fix handling of relative directories in "--init-directory=DIR" * lisp/startup.el (command-line): Interpret non-absolute file names in '--init-directory' relative to the directory from which Emacs is started. (Bug#59795) --- diff --git a/lisp/startup.el b/lisp/startup.el index d985d57d3c7..6270de2ace6 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1261,7 +1261,9 @@ please check its value") (setq user-emacs-directory (or argval (pop args)) user-emacs-directory (if (stringp user-emacs-directory) (file-name-as-directory - user-emacs-directory) + (expand-file-name + user-emacs-directory + command-line-default-directory)) user-emacs-directory) argval nil)) ((member argi '("-u" "-user"))