annotate man/xemacs/picture.texi @ 4981:4aebb0131297

Cleanups/renaming of EXTERNAL_TO_C_STRING and friends -------------------- ChangeLog entries follow: -------------------- modules/ChangeLog addition: 2010-02-05 Ben Wing <ben@xemacs.org> * postgresql/postgresql.c: * postgresql/postgresql.c (CHECK_LIVE_CONNECTION): * postgresql/postgresql.c (Fpq_connectdb): * postgresql/postgresql.c (Fpq_connect_start): * postgresql/postgresql.c (Fpq_lo_import): * postgresql/postgresql.c (Fpq_lo_export): * ldap/eldap.c (Fldap_open): * ldap/eldap.c (Fldap_search_basic): * ldap/eldap.c (Fldap_add): * ldap/eldap.c (Fldap_modify): * ldap/eldap.c (Fldap_delete): * canna/canna_api.c (Fcanna_initialize): * canna/canna_api.c (Fcanna_store_yomi): * canna/canna_api.c (Fcanna_parse): * canna/canna_api.c (Fcanna_henkan_begin): EXTERNAL_TO_C_STRING returns its argument instead of storing it in a parameter, and is renamed to EXTERNAL_TO_ITEXT. Similar things happen to related macros. See entry in src/ChangeLog. More Mule-izing of postgresql.c. Extract out common code between `pq-connectdb' and `pq-connect-start'. Fix places that signal an error string using a formatted string to instead follow the standard and have a fixed reason followed by the particular error message stored as one of the frobs. src/ChangeLog addition: 2010-02-05 Ben Wing <ben@xemacs.org> * console-msw.c (write_string_to_mswindows_debugging_output): * console-msw.c (Fmswindows_message_box): * console-x.c (x_perhaps_init_unseen_key_defaults): * console.c: * database.c (dbm_get): * database.c (dbm_put): * database.c (dbm_remove): * database.c (berkdb_get): * database.c (berkdb_put): * database.c (berkdb_remove): * database.c (Fopen_database): * device-gtk.c (gtk_init_device): * device-msw.c (msprinter_init_device_internal): * device-msw.c (msprinter_default_printer): * device-msw.c (msprinter_init_device): * device-msw.c (sync_printer_with_devmode): * device-msw.c (Fmsprinter_select_settings): * device-x.c (sanity_check_geometry_resource): * device-x.c (Dynarr_add_validified_lisp_string): * device-x.c (x_init_device): * device-x.c (Fx_put_resource): * device-x.c (Fx_valid_keysym_name_p): * device-x.c (Fx_set_font_path): * dialog-msw.c (push_lisp_string_as_unicode): * dialog-msw.c (handle_directory_dialog_box): * dialog-msw.c (handle_file_dialog_box): * dialog-x.c (dbox_descriptor_to_widget_value): * editfns.c (Fformat_time_string): * editfns.c (Fencode_time): * editfns.c (Fset_time_zone_rule): * emacs.c (make_argc_argv): * emacs.c (Fdump_emacs): * emodules.c (emodules_load): * eval.c: * eval.c (maybe_signal_error_1): * event-msw.c (Fdde_alloc_advise_item): * event-msw.c (mswindows_dde_callback): * event-msw.c (mswindows_wnd_proc): * fileio.c (report_error_with_errno): * fileio.c (Fsysnetunam): * fileio.c (Fdo_auto_save): * font-mgr.c (extract_fcapi_string): * font-mgr.c (Ffc_config_app_font_add_file): * font-mgr.c (Ffc_config_app_font_add_dir): * font-mgr.c (Ffc_config_filename): * frame-gtk.c (gtk_set_frame_text_value): * frame-gtk.c (gtk_create_widgets): * frame-msw.c (mswindows_init_frame_1): * frame-msw.c (mswindows_set_title_from_ibyte): * frame-msw.c (msprinter_init_frame_3): * frame-x.c (x_set_frame_text_value): * frame-x.c (x_set_frame_properties): * frame-x.c (start_drag_internal_1): * frame-x.c (x_cde_transfer_callback): * frame-x.c (x_create_widgets): * glyphs-eimage.c (my_jpeg_output_message): * glyphs-eimage.c (jpeg_instantiate): * glyphs-eimage.c (gif_instantiate): * glyphs-eimage.c (png_instantiate): * glyphs-eimage.c (tiff_instantiate): * glyphs-gtk.c (xbm_instantiate_1): * glyphs-gtk.c (gtk_xbm_instantiate): * glyphs-gtk.c (gtk_xpm_instantiate): * glyphs-gtk.c (gtk_xface_instantiate): * glyphs-gtk.c (cursor_font_instantiate): * glyphs-gtk.c (gtk_redisplay_widget): * glyphs-gtk.c (gtk_widget_instantiate_1): * glyphs-gtk.c (gtk_add_tab_item): * glyphs-msw.c (mswindows_xpm_instantiate): * glyphs-msw.c (bmp_instantiate): * glyphs-msw.c (mswindows_resource_instantiate): * glyphs-msw.c (xbm_instantiate_1): * glyphs-msw.c (mswindows_xbm_instantiate): * glyphs-msw.c (mswindows_xface_instantiate): * glyphs-msw.c (mswindows_redisplay_widget): * glyphs-msw.c (mswindows_widget_instantiate): * glyphs-msw.c (add_tree_item): * glyphs-msw.c (add_tab_item): * glyphs-msw.c (mswindows_combo_box_instantiate): * glyphs-msw.c (mswindows_widget_query_string_geometry): * glyphs-x.c (x_locate_pixmap_file): * glyphs-x.c (xbm_instantiate_1): * glyphs-x.c (x_xbm_instantiate): * glyphs-x.c (extract_xpm_color_names): * glyphs-x.c (x_xpm_instantiate): * glyphs-x.c (x_xface_instantiate): * glyphs-x.c (autodetect_instantiate): * glyphs-x.c (safe_XLoadFont): * glyphs-x.c (cursor_font_instantiate): * glyphs-x.c (x_redisplay_widget): * glyphs-x.c (Fchange_subwindow_property): * glyphs-x.c (x_widget_instantiate): * glyphs-x.c (x_tab_control_redisplay): * glyphs.c (pixmap_to_lisp_data): * gui-x.c (menu_separator_style_and_to_external): * gui-x.c (add_accel_and_to_external): * gui-x.c (button_item_to_widget_value): * hpplay.c (player_error_internal): * hpplay.c (play_sound_file): * hpplay.c (play_sound_data): * intl.c (Fset_current_locale): * lisp.h: * menubar-gtk.c (gtk_xemacs_set_accel_keys): * menubar-msw.c (populate_menu_add_item): * menubar-msw.c (populate_or_checksum_helper): * menubar-x.c (menu_item_descriptor_to_widget_value_1): * nt.c (init_user_info): * nt.c (get_long_basename): * nt.c (nt_get_resource): * nt.c (init_mswindows_environment): * nt.c (get_cached_volume_information): * nt.c (mswindows_readdir): * nt.c (read_unc_volume): * nt.c (mswindows_stat): * nt.c (mswindows_getdcwd): * nt.c (mswindows_executable_type): * nt.c (Fmswindows_short_file_name): * ntplay.c (nt_play_sound_file): * objects-gtk.c: * objects-gtk.c (gtk_valid_color_name_p): * objects-gtk.c (gtk_initialize_font_instance): * objects-gtk.c (gtk_font_list): * objects-msw.c (font_enum_callback_2): * objects-msw.c (parse_font_spec): * objects-x.c (x_parse_nearest_color): * objects-x.c (x_valid_color_name_p): * objects-x.c (x_initialize_font_instance): * objects-x.c (x_font_instance_truename): * objects-x.c (x_font_list): * objects-xlike-inc.c (XFUN): * objects-xlike-inc.c (xft_find_charset_font): * process-nt.c (mswindows_report_winsock_error): * process-nt.c (nt_create_process): * process-nt.c (get_internet_address): * process-nt.c (nt_open_network_stream): * process-unix.c: * process-unix.c (allocate_pty): * process-unix.c (get_internet_address): * process-unix.c (unix_canonicalize_host_name): * process-unix.c (unix_open_network_stream): * realpath.c: * select-common.h (lisp_data_to_selection_data): * select-gtk.c (symbol_to_gtk_atom): * select-gtk.c (atom_to_symbol): * select-msw.c (symbol_to_ms_cf): * select-msw.c (mswindows_register_selection_data_type): * select-x.c (symbol_to_x_atom): * select-x.c (x_atom_to_symbol): * select-x.c (hack_motif_clipboard_selection): * select-x.c (Fx_store_cutbuffer_internal): * sound.c (Fplay_sound_file): * sound.c (Fplay_sound): * sound.h (sound_perror): * sysdep.c: * sysdep.c (qxe_allocating_getcwd): * sysdep.c (qxe_execve): * sysdep.c (copy_in_passwd): * sysdep.c (qxe_getpwnam): * sysdep.c (qxe_ctime): * sysdll.c (dll_open): * sysdll.c (dll_function): * sysdll.c (dll_variable): * sysdll.c (search_linked_libs): * sysdll.c (dll_error): * sysfile.h: * sysfile.h (PATHNAME_CONVERT_OUT_TSTR): * sysfile.h (PATHNAME_CONVERT_OUT_UTF_8): * sysfile.h (PATHNAME_CONVERT_OUT): * sysfile.h (LISP_PATHNAME_CONVERT_OUT): * syswindows.h (ITEXT_TO_TSTR): * syswindows.h (LOCAL_FILE_FORMAT_TO_TSTR): * syswindows.h (TSTR_TO_LOCAL_FILE_FORMAT): * syswindows.h (LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN): * syswindows.h (LISP_LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR): * text.h: * text.h (eicpy_ext_len): * text.h (enum new_dfc_src_type): * text.h (EXTERNAL_TO_ITEXT): * text.h (GET_STRERROR): * tooltalk.c (check_status): * tooltalk.c (Fadd_tooltalk_message_arg): * tooltalk.c (Fadd_tooltalk_pattern_attribute): * tooltalk.c (Fadd_tooltalk_pattern_arg): * win32.c (tstr_to_local_file_format): * win32.c (mswindows_lisp_error_1): * win32.c (mswindows_report_process_error): * win32.c (Fmswindows_shell_execute): * win32.c (mswindows_read_link_1): Changes involving external/internal format conversion, mostly code cleanup and renaming. 1. Eliminate the previous macros like LISP_STRING_TO_EXTERNAL that stored its result in a parameter. The new version of LISP_STRING_TO_EXTERNAL returns its result through the return value, same as the previous NEW_LISP_STRING_TO_EXTERNAL. Use the new-style macros throughout the code. 2. Rename C_STRING_TO_EXTERNAL and friends to ITEXT_TO_EXTERNAL, in keeping with overall naming rationalization involving Itext and related types. Macros involved in previous two: EXTERNAL_TO_C_STRING -> EXTERNAL_TO_ITEXT EXTERNAL_TO_C_STRING_MALLOC -> EXTERNAL_TO_ITEXT_MALLOC SIZED_EXTERNAL_TO_C_STRING -> SIZED_EXTERNAL_TO_ITEXT SIZED_EXTERNAL_TO_C_STRING_MALLOC -> SIZED_EXTERNAL_TO_ITEXT_MALLOC C_STRING_TO_EXTERNAL -> ITEXT_TO_EXTERNAL C_STRING_TO_EXTERNAL_MALLOC -> ITEXT_TO_EXTERNAL_MALLOC LISP_STRING_TO_EXTERNAL LISP_STRING_TO_EXTERNAL_MALLOC LISP_STRING_TO_TSTR C_STRING_TO_TSTR -> ITEXT_TO_TSTR TSTR_TO_C_STRING -> TSTR_TO_ITEXT The following four still return their values through parameters, since they have more than one value to return: C_STRING_TO_SIZED_EXTERNAL -> ITEXT_TO_SIZED_EXTERNAL LISP_STRING_TO_SIZED_EXTERNAL C_STRING_TO_SIZED_EXTERNAL_MALLOC -> ITEXT_TO_SIZED_EXTERNAL_MALLOC LISP_STRING_TO_SIZED_EXTERNAL_MALLOC Sometimes additional casts had to be inserted, since the old macros played strange games and completely defeated the type system of the store params. 3. Rewrite many places where direct calls to TO_EXTERNAL_FORMAT occurred with calls to one of the convenience macros listed above, or to make_extstring(). 4. Eliminate SIZED_C_STRING macros (they were hardly used, anyway) and use a direct call to TO_EXTERNAL_FORMAT or TO_INTERNAL_FORMAT. 4. Use LISP_PATHNAME_CONVERT_OUT in many places instead of something like LISP_STRING_TO_EXTERNAL(..., Qfile_name). 5. Eliminate some temporary variables that are no longer necessary now that we return a value rather than storing it into a variable. 6. Some Mule-izing in database.c. 7. Error functions: -- A bit of code cleanup in maybe_signal_error_1. -- Eliminate report_file_type_error; it's just an alias for signal_error_2 with params in a different order. -- Fix some places in the hostname-handling code that directly inserted externally-retrieved error strings into the supposed ASCII "reason" param instead of doing the right thing and sticking text descriptive of what was going on in "reason" and putting the external message in a frob. 8. Use Ascbyte instead of CIbyte in process-unix.c and maybe one or two other places. 9. Some code cleanup in copy_in_passwd() in sysdep.c. 10. Fix a real bug due to accidental variable shadowing in tstr_to_local_file_format() in win32.c.
author Ben Wing <ben@xemacs.org>
date Fri, 05 Feb 2010 11:02:24 -0600
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 @node Picture, Sending Mail, Abbrevs, Top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 @chapter Editing Pictures
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 @cindex pictures
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 @findex edit-picture
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 If you want to create a picture made out of text characters (for example,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 a picture of the division of a register into fields, as a comment in a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 program), use the command @code{edit-picture} to enter Picture mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 In Picture mode, editing is based on the @dfn{quarter-plane} model of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 text. In this model, the text characters lie studded on an area that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 stretches infinitely far to the right and downward. The concept of the end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 of a line does not exist in this model; the most you can say is where the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 last non-blank character on the line is found.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 Of course, Emacs really always considers text as a sequence of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 characters, and lines really do have ends. But in Picture mode most
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 frequently-used keys are rebound to commands that simulate the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 quarter-plane model of text. They do this by inserting spaces or by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 converting tabs to spaces.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 Most of the basic editing commands of Emacs are redefined by Picture mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 to do essentially the same thing but in a quarter-plane way. In addition,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 Picture mode defines various keys starting with the @kbd{C-c} prefix to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 run special picture editing commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 One of these keys, @kbd{C-c C-c}, is pretty important. Often a picture
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 is part of a larger file that is usually edited in some other major mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 @kbd{M-x edit-picture} records the name of the previous major mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 You can then use the @kbd{C-c C-c} command (@code{picture-mode-exit}) to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 restore that mode. @kbd{C-c C-c} also deletes spaces from the ends of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 lines, unless you give it a numeric argument.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 The commands used in Picture mode all work in other modes (provided the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 @file{picture} library is loaded), but are only bound to keys in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 Picture mode. Note that the descriptions below talk of moving ``one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 column'' and so on, but all the picture mode commands handle numeric
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 arguments as their normal equivalents do.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 @vindex picture-mode-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 Turning on Picture mode calls the value of the variable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 @code{picture-mode-hook} as a function, with no arguments, if that value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 exists and is non-@code{nil}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 * Basic Picture:: Basic concepts and simple commands of Picture Mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 * Insert in Picture:: Controlling direction of cursor motion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 after "self-inserting" characters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 * Tabs in Picture:: Various features for tab stops and indentation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 * Rectangles in Picture:: Clearing and superimposing rectangles.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 @node Basic Picture, Insert in Picture, Picture, Picture
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 @section Basic Editing in Picture Mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 @findex picture-forward-column
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 @findex picture-backward-column
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 @findex picture-move-down
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 @findex picture-move-up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 Most keys do the same thing in Picture mode that they usually do, but do
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 it in a quarter-plane style. For example, @kbd{C-f} is rebound to run
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 @code{picture-forward-column}, which moves point one column to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 the right, by inserting a space if necessary, so that the actual end of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 line makes no difference. @kbd{C-b} is rebound to run
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 @code{picture-backward-column}, which always moves point left one column,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 converting a tab to multiple spaces if necessary. @kbd{C-n} and @kbd{C-p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 are rebound to run @code{picture-move-down} and @code{picture-move-up},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 which can either insert spaces or convert tabs as necessary to make sure
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 that point stays in exactly the same column. @kbd{C-e} runs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 @code{picture-end-of-line}, which moves to after the last non-blank
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 character on the line. There was no need to change @kbd{C-a}, as the choice
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 of screen model does not affect beginnings of lines.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 @findex picture-newline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 Insertion of text is adapted to the quarter-plane screen model through
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 the use of Overwrite mode (@pxref{Minor Modes}). Self-inserting characters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 replace existing text, column by column, rather than pushing existing text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 to the right. @key{RET} runs @code{picture-newline}, which just moves to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 the beginning of the following line so that new text will replace that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 @findex picture-backward-clear-column
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 @findex picture-clear-column
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 @findex picture-clear-line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 Text is erased instead of deleted and killed. @key{DEL}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (@code{picture-backward-clear-column}) replaces the preceding character
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 with a space rather than removing it. @kbd{C-d}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (@code{picture-clear-column}) does the same in a forward direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 @kbd{C-k} (@code{picture-clear-line}) really kills the contents of lines,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 but never removes the newlines from a buffer.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 @findex picture-open-line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 To do actual insertion, you must use special commands. @kbd{C-o}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (@code{picture-open-line}) creates a blank line, but does so after
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 the current line; it never splits a line. @kbd{C-M-o}, @code{split-line},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 makes sense in Picture mode, so it remains unchanged. @key{LFD}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (@code{picture-duplicate-line}) inserts another line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 with the same contents below the current line.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 @kindex C-c C-d (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 @findex delete-char
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 To actually delete parts of the picture, use @kbd{C-w}, or with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 @kbd{C-c C-d} (which is defined as @code{delete-char}, as @kbd{C-d} is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 in other modes), or with one of the picture rectangle commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (@pxref{Rectangles in Picture}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 @node Insert in Picture, Tabs in Picture, Basic Picture, Picture
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 @section Controlling Motion After Insert
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 @findex picture-movement-up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 @findex picture-movement-down
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 @findex picture-movement-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 @findex picture-movement-right
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 @findex picture-movement-nw
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 @findex picture-movement-ne
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 @findex picture-movement-sw
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 @findex picture-movement-se
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 @kindex C-c < (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 @kindex C-c > (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 @kindex C-c ^ (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 @kindex C-c . (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 @kindex C-c ` (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 @kindex C-c ' (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 @kindex C-c / (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 @kindex C-c \ (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 Since ``self-inserting'' characters just overwrite and move point in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 Picture mode, there is no essential restriction on how point should be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 moved. Normally point moves right, but you can specify any of the eight
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 orthogonal or diagonal directions for motion after a ``self-inserting''
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 character. This is useful for drawing lines in the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 @item C-c <
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 Move left after insertion (@code{picture-movement-left}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 @item C-c >
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 Move right after insertion (@code{picture-movement-right}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 @item C-c ^
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 Move up after insertion (@code{picture-movement-up}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 @item C-c .
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 Move down after insertion (@code{picture-movement-down}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 @item C-c `
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 Move up and left (``northwest'') after insertion @*(@code{picture-movement-nw}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 @item C-c '
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 Move up and right (``northeast'') after insertion @*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (@code{picture-movement-ne}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 @item C-c /
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 Move down and left (``southwest'') after insertion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 @*(@code{picture-movement-sw}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 @item C-c \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 Move down and right (``southeast'') after insertion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 @*(@code{picture-movement-se}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 @kindex C-c C-f (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 @kindex C-c C-b (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 @findex picture-motion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 @findex picture-motion-reverse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 Two motion commands move based on the current Picture insertion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 same direction as motion after ``insertion'' currently does, while @kbd{C-c
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 @node Tabs in Picture, Rectangles in Picture, Insert in Picture, Picture
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 @section Picture Mode Tabs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 @kindex M-TAB
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 @findex picture-tab-search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 @vindex picture-tab-chars
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 Two kinds of tab-like action are provided in Picture mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 Context-based tabbing is done with @kbd{M-@key{TAB}}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (@code{picture-tab-search}). With no argument, it moves to a point
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 underneath the next ``interesting'' character that follows whitespace in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 the previous non-blank line. ``Next'' here means ``appearing at a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 horizontal position greater than the one point starts out at''. With an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 argument, as in @kbd{C-u M-@key{TAB}}, the command moves to the next such
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 interesting character in the current line. @kbd{M-@key{TAB}} does not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 change the text; it only moves point. ``Interesting'' characters are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 defined by the variable @code{picture-tab-chars}, which contains a string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 of characters considered interesting. Its default value is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 @code{"!-~"}.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 @findex picture-tab
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 @key{TAB} itself runs @code{picture-tab}, which operates based on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 current tab stop settings; it is the Picture mode equivalent of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 @code{tab-to-tab-stop}. Without arguments it just moves point, but with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 a numeric argument it clears the text that it moves over.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 @kindex C-c TAB (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 @findex picture-set-tab-stops
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 The context-based and tab-stop-based forms of tabbing are brought
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 would consider significant in the current line. If you use this command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 with @key{TAB}, you can get the effect of context-based tabbing. But
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 @kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 @node Rectangles in Picture,, Tabs in Picture, Picture
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 @section Picture Mode Rectangle Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 @cindex rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 Picture mode defines commands for working on rectangular pieces of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 text in ways that fit with the quarter-plane model. The standard rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 commands may also be useful (@pxref{Rectangles}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 @item C-c C-k
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 Clear out the region-rectangle (@code{picture-clear-rectangle}). With
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 argument, kill it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 @item C-c C-w @var{r}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 Similar but save rectangle contents in register @var{r} first
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 (@code{picture-clear-rectangle-to-register}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 @item C-c C-y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 Copy last killed rectangle into the buffer by overwriting, with upper
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 left corner at point (@code{picture-yank-rectangle}). With argument,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 insert instead.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 @item C-c C-x @var{r}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 Similar, but use the rectangle in register @var{r}@*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (@code{picture-yank-rectangle-from-register}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 @kindex C-c C-k (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 @kindex C-c C-w (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 @findex picture-clear-rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 @findex picture-clear-rectangle-to-register
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 The picture rectangle commands @kbd{C-c C-k}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 (@code{picture-clear-rectangle}) and @kbd{C-c C-w}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (@code{picture-clear-rectangle-to-register}) differ from the standard
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 rectangle commands in that they normally clear the rectangle instead of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 mode.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 However, deletion of rectangles can be useful in Picture mode, so these
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 commands delete the rectangle if given a numeric argument.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 @kindex C-c C-y (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 @kindex C-c C-x (Picture mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 @findex picture-yank-rectangle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 @findex picture-yank-rectangle-from-register
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 The Picture mode commands for yanking rectangles differ from the standard
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 ones in overwriting instead of inserting. This is the same way that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 Picture mode insertion of other text is different from other modes.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts (by overwriting) the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 rectangle that was most recently killed, while @kbd{C-c C-x}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 (@code{picture-yank-rectangle-from-register}) does for the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 rectangle found in a specified register.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 Since most region commands in Picture mode operate on rectangles, when you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 select a region of text with the mouse in Picture mode, it is highlighted
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 as a rectangle.