diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 29 | ||||
| -rw-r--r-- | src/gtkutil.c | 10 | ||||
| -rw-r--r-- | src/insdel.c | 6 | ||||
| -rw-r--r-- | src/lisp.h | 6 | ||||
| -rw-r--r-- | src/lread.c | 2 | ||||
| -rw-r--r-- | src/macmenu.c | 10 | ||||
| -rw-r--r-- | src/xdisp.c | 2 | ||||
| -rw-r--r-- | src/xmenu.c | 8 |
8 files changed, 66 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e3c660dbbab..742bfc38249 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2007-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * macmenu.c (mac_dialog_show): Apply 2007-04-27 change for xmenu.c. | ||
| 4 | (Fx_popup_dialog) [MAC_OSX]: Likewise. | ||
| 5 | |||
| 6 | 2007-04-29 Richard Stallman <rms@gnu.org> | ||
| 7 | |||
| 8 | * insdel.c (replace_range): For undo, record insertion first. | ||
| 9 | |||
| 10 | 2007-04-29 Andreas Schwab <schwab@suse.de> | ||
| 11 | |||
| 12 | * lisp.h (VECSIZE): Use OFFSETOF. | ||
| 13 | |||
| 14 | 2007-04-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 15 | |||
| 16 | * xdisp.c (try_window_reusing_current_matrix): Fix number of | ||
| 17 | disabled lines. | ||
| 18 | |||
| 19 | 2007-04-28 Richard Stallman <rms@gnu.org> | ||
| 20 | |||
| 21 | * lread.c (read_escape): In a string, \s is always space. | ||
| 22 | |||
| 23 | 2007-04-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 24 | |||
| 25 | * xmenu.c (xdialog_show): Call Fredisplay before showing the dialog. | ||
| 26 | |||
| 27 | * gtkutil.c (xg_update_menubar, create_menus): Create empty | ||
| 28 | submenu for menu bar items. | ||
| 29 | |||
| 1 | 2007-04-24 Chong Yidong <cyd@stupidchicken.com> | 30 | 2007-04-24 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 31 | ||
| 3 | * xdisp.c (redisplay_window): Use BEG_UNCHANGED and END_UNCHANGED | 32 | * xdisp.c (redisplay_window): Use BEG_UNCHANGED and END_UNCHANGED |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 8dfcf84f0f2..02e42f74852 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -2192,7 +2192,9 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, | |||
| 2192 | cl_data, | 2192 | cl_data, |
| 2193 | &group); | 2193 | &group); |
| 2194 | 2194 | ||
| 2195 | if (item->contents) | 2195 | /* Create a possibly empty submenu for menu bar items, since some |
| 2196 | themes don't highlight items correctly without it. */ | ||
| 2197 | if (item->contents || menu_bar_p) | ||
| 2196 | { | 2198 | { |
| 2197 | GtkWidget *submenu = create_menus (item->contents, | 2199 | GtkWidget *submenu = create_menus (item->contents, |
| 2198 | f, | 2200 | f, |
| @@ -2479,8 +2481,14 @@ xg_update_menubar (menubar, f, list, iter, pos, val, | |||
| 2479 | cl_data, | 2481 | cl_data, |
| 2480 | &group); | 2482 | &group); |
| 2481 | 2483 | ||
| 2484 | /* Create a possibly empty submenu for menu bar items, since some | ||
| 2485 | themes don't highlight items correctly without it. */ | ||
| 2486 | GtkWidget *submenu = create_menus (NULL, f, | ||
| 2487 | select_cb, NULL, highlight_cb, | ||
| 2488 | 0, 0, 0, 0, cl_data, 0); | ||
| 2482 | gtk_widget_set_name (w, MENU_ITEM_NAME); | 2489 | gtk_widget_set_name (w, MENU_ITEM_NAME); |
| 2483 | gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos); | 2490 | gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos); |
| 2491 | gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), submenu); | ||
| 2484 | 2492 | ||
| 2485 | g_list_free (*list); | 2493 | g_list_free (*list); |
| 2486 | *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar)); | 2494 | *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar)); |
diff --git a/src/insdel.c b/src/insdel.c index d7ba13ecbca..c1c1ae882fa 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -1636,8 +1636,12 @@ replace_range (from, to, new, prepare, inherit, markers) | |||
| 1636 | 1636 | ||
| 1637 | if (! EQ (current_buffer->undo_list, Qt)) | 1637 | if (! EQ (current_buffer->undo_list, Qt)) |
| 1638 | { | 1638 | { |
| 1639 | /* Record the insertion first, so that when we undo, | ||
| 1640 | the deletion will be undone first. Thus, undo | ||
| 1641 | will insert before deleting, and thus will keep | ||
| 1642 | the markers before and after this text separate. */ | ||
| 1643 | record_insert (from + SCHARS (deletion), inschars); | ||
| 1639 | record_delete (from, deletion); | 1644 | record_delete (from, deletion); |
| 1640 | record_insert (from, inschars); | ||
| 1641 | } | 1645 | } |
| 1642 | 1646 | ||
| 1643 | GAP_SIZE -= outgoing_insbytes; | 1647 | GAP_SIZE -= outgoing_insbytes; |
diff --git a/src/lisp.h b/src/lisp.h index 6ba01b1e8f8..850e15ec2c4 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -738,9 +738,9 @@ struct Lisp_Vector | |||
| 738 | 738 | ||
| 739 | /* If a struct is made to look like a vector, this macro returns the length | 739 | /* If a struct is made to look like a vector, this macro returns the length |
| 740 | of the shortest vector that would hold that struct. */ | 740 | of the shortest vector that would hold that struct. */ |
| 741 | #define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \ | 741 | #define VECSIZE(type) ((sizeof (type) \ |
| 742 | - sizeof (Lisp_Object)) \ | 742 | - OFFSETOF (struct Lisp_Vector, contents[0]) \ |
| 743 | + sizeof(Lisp_Object) - 1) /* round up */ \ | 743 | + sizeof(Lisp_Object) - 1) /* round up */ \ |
| 744 | / sizeof (Lisp_Object)) | 744 | / sizeof (Lisp_Object)) |
| 745 | 745 | ||
| 746 | /* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields | 746 | /* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields |
diff --git a/src/lread.c b/src/lread.c index 5d46507dc77..ebc42e361ef 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2057,7 +2057,7 @@ read_escape (readcharfun, stringp) | |||
| 2057 | 2057 | ||
| 2058 | case 's': | 2058 | case 's': |
| 2059 | c = READCHAR; | 2059 | c = READCHAR; |
| 2060 | if (c != '-') | 2060 | if (stringp || c != '-') |
| 2061 | { | 2061 | { |
| 2062 | UNREAD (c); | 2062 | UNREAD (c); |
| 2063 | return ' '; | 2063 | return ' '; |
diff --git a/src/macmenu.c b/src/macmenu.c index c7a84df7106..a5196a156eb 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -1011,6 +1011,11 @@ for instance using the window manager, then this produces a quit and | |||
| 1011 | DialogItemIndex item_hit; | 1011 | DialogItemIndex item_hit; |
| 1012 | Lisp_Object tem; | 1012 | Lisp_Object tem; |
| 1013 | 1013 | ||
| 1014 | /* Force a redisplay before showing the dialog. If a frame is | ||
| 1015 | created just before showing the dialog, its contents may not | ||
| 1016 | have been fully drawn. */ | ||
| 1017 | Fredisplay (Qt); | ||
| 1018 | |||
| 1014 | tem = Fstring_match (concat3 (build_string ("\\("), | 1019 | tem = Fstring_match (concat3 (build_string ("\\("), |
| 1015 | call0 (intern ("sentence-end")), | 1020 | call0 (intern ("sentence-end")), |
| 1016 | build_string ("\\)\n")), | 1021 | build_string ("\\)\n")), |
| @@ -2943,6 +2948,11 @@ mac_dialog_show (f, keymaps, title, header, error_name) | |||
| 2943 | first_wv = wv; | 2948 | first_wv = wv; |
| 2944 | } | 2949 | } |
| 2945 | 2950 | ||
| 2951 | /* Force a redisplay before showing the dialog. If a frame is created | ||
| 2952 | just before showing the dialog, its contents may not have been fully | ||
| 2953 | drawn. */ | ||
| 2954 | Fredisplay (Qt); | ||
| 2955 | |||
| 2946 | /* Actually create the dialog. */ | 2956 | /* Actually create the dialog. */ |
| 2947 | #if TARGET_API_MAC_CARBON | 2957 | #if TARGET_API_MAC_CARBON |
| 2948 | menu_item_selection = create_and_show_dialog (f, first_wv); | 2958 | menu_item_selection = create_and_show_dialog (f, first_wv); |
diff --git a/src/xdisp.c b/src/xdisp.c index eb97ef110a9..dae45042685 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13960,7 +13960,7 @@ try_window_reusing_current_matrix (w) | |||
| 13960 | nrows_scrolled); | 13960 | nrows_scrolled); |
| 13961 | 13961 | ||
| 13962 | /* Disable lines that must be updated. */ | 13962 | /* Disable lines that must be updated. */ |
| 13963 | for (i = 0; i < it.vpos; ++i) | 13963 | for (i = 0; i < nrows_scrolled; ++i) |
| 13964 | (start_row + i)->enabled_p = 0; | 13964 | (start_row + i)->enabled_p = 0; |
| 13965 | 13965 | ||
| 13966 | /* Re-compute Y positions. */ | 13966 | /* Re-compute Y positions. */ |
diff --git a/src/xmenu.c b/src/xmenu.c index e2a67510de2..0518832d217 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -3333,6 +3333,14 @@ xdialog_show (f, keymaps, title, header, error_name) | |||
| 3333 | /* No selection has been chosen yet. */ | 3333 | /* No selection has been chosen yet. */ |
| 3334 | menu_item_selection = 0; | 3334 | menu_item_selection = 0; |
| 3335 | 3335 | ||
| 3336 | /* Force a redisplay before showing the dialog. If a frame is created | ||
| 3337 | just before showing the dialog, its contents may not have been fully | ||
| 3338 | drawn, as this depends on timing of events from the X server. Redisplay | ||
| 3339 | is not done when a dialog is shown. If redisplay could be done in the | ||
| 3340 | X event loop (i.e. the X event loop does not run in a signal handler) | ||
| 3341 | this would not be needed. */ | ||
| 3342 | Fredisplay (Qt); | ||
| 3343 | |||
| 3336 | /* Actually create and show the dialog. */ | 3344 | /* Actually create and show the dialog. */ |
| 3337 | create_and_show_dialog (f, first_wv); | 3345 | create_and_show_dialog (f, first_wv); |
| 3338 | 3346 | ||