summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-08-18 07:51:05 -0700
committerGlenn Morris <rgm@gnu.org>2020-08-18 07:51:05 -0700
commit013ddd1e5dcea1515e849eb9dea5b9c864407bd0 (patch)
tree28be516a3d2c8a18f03a5911e2d6501810a1b5fc /src
parent23e6c36645bb8f07f55ba94af21cebaaab2c91d3 (diff)
parentcf0ee6f49b4b0b03db2c3f9fe93e1a486472e831 (diff)
downloademacs-013ddd1e5dcea1515e849eb9dea5b9c864407bd0.tar.gz
Merge from origin/emacs-27
cf0ee6f49b ; spelling fixes 16f4f26632 Fix startup working dir bug on NeXTSTEP
Diffstat (limited to 'src')
-rw-r--r--src/composite.c2
-rw-r--r--src/emacs.c16
-rw-r--r--src/xdisp.c4
-rw-r--r--src/xfns.c2
4 files changed, 14 insertions, 10 deletions
diff --git a/src/composite.c b/src/composite.c
index 396d456f8cb..984e0d9cda8 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1258,7 +1258,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
is backward in the buffer, which can only happen if the
display routines were called to perform the bidi
reordering. But it doesn't harm to test for that, and
- avoid someon raising their brows and thinking it's a
+ avoid someone raising their brows and thinking it's a
subtle bug... */
if (bidi_level < 0)
direction = Qnil;
diff --git a/src/emacs.c b/src/emacs.c
index cb04de4aab6..059e1c6d8f0 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1625,23 +1625,27 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
{
#ifdef NS_IMPL_COCOA
/* Started from GUI? */
- /* FIXME: Do the right thing if get_homedir returns "", or if
- chdir fails. */
- if (! inhibit_window_system && ! isatty (STDIN_FILENO) && ! ch_to_dir)
- chdir (get_homedir ());
+ bool go_home = (!ch_to_dir && !inhibit_window_system
+ && !isatty (STDIN_FILENO));
if (skip_args < argc)
{
if (!strncmp (argv[skip_args], "-psn", 4))
{
skip_args += 1;
- if (! ch_to_dir) chdir (get_homedir ());
+ go_home |= !ch_to_dir;
}
else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn", 4))
{
skip_args += 2;
- if (! ch_to_dir) chdir (get_homedir ());
+ go_home |= !ch_to_dir;
}
}
+ if (go_home)
+ {
+ char const *home = get_homedir ();
+ if (*home && chdir (home) == 0)
+ emacs_wd = emacs_get_current_dir_name ();
+ }
#endif /* COCOA */
}
#endif /* HAVE_NS */
diff --git a/src/xdisp.c b/src/xdisp.c
index f05319aa644..ad03ac46054 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -180,8 +180,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
present (non-empty) only if the corresponding display margin is
shown in the window. If the glyph array for a marginal area is not
present its beginning and end coincide, i.e. such arrays are
- actually empty (they contain no glyphs). Frame glyph matrics, used
- on text-mode terminals (see below) never have marginal areas, they
+ actually empty (they contain no glyphs). Frame glyph matrices, used
+ on text-mode terminals (see below) never have marginal areas; they
treat the entire frame-wide row of glyphs as a single large "text
area".
diff --git a/src/xfns.c b/src/xfns.c
index 07bba90eaf2..d56fc0ad05d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -8027,7 +8027,7 @@ If this equals the symbol 'resize-mode', Emacs uses GTK's resize mode to
always trigger an immediate resize of the child frame. This method is
deprecated by GTK and may not work in future versions of that toolkit.
It also may freeze Emacs when used with other desktop environments. It
-avoids, however, the unpleasent flicker induced by the hiding approach.
+avoids, however, the unpleasant flicker induced by the hiding approach.
This variable is considered a temporary workaround and will be hopefully
eliminated in future versions of Emacs. */);