diff options
| author | Gerd Moellmann | 2001-10-14 10:36:32 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-10-14 10:36:32 +0000 |
| commit | 228299fa7111d1f2da3c2fa741bb27d7dc9c66af (patch) | |
| tree | 562b09ff191ebd71d426b5b2e33df3f7dcac4977 /src/xmenu.c | |
| parent | 37f6b5b6d246d36afcd658c8bdde1791eb790f63 (diff) | |
| download | emacs-228299fa7111d1f2da3c2fa741bb27d7dc9c66af.tar.gz emacs-228299fa7111d1f2da3c2fa741bb27d7dc9c66af.zip | |
Put doc strings in comments.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 105 |
1 files changed, 54 insertions, 51 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index e12099becf3..bf7bdbfd34e 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 37 | #include <signal.h> | 37 | #include <signal.h> |
| 38 | 38 | ||
| 39 | #include <stdio.h> | 39 | #include <stdio.h> |
| 40 | #define DOC_STRINGS_IN_COMMENTS | ||
| 40 | #include "lisp.h" | 41 | #include "lisp.h" |
| 41 | #include "termhooks.h" | 42 | #include "termhooks.h" |
| 42 | #include "keyboard.h" | 43 | #include "keyboard.h" |
| @@ -655,39 +656,40 @@ list_of_items (pane) | |||
| 655 | } | 656 | } |
| 656 | 657 | ||
| 657 | DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, | 658 | DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, |
| 658 | "Pop up a deck-of-cards menu and return user's selection.\n\ | 659 | /* Pop up a deck-of-cards menu and return user's selection. |
| 659 | POSITION is a position specification. This is either a mouse button event\n\ | 660 | POSITION is a position specification. This is either a mouse button event |
| 660 | or a list ((XOFFSET YOFFSET) WINDOW)\n\ | 661 | or a list ((XOFFSET YOFFSET) WINDOW) |
| 661 | where XOFFSET and YOFFSET are positions in pixels from the top left\n\ | 662 | where XOFFSET and YOFFSET are positions in pixels from the top left |
| 662 | corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.)\n\ | 663 | corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.) |
| 663 | This controls the position of the center of the first line\n\ | 664 | This controls the position of the center of the first line |
| 664 | in the first pane of the menu, not the top left of the menu as a whole.\n\ | 665 | in the first pane of the menu, not the top left of the menu as a whole. |
| 665 | If POSITION is t, it means to use the current mouse position.\n\ | 666 | If POSITION is t, it means to use the current mouse position. |
| 666 | \n\ | 667 | |
| 667 | MENU is a specifier for a menu. For the simplest case, MENU is a keymap.\n\ | 668 | MENU is a specifier for a menu. For the simplest case, MENU is a keymap. |
| 668 | The menu items come from key bindings that have a menu string as well as\n\ | 669 | The menu items come from key bindings that have a menu string as well as |
| 669 | a definition; actually, the \"definition\" in such a key binding looks like\n\ | 670 | a definition; actually, the "definition" in such a key binding looks like |
| 670 | \(STRING . REAL-DEFINITION). To give the menu a title, put a string into\n\ | 671 | \(STRING . REAL-DEFINITION). To give the menu a title, put a string into |
| 671 | the keymap as a top-level element.\n\n\ | 672 | the keymap as a top-level element. |
| 672 | If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.\n\ | 673 | |
| 673 | Otherwise, REAL-DEFINITION should be a valid key binding definition.\n\ | 674 | If REAL-DEFINITION is nil, that puts a nonselectable string in the menu. |
| 674 | \n\ | 675 | Otherwise, REAL-DEFINITION should be a valid key binding definition. |
| 675 | You can also use a list of keymaps as MENU.\n\ | 676 | |
| 676 | Then each keymap makes a separate pane.\n\ | 677 | You can also use a list of keymaps as MENU. |
| 677 | When MENU is a keymap or a list of keymaps, the return value\n\ | 678 | Then each keymap makes a separate pane. |
| 678 | is a list of events.\n\n\ | 679 | When MENU is a keymap or a list of keymaps, the return value |
| 679 | \n\ | 680 | is a list of events. |
| 680 | Alternatively, you can specify a menu of multiple panes\n\ | 681 | |
| 681 | with a list of the form (TITLE PANE1 PANE2...),\n\ | 682 | Alternatively, you can specify a menu of multiple panes |
| 682 | where each pane is a list of form (TITLE ITEM1 ITEM2...).\n\ | 683 | with a list of the form (TITLE PANE1 PANE2...), |
| 683 | Each ITEM is normally a cons cell (STRING . VALUE);\n\ | 684 | where each pane is a list of form (TITLE ITEM1 ITEM2...). |
| 684 | but a string can appear as an item--that makes a nonselectable line\n\ | 685 | Each ITEM is normally a cons cell (STRING . VALUE); |
| 685 | in the menu.\n\ | 686 | but a string can appear as an item--that makes a nonselectable line |
| 686 | With this form of menu, the return value is VALUE from the chosen item.\n\ | 687 | in the menu. |
| 687 | \n\ | 688 | With this form of menu, the return value is VALUE from the chosen item. |
| 688 | If POSITION is nil, don't display the menu at all, just precalculate the\n\ | 689 | |
| 689 | cached information about equivalent key sequences.") | 690 | If POSITION is nil, don't display the menu at all, just precalculate the |
| 690 | (position, menu) | 691 | cached information about equivalent key sequences. */ |
| 692 | (position, menu)) | ||
| 691 | Lisp_Object position, menu; | 693 | Lisp_Object position, menu; |
| 692 | { | 694 | { |
| 693 | Lisp_Object keymap, tem; | 695 | Lisp_Object keymap, tem; |
| @@ -879,21 +881,22 @@ cached information about equivalent key sequences.") | |||
| 879 | #ifdef HAVE_MENUS | 881 | #ifdef HAVE_MENUS |
| 880 | 882 | ||
| 881 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0, | 883 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0, |
| 882 | "Pop up a dialog box and return user's selection.\n\ | 884 | /* Pop up a dialog box and return user's selection. |
| 883 | POSITION specifies which frame to use.\n\ | 885 | POSITION specifies which frame to use. |
| 884 | This is normally a mouse button event or a window or frame.\n\ | 886 | This is normally a mouse button event or a window or frame. |
| 885 | If POSITION is t, it means to use the frame the mouse is on.\n\ | 887 | If POSITION is t, it means to use the frame the mouse is on. |
| 886 | The dialog box appears in the middle of the specified frame.\n\ | 888 | The dialog box appears in the middle of the specified frame. |
| 887 | \n\ | 889 | |
| 888 | CONTENTS specifies the alternatives to display in the dialog box.\n\ | 890 | CONTENTS specifies the alternatives to display in the dialog box. |
| 889 | It is a list of the form (TITLE ITEM1 ITEM2...).\n\ | 891 | It is a list of the form (TITLE ITEM1 ITEM2...). |
| 890 | Each ITEM is a cons cell (STRING . VALUE).\n\ | 892 | Each ITEM is a cons cell (STRING . VALUE). |
| 891 | The return value is VALUE from the chosen item.\n\n\ | 893 | The return value is VALUE from the chosen item. |
| 892 | An ITEM may also be just a string--that makes a nonselectable item.\n\ | 894 | |
| 893 | An ITEM may also be nil--that means to put all preceding items\n\ | 895 | An ITEM may also be just a string--that makes a nonselectable item. |
| 894 | on the left of the dialog box and all following items on the right.\n\ | 896 | An ITEM may also be nil--that means to put all preceding items |
| 895 | \(By default, approximately half appear on each side.)") | 897 | on the left of the dialog box and all following items on the right. |
| 896 | (position, contents) | 898 | \(By default, approximately half appear on each side.) */ |
| 899 | (position, contents)) | ||
| 897 | Lisp_Object position, contents; | 900 | Lisp_Object position, contents; |
| 898 | { | 901 | { |
| 899 | struct frame * f = NULL; | 902 | struct frame * f = NULL; |
| @@ -2846,9 +2849,9 @@ syms_of_xmenu () | |||
| 2846 | Qdebug_on_next_call = intern ("debug-on-next-call"); | 2849 | Qdebug_on_next_call = intern ("debug-on-next-call"); |
| 2847 | staticpro (&Qdebug_on_next_call); | 2850 | staticpro (&Qdebug_on_next_call); |
| 2848 | 2851 | ||
| 2849 | DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame, | 2852 | DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame |
| 2850 | "Frame for which we are updating a menu.\n\ | 2853 | /* Frame for which we are updating a menu. |
| 2851 | The enable predicate for a menu command should check this variable."); | 2854 | The enable predicate for a menu command should check this variable. */); |
| 2852 | Vmenu_updating_frame = Qnil; | 2855 | Vmenu_updating_frame = Qnil; |
| 2853 | 2856 | ||
| 2854 | #ifdef USE_X_TOOLKIT | 2857 | #ifdef USE_X_TOOLKIT |