diff options
| author | Paul Eggert | 2025-07-24 19:44:48 -0700 |
|---|---|---|
| committer | Paul Eggert | 2025-07-24 22:13:47 -0700 |
| commit | c403bc4d51e8466833ff728fddcca7ffe69740ee (patch) | |
| tree | f8c2693a26d542fe2279c6135f6f26af78ce8c78 /src | |
| parent | d7e818608027552aa084eb37e3bf39deedff4921 (diff) | |
| download | emacs-c403bc4d51e8466833ff728fddcca7ffe69740ee.tar.gz emacs-c403bc4d51e8466833ff728fddcca7ffe69740ee.zip | |
Streamline init_callproc a bit
* src/callproc.c (init_callproc): Don’t bother testing for the
existence of ../src/ and NEWS if installation-directory is
non-nil, because in that case we will test for ../etc/NEWS anyway.
Simplify by using AUTO_STR.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/callproc.c b/src/callproc.c index e1a369b47f4..8a8cdf813ce 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -2009,19 +2009,17 @@ init_callproc (void) | |||
| 2009 | source directory. */ | 2009 | source directory. */ |
| 2010 | if (data_dir == 0) | 2010 | if (data_dir == 0) |
| 2011 | { | 2011 | { |
| 2012 | Lisp_Object tem, srcdir; | ||
| 2013 | Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0)); | 2012 | Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0)); |
| 2014 | 2013 | if (!NILP (Vinstallation_directory) | |
| 2015 | srcdir = Fexpand_file_name (build_string ("../src/"), lispdir); | 2014 | || !NILP (Fequal (Fexpand_file_name (AUTO_STR ("../src/"), lispdir), |
| 2016 | 2015 | Vinvocation_directory)) | |
| 2017 | tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory); | 2016 | || NILP (Ffile_exists_p (Fexpand_file_name (AUTO_STR ("NEWS"), |
| 2018 | if (!NILP (Fequal (srcdir, Vinvocation_directory)) | 2017 | Vdata_directory)))) |
| 2019 | || NILP (Ffile_exists_p (tem)) || !NILP (Vinstallation_directory)) | ||
| 2020 | { | 2018 | { |
| 2021 | Lisp_Object newdir; | 2019 | Lisp_Object newdir; |
| 2022 | newdir = Fexpand_file_name (build_string ("../etc/"), lispdir); | 2020 | newdir = Fexpand_file_name (AUTO_STR ("../etc/"), lispdir); |
| 2023 | tem = Fexpand_file_name (build_string ("NEWS"), newdir); | 2021 | if (!NILP (Ffile_exists_p (Fexpand_file_name (AUTO_STR ("NEWS"), |
| 2024 | if (!NILP (Ffile_exists_p (tem))) | 2022 | newdir)))) |
| 2025 | Vdata_directory = newdir; | 2023 | Vdata_directory = newdir; |
| 2026 | } | 2024 | } |
| 2027 | } | 2025 | } |