diff options
| author | Paul Eggert | 2012-10-11 09:23:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-10-11 09:23:37 -0700 |
| commit | 7cded46f2bef23f86041cc883618ac82b6dbfe61 (patch) | |
| tree | c85855d128fee9247561a6f1395bfec9d8ceaa58 /src/xmenu.c | |
| parent | 549c3414d97575bfe537d2a4d357d48ea58c980a (diff) | |
| download | emacs-7cded46f2bef23f86041cc883618ac82b6dbfe61.tar.gz emacs-7cded46f2bef23f86041cc883618ac82b6dbfe61.zip | |
lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
* lread.c (load_each_byte, new_backquote_flag, readchar)
(read_filtered_event, lisp_file_lexically_bound_p)
(safe_to_load_version, Fload, complete_filename_p, openp)
(build_load_history, readevalloop, read_escape, read1)
(string_to_number, read_vector, read_list):
* macros.c (Fstart_kbd_macro):
* marker.c (CONSIDER):
* menu.c (parse_single_submenu, digest_single_submenu)
(find_and_return_menu_selection, Fx_popup_menu):
* minibuf.c (read_minibuf_noninteractive, read_minibuf)
(Ftry_completion):
* nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
(ns_menu_show):
* xmenu.c (set_frame_menubar, create_and_show_popup_menu)
(xmenu_show, xdialog_show):
Use bool for booleans.
* lread.c (safe_to_load_version): Rename from safe_to_load_p,
as it's not a predicate. All uses changed. Omit unnecessary
buffer termination.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 96a1ae87fdc..01d932cf8d8 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -111,7 +111,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 111 | static Lisp_Object Qdebug_on_next_call; | 111 | static Lisp_Object Qdebug_on_next_call; |
| 112 | 112 | ||
| 113 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 113 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) |
| 114 | static Lisp_Object xdialog_show (FRAME_PTR, int, Lisp_Object, Lisp_Object, | 114 | static Lisp_Object xdialog_show (FRAME_PTR, bool, Lisp_Object, Lisp_Object, |
| 115 | const char **); | 115 | const char **); |
| 116 | #endif | 116 | #endif |
| 117 | 117 | ||
| @@ -930,7 +930,8 @@ set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p) | |||
| 930 | widget_value *wv, *first_wv, *prev_wv = 0; | 930 | widget_value *wv, *first_wv, *prev_wv = 0; |
| 931 | int i; | 931 | int i; |
| 932 | int *submenu_start, *submenu_end; | 932 | int *submenu_start, *submenu_end; |
| 933 | int *submenu_top_level_items, *submenu_n_panes; | 933 | bool *submenu_top_level_items; |
| 934 | int *submenu_n_panes; | ||
| 934 | 935 | ||
| 935 | if (! FRAME_X_P (f)) | 936 | if (! FRAME_X_P (f)) |
| 936 | emacs_abort (); | 937 | emacs_abort (); |
| @@ -1346,8 +1347,8 @@ free_frame_menubar (FRAME_PTR f) | |||
| 1346 | /* F is the frame the menu is for. | 1347 | /* F is the frame the menu is for. |
| 1347 | X and Y are the frame-relative specified position, | 1348 | X and Y are the frame-relative specified position, |
| 1348 | relative to the inside upper left corner of the frame F. | 1349 | relative to the inside upper left corner of the frame F. |
| 1349 | FOR_CLICK is nonzero if this menu was invoked for a mouse click. | 1350 | FOR_CLICK is true if this menu was invoked for a mouse click. |
| 1350 | KEYMAPS is 1 if this menu was specified with keymaps; | 1351 | KEYMAPS is true if this menu was specified with keymaps; |
| 1351 | in that case, we return a list containing the chosen item's value | 1352 | in that case, we return a list containing the chosen item's value |
| 1352 | and perhaps also the pane's prefix. | 1353 | and perhaps also the pane's prefix. |
| 1353 | TITLE is the specified menu title. | 1354 | TITLE is the specified menu title. |
| @@ -1427,14 +1428,14 @@ pop_down_menu (Lisp_Object arg) | |||
| 1427 | menu_item_selection will be set to the selection. */ | 1428 | menu_item_selection will be set to the selection. */ |
| 1428 | static void | 1429 | static void |
| 1429 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, | 1430 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, |
| 1430 | int for_click, Time timestamp) | 1431 | bool for_click, Time timestamp) |
| 1431 | { | 1432 | { |
| 1432 | int i; | 1433 | int i; |
| 1433 | GtkWidget *menu; | 1434 | GtkWidget *menu; |
| 1434 | GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */ | 1435 | GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */ |
| 1435 | struct next_popup_x_y popup_x_y; | 1436 | struct next_popup_x_y popup_x_y; |
| 1436 | ptrdiff_t specpdl_count = SPECPDL_INDEX (); | 1437 | ptrdiff_t specpdl_count = SPECPDL_INDEX (); |
| 1437 | int use_pos_func = ! for_click; | 1438 | bool use_pos_func = ! for_click; |
| 1438 | 1439 | ||
| 1439 | #ifdef HAVE_GTK3 | 1440 | #ifdef HAVE_GTK3 |
| 1440 | /* Always use position function for Gtk3. Otherwise menus may become | 1441 | /* Always use position function for Gtk3. Otherwise menus may become |
| @@ -1539,7 +1540,7 @@ pop_down_menu (Lisp_Object arg) | |||
| 1539 | menu_item_selection will be set to the selection. */ | 1540 | menu_item_selection will be set to the selection. */ |
| 1540 | static void | 1541 | static void |
| 1541 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, | 1542 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, |
| 1542 | int x, int y, int for_click, Time timestamp) | 1543 | int x, int y, bool for_click, Time timestamp) |
| 1543 | { | 1544 | { |
| 1544 | int i; | 1545 | int i; |
| 1545 | Arg av[2]; | 1546 | Arg av[2]; |
| @@ -1623,7 +1624,7 @@ cleanup_widget_value_tree (Lisp_Object arg) | |||
| 1623 | } | 1624 | } |
| 1624 | 1625 | ||
| 1625 | Lisp_Object | 1626 | Lisp_Object |
| 1626 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | 1627 | xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, |
| 1627 | Lisp_Object title, const char **error_name, Time timestamp) | 1628 | Lisp_Object title, const char **error_name, Time timestamp) |
| 1628 | { | 1629 | { |
| 1629 | int i; | 1630 | int i; |
| @@ -1878,7 +1879,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | |||
| 1878 | = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE); | 1879 | = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE); |
| 1879 | if (menu_item_selection == aref_addr (menu_items, i)) | 1880 | if (menu_item_selection == aref_addr (menu_items, i)) |
| 1880 | { | 1881 | { |
| 1881 | if (keymaps != 0) | 1882 | if (keymaps) |
| 1882 | { | 1883 | { |
| 1883 | int j; | 1884 | int j; |
| 1884 | 1885 | ||
| @@ -2011,7 +2012,7 @@ static const char * button_names [] = { | |||
| 2011 | 2012 | ||
| 2012 | static Lisp_Object | 2013 | static Lisp_Object |
| 2013 | xdialog_show (FRAME_PTR f, | 2014 | xdialog_show (FRAME_PTR f, |
| 2014 | int keymaps, | 2015 | bool keymaps, |
| 2015 | Lisp_Object title, | 2016 | Lisp_Object title, |
| 2016 | Lisp_Object header, | 2017 | Lisp_Object header, |
| 2017 | const char **error_name) | 2018 | const char **error_name) |
| @@ -2277,7 +2278,7 @@ pop_down_menu (Lisp_Object arg) | |||
| 2277 | 2278 | ||
| 2278 | 2279 | ||
| 2279 | Lisp_Object | 2280 | Lisp_Object |
| 2280 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | 2281 | xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, |
| 2281 | Lisp_Object title, const char **error_name, Time timestamp) | 2282 | Lisp_Object title, const char **error_name, Time timestamp) |
| 2282 | { | 2283 | { |
| 2283 | Window root; | 2284 | Window root; |
| @@ -2528,7 +2529,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | |||
| 2528 | { | 2529 | { |
| 2529 | entry | 2530 | entry |
| 2530 | = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE); | 2531 | = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE); |
| 2531 | if (keymaps != 0) | 2532 | if (keymaps) |
| 2532 | { | 2533 | { |
| 2533 | entry = Fcons (entry, Qnil); | 2534 | entry = Fcons (entry, Qnil); |
| 2534 | if (!NILP (pane_prefix)) | 2535 | if (!NILP (pane_prefix)) |