Now on revision 111595. ------------------------------------------------------------ revno: 111595 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-01-24 09:56:31 +0400 message: * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script): Avoid redundant calls to strlen. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-24 05:41:28 +0000 +++ src/ChangeLog 2013-01-24 05:56:31 +0000 @@ -1,5 +1,10 @@ 2013-01-24 Dmitry Antipov + * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script): + Avoid redundant calls to strlen. + +2013-01-24 Dmitry Antipov + Drop async_visible and async_iconified fields of struct frame. This is possible because async input is gone; for details, see http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html. === modified file 'src/nsfont.m' --- src/nsfont.m 2013-01-13 20:03:01 +0000 +++ src/nsfont.m 2013-01-24 05:56:31 +0000 @@ -75,10 +75,9 @@ static void ns_escape_name (char *name) { - int i =0, len =strlen (name); - for ( ; i branch nick: trunk timestamp: Thu 2013-01-24 09:41:28 +0400 message: Drop async_visible and async_iconified fields of struct frame. This is possible because async input is gone; for details, see http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html. * frame.h (struct frame): Remove async_visible and async_iconified members, convert garbaged to unsigned bitfield. Adjust comments. (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users. (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros. * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c: Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED, FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate. * w32term.c: Ditto. (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT properly. Likewise for obscured. * xterm.c: Ditto. (handle_one_xevent): Save visible state go generate ICONIFY_EVENT properly. * nsterm.m: Ditto. (windowDidDeminiaturize): Generate DEICONIFY_EVENT. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-24 03:34:20 +0000 +++ src/ChangeLog 2013-01-24 05:41:28 +0000 @@ -1,5 +1,26 @@ 2013-01-24 Dmitry Antipov + Drop async_visible and async_iconified fields of struct frame. + This is possible because async input is gone; for details, see + http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html. + * frame.h (struct frame): Remove async_visible and async_iconified + members, convert garbaged to unsigned bitfield. Adjust comments. + (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users. + (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros. + * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c: + Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED, + FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate. + * w32term.c: Ditto. + (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT + properly. Likewise for obscured. + * xterm.c: Ditto. + (handle_one_xevent): Save visible state go generate ICONIFY_EVENT + properly. + * nsterm.m: Ditto. + (windowDidDeminiaturize): Generate DEICONIFY_EVENT. + +2013-01-24 Dmitry Antipov + * insdel.c (prepare_to_modify_buffer): Revert last change as suggested in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html. === modified file 'src/frame.c' --- src/frame.c 2013-01-23 20:07:28 +0000 +++ src/frame.c 2013-01-24 05:41:28 +0000 @@ -500,8 +500,7 @@ tty_frame_count = 1; fset_name (f, build_pure_c_string ("F1")); - f->visible = 1; - f->async_visible = 1; + SET_FRAME_VISIBLE (f, 1); f->output_method = terminal->type; f->terminal = terminal; @@ -540,8 +539,8 @@ fset_name (f, make_formatted_string (name, "F%"pMd, ++tty_frame_count)); - f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ - f->async_visible = 1; /* Don't let visible be cleared later. */ + SET_FRAME_VISIBLE (f, 1); + f->terminal = terminal; f->terminal->reference_count++; #ifdef MSDOS @@ -565,7 +564,7 @@ /* Set the top frame to the newly created frame. */ if (FRAMEP (FRAME_TTY (f)->top_frame) && FRAME_LIVE_P (XFRAME (FRAME_TTY (f)->top_frame))) - XFRAME (FRAME_TTY (f)->top_frame)->async_visible = 2; /* obscured */ + SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (f)->top_frame), 2); /* obscured */ FRAME_TTY (f)->top_frame = frame; @@ -806,8 +805,8 @@ { if (FRAMEP (FRAME_TTY (XFRAME (frame))->top_frame)) /* Mark previously displayed frame as now obscured. */ - XFRAME (FRAME_TTY (XFRAME (frame))->top_frame)->async_visible = 2; - XFRAME (frame)->async_visible = 1; + SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (XFRAME (frame))->top_frame), 2); + SET_FRAME_VISIBLE (XFRAME (frame), 1); FRAME_TTY (XFRAME (frame))->top_frame = frame; } @@ -914,7 +913,6 @@ } else if (EQ (minibuf, Qvisible)) { - FRAME_SAMPLE_VISIBILITY (c); if (FRAME_VISIBLE_P (c)) return candidate; } @@ -928,7 +926,6 @@ } else if (XFASTINT (minibuf) == 0) { - FRAME_SAMPLE_VISIBILITY (c); if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c)) return candidate; } @@ -1052,10 +1049,7 @@ and note any recent change in visibility. */ #ifdef HAVE_WINDOW_SYSTEM if (FRAME_WINDOW_P (XFRAME (this))) - { - x_sync (XFRAME (this)); - FRAME_SAMPLE_VISIBILITY (XFRAME (this)); - } + x_sync (XFRAME (this)); #endif if (FRAME_VISIBLE_P (XFRAME (this)) @@ -1231,7 +1225,7 @@ fset_root_window (f, Qnil); Vframe_list = Fdelq (frame, Vframe_list); - FRAME_SET_VISIBLE (f, 0); + SET_FRAME_VISIBLE (f, 0); /* Allow the vector of menu bar contents to be freed in the next garbage collection. The frame object itself may not be garbage @@ -1579,10 +1573,7 @@ /* I think this should be done with a hook. */ #ifdef HAVE_WINDOW_SYSTEM if (FRAME_WINDOW_P (f)) - { - FRAME_SAMPLE_VISIBILITY (f); - x_make_frame_visible (f); - } + x_make_frame_visible (f); #endif make_frame_visible_1 (f->root_window); @@ -1705,8 +1696,6 @@ { CHECK_LIVE_FRAME (frame); - FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); - if (FRAME_VISIBLE_P (XFRAME (frame))) return Qt; if (FRAME_ICONIFIED_P (XFRAME (frame))) @@ -2891,7 +2880,6 @@ make_formatted_string (buf, "%"pMu, w)); #endif store_in_alist (alistptr, Qicon_name, f->icon_name); - FRAME_SAMPLE_VISIBILITY (f); store_in_alist (alistptr, Qvisibility, (FRAME_VISIBLE_P (f) ? Qt : FRAME_ICONIFIED_P (f) ? Qicon : Qnil)); === modified file 'src/frame.h' --- src/frame.h 2013-01-23 20:07:28 +0000 +++ src/frame.h 2013-01-24 05:41:28 +0000 @@ -353,46 +353,30 @@ unsigned int external_menu_bar : 1; #endif - /* visible is nonzero if the frame is currently displayed; we check + /* Next two bitfields are mutually exclusive. They might both be + zero if the frame has been made invisible without an icon. */ + + /* Nonzero if the frame is currently displayed; we check it to see if we should bother updating the frame's contents. - DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE. Note that, since invisible frames aren't updated, whenever a - frame becomes visible again, it must be marked as garbaged. The - FRAME_SAMPLE_VISIBILITY macro takes care of this. + frame becomes visible again, it must be marked as garbaged. On ttys and on Windows NT/9X, to avoid wasting effort updating visible frames that are actually completely obscured by other windows on the display, we bend the meaning of visible slightly: - if greater than 1, then the frame is obscured - we still consider + if equal to 2, then the frame is obscured - we still consider it to be "visible" as seen from lisp, but we don't bother updating it. We must take care to garbage the frame when it - ceases to be obscured though. - - iconified is nonzero if the frame is currently iconified. - - Asynchronous input handlers should NOT change these directly; - instead, they should change async_visible or async_iconified, and - let the FRAME_SAMPLE_VISIBILITY macro set visible and iconified - at the next redisplay. - - These should probably be considered read-only by everyone except - FRAME_SAMPLE_VISIBILITY. - - These two are mutually exclusive. They might both be zero, if the - frame has been made invisible without an icon. */ + ceases to be obscured though. See SET_FRAME_VISIBLE below. */ unsigned visible : 2; + + /* Nonzero if the frame is currently iconified. Do not + set this directly, use SET_FRAME_ICONIFIED instead. */ unsigned iconified : 1; - /* Let's not use bitfields for volatile variables. */ - - /* Asynchronous input handlers change these, and - FRAME_SAMPLE_VISIBILITY copies them into visible and iconified. - See FRAME_SAMPLE_VISIBILITY, below. */ - volatile char async_visible, async_iconified; - /* Nonzero if this frame should be redrawn. */ - volatile char garbaged; + unsigned garbaged : 1; /* True if frame actually has a minibuffer window on it. 0 if using a minibuffer window that isn't on this frame. */ @@ -711,7 +695,7 @@ #else #define FRAME_EXTERNAL_MENU_BAR(f) 0 #endif -#define FRAME_VISIBLE_P(f) ((f)->visible != 0) +#define FRAME_VISIBLE_P(f) (f)->visible /* Nonzero if frame F is currently visible but hidden. */ #define FRAME_OBSCURED_P(f) ((f)->visible > 1) @@ -719,9 +703,10 @@ /* Nonzero if frame F is currently iconified. */ #define FRAME_ICONIFIED_P(f) (f)->iconified -#define FRAME_SET_VISIBLE(f,p) \ - ((f)->async_visible = (p), FRAME_SAMPLE_VISIBILITY (f)) +/* Mark frame F as currently garbaged. */ #define SET_FRAME_GARBAGED(f) (frame_garbaged = 1, f->garbaged = 1) + +/* Nonzero if frame F is currently garbaged. */ #define FRAME_GARBAGED_P(f) (f)->garbaged /* Nonzero means do not allow splitting this frame's window. */ @@ -866,39 +851,6 @@ #define FRAME_MESSAGE_BUF_SIZE(f) (((int) FRAME_COLS (f)) * 4) -/* Emacs's redisplay code could become confused if a frame's - visibility changes at arbitrary times. For example, if a frame is - visible while the desired glyphs are being built, but becomes - invisible before they are updated, then some rows of the - desired_glyphs will be left marked as enabled after redisplay is - complete, which should never happen. The next time the frame - becomes visible, redisplay will probably barf. - - Currently, there are no similar situations involving iconified, but - the principle is the same. - - So instead of having asynchronous input handlers directly set and - clear the frame's visibility and iconification flags, they just set - the async_visible and async_iconified flags; the redisplay code - calls the FRAME_SAMPLE_VISIBILITY macro before doing any redisplay, - which sets visible and iconified from their asynchronous - counterparts. - - Synchronous code must use the FRAME_SET_VISIBLE macro. - - Also, if a frame used to be invisible, but has just become visible, - it must be marked as garbaged, since redisplay hasn't been keeping - up its contents. - - Note that a tty frame is visible if and only if it is the topmost - frame. */ - -#define FRAME_SAMPLE_VISIBILITY(f) \ - (((f)->async_visible && (f)->visible != (f)->async_visible) ? \ - SET_FRAME_GARBAGED (f) : 0, \ - (f)->visible = (f)->async_visible, \ - (f)->iconified = (f)->async_iconified) - #define CHECK_FRAME(x) \ CHECK_TYPE (FRAMEP (x), Qframep, x) @@ -932,12 +884,24 @@ block_input (); \ if (hlinfo->mouse_face_mouse_frame) \ note_mouse_highlight (hlinfo->mouse_face_mouse_frame, \ - hlinfo->mouse_face_mouse_x, \ - hlinfo->mouse_face_mouse_y); \ + hlinfo->mouse_face_mouse_x, \ + hlinfo->mouse_face_mouse_y); \ unblock_input (); \ } \ } while (0) +/* Set visibility of frame F, marking F as garbaged if needed. */ + +#define SET_FRAME_VISIBLE(f, v) \ + (((f)->visible == 0 || ((f)->visible == 2)) \ + && ((v) == 1) ? SET_FRAME_GARBAGED (f) : 0, \ + (f)->visible = (eassert (0 <= (v) && (v) <= 2), (v))) + +/* Set iconify of frame F. */ + +#define SET_FRAME_ICONIFIED(f, i) \ + (f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i)) + extern Lisp_Object Qframep, Qframe_live_p; extern Lisp_Object Qtty, Qtty_type; extern Lisp_Object Qtty_color_mode; === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-01-17 06:29:40 +0000 +++ src/gtkutil.c 2013-01-24 05:41:28 +0000 @@ -983,7 +983,7 @@ size as fast as possible. For unmapped windows, we can set rows/cols. When the frame is mapped again we will (hopefully) get the correct size. */ - if (f->async_visible) + if (FRAME_VISIBLE_P (f)) { /* Must call this to flush out events */ (void)gtk_events_pending (); === modified file 'src/nsterm.m' --- src/nsterm.m 2013-01-17 06:29:40 +0000 +++ src/nsterm.m 2013-01-24 05:41:28 +0000 @@ -1000,11 +1000,8 @@ NSView *view = FRAME_NS_VIEW (f); check_ns (); block_input (); - FRAME_SAMPLE_VISIBILITY (f); if (FRAME_VISIBLE_P (f)) - { - [[view window] makeKeyAndOrderFront: NSApp]; - } + [[view window] makeKeyAndOrderFront: NSApp]; unblock_input (); } @@ -1093,7 +1090,8 @@ if (!FRAME_VISIBLE_P (f)) { EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); - f->async_visible = 1; + + SET_FRAME_VISIBLE (f, 1); ns_raise_frame (f); #ifdef NEW_STYLE_FS @@ -1123,8 +1121,8 @@ NSTRACE (x_make_frame_invisible); check_ns (); [[view window] orderOut: NSApp]; - f->async_visible = 0; - f->async_iconified = 0; + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 0); } @@ -1354,7 +1352,9 @@ { EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); - if (! f->async_visible) return; + if (!FRAME_VISIBLE_P (f)) + return; + #ifndef NEW_STYLE_FS if (f->want_fullscreen == FULLSCREEN_BOTH) { @@ -5824,13 +5824,14 @@ NSTRACE (windowDidDeminiaturize); if (!emacsframe->output_data.ns) return; - emacsframe->async_iconified = 0; - emacsframe->async_visible = 1; + + SET_FRAME_ICONIFIED (emacsframe, 0); + SET_FRAME_VISIBLE (emacsframe, 1); windows_or_buffers_changed++; if (emacs_event) { - emacs_event->kind = ICONIFY_EVENT; + emacs_event->kind = DEICONIFY_EVENT; EV_TRAILER ((id)nil); } } @@ -5841,7 +5842,8 @@ NSTRACE (windowDidExpose); if (!emacsframe->output_data.ns) return; - emacsframe->async_visible = 1; + + SET_FRAME_VISIBLE (emacsframe, 1); SET_FRAME_GARBAGED (emacsframe); if (send_appdefined) @@ -5855,8 +5857,8 @@ if (!emacsframe->output_data.ns) return; - emacsframe->async_iconified = 1; - emacsframe->async_visible = 0; + SET_FRAME_ICONIFIED (emacsframe, 1); + SET_FRAME_VISIBLE (emacsframe, 0); if (emacs_event) { === modified file 'src/term.c' --- src/term.c 2013-01-11 02:40:58 +0000 +++ src/term.c 2013-01-24 05:41:28 +0000 @@ -2374,7 +2374,7 @@ t->display_info.tty->output = 0; if (FRAMEP (t->display_info.tty->top_frame)) - FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0); + SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0); } @@ -2444,7 +2444,7 @@ get_tty_size (fileno (t->display_info.tty->input), &width, &height); if (width != old_width || height != old_height) change_frame_size (f, height, width, 0, 0, 0); - FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); + SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); } set_tty_hooks (t); === modified file 'src/w32fns.c' --- src/w32fns.c 2013-01-02 16:13:04 +0000 +++ src/w32fns.c 2013-01-24 05:41:28 +0000 @@ -5943,7 +5943,7 @@ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); /* Let redisplay know that we have made the frame visible already. */ - f->async_visible = 1; + SET_FRAME_VISIBLE (f, 1); ShowWindow (FRAME_W32_WINDOW (f), SW_SHOWNOACTIVATE); } === modified file 'src/w32term.c' --- src/w32term.c 2013-01-23 16:52:05 +0000 +++ src/w32term.c 2013-01-24 05:41:28 +0000 @@ -4319,24 +4319,25 @@ DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f, SDATA (f->name))); } - else if (f->async_visible != 1) + else if (FRAME_VISIBLE_P (f) != 1) { + bool iconified = FRAME_ICONIFIED_P (f); + /* Definitely not obscured, so mark as visible. */ - f->async_visible = 1; - f->async_iconified = 0; + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, 0); SET_FRAME_GARBAGED (f); DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, SDATA (f->name))); /* WM_PAINT serves as MapNotify as well, so report visibility changes properly. */ - if (f->iconified) + if (iconified) { inev.kind = DEICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); } - else if (! NILP (Vframe_list) - && ! NILP (XCDR (Vframe_list))) + else if (!NILP (Vframe_list) && !NILP (XCDR (Vframe_list))) /* Force a redisplay sooner or later to update the frame titles in case this is the second frame. */ record_asynch_buffer_change (); @@ -4379,7 +4380,7 @@ case WM_SYSKEYDOWN: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); - if (f && !f->iconified) + if (f && !FRAME_ICONIFIED_P (f)) { if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) @@ -4404,7 +4405,7 @@ case WM_CHAR: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); - if (f && !f->iconified) + if (f && !FRAME_ICONIFIED_P (f)) { if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) @@ -4482,7 +4483,7 @@ case WM_APPCOMMAND: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); - if (f && !f->iconified) + if (f && !FRAME_ICONIFIED_P (f)) { if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) @@ -4722,7 +4723,7 @@ case WM_MOVE: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); - if (f && !f->async_iconified) + if (f && !FRAME_ICONIFIED_P (f)) { int x, y; @@ -4770,8 +4771,8 @@ switch (msg.msg.wParam) { case SIZE_MINIMIZED: - f->async_visible = 0; - f->async_iconified = 1; + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 1); inev.kind = ICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); @@ -4779,40 +4780,44 @@ case SIZE_MAXIMIZED: case SIZE_RESTORED: - f->async_visible = 1; - f->async_iconified = 0; - - /* wait_reading_process_output will notice this and update - the frame's display structures. */ - SET_FRAME_GARBAGED (f); - - if (f->iconified) - { - int x, y; - - /* Reset top and left positions of the Window - here since Windows sends a WM_MOVE message - BEFORE telling us the Window is minimized - when the Window is iconified, with 3000,3000 - as the co-ords. */ - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; - - inev.kind = DEICONIFY_EVENT; - XSETFRAME (inev.frame_or_window, f); - } - else if (! NILP (Vframe_list) - && ! NILP (XCDR (Vframe_list))) - /* Force a redisplay sooner or later - to update the frame titles - in case this is the second frame. */ - record_asynch_buffer_change (); + { + bool iconified = FRAME_ICONIFIED_P (f); + + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, 0); + + /* wait_reading_process_output will notice this + and update the frame's display structures. */ + SET_FRAME_GARBAGED (f); + + if (iconified) + { + int x, y; + + /* Reset top and left positions of the Window + here since Windows sends a WM_MOVE message + BEFORE telling us the Window is minimized + when the Window is iconified, with 3000,3000 + as the co-ords. */ + x_real_positions (f, &x, &y); + f->left_pos = x; + f->top_pos = y; + + inev.kind = DEICONIFY_EVENT; + XSETFRAME (inev.frame_or_window, f); + } + else if (! NILP (Vframe_list) + && ! NILP (XCDR (Vframe_list))) + /* Force a redisplay sooner or later + to update the frame titles + in case this is the second frame. */ + record_asynch_buffer_change (); + } break; } } - if (f && !f->async_iconified && msg.msg.wParam != SIZE_MINIMIZED) + if (f && !FRAME_ICONIFIED_P (f) && msg.msg.wParam != SIZE_MINIMIZED) { RECT rect; int rows; @@ -5040,12 +5045,13 @@ continue; /* Check "visible" frames and mark each as obscured or not. - Note that async_visible is nonzero for unobscured and - obscured frames, but zero for hidden and iconified frames. */ - if (FRAME_W32_P (f) && f->async_visible) + Note that visible is nonzero for unobscured and obscured + frames, but zero for hidden and iconified frames. */ + if (FRAME_W32_P (f) && FRAME_VISIBLE_P (f)) { RECT clipbox; HDC hdc; + bool obscured; enter_crit (); /* Query clipping rectangle for the entire window area @@ -5059,31 +5065,28 @@ ReleaseDC (FRAME_W32_WINDOW (f), hdc); leave_crit (); - if (clipbox.right == clipbox.left - || clipbox.bottom == clipbox.top) + obscured = FRAME_OBSCURED_P (f); + + if (clipbox.right == clipbox.left || clipbox.bottom == clipbox.top) { - /* Frame has become completely obscured so mark as - such (we do this by setting async_visible to 2 so - that FRAME_VISIBLE_P is still true, but redisplay - will skip it). */ - f->async_visible = 2; + /* Frame has become completely obscured so mark as such (we + do this by setting visible to 2 so that FRAME_VISIBLE_P + is still true, but redisplay will skip it). */ + SET_FRAME_VISIBLE (f, 2); - if (!FRAME_OBSCURED_P (f)) - { - DebPrint (("frame %p (%s) obscured\n", f, - SDATA (f->name))); - } + if (!obscured) + DebPrint (("frame %p (%s) obscured\n", f, SDATA (f->name))); } else { /* Frame is not obscured, so mark it as such. */ - f->async_visible = 1; + SET_FRAME_VISIBLE (f, 1); - if (FRAME_OBSCURED_P (f)) + if (obscured) { SET_FRAME_GARBAGED (f); - DebPrint (("obscured frame %p (%s) found to be visible\n", f, - SDATA (f->name))); + DebPrint (("obscured frame %p (%s) found to be visible\n", + f, SDATA (f->name))); /* Force a redisplay sooner or later. */ record_asynch_buffer_change (); @@ -5654,7 +5657,7 @@ { static int normal_width, normal_height; - if (f->async_visible) + if (FRAME_VISIBLE_P (f)) { int width, height, top_pos, left_pos, pixel_height, pixel_width; int cur_w = FRAME_COLS (f), cur_h = FRAME_LINES (f); @@ -6023,11 +6026,11 @@ causes unexpected behavior when unminimizing frames that were previously maximized. But only SW_SHOWNORMAL works properly for frames that were truely hidden (using make-frame-invisible), so - we need it to avoid Bug#5482. It seems that async_iconified - is only set for minimized windows that are still visible, so - use that to determine the appropriate flag to pass ShowWindow. */ + we need it to avoid Bug#5482. It seems that iconified is only + set for minimized windows that are still visible, so use that to + determine the appropriate flag to pass ShowWindow. */ my_show_window (f, FRAME_W32_WINDOW (f), - f->async_iconified ? SW_RESTORE : SW_SHOWNORMAL); + FRAME_ICONIFIED_P (f) ? SW_RESTORE : SW_SHOWNORMAL); } /* Synchronize to ensure Emacs knows the frame is visible @@ -6066,7 +6069,6 @@ poll_suppress_count = old_poll_suppress_count; } } - FRAME_SAMPLE_VISIBILITY (f); } } @@ -6090,10 +6092,8 @@ So we can't win using the usual strategy of letting FRAME_SAMPLE_VISIBILITY set this. So do it by hand, and synchronize with the server to make sure we agree. */ - f->visible = 0; - FRAME_ICONIFIED_P (f) = 0; - f->async_visible = 0; - f->async_iconified = 0; + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 0); unblock_input (); } @@ -6109,7 +6109,7 @@ if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f) FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0; - if (f->async_iconified) + if (FRAME_ICONIFIED_P (f)) return; block_input (); === modified file 'src/window.c' --- src/window.c 2013-01-22 11:48:00 +0000 +++ src/window.c 2013-01-24 05:41:28 +0000 @@ -2231,7 +2231,6 @@ } else if (EQ (all_frames, Qvisible)) { - FRAME_SAMPLE_VISIBILITY (f); candidate_p = FRAME_VISIBLE_P (f) && (FRAME_TERMINAL (XFRAME (w->frame)) == FRAME_TERMINAL (XFRAME (selected_frame))); @@ -2239,7 +2238,6 @@ } else if (INTEGERP (all_frames) && XINT (all_frames) == 0) { - FRAME_SAMPLE_VISIBILITY (f); candidate_p = (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f) #ifdef HAVE_X_WINDOWS /* Yuck!! If we've just created the frame and the === modified file 'src/xdisp.c' --- src/xdisp.c 2013-01-23 20:07:28 +0000 +++ src/xdisp.c 2013-01-24 05:41:28 +0000 @@ -9644,8 +9644,7 @@ /* Error messages get reported properly by cmd_error, so this must be just an informative message; if the frame hasn't really been initialized yet, just toss it. */ - else if (INTERACTIVE - && sf->glyphs_initialized_p) + else if (INTERACTIVE && sf->glyphs_initialized_p) { /* Get the frame containing the mini-buffer that the selected frame is using. */ @@ -9653,9 +9652,7 @@ Lisp_Object frame = XWINDOW (mini_window)->frame; struct frame *f = XFRAME (frame); - FRAME_SAMPLE_VISIBILITY (f); - if (FRAME_VISIBLE_P (sf) - && !FRAME_VISIBLE_P (f)) + if (FRAME_VISIBLE_P (sf) && !FRAME_VISIBLE_P (f)) Fmake_frame_visible (frame); if (STRINGP (m) && SCHARS (m) > 0) @@ -12924,7 +12921,6 @@ { struct frame *f = XFRAME (frame); - FRAME_SAMPLE_VISIBILITY (f); if (FRAME_VISIBLE_P (f)) ++number_of_visible_frames; clear_desired_matrices (f); @@ -13472,9 +13468,6 @@ if (XFRAME (frame)->visible) this_is_visible = 1; - FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); - if (XFRAME (frame)->visible) - this_is_visible = 1; if (this_is_visible) new_count++; === modified file 'src/xterm.c' --- src/xterm.c 2013-01-11 05:09:30 +0000 +++ src/xterm.c 2013-01-24 05:41:28 +0000 @@ -6102,16 +6102,15 @@ last_user_time = event.xproperty.time; f = x_top_window_to_frame (dpyinfo, event.xproperty.window); if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) - if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified - && f->output_data.x->net_wm_state_hidden_seen) + if (x_handle_net_wm_state (f, &event.xproperty) + && FRAME_ICONIFIED_P (f) + && f->output_data.x->net_wm_state_hidden_seen) { - /* Gnome shell does not iconify us when C-z is pressed. It hides - the frame. So if our state says we aren't hidden anymore, - treat it as deiconified. */ - if (! f->async_iconified) - SET_FRAME_GARBAGED (f); - f->async_visible = 1; - f->async_iconified = 0; + /* Gnome shell does not iconify us when C-z is pressed. + It hides the frame. So if our state says we aren't + hidden anymore, treat it as deiconified. */ + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, 0); f->output_data.x->has_been_visible = 1; f->output_data.x->net_wm_state_hidden_seen = 0; inev.ie.kind = DEICONIFY_EVENT; @@ -6152,10 +6151,10 @@ event.xexpose.width, event.xexpose.height, FALSE); #endif - if (f->async_visible == 0) + if (!FRAME_VISIBLE_P (f)) { - f->async_visible = 1; - f->async_iconified = 0; + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, 0); f->output_data.x->has_been_visible = 1; SET_FRAME_GARBAGED (f); } @@ -6232,20 +6231,20 @@ if (f) /* F may no longer exist if the frame was deleted. */ { + bool visible = FRAME_VISIBLE_P (f); /* While a frame is unmapped, display generation is disabled; you don't want to spend time updating a display that won't ever be seen. */ - f->async_visible = 0; + SET_FRAME_VISIBLE (f, 0); /* We can't distinguish, from the event, whether the window has become iconified or invisible. So assume, if it was previously visible, than now it is iconified. But x_make_frame_invisible clears both the visible flag and the iconified flag; and that way, we know the window is not iconified now. */ - if (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f)) + if (visible || FRAME_ICONIFIED_P (f)) { - f->async_iconified = 1; - + SET_FRAME_ICONIFIED (f, 1); inev.ie.kind = ICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } @@ -6264,13 +6263,14 @@ f = x_top_window_to_frame (dpyinfo, event.xmap.window); if (f) { + bool iconified = FRAME_ICONIFIED_P (f); /* wait_reading_process_output will notice this and update the frame's display structures. If we where iconified, we should not set garbaged, because that stops redrawing on Expose events. This looks bad if we are called from a recursive event loop (x_dispatch_event), for example when a dialog is up. */ - if (! f->async_iconified) + if (!iconified) SET_FRAME_GARBAGED (f); /* Check if fullscreen was specified before we where mapped the @@ -6278,20 +6278,18 @@ if (!f->output_data.x->has_been_visible) x_check_fullscreen (f); - f->async_visible = 1; - f->async_iconified = 0; + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, 0); f->output_data.x->has_been_visible = 1; - if (f->iconified) + if (iconified) { inev.ie.kind = DEICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } - else if (! NILP (Vframe_list) - && ! NILP (XCDR (Vframe_list))) - /* Force a redisplay sooner or later - to update the frame titles - in case this is the second frame. */ + else if (! NILP (Vframe_list) && ! NILP (XCDR (Vframe_list))) + /* Force a redisplay sooner or later to update the + frame titles in case this is the second frame. */ record_asynch_buffer_change (); #ifdef USE_GTK @@ -8417,7 +8415,7 @@ if (tmp_data) XFree (tmp_data); x_uncatch_errors (); unblock_input (); - return ! f->iconified; + return !FRAME_ICONIFIED_P (f); } x_uncatch_errors (); @@ -8529,7 +8527,7 @@ static void XTfullscreen_hook (FRAME_PTR f) { - if (f->async_visible) + if (FRAME_VISIBLE_P (f)) { block_input (); x_check_fullscreen (f); @@ -8793,7 +8791,7 @@ /* But the ConfigureNotify may in fact never arrive, and then this is not right if the frame is visible. Instead wait (with timeout) for the ConfigureNotify. */ - if (f->async_visible) + if (FRAME_VISIBLE_P (f)) x_wait_for_event (f, ConfigureNotify); else { @@ -8905,9 +8903,8 @@ x_raise_frame (struct frame *f) { block_input (); - if (f->async_visible) + if (FRAME_VISIBLE_P (f)) XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f)); - XFlush (FRAME_X_DISPLAY (f)); unblock_input (); } @@ -8917,7 +8914,7 @@ static void x_lower_frame (struct frame *f) { - if (f->async_visible) + if (FRAME_VISIBLE_P (f)) { block_input (); XLowerWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f)); @@ -8933,7 +8930,7 @@ { /* See XEmbed Protocol Specification at http://freedesktop.org/wiki/Specifications/xembed-spec */ - if (f->async_visible) + if (FRAME_VISIBLE_P (f)) xembed_send_message (f, CurrentTime, XEMBED_REQUEST_FOCUS, 0, 0, 0); } @@ -8947,7 +8944,8 @@ http://freedesktop.org/wiki/Specifications/wm-spec */ struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - if (f->async_visible && wm_supports (f, dpyinfo->Xatom_net_active_window)) + + if (FRAME_VISIBLE_P (f) && wm_supports (f, dpyinfo->Xatom_net_active_window)) { Lisp_Object frame; XSETFRAME (frame, f); @@ -9159,9 +9157,6 @@ poll_for_input_1 (); poll_suppress_count = old_poll_suppress_count; } - - /* See if a MapNotify event has been processed. */ - FRAME_SAMPLE_VISIBILITY (f); } /* 2000-09-28: In @@ -9229,10 +9224,8 @@ So we can't win using the usual strategy of letting FRAME_SAMPLE_VISIBILITY set this. So do it by hand, and synchronize with the server to make sure we agree. */ - f->visible = 0; - FRAME_ICONIFIED_P (f) = 0; - f->async_visible = 0; - f->async_iconified = 0; + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 0); x_sync (f); @@ -9253,13 +9246,11 @@ if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f) FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0; - if (f->async_iconified) + if (FRAME_ICONIFIED_P (f)) return; block_input (); - FRAME_SAMPLE_VISIBILITY (f); - type = x_icon_type (f); if (!NILP (type)) x_bitmap_icon (f, type); @@ -9271,10 +9262,8 @@ gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); gtk_window_iconify (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f))); - f->iconified = 1; - f->visible = 1; - f->async_iconified = 1; - f->async_visible = 0; + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 1); unblock_input (); return; } @@ -9291,10 +9280,8 @@ /* The server won't give us any event to indicate that an invisible frame was changed to an icon, so we have to record it here. */ - f->iconified = 1; - f->visible = 1; - f->async_iconified = 1; - f->async_visible = 0; + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 1); unblock_input (); return; } @@ -9307,9 +9294,8 @@ if (!result) error ("Can't notify window manager of iconification"); - f->async_iconified = 1; - f->async_visible = 0; - + SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_VISIBLE (f, 0); block_input (); XFlush (FRAME_X_DISPLAY (f)); @@ -9358,8 +9344,8 @@ XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); } - f->async_iconified = 1; - f->async_visible = 0; + SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_VISIBLE (f, 0); XFlush (FRAME_X_DISPLAY (f)); unblock_input (); ------------------------------------------------------------ revno: 111593 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-01-24 07:34:20 +0400 message: * src/insdel.c (prepare_to_modify_buffer): Revert last change as suggested in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html. * lisp/doc-view.el (doc-view-display): Force mode line update until all document is converted. Suggested by Stefan Monnier (Bug#13164). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-23 09:43:29 +0000 +++ lisp/ChangeLog 2013-01-24 03:34:20 +0000 @@ -1,3 +1,8 @@ +2013-01-24 Dmitry Antipov + + * doc-view.el (doc-view-display): Force mode line update until all + document is converted. Suggested by Stefan Monnier (Bug#13164). + 2013-01-23 Bastien Guerry * paren.el (show-paren-function): Make sure an overlay exists === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2013-01-10 15:50:04 +0000 +++ lisp/doc-view.el 2013-01-24 03:34:20 +0000 @@ -1265,6 +1265,8 @@ "[0-9]+") t) 'doc-view-sort)) + (unless (eq (length prev-pages) (length doc-view-current-files)) + (force-mode-line-update)) (dolist (win (or (get-buffer-window-list buffer nil t) (list t))) (let* ((page (doc-view-current-page win)) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-23 20:07:28 +0000 +++ src/ChangeLog 2013-01-24 03:34:20 +0000 @@ -1,3 +1,8 @@ +2013-01-24 Dmitry Antipov + + * insdel.c (prepare_to_modify_buffer): Revert last change as suggested + in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html. + 2013-01-23 Stefan Monnier * xdisp.c (message2, message2_nolog): Remove functions. === modified file 'src/insdel.c' --- src/insdel.c 2013-01-23 14:49:54 +0000 +++ src/insdel.c 2013-01-24 03:34:20 +0000 @@ -1804,12 +1804,9 @@ Fbarf_if_buffer_read_only (); /* If we're modifying the buffer other than shown in a selected window, - let redisplay consider other windows if this buffer is visible or - hidden (although hidden buffers have zero window counts, their state - may affect the display too, e.g. via mode lines of other buffers). */ + let redisplay consider other windows if this buffer is visible. */ if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer - && (buffer_window_count (current_buffer) - || BUFFER_HIDDEN_P (current_buffer))) + && buffer_window_count (current_buffer)) ++windows_or_buffers_changed; if (buffer_intervals (current_buffer)) ------------------------------------------------------------ revno: 111592 author: Giorgos Keramidas committer: Paul Eggert branch nick: trunk timestamp: Wed 2013-01-23 15:49:46 -0800 message: * .bzrignore: add lib-src/blessmail. diff: === modified file '.bzrignore' --- .bzrignore 2012-12-10 20:47:57 +0000 +++ .bzrignore 2013-01-23 23:49:46 +0000 @@ -114,6 +114,7 @@ lib/time.in-h lib/unistd.in-h lib/cxxdefs.h +lib-src/blessmail lib-src/ctags lib-src/ctags.c lib-src/ebrowse === modified file 'ChangeLog' --- ChangeLog 2013-01-23 01:47:44 +0000 +++ ChangeLog 2013-01-23 23:49:46 +0000 @@ -1,3 +1,7 @@ +2013-01-23 Giorgos Keramidas (tiny change) + + * .bzrignore: add lib-src/blessmail. + 2013-01-23 Paul Eggert Merge from gnulib, incorporating: ------------------------------------------------------------ revno: 111591 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-01-23 15:07:28 -0500 message: * src/xdisp.c (message2, message2_nolog): Remove functions. (message3, message3_nolog): Extract nbytes and multibyteness directly from the string. Change all callers. (message3_nolog): Don't set message_enable_multibyte since set_message will reset it anyway. (message1, message1_nolog): Use message3. (vmessage): Use a stack allocated buffer rather than f->message_buf. (with_echo_area_buffer): Remove last two arguments. Update all callers. (set_message): Drop all but the second arg, which has to be a string. (set_message_1): Simplify now that we know that a1 is NULL and the second arg is a string. * src/frame.h (struct frame): Remove `message_buf' field. Use glyphs_initialized_p instead. (FRAME_MESSAGE_BUF): Remove macro. * src/w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2. * src/lisp.h (message2, message2_nolog): Remove declarations. (message3, message3_nolog): Update declarations. * src/keyboard.c (read_char_minibuf_menu_text) (read_char_minibuf_menu_width): Remove vars. (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as to correctly handle multibyte strings. * src/frame.c (delete_frame): Don't free message_buf any more. * src/editfns.c (message_text, message_length): Remove vars. (Fmessage_box): Don't copy the Lisp string's bytes any longer. * src/fileio.c (auto_save_error): Use message3 instead of message2. * src/dispnew.c (adjust_frame_message_buffer): Remove function. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-23 16:52:05 +0000 +++ src/ChangeLog 2013-01-23 20:07:28 +0000 @@ -1,3 +1,32 @@ +2013-01-23 Stefan Monnier + + * xdisp.c (message2, message2_nolog): Remove functions. + (message3, message3_nolog): Extract nbytes and multibyteness directly + from the string. Change all callers. + (message3_nolog): Don't set message_enable_multibyte since set_message + will reset it anyway. + (message1, message1_nolog): Use message3. + (vmessage): Use a stack allocated buffer rather than f->message_buf. + (with_echo_area_buffer): Remove last two arguments. Update all callers. + (set_message): Drop all but the second arg, which has to be a string. + (set_message_1): Simplify now that we know that a1 is NULL and the + second arg is a string. + * frame.h (struct frame): Remove `message_buf' field. + Use glyphs_initialized_p instead. + (FRAME_MESSAGE_BUF): Remove macro. + * w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2. + * lisp.h (message2, message2_nolog): Remove declarations. + (message3, message3_nolog): Update declarations. + * keyboard.c (read_char_minibuf_menu_text) + (read_char_minibuf_menu_width): Remove vars. + (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as + to correctly handle multibyte strings. + * frame.c (delete_frame): Don't free message_buf any more. + * editfns.c (message_text, message_length): Remove vars. + (Fmessage_box): Don't copy the Lisp string's bytes any longer. + * fileio.c (auto_save_error): Use message3 instead of message2. + * dispnew.c (adjust_frame_message_buffer): Remove function. + 2013-01-23 Eli Zaretskii * w32term.c (w32fullscreen_hook): Account correctly for the screen === modified file 'src/alloc.c' --- src/alloc.c 2013-01-17 06:29:40 +0000 +++ src/alloc.c 2013-01-23 20:07:28 +0000 @@ -26,7 +26,7 @@ #include /* For CHAR_BIT. */ #ifdef ENABLE_CHECKING -#include /* For SIGABRT. */ +#include /* For SIGABRT. */ #endif #ifdef HAVE_PTHREAD @@ -1684,7 +1684,7 @@ b = lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP); #ifdef DOUG_LEA_MALLOC - /* Back to a reasonable maximum of mmap'ed areas. */ + /* Back to a reasonable maximum of mmap'ed areas. */ mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); #endif @@ -1901,7 +1901,7 @@ #ifdef GC_CHECK_STRING_BYTES /* Check that the string size recorded in the string is the - same as the one recorded in the sdata structure. */ + same as the one recorded in the sdata structure. */ if (s && string_bytes (s) != SDATA_NBYTES (from)) emacs_abort (); #endif /* GC_CHECK_STRING_BYTES */ @@ -6564,7 +6564,7 @@ } #endif -/* Initialization */ +/* Initialization. */ void init_alloc_once (void) @@ -6579,9 +6579,9 @@ #endif #ifdef DOUG_LEA_MALLOC - mallopt (M_TRIM_THRESHOLD, 128*1024); /* trim threshold */ - mallopt (M_MMAP_THRESHOLD, 64*1024); /* mmap threshold */ - mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); /* max. number of mmap'ed areas */ + mallopt (M_TRIM_THRESHOLD, 128 * 1024); /* Trim threshold. */ + mallopt (M_MMAP_THRESHOLD, 64 * 1024); /* Mmap threshold. */ + mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); /* Max. number of mmap'ed areas. */ #endif init_strings (); init_vectors (); === modified file 'src/callint.c' --- src/callint.c 2013-01-01 09:11:05 +0000 +++ src/callint.c 2013-01-23 20:07:28 +0000 @@ -497,47 +497,47 @@ switch (*tem) { - case 'a': /* Symbol defined as a function */ + case 'a': /* Symbol defined as a function. */ visargs[i] = Fcompleting_read (callint_message, Vobarray, Qfboundp, Qt, Qnil, Qnil, Qnil, Qnil); - /* Passing args[i] directly stimulates compiler bug */ + /* Passing args[i] directly stimulates compiler bug. */ teml = visargs[i]; args[i] = Fintern (teml, Qnil); break; - case 'b': /* Name of existing buffer */ + case 'b': /* Name of existing buffer. */ args[i] = Fcurrent_buffer (); if (EQ (selected_window, minibuf_window)) args[i] = Fother_buffer (args[i], Qnil, Qnil); args[i] = Fread_buffer (callint_message, args[i], Qt); break; - case 'B': /* Name of buffer, possibly nonexistent */ + case 'B': /* Name of buffer, possibly nonexistent. */ args[i] = Fread_buffer (callint_message, Fother_buffer (Fcurrent_buffer (), Qnil, Qnil), Qnil); break; - case 'c': /* Character */ + case 'c': /* Character. */ /* Prompt in `minibuffer-prompt' face. */ Fput_text_property (make_number (0), make_number (SCHARS (callint_message)), Qface, Qminibuffer_prompt, callint_message); args[i] = Fread_char (callint_message, Qnil, Qnil); message1_nolog ((char *) 0); - /* Passing args[i] directly stimulates compiler bug */ + /* Passing args[i] directly stimulates compiler bug. */ teml = args[i]; /* See bug#8479. */ if (! CHARACTERP (teml)) error ("Non-character input-event"); visargs[i] = Fchar_to_string (teml); break; - case 'C': /* Command: symbol with interactive function */ + case 'C': /* Command: symbol with interactive function. */ visargs[i] = Fcompleting_read (callint_message, Vobarray, Qcommandp, Qt, Qnil, Qnil, Qnil, Qnil); - /* Passing args[i] directly stimulates compiler bug */ + /* Passing args[i] directly stimulates compiler bug. */ teml = visargs[i]; args[i] = Fintern (teml, Qnil); break; @@ -549,33 +549,33 @@ varies[i] = 1; break; - case 'D': /* Directory name. */ + case 'D': /* Directory name. */ args[i] = Fread_file_name (callint_message, Qnil, BVAR (current_buffer, directory), Qlambda, Qnil, Qfile_directory_p); break; - case 'f': /* Existing file name. */ + case 'f': /* Existing file name. */ args[i] = Fread_file_name (callint_message, Qnil, Qnil, Qlambda, Qnil, Qnil); break; - case 'F': /* Possibly nonexistent file name. */ + case 'F': /* Possibly nonexistent file name. */ args[i] = Fread_file_name (callint_message, Qnil, Qnil, Qnil, Qnil, Qnil); break; case 'G': /* Possibly nonexistent file name, - default to directory alone. */ + default to directory alone. */ args[i] = Fread_file_name (callint_message, Qnil, Qnil, Qnil, empty_unibyte_string, Qnil); break; - case 'i': /* Ignore an argument -- Does not do I/O */ + case 'i': /* Ignore an argument -- Does not do I/O. */ varies[i] = -1; break; - case 'k': /* Key sequence. */ + case 'k': /* Key sequence. */ { ptrdiff_t speccount1 = SPECPDL_INDEX (); specbind (Qcursor_in_echo_area, Qt); @@ -607,7 +607,7 @@ } break; - case 'K': /* Key sequence to be defined. */ + case 'K': /* Key sequence to be defined. */ { ptrdiff_t speccount1 = SPECPDL_INDEX (); specbind (Qcursor_in_echo_area, Qt); @@ -639,7 +639,7 @@ } break; - case 'U': /* Up event from last k or K */ + case 'U': /* Up event from last k or K. */ if (!NILP (up_event)) { args[i] = Fmake_vector (make_number (1), up_event); @@ -679,7 +679,7 @@ Qnil, Qnil, Qnil, Qt); break; - case 'N': /* Prefix arg as number, else number from minibuffer */ + case 'N': /* Prefix arg as number, else number from minibuffer. */ if (!NILP (prefix_arg)) goto have_prefix_arg; case 'n': /* Read number from minibuffer. */ @@ -714,14 +714,14 @@ varies[i] = -1; break; - case 'p': /* Prefix arg converted to number. No I/O. */ + case 'p': /* Prefix arg converted to number. No I/O. */ have_prefix_arg: args[i] = Fprefix_numeric_value (prefix_arg); /* visargs[i] = Qnil; */ varies[i] = -1; break; - case 'r': /* Region, point and mark as 2 args. */ + case 'r': /* Region, point and mark as 2 args. */ check_mark (1); set_marker_both (point_marker, Qnil, PT, PT_BYTE); /* visargs[i+1] = Qnil; */ @@ -742,29 +742,29 @@ case 'S': /* Any symbol. */ visargs[i] = Fread_string (callint_message, Qnil, Qnil, Qnil, Qnil); - /* Passing args[i] directly stimulates compiler bug */ + /* Passing args[i] directly stimulates compiler bug. */ teml = visargs[i]; args[i] = Fintern (teml, Qnil); break; case 'v': /* Variable name: symbol that is - custom-variable-p. */ + custom-variable-p. */ args[i] = Fread_variable (callint_message, Qnil); visargs[i] = last_minibuf_string; break; - case 'x': /* Lisp expression read but not evaluated */ + case 'x': /* Lisp expression read but not evaluated. */ args[i] = Fread_minibuffer (callint_message, Qnil); visargs[i] = last_minibuf_string; break; - case 'X': /* Lisp expression read and evaluated */ + case 'X': /* Lisp expression read and evaluated. */ args[i] = Feval_minibuffer (callint_message, Qnil); visargs[i] = last_minibuf_string; break; case 'Z': /* Coding-system symbol, or ignore the - argument if no prefix */ + argument if no prefix. */ if (NILP (prefix_arg)) { args[i] = Qnil; @@ -778,7 +778,7 @@ } break; - case 'z': /* Coding-system symbol or nil */ + case 'z': /* Coding-system symbol or nil. */ args[i] = Fread_coding_system (callint_message, Qnil); visargs[i] = last_minibuf_string; break; === modified file 'src/dispnew.c' --- src/dispnew.c 2013-01-22 11:48:00 +0000 +++ src/dispnew.c 2013-01-23 20:07:28 +0000 @@ -87,7 +87,6 @@ struct window *); static void build_frame_matrix_from_leaf_window (struct glyph_matrix *, struct window *); -static void adjust_frame_message_buffer (struct frame *); static void adjust_decode_mode_spec_buffer (struct frame *); static void fill_up_glyph_row_with_spaces (struct glyph_row *); static void clear_window_matrices (struct window *, bool); @@ -1857,9 +1856,7 @@ else adjust_frame_glyphs_for_frame_redisplay (f); - /* Don't forget the message buffer and the buffer for - decode_mode_spec. */ - adjust_frame_message_buffer (f); + /* Don't forget the buffer for decode_mode_spec. */ adjust_decode_mode_spec_buffer (f); f->glyphs_initialized_p = 1; @@ -2159,23 +2156,6 @@ } -/* Adjust/ allocate message buffer of frame F. - - Note that the message buffer is never freed. Since I could not - find a free in 19.34, I assume that freeing it would be - problematic in some way and don't do it either. - - (Implementation note: It should be checked if we can free it - eventually without causing trouble). */ - -static void -adjust_frame_message_buffer (struct frame *f) -{ - FRAME_MESSAGE_BUF (f) = xrealloc (FRAME_MESSAGE_BUF (f), - FRAME_MESSAGE_BUF_SIZE (f) + 1); -} - - /* Re-allocate buffer for decode_mode_spec on frame F. */ static void === modified file 'src/editfns.c' --- src/editfns.c 2013-01-19 20:04:33 +0000 +++ src/editfns.c 2013-01-23 20:07:28 +0000 @@ -3429,12 +3429,6 @@ return unbind_to (count, val); } -/* Buffer for the most recent text displayed by Fmessage_box. */ -static char *message_text; - -/* Allocated length of that buffer. */ -static ptrdiff_t message_length; - DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, doc: /* Display a message at the bottom of the screen. The message also goes into the `*Messages*' buffer, if `message-log-max' @@ -3465,7 +3459,7 @@ { register Lisp_Object val; val = Fformat (nargs, args); - message3 (val, SBYTES (val), STRING_MULTIBYTE (val)); + message3 (val); return val; } } @@ -3489,8 +3483,7 @@ } else { - register Lisp_Object val; - val = Fformat (nargs, args); + Lisp_Object val = Fformat (nargs, args); #ifdef HAVE_MENUS /* The MS-DOS frames support popup menus even though they are not FRAME_WINDOW_P. */ @@ -3507,16 +3500,7 @@ return val; } #endif /* HAVE_MENUS */ - /* Copy the data so that it won't move when we GC. */ - if (SBYTES (val) > message_length) - { - ptrdiff_t new_length = SBYTES (val) + 80; - message_text = xrealloc (message_text, new_length); - message_length = new_length; - } - memcpy (message_text, SDATA (val), SBYTES (val)); - message2 (message_text, SBYTES (val), - STRING_MULTIBYTE (val)); + message3 (val); return val; } } === modified file 'src/fileio.c' --- src/fileio.c 2013-01-22 06:10:20 +0000 +++ src/fileio.c 2013-01-23 20:07:28 +0000 @@ -5444,10 +5444,8 @@ auto_save_error (Lisp_Object error_val) { Lisp_Object args[3], msg; - int i, nbytes; + int i; struct gcpro gcpro1; - char *msgbuf; - USE_SAFE_ALLOCA; auto_save_error_occurred = 1; @@ -5458,20 +5456,16 @@ args[2] = Ferror_message_string (error_val); msg = Fformat (3, args); GCPRO1 (msg); - nbytes = SBYTES (msg); - msgbuf = SAFE_ALLOCA (nbytes); - memcpy (msgbuf, SDATA (msg), nbytes); for (i = 0; i < 3; ++i) { if (i == 0) - message2 (msgbuf, nbytes, STRING_MULTIBYTE (msg)); + message3 (msg); else - message2_nolog (msgbuf, nbytes, STRING_MULTIBYTE (msg)); + message3_nolog (msg); Fsleep_for (make_number (1), Qnil); } - SAFE_FREE (); UNGCPRO; return Qnil; } === modified file 'src/fns.c' --- src/fns.c 2013-01-19 20:38:13 +0000 +++ src/fns.c 2013-01-23 20:07:28 +0000 @@ -2745,7 +2745,7 @@ usage: (widget-apply WIDGET PROPERTY &rest ARGS) */) (ptrdiff_t nargs, Lisp_Object *args) { - /* This function can GC. */ + /* This function can GC. */ Lisp_Object newargs[3]; struct gcpro gcpro1, gcpro2; Lisp_Object result; === modified file 'src/frame.c' --- src/frame.c 2013-01-02 16:13:04 +0000 +++ src/frame.c 2013-01-23 20:07:28 +0000 @@ -1251,7 +1251,6 @@ xfree (FRAME_DELETEN_COST (f)); xfree (FRAME_INSERTN_COST (f)); xfree (FRAME_DELETE_COST (f)); - xfree (FRAME_MESSAGE_BUF (f)); /* Since some events are handled at the interrupt level, we may get an event for f at any time; if we zero out the frame's terminal @@ -1266,10 +1265,10 @@ { struct terminal *terminal = FRAME_TERMINAL (f); f->output_data.nothing = 0; - f->terminal = 0; /* Now the frame is dead. */ + f->terminal = 0; /* Now the frame is dead. */ /* If needed, delete the terminal that this frame was on. - (This must be done after the frame is killed.) */ + (This must be done after the frame is killed.) */ terminal->reference_count--; #ifdef USE_GTK /* FIXME: Deleting the terminal crashes emacs because of a GTK === modified file 'src/frame.h' --- src/frame.h 2013-01-02 16:13:04 +0000 +++ src/frame.h 2013-01-23 20:07:28 +0000 @@ -18,7 +18,7 @@ /* Don't multiply include: dispextern.h includes macterm.h which includes frame.h some emacs source includes both dispextern.h and - frame.h */ + frame.h. */ #ifndef EMACS_FRAME_H #define EMACS_FRAME_H @@ -33,7 +33,7 @@ /* Miscellanea. */ -/* Nonzero means there is at least one garbaged frame. */ +/* Nonzero means there is at least one garbaged frame. */ extern bool frame_garbaged; @@ -200,7 +200,7 @@ string's pointer (`name', above) because it might get relocated. */ char *namebuf; - /* Glyph pool and matrix. */ + /* Glyph pool and matrix. */ struct glyph_pool *current_pool; struct glyph_pool *desired_pool; struct glyph_matrix *desired_matrix; @@ -444,9 +444,6 @@ /* Width of bar cursor (if we are using that) for blink-off state. */ int blink_off_cursor_width; - /* Storage for messages to this frame. */ - char *message_buf; - /* Nonnegative if current redisplay should not do scroll computation for lines beyond a certain vpos. This is the vpos. */ int scroll_bottom_vpos; @@ -751,7 +748,6 @@ #define FRAME_DELETE_COST(f) (f)->delete_line_cost #define FRAME_INSERTN_COST(f) (f)->insert_n_lines_cost #define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost -#define FRAME_MESSAGE_BUF(f) (f)->message_buf #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos #define FRAME_FOCUS_FRAME(f) f->focus_frame === modified file 'src/keyboard.c' --- src/keyboard.c 2013-01-11 23:08:55 +0000 +++ src/keyboard.c 2013-01-23 20:07:28 +0000 @@ -675,9 +675,8 @@ } echoing = 1; - message3_nolog (KVAR (current_kboard, echo_string), - SBYTES (KVAR (current_kboard, echo_string)), - STRING_MULTIBYTE (KVAR (current_kboard, echo_string))); + /* FIXME: Use call (Qmessage) so it can be advised (e.g. emacspeak). */ + message3_nolog (KVAR (current_kboard, echo_string)); echoing = 0; /* Record in what buffer we echoed, and from which kboard. */ @@ -1429,7 +1428,7 @@ sit_for (Vminibuffer_message_timeout, 0, 2); /* Clear the echo area. */ - message2 (0, 0, 0); + message1 (0); safe_run_hooks (Qecho_area_clear_hook); unbind_to (count, Qnil); @@ -8434,12 +8433,6 @@ return Qnil ; } -/* Buffer in use so far for the minibuf prompts for menu keymaps. - We make this bigger when necessary, and never free it. */ -static char *read_char_minibuf_menu_text; -/* Size of that buffer. */ -static ptrdiff_t read_char_minibuf_menu_width; - static Lisp_Object read_char_minibuf_menu_prompt (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps) @@ -8452,7 +8445,7 @@ ptrdiff_t idx = -1; bool nobindings = 1; Lisp_Object rest, vector; - char *menu; + Lisp_Object prompt_strings = Qnil; vector = Qnil; name = Qnil; @@ -8472,24 +8465,13 @@ if (!STRINGP (name)) return Qnil; - /* Make sure we have a big enough buffer for the menu text. */ - width = max (width, SBYTES (name)); - if (STRING_BYTES_BOUND - 4 < width) - memory_full (SIZE_MAX); - if (width + 4 > read_char_minibuf_menu_width) - { - read_char_minibuf_menu_text - = xrealloc (read_char_minibuf_menu_text, width + 4); - read_char_minibuf_menu_width = width + 4; - } - menu = read_char_minibuf_menu_text; - +#define PUSH_C_STR(str, listvar) \ + listvar = Fcons (make_unibyte_string (str, strlen (str)), listvar) + /* Prompt string always starts with map's prompt, and a space. */ - strcpy (menu, SSDATA (name)); - nlength = SBYTES (name); - menu[nlength++] = ':'; - menu[nlength++] = ' '; - menu[nlength] = 0; + prompt_strings = Fcons (name, prompt_strings); + PUSH_C_STR (": ", prompt_strings); + nlength = SCHARS (name) + 2; /* Start prompting at start of first map. */ mapno = 0; @@ -8499,6 +8481,7 @@ while (1) { bool notfirst = 0; + Lisp_Object menu_strings = prompt_strings; ptrdiff_t i = nlength; Lisp_Object obj; Lisp_Object orig_defn_macro; @@ -8508,6 +8491,8 @@ { Lisp_Object elt; + /* FIXME: Use map_keymap to handle new keymap formats. */ + /* If reached end of map, start at beginning of next map. */ if (NILP (rest)) { @@ -8603,7 +8588,7 @@ /* Punctuate between strings. */ if (notfirst) { - strcpy (menu + i, ", "); + PUSH_C_STR (", ", menu_strings); i += 2; } notfirst = 1; @@ -8615,23 +8600,28 @@ { /* Add as much of string as fits. */ thiswidth = min (SCHARS (desc), width - i); - memcpy (menu + i, SDATA (desc), thiswidth); + menu_strings + = Fcons (Fsubstring (desc, make_number (0), + make_number (thiswidth)), + menu_strings); i += thiswidth; - strcpy (menu + i, " = "); + PUSH_C_STR (" = ", menu_strings); i += 3; } /* Add as much of string as fits. */ thiswidth = min (SCHARS (s), width - i); - memcpy (menu + i, SDATA (s), thiswidth); + menu_strings + = Fcons (Fsubstring (s, make_number (0), + make_number (thiswidth)), + menu_strings); i += thiswidth; - menu[i] = 0; } else { /* If this element does not fit, end the line now, and save the element for the next line. */ - strcpy (menu + i, "..."); + PUSH_C_STR ("...", menu_strings); break; } } @@ -8648,13 +8638,11 @@ } /* Prompt with that and read response. */ - message2_nolog (menu, strlen (menu), - ! NILP (BVAR (current_buffer, enable_multibyte_characters))); + message3_nolog (apply1 (intern ("concat"), menu_strings)); - /* Make believe its not a keyboard macro in case the help char + /* Make believe it's not a keyboard macro in case the help char is pressed. Help characters are not recorded because menu prompting - is not used on replay. - */ + is not used on replay. */ orig_defn_macro = KVAR (current_kboard, defining_kbd_macro); kset_defining_kbd_macro (current_kboard, Qnil); do @@ -8662,9 +8650,7 @@ while (BUFFERP (obj)); kset_defining_kbd_macro (current_kboard, orig_defn_macro); - if (!INTEGERP (obj)) - return obj; - else if (XINT (obj) == -2) + if (!INTEGERP (obj) || XINT (obj) == -2) return obj; if (! EQ (obj, menu_prompt_more_char) @@ -8675,7 +8661,7 @@ store_kbd_macro_char (obj); return obj; } - /* Help char - go round again */ + /* Help char - go round again. */ } } @@ -10091,7 +10077,7 @@ cancel_hourglass (); #endif - i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), + i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0); === modified file 'src/lisp.h' --- src/lisp.h 2013-01-19 22:33:29 +0000 +++ src/lisp.h 2013-01-23 20:07:28 +0000 @@ -2948,10 +2948,8 @@ extern void message (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern void message1 (const char *); extern void message1_nolog (const char *); -extern void message2 (const char *, ptrdiff_t, int); -extern void message2_nolog (const char *, ptrdiff_t, int); -extern void message3 (Lisp_Object, ptrdiff_t, int); -extern void message3_nolog (Lisp_Object, ptrdiff_t, int); +extern void message3 (Lisp_Object); +extern void message3_nolog (Lisp_Object); extern void message_dolog (const char *, ptrdiff_t, int, int); extern void message_with_string (const char *, Lisp_Object, int); extern void message_log_maybe_newline (void); === modified file 'src/w16select.c' --- src/w16select.c 2013-01-01 09:11:05 +0000 +++ src/w16select.c 2013-01-23 20:07:28 +0000 @@ -532,13 +532,13 @@ switch (put_status) { case 1: - message2 (no_mem_msg, sizeof (no_mem_msg) - 1, 0); + message3 (make_unibyte_string (no_mem_msg, sizeof (no_mem_msg) - 1)); break; case 2: - message2 (binary_msg, sizeof (binary_msg) - 1, 0); + message3 (make_unibyte_string (binary_msg, sizeof (binary_msg) - 1)); break; case 3: - message2 (system_error_msg, sizeof (system_error_msg) - 1, 0); + message3 (make_unibyte_string (system_error_msg, sizeof (system_error_msg) - 1)); break; } sit_for (make_number (2), 0, 2); === modified file 'src/xdisp.c' --- src/xdisp.c 2013-01-22 11:48:00 +0000 +++ src/xdisp.c 2013-01-23 20:07:28 +0000 @@ -840,17 +840,17 @@ static Lisp_Object unwind_with_echo_area_buffer (Lisp_Object); static Lisp_Object with_echo_area_buffer_unwind_data (struct window *); static int with_echo_area_buffer (struct window *, int, - int (*) (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t), - ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t); + int (*) (ptrdiff_t, Lisp_Object), + ptrdiff_t, Lisp_Object); static void clear_garbaged_frames (void); -static int current_message_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t); +static int current_message_1 (ptrdiff_t, Lisp_Object); static void pop_message (void); -static int truncate_message_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t); -static void set_message (const char *, Lisp_Object, ptrdiff_t, int); -static int set_message_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t); +static int truncate_message_1 (ptrdiff_t, Lisp_Object); +static void set_message (Lisp_Object); +static int set_message_1 (ptrdiff_t, Lisp_Object); static int display_echo_area (struct window *); -static int display_echo_area_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t); -static int resize_mini_window_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t); +static int display_echo_area_1 (ptrdiff_t, Lisp_Object); +static int resize_mini_window_1 (ptrdiff_t, Lisp_Object); static Lisp_Object unwind_redisplay (Lisp_Object); static int string_char_and_length (const unsigned char *, int *); static struct text_pos display_prop_end (struct it *, Lisp_Object, @@ -9567,7 +9567,7 @@ for (i = 0; i < len; i++) { - if (i >= 3 && p1[i-3] == '.' && p1[i-2] == '.' && p1[i-1] == '.') + if (i >= 3 && p1[i - 3] == '.' && p1[i - 2] == '.' && p1[i - 1] == '.') seen_dots = 1; if (p1[i] != p2[i]) return seen_dots; @@ -9580,88 +9580,13 @@ char *pend; intmax_t n = strtoimax ((char *) p1, &pend, 10); if (0 < n && n < INTMAX_MAX && strncmp (pend, " times]\n", 8) == 0) - return n+1; + return n + 1; } return 0; } /* Display an echo area message M with a specified length of NBYTES - bytes. The string may include null characters. If M is 0, clear - out any existing message, and let the mini-buffer text show - through. - - This may GC, so the buffer M must NOT point to a Lisp string. */ - -void -message2 (const char *m, ptrdiff_t nbytes, int multibyte) -{ - /* First flush out any partial line written with print. */ - message_log_maybe_newline (); - if (m) - message_dolog (m, nbytes, 1, multibyte); - message2_nolog (m, nbytes, multibyte); -} - - -/* The non-logging counterpart of message2. */ - -void -message2_nolog (const char *m, ptrdiff_t nbytes, int multibyte) -{ - struct frame *sf = SELECTED_FRAME (); - message_enable_multibyte = multibyte; - - if (FRAME_INITIAL_P (sf)) - { - if (noninteractive_need_newline) - putc ('\n', stderr); - noninteractive_need_newline = 0; - if (m) - fwrite (m, nbytes, 1, stderr); - if (cursor_in_echo_area == 0) - fprintf (stderr, "\n"); - fflush (stderr); - } - /* A null message buffer means that the frame hasn't really been - initialized yet. Error messages get reported properly by - cmd_error, so this must be just an informative message; toss it. */ - else if (INTERACTIVE - && sf->glyphs_initialized_p - && FRAME_MESSAGE_BUF (sf)) - { - Lisp_Object mini_window; - struct frame *f; - - /* Get the frame containing the mini-buffer - that the selected frame is using. */ - mini_window = FRAME_MINIBUF_WINDOW (sf); - f = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); - - FRAME_SAMPLE_VISIBILITY (f); - if (FRAME_VISIBLE_P (sf) - && ! FRAME_VISIBLE_P (f)) - Fmake_frame_visible (WINDOW_FRAME (XWINDOW (mini_window))); - - if (m) - { - set_message (m, Qnil, nbytes, multibyte); - if (minibuffer_auto_raise) - Fraise_frame (WINDOW_FRAME (XWINDOW (mini_window))); - } - else - clear_message (1, 1); - - do_pending_window_change (0); - echo_area_display (1); - do_pending_window_change (0); - if (FRAME_TERMINAL (f)->frame_up_to_date_hook) - (*FRAME_TERMINAL (f)->frame_up_to_date_hook) (f); - } -} - - -/* Display an echo area message M with a specified length of NBYTES bytes. The string may include null characters. If M is not a string, clear out any existing message, and let the mini-buffer text show through. @@ -9669,7 +9594,7 @@ This function cancels echoing. */ void -message3 (Lisp_Object m, ptrdiff_t nbytes, int multibyte) +message3 (Lisp_Object m) { struct gcpro gcpro1; @@ -9681,13 +9606,15 @@ message_log_maybe_newline (); if (STRINGP (m)) { + ptrdiff_t nbytes = SBYTES (m); + int multibyte = STRING_MULTIBYTE (m); USE_SAFE_ALLOCA; char *buffer = SAFE_ALLOCA (nbytes); memcpy (buffer, SDATA (m), nbytes); message_dolog (buffer, nbytes, 1, multibyte); SAFE_FREE (); } - message3_nolog (m, nbytes, multibyte); + message3_nolog (m); UNGCPRO; } @@ -9699,10 +9626,9 @@ and make this cancel echoing. */ void -message3_nolog (Lisp_Object m, ptrdiff_t nbytes, int multibyte) +message3_nolog (Lisp_Object m) { struct frame *sf = SELECTED_FRAME (); - message_enable_multibyte = multibyte; if (FRAME_INITIAL_P (sf)) { @@ -9710,27 +9636,22 @@ putc ('\n', stderr); noninteractive_need_newline = 0; if (STRINGP (m)) - fwrite (SDATA (m), nbytes, 1, stderr); + fwrite (SDATA (m), SBYTES (m), 1, stderr); if (cursor_in_echo_area == 0) fprintf (stderr, "\n"); fflush (stderr); } - /* A null message buffer means that the frame hasn't really been - initialized yet. Error messages get reported properly by - cmd_error, so this must be just an informative message; toss it. */ + /* Error messages get reported properly by cmd_error, so this must be just an + informative message; if the frame hasn't really been initialized yet, just + toss it. */ else if (INTERACTIVE - && sf->glyphs_initialized_p - && FRAME_MESSAGE_BUF (sf)) + && sf->glyphs_initialized_p) { - Lisp_Object mini_window; - Lisp_Object frame; - struct frame *f; - /* Get the frame containing the mini-buffer that the selected frame is using. */ - mini_window = FRAME_MINIBUF_WINDOW (sf); - frame = XWINDOW (mini_window)->frame; - f = XFRAME (frame); + Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf); + Lisp_Object frame = XWINDOW (mini_window)->frame; + struct frame *f = XFRAME (frame); FRAME_SAMPLE_VISIBILITY (f); if (FRAME_VISIBLE_P (sf) @@ -9739,7 +9660,7 @@ if (STRINGP (m) && SCHARS (m) > 0) { - set_message (NULL, m, nbytes, multibyte); + set_message (m); if (minibuffer_auto_raise) Fraise_frame (frame); /* Assume we are not echoing. @@ -9769,7 +9690,7 @@ void message1 (const char *m) { - message2 (m, (m ? strlen (m) : 0), 0); + message3 (m ? make_unibyte_string (m, strlen (m)) : Qnil); } @@ -9778,7 +9699,7 @@ void message1_nolog (const char *m) { - message2_nolog (m, (m ? strlen (m) : 0), 0); + message3_nolog (m ? make_unibyte_string (m, strlen (m)) : Qnil); } /* Display a message M which contains a single %s @@ -9815,10 +9736,10 @@ mini_window = FRAME_MINIBUF_WINDOW (sf); f = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); - /* A null message buffer means that the frame hasn't really been - initialized yet. Error messages get reported properly by - cmd_error, so this must be just an informative message; toss it. */ - if (FRAME_MESSAGE_BUF (f)) + /* Error messages get reported properly by cmd_error, so this must be + just an informative message; if the frame hasn't really been + initialized yet, just toss it. */ + if (f->glyphs_initialized_p) { Lisp_Object args[2], msg; struct gcpro gcpro1, gcpro2; @@ -9831,9 +9752,9 @@ msg = Fformat (2, args); if (log) - message3 (msg, SBYTES (msg), STRING_MULTIBYTE (msg)); + message3 (msg); else - message3_nolog (msg, SBYTES (msg), STRING_MULTIBYTE (msg)); + message3_nolog (msg); UNGCPRO; @@ -9877,20 +9798,20 @@ mini_window = FRAME_MINIBUF_WINDOW (sf); f = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); - /* A null message buffer means that the frame hasn't really been - initialized yet. Error messages get reported properly by - cmd_error, so this must be just an informative message; toss - it. */ - if (FRAME_MESSAGE_BUF (f)) + /* Error messages get reported properly by cmd_error, so this must be + just an informative message; if the frame hasn't really been + initialized yet, just toss it. */ + if (f->glyphs_initialized_p) { if (m) { ptrdiff_t len; - - len = doprnt (FRAME_MESSAGE_BUF (f), - FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, ap); - - message2 (FRAME_MESSAGE_BUF (f), len, 1); + ptrdiff_t maxsize = FRAME_MESSAGE_BUF_SIZE (f); + char *message_buf = alloca (maxsize + 1); + + len = doprnt (message_buf, maxsize, m, (char *)0, ap); + + message3 (make_string (message_buf, len)); } else message1 (0); @@ -9941,8 +9862,7 @@ { Lisp_Object string; string = Fcurrent_message (); - message3 (string, SBYTES (string), - !NILP (BVAR (current_buffer, enable_multibyte_characters))); + message3 (string); } } @@ -9978,7 +9898,7 @@ } -/* Call FN with args A1..A4 with either the current or last displayed +/* Call FN with args A1..A2 with either the current or last displayed echo_area_buffer as current buffer. WHICH zero means use the current message buffer @@ -9996,8 +9916,8 @@ static int with_echo_area_buffer (struct window *w, int which, - int (*fn) (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t), - ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4) + int (*fn) (ptrdiff_t, Lisp_Object), + ptrdiff_t a1, Lisp_Object a2) { Lisp_Object buffer; int this_one, the_other, clear_buffer_p, rc; @@ -10070,7 +9990,7 @@ eassert (BEGV >= BEG); eassert (ZV <= Z && ZV >= BEGV); - rc = fn (a1, a2, a3, a4); + rc = fn (a1, a2); eassert (BEGV >= BEG); eassert (ZV <= Z && ZV >= BEGV); @@ -10249,7 +10169,7 @@ window_height_changed_p = with_echo_area_buffer (w, display_last_displayed_message_p, display_echo_area_1, - (intptr_t) w, Qnil, 0, 0); + (intptr_t) w, Qnil); if (no_message_p) echo_area_buffer[i] = Qnil; @@ -10266,7 +10186,7 @@ Value is non-zero if height of W was changed. */ static int -display_echo_area_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4) +display_echo_area_1 (ptrdiff_t a1, Lisp_Object a2) { intptr_t i1 = a1; struct window *w = (struct window *) i1; @@ -10311,8 +10231,7 @@ resize_exactly = Qnil; resized_p = with_echo_area_buffer (w, 0, resize_mini_window_1, - (intptr_t) w, resize_exactly, - 0, 0); + (intptr_t) w, resize_exactly); if (resized_p) { ++windows_or_buffers_changed; @@ -10330,7 +10249,7 @@ resize_mini_window returns. */ static int -resize_mini_window_1 (ptrdiff_t a1, Lisp_Object exactly, ptrdiff_t a3, ptrdiff_t a4) +resize_mini_window_1 (ptrdiff_t a1, Lisp_Object exactly) { intptr_t i1 = a1; return resize_mini_window ((struct window *) i1, !NILP (exactly)); @@ -10499,7 +10418,7 @@ else { with_echo_area_buffer (0, 0, current_message_1, - (intptr_t) &msg, Qnil, 0, 0); + (intptr_t) &msg, Qnil); if (NILP (msg)) echo_area_buffer[0] = Qnil; } @@ -10509,7 +10428,7 @@ static int -current_message_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4) +current_message_1 (ptrdiff_t a1, Lisp_Object a2) { intptr_t i1 = a1; Lisp_Object *msg = (Lisp_Object *) i1; @@ -10541,14 +10460,8 @@ void restore_message (void) { - Lisp_Object msg; - eassert (CONSP (Vmessage_stack)); - msg = XCAR (Vmessage_stack); - if (STRINGP (msg)) - message3_nolog (msg, SBYTES (msg), STRING_MULTIBYTE (msg)); - else - message3_nolog (msg, 0, 0); + message3_nolog (XCAR (Vmessage_stack)); } @@ -10591,16 +10504,16 @@ { if (nchars == 0) echo_area_buffer[0] = Qnil; - /* A null message buffer means that the frame hasn't really been - initialized yet. Error messages get reported properly by - cmd_error, so this must be just an informative message; toss it. */ else if (!noninteractive && INTERACTIVE && !NILP (echo_area_buffer[0])) { struct frame *sf = SELECTED_FRAME (); - if (FRAME_MESSAGE_BUF (sf)) - with_echo_area_buffer (0, 0, truncate_message_1, nchars, Qnil, 0, 0); + /* Error messages get reported properly by cmd_error, so this must be + just an informative message; if the frame hasn't really been + initialized yet, just toss it. */ + if (sf->glyphs_initialized_p) + with_echo_area_buffer (0, 0, truncate_message_1, nchars, Qnil); } } @@ -10609,7 +10522,7 @@ message to at most NCHARS characters. */ static int -truncate_message_1 (ptrdiff_t nchars, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4) +truncate_message_1 (ptrdiff_t nchars, Lisp_Object a2) { if (BEG + nchars < Z) del_range (BEG + nchars, Z); @@ -10618,30 +10531,16 @@ return 0; } -/* Set the current message to a substring of S or STRING. - - If STRING is a Lisp string, set the message to the first NBYTES - bytes from STRING. NBYTES zero means use the whole string. If - STRING is multibyte, the message will be displayed multibyte. - - If S is not null, set the message to the first LEN bytes of S. LEN - zero means use the whole string. MULTIBYTE_P non-zero means S is - multibyte. Display the message multibyte in that case. - - Doesn't GC, as with_echo_area_buffer binds Qinhibit_modification_hooks - to t before calling set_message_1 (which calls insert). - */ +/* Set the current message to STRING. */ static void -set_message (const char *s, Lisp_Object string, - ptrdiff_t nbytes, int multibyte_p) +set_message (Lisp_Object string) { - message_enable_multibyte - = ((s && multibyte_p) - || (STRINGP (string) && STRING_MULTIBYTE (string))); - - with_echo_area_buffer (0, -1, set_message_1, - (intptr_t) s, string, nbytes, multibyte_p); + eassert (STRINGP (string)); + + message_enable_multibyte = STRING_MULTIBYTE (string); + + with_echo_area_buffer (0, -1, set_message_1, 0, string); message_buf_print = 0; help_echo_showing_p = 0; @@ -10651,18 +10550,14 @@ } -/* Helper function for set_message. Arguments have the same meaning - as there, with A1 corresponding to S and A2 corresponding to STRING - This function is called with the echo area buffer being - current. */ +/* Helper function for set_message. First argument is ignored and second + argument has the same meaning as for set_message. + This function is called with the echo area buffer being current. */ static int -set_message_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t nbytes, ptrdiff_t multibyte_p) +set_message_1 (ptrdiff_t a1, Lisp_Object string) { - intptr_t i1 = a1; - const char *s = (const char *) i1; - const unsigned char *msg = (const unsigned char *) s; - Lisp_Object string = a2; + eassert (STRINGP (string)); /* Change multibyteness of the echo buffer appropriately. */ if (message_enable_multibyte @@ -10676,61 +10571,10 @@ /* Insert new message at BEG. */ TEMP_SET_PT_BOTH (BEG, BEG_BYTE); - if (STRINGP (string)) - { - ptrdiff_t nchars; - - if (nbytes == 0) - nbytes = SBYTES (string); - nchars = string_byte_to_char (string, nbytes); - - /* This function takes care of single/multibyte conversion. We - just have to ensure that the echo area buffer has the right - setting of enable_multibyte_characters. */ - insert_from_string (string, 0, 0, nchars, nbytes, 1); - } - else if (s) - { - if (nbytes == 0) - nbytes = strlen (s); - - if (multibyte_p && NILP (BVAR (current_buffer, enable_multibyte_characters))) - { - /* Convert from multi-byte to single-byte. */ - ptrdiff_t i; - int c, n; - char work[1]; - - /* Convert a multibyte string to single-byte. */ - for (i = 0; i < nbytes; i += n) - { - c = string_char_and_length (msg + i, &n); - work[0] = (ASCII_CHAR_P (c) - ? c - : multibyte_char_to_unibyte (c)); - insert_1_both (work, 1, 1, 1, 0, 0); - } - } - else if (!multibyte_p - && !NILP (BVAR (current_buffer, enable_multibyte_characters))) - { - /* Convert from single-byte to multi-byte. */ - ptrdiff_t i; - int c, n; - unsigned char str[MAX_MULTIBYTE_LENGTH]; - - /* Convert a single-byte string to multibyte. */ - for (i = 0; i < nbytes; i++) - { - c = msg[i]; - MAKE_CHAR_MULTIBYTE (c); - n = CHAR_STRING (c, str); - insert_1_both ((char *) str, 1, n, 1, 0, 0); - } - } - else - insert_1 (s, nbytes, 1, 0, 0); - } + /* This function takes care of single/multibyte conversion. + We just have to ensure that the echo area buffer has the right + setting of enable_multibyte_characters. */ + insert_from_string (string, 0, 0, SCHARS (string), SBYTES (string), 1); return 0; } ------------------------------------------------------------ revno: 111590 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-01-23 18:52:05 +0200 message: Fix dimensions of maximized frame on MS-Windows. src/w32term.c (w32fullscreen_hook): Account correctly for the screen real estate used for the tool bar, the menu bar, and scroll bar. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-23 14:49:54 +0000 +++ src/ChangeLog 2013-01-23 16:52:05 +0000 @@ -1,3 +1,8 @@ +2013-01-23 Eli Zaretskii + + * w32term.c (w32fullscreen_hook): Account correctly for the screen + real estate used for the tool bar and the menu bar. + 2013-01-23 Dmitry Antipov * insdel.c (prepare_to_modify_buffer): Force redisplay if === modified file 'src/w32term.c' --- src/w32term.c 2013-01-09 15:07:01 +0000 +++ src/w32term.c 2013-01-23 16:52:05 +0000 @@ -5674,24 +5674,33 @@ switch (f->want_fullscreen) { - /* No difference between these two when there is no WM */ case FULLSCREEN_MAXIMIZED: - PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, 0xf030, 0); + PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MAXIMIZE, 0); break; case FULLSCREEN_BOTH: - height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) - 2; - width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width); + height = + FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) + - XINT (Ftool_bar_lines_needed (selected_frame)) + + (NILP (Vmenu_bar_mode) ? 1 : 0); + width = + FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width) + - FRAME_SCROLL_BAR_COLS (f); left_pos = workarea_rect.left; top_pos = workarea_rect.top; break; case FULLSCREEN_WIDTH: - width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width); + width = + FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width) + - FRAME_SCROLL_BAR_COLS (f); if (normal_height > 0) height = normal_height; left_pos = workarea_rect.left; break; case FULLSCREEN_HEIGHT: - height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) - 2; + height = + FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) + - XINT (Ftool_bar_lines_needed (selected_frame)) + + (NILP (Vmenu_bar_mode) ? 1 : 0); if (normal_width > 0) width = normal_width; top_pos = workarea_rect.top; ------------------------------------------------------------ revno: 111589 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-01-23 18:49:54 +0400 message: * insdel.c (prepare_to_modify_buffer): Force redisplay if hidden buffer is prepared to modification (Bug#13164). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-22 11:48:00 +0000 +++ src/ChangeLog 2013-01-23 14:49:54 +0000 @@ -1,3 +1,8 @@ +2013-01-23 Dmitry Antipov + + * insdel.c (prepare_to_modify_buffer): Force redisplay if + hidden buffer is prepared to modification (Bug#13164). + 2013-01-22 Dmitry Antipov * window.h (struct window): Change window_end_valid member from === modified file 'src/insdel.c' --- src/insdel.c 2013-01-11 23:08:55 +0000 +++ src/insdel.c 2013-01-23 14:49:54 +0000 @@ -1804,9 +1804,12 @@ Fbarf_if_buffer_read_only (); /* If we're modifying the buffer other than shown in a selected window, - let redisplay consider other windows if this buffer is visible. */ + let redisplay consider other windows if this buffer is visible or + hidden (although hidden buffers have zero window counts, their state + may affect the display too, e.g. via mode lines of other buffers). */ if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer - && buffer_window_count (current_buffer)) + && (buffer_window_count (current_buffer) + || BUFFER_HIDDEN_P (current_buffer))) ++windows_or_buffers_changed; if (buffer_intervals (current_buffer)) ------------------------------------------------------------ revno: 111588 committer: Bastien Guerry branch nick: trunk timestamp: Wed 2013-01-23 10:43:29 +0100 message: * paren.el (show-paren-function): Make sure an overlay exists before trying to delete it. Also use `pos' as a position only when it is an integer. See this thread: http://thread.gmane.org/gmane.emacs.devel/156498 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-23 08:49:34 +0000 +++ lisp/ChangeLog 2013-01-23 09:43:29 +0000 @@ -1,3 +1,9 @@ +2013-01-23 Bastien Guerry + + * paren.el (show-paren-function): Make sure an overlay exists + before trying to delete it. Also use `pos' as a position only + when it is an integer. + 2013-01-23 Dmitry Antipov * play/gametree.el (gametree-break-line-here): Use point-marker. === modified file 'lisp/paren.el' --- lisp/paren.el 2013-01-01 09:11:05 +0000 +++ lisp/paren.el 2013-01-23 09:43:29 +0000 @@ -243,23 +243,23 @@ ;; ;; Turn on highlighting for the matching paren, if found. ;; If it's an unmatched paren, turn off any such highlighting. - (unless (integerp pos) - (delete-overlay show-paren-overlay)) - (let ((to (if (or (eq show-paren-style 'expression) - (and (eq show-paren-style 'mixed) - (not (pos-visible-in-window-p pos)))) - (point) - pos)) - (from (if (or (eq show-paren-style 'expression) + (if (not (integerp pos)) + (when show-paren-overlay (delete-overlay show-paren-overlay)) + (let ((to (if (or (eq show-paren-style 'expression) (and (eq show-paren-style 'mixed) (not (pos-visible-in-window-p pos)))) - pos - (save-excursion - (goto-char pos) - (- (point) dir))))) - (if show-paren-overlay - (move-overlay show-paren-overlay from to (current-buffer)) - (setq show-paren-overlay (make-overlay from to nil t)))) + (point) + pos)) + (from (if (or (eq show-paren-style 'expression) + (and (eq show-paren-style 'mixed) + (not (pos-visible-in-window-p pos)))) + pos + (save-excursion + (goto-char pos) + (- (point) dir))))) + (if show-paren-overlay + (move-overlay show-paren-overlay from to (current-buffer)) + (setq show-paren-overlay (make-overlay from to nil t))))) ;; ;; Always set the overlay face, since it varies. (overlay-put show-paren-overlay 'priority show-paren-priority) ------------------------------------------------------------ revno: 111587 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-01-23 12:49:34 +0400 message: * lisp/play/gametree.el (gametree-break-line-here): Use point-marker. * lisp/mh-e/mh-acros.el (mh-do-at-event-location): Likewise. * lisp/mh-e/mh-search.el (mh-index-create-imenu-index): Likewise. * lisp/mh-e/mh-xface.el (mh-x-image-url-display): Likewise. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-22 08:49:03 +0000 +++ lisp/ChangeLog 2013-01-23 08:49:34 +0000 @@ -1,3 +1,7 @@ +2013-01-23 Dmitry Antipov + + * play/gametree.el (gametree-break-line-here): Use point-marker. + 2013-01-22 Michael Albinus * net/tramp-cmds.el (tramp-bug, tramp-append-tramp-buffers): Mark === modified file 'lisp/mh-e/ChangeLog' --- lisp/mh-e/ChangeLog 2013-01-02 16:13:04 +0000 +++ lisp/mh-e/ChangeLog 2013-01-23 08:49:34 +0000 @@ -1,3 +1,9 @@ +2013-01-23 Dmitry Antipov + + * mh-acros.el (mh-do-at-event-location): Use point-marker. + * mh-search.el (mh-index-create-imenu-index): Likewise. + * mh-xface.el (mh-x-image-url-display): Likewise. + 2012-11-25 Bill Wohler Release MH-E version 8.4. === modified file 'lisp/mh-e/mh-acros.el' --- lisp/mh-e/mh-acros.el 2013-01-01 09:11:05 +0000 +++ lisp/mh-e/mh-acros.el 2013-01-23 08:49:34 +0000 @@ -233,7 +233,7 @@ (,original-window (selected-window)) (,original-position (progn (set-buffer (window-buffer ,event-window)) - (set-marker (make-marker) (point)))) + (point-marker))) (,modified-flag (buffer-modified-p)) (buffer-read-only nil)) (unwind-protect (progn === modified file 'lisp/mh-e/mh-search.el' --- lisp/mh-e/mh-search.el 2013-01-02 16:13:04 +0000 +++ lisp/mh-e/mh-search.el 2013-01-23 08:49:34 +0000 @@ -1434,7 +1434,7 @@ (beginning-of-line) (push (cons (buffer-substring-no-properties (point) (mh-line-end-position)) - (set-marker (make-marker) (point))) + (point-marker)) alist))) (setq imenu--index-alist (nreverse alist))))) === modified file 'lisp/mh-e/mh-xface.el' --- lisp/mh-e/mh-xface.el 2013-01-01 09:11:05 +0000 +++ lisp/mh-e/mh-xface.el 2013-01-23 08:49:34 +0000 @@ -323,7 +323,7 @@ If the URL isn't present in the cache then it is fetched with wget." (let* ((cache-filename (mh-x-image-url-cache-canonicalize url)) (state (mh-x-image-get-download-state cache-filename)) - (marker (set-marker (make-marker) (point)))) + (marker (point-marker))) (set (make-local-variable 'mh-x-image-marker) marker) (cond ((not (mh-x-image-url-sane-p url))) ((eq state 'ok) === modified file 'lisp/play/gametree.el' --- lisp/play/gametree.el 2013-01-01 09:11:05 +0000 +++ lisp/play/gametree.el 2013-01-23 08:49:34 +0000 @@ -435,7 +435,7 @@ gametree-half-ply-regexp)) limit)) (goto-char (match-beginning 0)))) (gametree-transpose-following-leaves) - (let* ((pt (set-marker (make-marker) (point))) + (let* ((pt (point-marker)) (plys (gametree-current-branch-ply)) (depth (gametree-current-branch-depth)) (old-depth depth)) ------------------------------------------------------------ revno: 111586 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-01-22 17:51:49 -0800 message: Undo stray change committed by mistake. diff: === modified file 'src/unexmacosx.c' --- src/unexmacosx.c 2013-01-23 01:47:44 +0000 +++ src/unexmacosx.c 2013-01-23 01:51:49 +0000 @@ -437,7 +437,7 @@ } -#define MAX_UNEXEC_REGIONS 800 +#define MAX_UNEXEC_REGIONS 400 static int num_unexec_regions; typedef struct {