]> code.delx.au - gnu-emacs/blobdiff - src/insdel.c
Port --enable-gcc-warnings to clang.
[gnu-emacs] / src / insdel.c
index 3dd81ffeb6298430d12e4004ed0be22ce9eec4b5..ed6842642491d8c3c098a7dcfd00797e33093367 100644 (file)
@@ -771,8 +771,13 @@ count_combining_after (const unsigned char *string,
 
 \f
 /* Insert a sequence of NCHARS chars which occupy NBYTES bytes
-   starting at STRING.  INHERIT, PREPARE and BEFORE_MARKERS
-   are the same as in insert_1.  */
+   starting at STRING.  INHERIT non-zero means inherit the text
+   properties from neighboring characters; zero means inserted text
+   will have no text properties.  PREPARE non-zero means call
+   prepare_to_modify_buffer, which checks that the region is not
+   read-only, and calls before-change-function and any modification
+   properties the text may have.  BEFORE_MARKERS non-zero means adjust
+   all markers that point at the insertion place to point after it.  */
 
 void
 insert_1_both (const char *string,
@@ -1801,7 +1806,7 @@ prepare_to_modify_buffer (ptrdiff_t start, ptrdiff_t end,
 
   /* If we're modifying the buffer other than shown in a selected window,
      let redisplay consider other windows if this buffer is visible.  */
-  if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer
+  if (XBUFFER (XWINDOW (selected_window)->contents) != current_buffer
       && buffer_window_count (current_buffer))
     ++windows_or_buffers_changed;