Extend mouse support on W32 text-mode console.
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 May 2012 12:14:56 +0000 (15:14 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 26 May 2012 12:14:56 +0000 (15:14 +0300)
 src/xdisp.c (draw_row_with_mouse_face): Call
 tty_draw_row_with_mouse_face for WINDOWSNT as well.
 src/w32console.c: Include window.h.
 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face): New
 functions.
 (initialize_w32_display): Initialize mouse-highlight data.
 src/w32inevt.c: Include termchar.h and window.h.
 (do_mouse_event): Support mouse-autoselect-window.  When the mouse
 moves, call note_mouse_highlight.  If help_echo changed, call
 gen_help_event to produce help-echo message in the echo area.
 Call clear_mouse_face if mouse_face_hidden is set in the mouse
 highlight info.

 etc/NEWS: Describe the changes.

etc/NEWS
src/ChangeLog
src/lread.c

index 68744dc..c216c6b 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -313,6 +313,10 @@ by the underlying C implementation.
 *** --without-libxml2 omits support for libxml2, even if its presence
 is detected.
 
+** When invoked with the -nw switch to run on the Windows text-mode terminal,
+Emacs now supports mouse highlight, help-echo (in the echo area), and
+mouse-autoselect-window.
+
 \f
 * Installation Changes in Emacs 24.1
 
index aeab5c9..c71ea45 100644 (file)
@@ -1,32 +1,26 @@
 2012-05-26  Eli Zaretskii  <eliz@gnu.org>
 
-       * w32inevt.c (do_mouse_event): Support mouse-autoselect-window.
-       If help_echo changed, call gen_help_event to produce help-echo
-       message in the echo area.
-
-2012-05-26  Eli Zaretskii  <eliz@gnu.org>
-
-       Refactor mouse highlight invocation for w32 console.
-       * w32inevt.c: Include termchar.h.
-       (mouse_moved_to): Move the call to note_mouse_highlight from here...
-       (do_mouse_event): ...to here.
-       Call clear_mouse_face if mouse_face_hidden is set in the mouse
-       highlight info.
-
-2012-05-26  Eli Zaretskii  <eliz@gnu.org>
-
-       Support mouse highlight on w32 text-mode frames.
+       Extend mouse support on W32 text-mode console.
        * xdisp.c (draw_row_with_mouse_face): Call
        tty_draw_row_with_mouse_face for WINDOWSNT as well.
 
-       * w32inevt.c (mouse_moved_to): When the mouse moves, call
-       note_mouse_highlight.
-
        * w32console.c: Include window.h.
        (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face): New
        functions.
        (initialize_w32_display): Initialize mouse-highlight data.
 
+       * w32inevt.c: Include termchar.h and window.h.
+       (do_mouse_event): Support mouse-autoselect-window.  When the mouse
+       moves, call note_mouse_highlight.  If help_echo changed, call
+       gen_help_event to produce help-echo message in the echo area.
+       Call clear_mouse_face if mouse_face_hidden is set in the mouse
+       highlight info.
+
+2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lread.c (read1): Simplify slightly to avoid an overflow warning
+       with GCC 4.7.0 on x86-64.
+
 2012-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * bidi.c (bidi_mirror_char): Revert last change: an int is
index 80250cf..7aba203 100644 (file)
@@ -2986,19 +2986,14 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
        if (!NILP (Vpurify_flag) && NILP (Vdoc_file_name) && cancel)
          return make_number (0);
 
-       if (force_multibyte)
-         /* READ_BUFFER already contains valid multibyte forms.  */
-         ;
-       else if (force_singlebyte)
+       if (! force_multibyte && force_singlebyte)
          {
+           /* READ_BUFFER contains raw 8-bit bytes and no multibyte
+              forms.  Convert it to unibyte.  */
            nchars = str_as_unibyte ((unsigned char *) read_buffer,
                                     p - read_buffer);
            p = read_buffer + nchars;
          }
-       else
-         {
-           /* Otherwise, READ_BUFFER contains only ASCII.  */
-         }
 
        return make_specified_string (read_buffer, nchars, p - read_buffer,
                                      (force_multibyte