]> code.delx.au - gnu-emacs/blobdiff - src/dispnew.c
(direct_output_for_insert): Avoid direct output when inserting a space
[gnu-emacs] / src / dispnew.c
index 82541987908e828308ea1683ca7e41ef16cc5009..f182af77d3bba1116b9c9873af2b8c270e9c0e50 100644 (file)
@@ -3514,6 +3514,7 @@ direct_output_for_insert (g)
       || g == '\t'
       || g == '\n'
       || g == '\r'
+      || (g == ' ' && !NILP (current_buffer->word_wrap))
       /* Give up if unable to display the cursor in the window.  */
       || w->cursor.vpos < 0
       /* Give up if we are showing a message or just cleared the message
@@ -7061,6 +7062,18 @@ WINDOW nil or omitted means report on the selected window.  */)
   return w->cursor_off_p ? Qnil : Qt;
 }
 
+DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
+       Slast_nonminibuf_frame, 0, 0, 0,
+       doc: /* Value is last nonminibuffer frame. */)
+     ()
+{
+  Lisp_Object frame = Qnil;
+
+  if (last_nonminibuf_frame)
+    XSETFRAME (frame, last_nonminibuf_frame);
+
+  return frame;
+}
 \f
 /***********************************************************************
                            Initialization
@@ -7079,6 +7092,7 @@ syms_of_display ()
   defsubr (&Ssend_string_to_terminal);
   defsubr (&Sinternal_show_cursor);
   defsubr (&Sinternal_show_cursor_p);
+  defsubr (&Slast_nonminibuf_frame);
 
 #if GLYPH_DEBUG
   defsubr (&Sdump_redisplay_history);