view man/m-x.texi @ 80392:80c2bc6163c3

Replace MenuHandle and GetMenuHandle with MenuRef and GetMenuRef, respectively. Replace WindowPtr with WindowRef. Replace ControlHandle with ControlRef. (USE_CARBON_EVENTS): Remove. Use TARGET_API_MAC_CARBON instead. [MAC_OS8] (do_get_menus): Rename variable `menu_handle' to `menu'. (mac_begin_cg_clip): New arg F. Call SetPortWindowPort. All callers changed so as not to call SetPortWindowPort. (mac_begin_cg_clip) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw. (mac_draw_image_string_atsui) [USE_ATSUI]: New function created from mac_draw_string_common. (mac_draw_image_string_qd): Likewise. (mac_draw_string_common): Use them. Add INLINE. (XTmouse_position, x_scroll_bar_report_motion) [TARGET_API_MAC_CARBON]: Use FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y, and GetGlobalMouse. (x_set_mouse_pixel_position) [MAC_OSX]: Use FRAME_OUTER_TO_INNER_DIFF_X and FRAME_OUTER_TO_INNER_DIFF_Y. [TARGET_API_MAC_CARBON] (mac_handle_mouse_event): Likewise. [USE_MAC_TSM] (mac_handle_text_input_event): Likewise. (x_make_frame_visible) [TARGET_API_MAC_CARBON]: Move code for repositioning window to mac_handle_window_event. (x_make_frame_invisible) [TARGET_API_MAC_CARBON]: Move code for saving window location to mac_handle_window_event [USE_MAC_FONT_PANEL] (mac_show_hide_font_panel): Install handler here. (install_menu_target_item_handler): Remove argument in extern. [TARGET_API_MAC_CARBON] (mac_event_to_emacs_modifiers): Also accept command events. (do_keystroke): New function created from XTread_socket. (init_command_handler): Remove functions. [TARGET_API_MAC_CARBON] (mac_handle_window_event): Reposition window and save window location by kEventWindowShowing and kEventWindowHiding handlers here. Don't call next handler for window state change and focus events. (mac_handle_keyboard_event) [TARGET_API_MAC_CARBON]: New function. (install_window_handler) [TARGET_API_MAC_CARBON]: Register handlers for kEventWindowShowing and kEventWindowHiding events. Move installation of mouse, font, text input and menu target item handlers to install_application_handler. (install_application_handler) [TARGET_API_MAC_CARBON]: New function. (mac_handle_cg_display_reconfig) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: New function. (init_dm_notification_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: Register it. (XTread_socket) [TARGET_API_MAC_CARBON]: Consolidate SendEventToEventTarget calls. Use FRAME_OUTER_TO_INNER_DIFF_X and FRAME_OUTER_TO_INNER_DIFF_Y. Move keyboard handler to mac_handle_keyboard_event. (XTread_socket) [!TARGET_API_MAC_CARBON]: Use do_keystroke. (mac_initialize) [TARGET_API_MAC_CARBON]: Don't call init_command_handler. Call install_application_handler. (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe background to scroll bar gap. (x_scroll_bar_create) [MAC_OSX]: Set bar->fringe_extended_p. (XTset_vertical_scroll_bar) [MAC_OSX]: Put leftmost/rightmost scroll bars on frame edge. Check fringe background extension. Don't clear extended fringe background area. (TOOLBAR_IDENTIFIER, TOOLBAR_ICON_ITEM_IDENTIFIER) (TOOLBAR_ITEM_COMMAND_ID_OFFSET, TOOLBAR_ITEM_COMMAND_ID_P) (TOOLBAR_ITEM_COMMAND_ID_VALUE, TOOLBAR_ITEM_MAKE_COMMAND_ID): [USE_MAC_TOOLBAR]: New macros. (mac_move_window_with_gravity, mac_get_window_origin_with_gravity) (mac_handle_toolbar_event, mac_image_spec_to_cg_image) (mac_create_frame_tool_bar, update_frame_tool_bar, free_frame_tool_bar) (mac_tool_bar_note_mouse_movement, mac_handle_toolbar_command_event) [USE_MAC_TOOLBAR]: New functions. (mac_handle_window_event) [USE_MAC_TOOLBAR]: Reposition window manually if previous repositioning has failed. (mac_handle_keyboard_event): Use precomputed event kind. (XTread_socket) [USE_MAC_TOOLBAR]: Handle click in structure region as tool bar item click. Handle mouse movement over tool bar items. (frame_highlight, frame_unhighlight): Don't call ActivateControl/DeactivateControl here. [USE_MAC_TOOLBAR] (free_frame_tool_bar): Suppress animation when frame-notice-user-settings is non-nil. [USE_MAC_FONT_PANEL] (mac_handle_font_event): Also record parameter for kEventParamFMFontStyle. [TARGET_API_MAC_CARBON] (mac_handle_keyboard_event): Don't check mac_pass_command_to_system and mac_pass_control_to_system here. (XTread_socket): Call ActivateControl/DeactivateControl here. (XTread_socket) [TARGET_API_MAC_CARBON]: Check mac_pass_command_to_system and mac_pass_control_to_system here. [TARGET_API_MAC_CARBON] (mac_handle_window_event): Don't use invisible frame as parent window for repositioning.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Sat, 29 Mar 2008 00:46:51 +0000
parents 02b9a9aa5b0c
children
line wrap: on
line source

@c This is part of the Emacs manual.
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2001, 2002,
@c   2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node M-x, Help, Minibuffer, Top
@chapter Running Commands by Name

  Every Emacs command has a name that you can use to run it.  For
convenience, many commands also have key bindings.  You can run those
commands by typing the keys, or run them by name.  Most Emacs commands
have no key bindings, so the only way to run them is by name.
(@xref{Key Bindings}, for how to set up key bindings.)

  By convention, a command name consists of one or more words,
separated by hyphens; for example, @code{auto-fill-mode} or
@code{manual-entry}.  Command names mostly use complete English words
to make them easier to remember.

@kindex M-x
  To run a command by name, start with @kbd{M-x}, type the command
name, then terminate it with @key{RET}.  @kbd{M-x} uses the minibuffer
to read the command name.  The string @samp{M-x} appears at the
beginning of the minibuffer as a @dfn{prompt} to remind you to enter a
command name to be run.  @key{RET} exits the minibuffer and runs the
command.  @xref{Minibuffer}, for more information on the minibuffer.

  You can use completion to enter the command name.  For example,
to invoke the command @code{forward-char}, you can type

@example
M-x forward-char @key{RET}
@end example

@noindent
or

@example
M-x forw @key{TAB} c @key{RET}
@end example

@noindent
Note that @code{forward-char} is the same command that you invoke with
the key @kbd{C-f}.  The existence of a key binding does not stop you
from running the command by name.

  To cancel the @kbd{M-x} and not run a command, type @kbd{C-g} instead
of entering the command name.  This takes you back to command level.

  To pass a numeric argument to the command you are invoking with
@kbd{M-x}, specify the numeric argument before @kbd{M-x}.  The
argument value appears in the prompt while the command name is being
read, and finally @kbd{M-x} passes the argument to that command.

@vindex suggest-key-bindings
  When the command you run with @kbd{M-x} has a key binding, Emacs
mentions this in the echo area after running the command.  For
example, if you type @kbd{M-x forward-word}, the message says that you
can run the same command by typing @kbd{M-f}.  You can turn off these
messages by setting the variable @code{suggest-key-bindings} to
@code{nil}.

  In this manual, when we speak of running a command by name, we often
omit the @key{RET} that terminates the name.  Thus we might say
@kbd{M-x auto-fill-mode} rather than @kbd{M-x auto-fill-mode
@key{RET}}.  We mention the @key{RET} only for emphasis, such as when
the command is followed by arguments.

@findex execute-extended-command
  @kbd{M-x} works by running the command
@code{execute-extended-command}, which is responsible for reading the
name of another command and invoking it.

@ignore
   arch-tag: b67bff53-9628-4666-b94e-eda972a7ba56
@end ignore