]> git.eshelyaron.com Git - emacs.git/commitdiff
(with_echo_area_buffer): Avoid confusion from reusing
authorGerd Moellmann <gerd@gnu.org>
Wed, 4 Apr 2001 14:06:06 +0000 (14:06 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 4 Apr 2001 14:06:06 +0000 (14:06 +0000)
the buffer that was used for echoing.

src/ChangeLog
src/xdisp.c

index a0225dd188cccae10cf6595aa14cf12d67ff8f49..36eac1ca486c8c553974284021f386e8ca1a975b 100644 (file)
@@ -1,5 +1,13 @@
 2001-04-04  Gerd Moellmann  <gerd@gnu.org>
 
+       * lisp.h (echoing, echo_message_buffer, cancel_echoing): Declare.
+
+       * keyboard.c (echoing, echo_message_buffer): Make externally
+       visible.
+       
+       * xdisp.c (with_echo_area_buffer): Avoid confusion from reusing
+       the buffer that was used for echoing.
+
        * xfaces.c (best_matching_font): Remove unused parameter PATTERN.
        (first_font_matching): Removed unused function.
        (x_face_list_fonts): Remove unused parameter SCALABLE_P.
index 925eed8d6ffd2b6242875fd173dc0afa8038e9a5..4b26633c7e7771c8ec78441b789ad5b9924f49dd 100644 (file)
@@ -6139,6 +6139,11 @@ with_echo_area_buffer (w, which, fn, a1, a2, a3, a4)
 
   buffer = echo_area_buffer[this_one];
 
+  /* Don't get confused by reusing the buffer used for echoing
+     for a different purpose.  */
+  if (!echoing && EQ (buffer, echo_message_buffer))
+    cancel_echoing ();
+
   record_unwind_protect (unwind_with_echo_area_buffer,
                         with_echo_area_buffer_unwind_data (w));