summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-06-21 06:30:25 +0200
committerStefan Kangas <stefan@marxist.se>2022-06-21 06:30:25 +0200
commitc175984e2c909979da915ac46b0c92de67f4b249 (patch)
treeda1edbf9fa41a6ccd2a54e9fe1cfffd6ddf3c211
parent1d681a57005c837a58c9b3a365bc59f7293c4df5 (diff)
parent2eb738f2b8a3948b590ac7a6640f317a5cb12918 (diff)
downloademacs-c175984e2c909979da915ac46b0c92de67f4b249.tar.gz
Merge from origin/emacs-28
2eb738f2b8 Support builds configured with a separate --bindir cf4c204df8 * doc/misc/eww.texi (Overview, Basics): Fix typos.
-rw-r--r--doc/misc/eww.texi4
-rw-r--r--src/emacs.c32
2 files changed, 20 insertions, 16 deletions
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
index f23180c1d4e..1060cd805ab 100644
--- a/doc/misc/eww.texi
+++ b/doc/misc/eww.texi
@@ -69,7 +69,7 @@ Indices
@chapter Overview
@dfn{EWW}, the Emacs Web Wowser, is a web browser for GNU Emacs. It
can load, parse, and display various web pages using @dfn{shr.el}.
-However a GNU Emacs with @code{libxml2} support is required.
+However, a GNU Emacs with @code{libxml2} support is required.
@node Basics
@chapter Basic Usage
@@ -213,7 +213,7 @@ switch EWW buffers through a minibuffer prompt, press @kbd{s}
@cindex External Browser
Although EWW and shr.el do their best to render webpages in GNU
Emacs some websites use features which can not be properly represented
-or are not implemented (E.g., JavaScript). If you have trouble
+or are not implemented (e.g., JavaScript). If you have trouble
viewing a website with EWW then hit @kbd{&}
(@code{eww-browse-with-external-browser}) inside the EWW buffer to
open the website in the external browser specified by
diff --git a/src/emacs.c b/src/emacs.c
index 236add1157d..5098acd7225 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -975,20 +975,24 @@ load_pdump (int argc, char **argv)
sprintf (dump_file, "%s%c%s-%s%s",
path_exec, DIRECTORY_SEP, argv0_base, hexbuf, suffix);
#if !defined (NS_SELF_CONTAINED)
- /* Assume the Emacs binary lives in a sibling directory as set up by
- the default installation configuration. */
- const char *go_up = "../../../../bin/";
- needed += (strip_suffix ? strlen (strip_suffix) : 0)
- - strlen (suffix) + strlen (go_up);
- if (exec_bufsize < needed)
- {
- xfree (emacs_executable);
- emacs_executable = xpalloc (NULL, &exec_bufsize, needed - exec_bufsize,
- -1, 1);
- }
- sprintf (emacs_executable, "%s%c%s%s%s",
- path_exec, DIRECTORY_SEP, go_up, argv0_base,
- strip_suffix ? strip_suffix : "");
+ if (!(emacs_executable && *emacs_executable))
+ {
+ /* If we didn't find the Emacs binary, assume that it lives in a
+ sibling directory as set up by the default installation
+ configuration. */
+ const char *go_up = "../../../../bin/";
+ needed += (strip_suffix ? strlen (strip_suffix) : 0)
+ - strlen (suffix) + strlen (go_up);
+ if (exec_bufsize < needed)
+ {
+ xfree (emacs_executable);
+ emacs_executable = xpalloc (NULL, &exec_bufsize,
+ needed - exec_bufsize, -1, 1);
+ }
+ sprintf (emacs_executable, "%s%c%s%s%s",
+ path_exec, DIRECTORY_SEP, go_up, argv0_base,
+ strip_suffix ? strip_suffix : "");
+ }
#endif
result = pdumper_load (dump_file, emacs_executable);