summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-10-12 13:44:16 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-10-12 13:44:16 -0700
commit3d0d5b4ebdf19876104d23402606f2b3cc636aca (patch)
tree87febb7bc2409f9502c86802a46915c01c546e7c /src
parent36375d35aa06e84865cce678559ddfa8f79a9775 (diff)
parent05d0c0f80291d25ea228d4a8572d58540bf08b52 (diff)
downloademacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.tar.gz
Merge from origin/emacs-26
05d0c0f802 ; * ChangeLog.3: ChangeLog fixes. fbabae6b24 * ChangeLog.3: Update. eab051991e Fix docstring style for 'functionp' e8a7c41b4e Format shell commands in tramp.texi 0526aac4eb Unbreak the button in the Flymake diagnostics buffer again c89f001de1 Add mode map to Flymake diagnostic button f9cd8ee681 Tweak the Flymake diagnostics buffer again 0e83f5f279 Simplify Flymake diagnostics buffer UX cf4a15b9b6 First stab at a Flymake diagnostics buffer e4a1556392 * etc/NEWS (Flymake): Rewrite entry. 00adeb43e9 Improve the Flymake manual 44c6401733 ; * etc/NEWS: Clarify the description of "---" and "+++". 042b3cfbd2 Fix two Flymake bugs 3dfa2ca4dc Don't log "emergencies" in the Flymake legacy backend 1c2e188440 Add full documentation on new Flymake API 0f7f677f82 Fix some Flymake docstrings and messages 21e7075781 Make three new Flymake commands for debugging common problems c9be9a3678 ; INSTALL.REPO: Add -d to "thorough cleaning" suggestion. 5d51403ceb ; Typo fixes, mostly repeated words 0d004ed01a ; Spelling fixes 0485aa76c9 ; * src/lread.c (syms_of_lread) <module-file-suffix>: Fix ... ba7fb37d6a * admin/authors.el (authors-renamed-files-alist): addition. 14dca4a79a ; ChangeLog.3 fixes f352d0257c Fix PWD check on DOS_NT 934f08f3de Fix unlikely overflows with wd length 6c2b1e89ef * lisp/gnus/message.el: Improve last commit 7ed7360855 Fix problems when editing raw undecoded message (Bug#28671) aca5f0072b Avoid encoding errors in message.el 0c36663db5 Improve doc string and prompt of 'grep-read-files' 2da83c9d36 Avoid assertion violations when line numbers are displayed 5b81f65ad0 ; * lisp/emacs-lisp/rmc.el: Minor fix for copyright and li... 11b37b4a9f Be lazy when starting Flymake checks 36ed9a9ede Fix last change in frameset.el 62e5c119af Describe how window dividers can replicate vertical border... e2150d994a Add line-number faces to the display-line-numbers group 89b0023044 Increase xterm click count only within double-click-fuzz 745aea2296 Change pause in fullscreen toggling for NS port (bug#28496) 1cd334cd47 Handle PARENTS properly in tramp-*-handle-make-directory f1c73de47d ; Merge from Gnulib (comment changes only) 7c2c117c91 Improve test for unreachable dirs 2202952b83 * src/xsmfns.c (x_session_initialize): Fix memory leak. a9b72976de Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs i... 64baaff8c5 New option for handling ZWNJ in Arabic text rendering c194fb61c6 Make python prettify symbols into a defvar (Bug#28713) 6dfc778d54 Fix fullscreen crash on macOS (bug#28496) 3db0dc2168 Fix crash when closing fullscreen frame on macOS (bug#28661) bc80da5bd3 Support gio tool in Tramp 349e0eb5ff Fix flymake-goto-next-error when message has %-constructs 0fa353b504 * src/gnutls.c (syms_of_gnutls): Remove duplicated call to... dc6ae15a8d Move the entry about 'format' into Incompatible Lisp Changes 75174a632d Fix glitches in displaying TTY menus 238fbcb20e Create new Edebug spec for docstrings and use it in closures 2d58d51329 Avoid byte-compilation warnings in message.el # Conflicts: # etc/NEWS
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog.102
-rw-r--r--src/ChangeLog.122
-rw-r--r--src/ChangeLog.42
-rw-r--r--src/ChangeLog.52
-rw-r--r--src/ChangeLog.72
-rw-r--r--src/buffer.c2
-rw-r--r--src/dispnew.c22
-rw-r--r--src/emacs-module.c2
-rw-r--r--src/emacsgtkfixed.c2
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c2
-rw-r--r--src/frame.h2
-rw-r--r--src/gnutls.c1
-rw-r--r--src/keyboard.h2
-rw-r--r--src/lread.c2
-rw-r--r--src/nsterm.m5
-rw-r--r--src/scroll.c2
-rw-r--r--src/sysdep.c92
-rw-r--r--src/termhooks.h2
-rw-r--r--src/w32inevt.c2
-rw-r--r--src/w32proc.c2
-rw-r--r--src/xdisp.c1
-rw-r--r--src/xsmfns.c4
23 files changed, 102 insertions, 57 deletions
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 1bd822d492f..f5eb88be961 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -3958,7 +3958,7 @@
2006-05-12 Chong Yidong <cyd@stupidchicken.com>
- * intervals.c (set_point_both): Fix mixup before before and after
+ * intervals.c (set_point_both): Fix mixup before and after
in variable names.
* editfns.c (Fline_beginning_position): Inhibit point-motion hooks
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12
index 61251bfbb47..2291e85e8cb 100644
--- a/src/ChangeLog.12
+++ b/src/ChangeLog.12
@@ -3348,7 +3348,7 @@
with plain -g rather than with -g3, and they need the duplicate
definitions for .gdbinit to work; see <https://bugs.gnu.org/12814#26>.
* lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
- Define as macros, as well as as enums or as constants.
+ Define as macros, as well as enums or constants.
2012-11-06 Jan Djärv <jan.h.d@swipnet.se>
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4
index 2935ee52cca..70865535e96 100644
--- a/src/ChangeLog.4
+++ b/src/ChangeLog.4
@@ -3381,7 +3381,7 @@
some external definitions.
(Ffile_attributes) [MSDOS]: Set execute bits from file name.
(Ffile_name_all_completions) [FILE_SYSTEM_CASE]: Convert
- case of file name as as indicated by conditional.
+ case of file name as indicated by conditional.
* emacs.c (main) [MSDOS]: Call init_environment. Set file types to
binary for all files. Call init_dosfns.
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5
index 489ccfa5323..99d25163a4d 100644
--- a/src/ChangeLog.5
+++ b/src/ChangeLog.5
@@ -1372,7 +1372,7 @@
1995-04-11 Richard Stallman <rms@mole.gnu.ai.mit.edu>
* keyboard.c (read_char): Rearrange code so that getcjmp is set
- only around sit_for and kbd_buffer_get_event, and
+ only around sit_for and kbd_buffer_get_event,
and polling is stopped only around the kbd_buffer_get_event call.
(Ftrack_mouse, tracking_off, read_char): Don't call prepare_menu_bars.
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7
index 32472ac074c..a1a9fb77157 100644
--- a/src/ChangeLog.7
+++ b/src/ChangeLog.7
@@ -3381,7 +3381,7 @@
1998-02-15 Richard Stallman <rms@psilocin.gnu.org>
* minibuf.c (read_minibuf): Do use DEFALT in place of empty input
- when when expflag is nonzero.
+ when expflag is nonzero.
(Fread_no_blanks_input): Arg INIT renamed to INITIAL.
1998-02-14 Richard Stallman <rms@psilocin.gnu.org>
diff --git a/src/buffer.c b/src/buffer.c
index 76670b89545..cc6021bfb5d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -6054,7 +6054,7 @@ and is the visited file's modification time, as of that time. If the
modification time of the most recent save is different, this entry is
obsolete.
-An entry (t . 0) means means the buffer was previously unmodified but
+An entry (t . 0) means the buffer was previously unmodified but
its time stamp was unknown because it was not associated with a file.
An entry (t . -1) is similar, except that it means the buffer's visited
file did not exist.
diff --git a/src/dispnew.c b/src/dispnew.c
index ad59704a168..cb32f09b7c6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -66,7 +66,7 @@ struct dim
/* Function prototypes. */
-static void update_frame_line (struct frame *, int);
+static void update_frame_line (struct frame *, int, bool);
static int required_matrix_height (struct window *);
static int required_matrix_width (struct window *);
static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
@@ -88,7 +88,7 @@ static void check_matrix_pointers (struct glyph_matrix *,
static void mirror_line_dance (struct window *, int, int, int *, char *);
static bool update_window_tree (struct window *, bool);
static bool update_window (struct window *, bool);
-static bool update_frame_1 (struct frame *, bool, bool, bool);
+static bool update_frame_1 (struct frame *, bool, bool, bool, bool);
static bool scrolling (struct frame *);
static void set_window_cursor_after_update (struct window *);
static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
@@ -3121,7 +3121,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
/* Update the display. */
update_begin (f);
- paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1);
+ paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1, false);
update_end (f);
if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
@@ -3174,7 +3174,7 @@ update_frame_with_menu (struct frame *f, int row, int col)
cursor_at_point_p = !(row >= 0 && col >= 0);
/* Force update_frame_1 not to stop due to pending input, and not
try scrolling. */
- paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p);
+ paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p, true);
/* ROW and COL tell us where in the menu to position the cursor, so
that screen readers know the active region on the screen. */
if (!cursor_at_point_p)
@@ -4474,7 +4474,7 @@ scrolling_window (struct window *w, bool header_line_p)
static bool
update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
- bool set_cursor_p)
+ bool set_cursor_p, bool updating_menu_p)
{
/* Frame matrices to work on. */
struct glyph_matrix *current_matrix = f->current_matrix;
@@ -4513,7 +4513,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
/* Update the individual lines as needed. Do bottom line first. */
if (MATRIX_ROW_ENABLED_P (desired_matrix, desired_matrix->nrows - 1))
- update_frame_line (f, desired_matrix->nrows - 1);
+ update_frame_line (f, desired_matrix->nrows - 1, updating_menu_p);
/* Now update the rest of the lines. */
for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending); i++)
@@ -4539,7 +4539,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
if (!force_p && (i - 1) % preempt_count == 0)
detect_input_pending_ignore_squeezables ();
- update_frame_line (f, i);
+ update_frame_line (f, i, updating_menu_p);
}
}
@@ -4775,7 +4775,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
/* Perform a frame-based update on line VPOS in frame FRAME. */
static void
-update_frame_line (struct frame *f, int vpos)
+update_frame_line (struct frame *f, int vpos, bool updating_menu_p)
{
struct glyph *obody, *nbody, *op1, *op2, *np1, *nend;
int tem;
@@ -4814,6 +4814,12 @@ update_frame_line (struct frame *f, int vpos)
current_row->enabled_p = true;
current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA];
+ /* For some reason, cursor is sometimes moved behind our back when a
+ frame with a TTY menu is redrawn. Homing the cursor as below
+ fixes that. */
+ if (updating_menu_p)
+ cursor_to (f, 0, 0);
+
/* If desired line is empty, just clear the line. */
if (!desired_row->enabled_p)
{
diff --git a/src/emacs-module.c b/src/emacs-module.c
index e5833a1d1f0..6bc91a7e06a 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -983,7 +983,7 @@ value_to_lisp (emacs_value v)
return o;
}
-/* Attempt to convert O to an emacs_value. Do not do any checking or
+/* Attempt to convert O to an emacs_value. Do not do any checking
or allocate any storage; the caller should prevent or detect
any resulting bit pattern that is not a valid emacs_value. */
static emacs_value
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 1a00e0f6806..4243b3ffd9d 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -81,7 +81,7 @@ emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
additional case for an xwidget view.
It would be nicer if the bse class method could be called first,
- and the the xview modification only would remain here. It wasn't
+ and the xview modification only would remain here. It wasn't
possible to solve it that way yet. */
EmacsFixedClass *klass;
GtkWidgetClass *parent_class;
diff --git a/src/eval.c b/src/eval.c
index acda64e7f04..52e4c96d4b2 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2681,7 +2681,7 @@ call8 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
}
DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0,
- doc: /* Non-nil if OBJECT is a function. */)
+ doc: /* Return t if OBJECT is a function. */)
(Lisp_Object object)
{
if (FUNCTIONP (object))
diff --git a/src/fileio.c b/src/fileio.c
index d460f123a82..d8ecccd7930 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -125,7 +125,7 @@ static mode_t auto_save_mode_bits;
static bool auto_save_error_occurred;
/* If VALID_TIMESTAMP_FILE_SYSTEM, then TIMESTAMP_FILE_SYSTEM is the device
- number of a file system where time stamps were observed to to work. */
+ number of a file system where time stamps were observed to work. */
static bool valid_timestamp_file_system;
static dev_t timestamp_file_system;
diff --git a/src/frame.h b/src/frame.h
index d1c21da4d2a..e610fc768d3 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -447,7 +447,7 @@ struct frame
/* New text height and width for pending size change. 0 if no change
pending. These values represent pixels or canonical character units
- according to the value of new_pixelwise and correlate to the the
+ according to the value of new_pixelwise and correlate to the
text width/height of the frame. */
int new_width, new_height;
diff --git a/src/gnutls.c b/src/gnutls.c
index d7a1399f106..b55d1b9289f 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -2472,7 +2472,6 @@ syms_of_gnutls (void)
DEFSYM (QCcipher_blocksize, ":cipher-blocksize");
DEFSYM (QCcipher_keysize, ":cipher-keysize");
DEFSYM (QCcipher_tagsize, ":cipher-tagsize");
- DEFSYM (QCcipher_keysize, ":cipher-keysize");
DEFSYM (QCcipher_ivsize, ":cipher-ivsize");
DEFSYM (QCmac_algorithm_id, ":mac-algorithm-id");
diff --git a/src/keyboard.h b/src/keyboard.h
index a2a5f8f21d9..662d8e4a4f6 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -65,7 +65,7 @@ INLINE_HEADER_BEGIN
as soon as a complete key arrives from some KBOARD or other,
Emacs starts executing that key's binding. It switches to the
single-kboard state for the execution of that command,
- so that that command can get input only from its own KBOARD.
+ so that the command can get input only from its own KBOARD.
While in the single-kboard state, read_char can consider input only
from the current KBOARD. If events come from other KBOARDs, they
diff --git a/src/lread.c b/src/lread.c
index 6bc93b14817..33da8667228 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4834,7 +4834,7 @@ to the specified file name if a suffix is allowed or required. */);
build_pure_c_string (".el"));
#endif
DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix,
- doc: /* Suffix of loadable module file, or nil of modules are not supported. */);
+ doc: /* Suffix of loadable module file, or nil if modules are not supported. */);
#ifdef HAVE_MODULES
Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX);
#else
diff --git a/src/nsterm.m b/src/nsterm.m
index f0b6a70dae3..0b43c04c0b7 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3715,7 +3715,7 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r)
/* Currently on NS img->mask is always 0. Since
get_window_cursor_type specifies a hollow box cursor when on
a non-masked image we never reach this clause. But we put it
- in in anticipation of better support for image masks on
+ in, in anticipation of better support for image masks on
NS. */
tdCol = ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f);
}
@@ -6893,6 +6893,9 @@ not_in_argv (NSString *arg)
NSTRACE_RECT ("[sender frame]", [sender frame]);
NSTRACE_FSTYPE ("fs_state", fs_state);
+ if (!FRAME_LIVE_P (emacsframe))
+ return frameSize;
+
if (fs_state == FULLSCREEN_MAXIMIZED
&& (maximized_width != (int)frameSize.width
|| maximized_height != (int)frameSize.height))
diff --git a/src/scroll.c b/src/scroll.c
index 7004dcd9aea..c6e0cfd7e21 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -457,7 +457,7 @@ calculate_direct_scrolling (struct frame *frame,
if (baud_rate <= 0)
extra_cost = 1;
- /* Overhead of setting the scroll window, plus the extra cost
+ /* Overhead of setting the scroll window, plus the extra
cost of scrolling by a distance of one. The extra cost is
added once for consistency with the cost vectors */
scroll_overhead
diff --git a/src/sysdep.c b/src/sysdep.c
index 8291a606bea..dd0062b6f04 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -221,10 +221,29 @@ init_standard_fds (void)
}
/* Return the current working directory. The result should be freed
- with 'free'. Return NULL on errors. */
-char *
-emacs_get_current_dir_name (void)
+ with 'free'. Return NULL (setting errno) on errors. If the
+ current directory is unreachable, return either NULL or a string
+ beginning with '('. */
+
+static char *
+get_current_dir_name_or_unreachable (void)
{
+ /* Use malloc, not xmalloc, since this function can be called before
+ the xmalloc exception machinery is available. */
+
+ char *pwd;
+
+ /* The maximum size of a directory name, including the terminating null.
+ Leave room so that the caller can append a trailing slash. */
+ ptrdiff_t dirsize_max = min (PTRDIFF_MAX, SIZE_MAX) - 1;
+
+ /* The maximum size of a buffer for a file name, including the
+ terminating null. This is bounded by MAXPATHLEN, if available. */
+ ptrdiff_t bufsize_max = dirsize_max;
+#ifdef MAXPATHLEN
+ bufsize_max = min (bufsize_max, MAXPATHLEN);
+#endif
+
# if HAVE_GET_CURRENT_DIR_NAME && !BROKEN_GET_CURRENT_DIR_NAME
# ifdef HYBRID_MALLOC
bool use_libc = bss_sbrk_did_unexec;
@@ -233,65 +252,80 @@ emacs_get_current_dir_name (void)
# endif
if (use_libc)
{
- /* GNU/Linux get_current_dir_name can return a string starting
- with "(unreachable)" (Bug#27871). */
- char *wd = get_current_dir_name ();
- if (wd && ! (IS_DIRECTORY_SEP (*wd) || (*wd && IS_DEVICE_SEP (wd[1]))))
+ /* For an unreachable directory, this returns a string that starts
+ with "(unreachable)"; see Bug#27871. */
+ pwd = get_current_dir_name ();
+ if (pwd)
{
- free (wd);
- errno = ENOENT;
- return NULL;
+ if (strlen (pwd) < dirsize_max)
+ return pwd;
+ free (pwd);
+ errno = ERANGE;
}
- return wd;
+ return NULL;
}
# endif
- char *buf;
- char *pwd = getenv ("PWD");
+ size_t pwdlen;
struct stat dotstat, pwdstat;
+ pwd = getenv ("PWD");
+
/* If PWD is accurate, use it instead of calling getcwd. PWD is
sometimes a nicer name, and using it may avoid a fatal error if a
parent directory is searchable but not readable. */
if (pwd
- && (IS_DIRECTORY_SEP (*pwd) || (*pwd && IS_DEVICE_SEP (pwd[1])))
+ && (pwdlen = strlen (pwd)) < bufsize_max
+ && IS_DIRECTORY_SEP (pwd[pwdlen && IS_DEVICE_SEP (pwd[1]) ? 2 : 0])
&& stat (pwd, &pwdstat) == 0
&& stat (".", &dotstat) == 0
&& dotstat.st_ino == pwdstat.st_ino
- && dotstat.st_dev == pwdstat.st_dev
-#ifdef MAXPATHLEN
- && strlen (pwd) < MAXPATHLEN
-#endif
- )
+ && dotstat.st_dev == pwdstat.st_dev)
{
- buf = malloc (strlen (pwd) + 1);
+ char *buf = malloc (pwdlen + 1);
if (!buf)
return NULL;
- strcpy (buf, pwd);
+ return memcpy (buf, pwd, pwdlen + 1);
}
else
{
- size_t buf_size = 1024;
- buf = malloc (buf_size);
+ ptrdiff_t buf_size = min (bufsize_max, 1024);
+ char *buf = malloc (buf_size);
if (!buf)
return NULL;
for (;;)
{
if (getcwd (buf, buf_size) == buf)
- break;
- if (errno != ERANGE)
+ return buf;
+ int getcwd_errno = errno;
+ if (getcwd_errno != ERANGE || buf_size == bufsize_max)
{
- int tmp_errno = errno;
free (buf);
- errno = tmp_errno;
+ errno = getcwd_errno;
return NULL;
}
- buf_size *= 2;
+ buf_size = buf_size <= bufsize_max / 2 ? 2 * buf_size : bufsize_max;
buf = realloc (buf, buf_size);
if (!buf)
return NULL;
}
}
- return buf;
+}
+
+/* Return the current working directory. The result should be freed
+ with 'free'. Return NULL (setting errno) on errors; an unreachable
+ directory (e.g., its name starts with '(') counts as an error. */
+
+char *
+emacs_get_current_dir_name (void)
+{
+ char *dir = get_current_dir_name_or_unreachable ();
+ if (dir && *dir == '(')
+ {
+ free (dir);
+ errno = ENOENT;
+ return NULL;
+ }
+ return dir;
}
diff --git a/src/termhooks.h b/src/termhooks.h
index b5171bf1229..dd6044aabd5 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -625,7 +625,7 @@ struct terminal
TERMINAL indicates which terminal device to read from. Input
events should be read into HOLD_QUIT.
- A positive return value indicates that that many input events
+ A positive return value N indicates that N input events
were read into BUF.
Zero means no events were immediately available.
A value of -1 means a transient read error, while -2 indicates
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 0b0f3f9e669..9d79bd46fb3 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -526,7 +526,7 @@ do_mouse_event (MOUSE_EVENT_RECORD *event,
help_echo_window, help_echo_object,
help_echo_pos);
}
- /* We already called kbd_buffer_store_event, so indicate the
+ /* We already called kbd_buffer_store_event, so indicate to
the caller it shouldn't. */
return 0;
}
diff --git a/src/w32proc.c b/src/w32proc.c
index ca59f995e63..0046c9e85dc 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -838,7 +838,7 @@ alarm (int seconds)
updates the status of the read accordingly, and signals the 2nd
event object, char_avail, on whose handle sys_select is
waiting. This tells sys_select that the file descriptor
- allocated for the subprocess or the the stream is ready to be
+ allocated for the subprocess or the stream is ready to be
read from.
When the subprocess exits or the network/serial stream is closed,
diff --git a/src/xdisp.c b/src/xdisp.c
index 141275f15a0..b14b7daf2b0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17036,6 +17036,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
= try_window_reusing_current_matrix (w)))
{
IF_DEBUG (debug_method_add (w, "1"));
+ clear_glyph_matrix (w->desired_matrix);
if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0)
/* -1 means we need to scroll.
0 means we need new matrices, but fonts_changed
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 2cb4f3eca56..fb0d01bb66c 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -401,12 +401,14 @@ x_session_initialize (struct x_display_info *dpyinfo)
ptrdiff_t name_len = 0;
/* libSM seems to crash if pwd is missing - see bug#18851. */
- if (! emacs_get_current_dir_name ())
+ char *pwd = emacs_get_current_dir_name ();
+ if (!pwd)
{
fprintf (stderr, "Disabling session management due to pwd error: %s\n",
emacs_strerror (errno));
return;
}
+ xfree (pwd);
ice_fd = -1;
doing_interact = false;