aboutsummaryrefslogtreecommitdiffstats
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorGerd Moellmann2001-10-14 10:36:32 +0000
committerGerd Moellmann2001-10-14 10:36:32 +0000
commit228299fa7111d1f2da3c2fa741bb27d7dc9c66af (patch)
tree562b09ff191ebd71d426b5b2e33df3f7dcac4977 /src/xmenu.c
parent37f6b5b6d246d36afcd658c8bdde1791eb790f63 (diff)
downloademacs-228299fa7111d1f2da3c2fa741bb27d7dc9c66af.tar.gz
emacs-228299fa7111d1f2da3c2fa741bb27d7dc9c66af.zip
Put doc strings in comments.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c105
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
657DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, 658DEFUN ("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.
659POSITION is a position specification. This is either a mouse button event\n\ 660POSITION is a position specification. This is either a mouse button event
660or a list ((XOFFSET YOFFSET) WINDOW)\n\ 661or a list ((XOFFSET YOFFSET) WINDOW)
661where XOFFSET and YOFFSET are positions in pixels from the top left\n\ 662where XOFFSET and YOFFSET are positions in pixels from the top left
662corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.)\n\ 663corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.)
663This controls the position of the center of the first line\n\ 664This controls the position of the center of the first line
664in the first pane of the menu, not the top left of the menu as a whole.\n\ 665in the first pane of the menu, not the top left of the menu as a whole.
665If POSITION is t, it means to use the current mouse position.\n\ 666If POSITION is t, it means to use the current mouse position.
666\n\ 667
667MENU is a specifier for a menu. For the simplest case, MENU is a keymap.\n\ 668MENU is a specifier for a menu. For the simplest case, MENU is a keymap.
668The menu items come from key bindings that have a menu string as well as\n\ 669The menu items come from key bindings that have a menu string as well as
669a definition; actually, the \"definition\" in such a key binding looks like\n\ 670a 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
671the keymap as a top-level element.\n\n\ 672the keymap as a top-level element.
672If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.\n\ 673
673Otherwise, REAL-DEFINITION should be a valid key binding definition.\n\ 674If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.
674\n\ 675Otherwise, REAL-DEFINITION should be a valid key binding definition.
675You can also use a list of keymaps as MENU.\n\ 676
676 Then each keymap makes a separate pane.\n\ 677You can also use a list of keymaps as MENU.
677When MENU is a keymap or a list of keymaps, the return value\n\ 678 Then each keymap makes a separate pane.
678is a list of events.\n\n\ 679When MENU is a keymap or a list of keymaps, the return value
679\n\ 680is a list of events.
680Alternatively, you can specify a menu of multiple panes\n\ 681
681 with a list of the form (TITLE PANE1 PANE2...),\n\ 682Alternatively, you can specify a menu of multiple panes
682where each pane is a list of form (TITLE ITEM1 ITEM2...).\n\ 683 with a list of the form (TITLE PANE1 PANE2...),
683Each ITEM is normally a cons cell (STRING . VALUE);\n\ 684where each pane is a list of form (TITLE ITEM1 ITEM2...).
684but a string can appear as an item--that makes a nonselectable line\n\ 685Each ITEM is normally a cons cell (STRING . VALUE);
685in the menu.\n\ 686but a string can appear as an item--that makes a nonselectable line
686With this form of menu, the return value is VALUE from the chosen item.\n\ 687in the menu.
687\n\ 688With this form of menu, the return value is VALUE from the chosen item.
688If POSITION is nil, don't display the menu at all, just precalculate the\n\ 689
689cached information about equivalent key sequences.") 690If POSITION is nil, don't display the menu at all, just precalculate the
690 (position, menu) 691cached 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
881DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0, 883DEFUN ("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.
883POSITION specifies which frame to use.\n\ 885POSITION specifies which frame to use.
884This is normally a mouse button event or a window or frame.\n\ 886This is normally a mouse button event or a window or frame.
885If POSITION is t, it means to use the frame the mouse is on.\n\ 887If POSITION is t, it means to use the frame the mouse is on.
886The dialog box appears in the middle of the specified frame.\n\ 888The dialog box appears in the middle of the specified frame.
887\n\ 889
888CONTENTS specifies the alternatives to display in the dialog box.\n\ 890CONTENTS specifies the alternatives to display in the dialog box.
889It is a list of the form (TITLE ITEM1 ITEM2...).\n\ 891It is a list of the form (TITLE ITEM1 ITEM2...).
890Each ITEM is a cons cell (STRING . VALUE).\n\ 892Each ITEM is a cons cell (STRING . VALUE).
891The return value is VALUE from the chosen item.\n\n\ 893The return value is VALUE from the chosen item.
892An ITEM may also be just a string--that makes a nonselectable item.\n\ 894
893An ITEM may also be nil--that means to put all preceding items\n\ 895An ITEM may also be just a string--that makes a nonselectable item.
894on the left of the dialog box and all following items on the right.\n\ 896An ITEM may also be nil--that means to put all preceding items
895\(By default, approximately half appear on each side.)") 897on 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.
2851The enable predicate for a menu command should check this variable."); 2854The 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