GNU Emacs Manual - Editing Pictures
11/3/2015 GNU Emacs Manual - Editing Picturesdata:text/html;charset=utf-8,%3Cp%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20font-family%3A%20'Times%20New%20Roman'%3B%2 1/1To edit a picture made out of text characters (for example, a picture of the division of a register into fields, as acomment in a program), use the command M-x edit-picture to enter Picture mode.In Picture mode, editing is based on the quarter-plane model of text, according to which the text characters liestudded on an area that stretches infinitely far to the right and downward. The concept of the end of a line doesnot exist in this model; the most you can say is where the last nonblank character on the line is found.Of course, Emacs really always considers text as a sequence of characters, and lines really do have ends. ButPicture mode replaces the most frequently-used commands with variants that simulate the quarter-plane model oftext. They do this by inserting spaces or by converting tabs to spaces.Most of the basic editing commands of Emacs are redefined by Picture mode to do essentially the same thing butin a quarter-plane way. In addition, Picture mode defines various keys starting with the C-c prefix to run specialpicture editing commands.One of these keys, C-c C-c, is pretty important. Often a picture is part of a larger file that is usually edited insome other major mode. M-x edit-picture records the name of the previous major mode so you can usethe C-c C-c command (picture-mode-exit) later to go back to that mode. C-c C-c also deletes spacesfrom the ends of lines, unless given a numeric argument.The special commands of Picture mode all work in other modes (provided the p`icture' library is loaded), butare not bound to keys except in Picture mode. The descriptions below talk of moving "one column" and so on,but all the picture mode commands handle numeric arguments as their normal equivalents do.Turning on Picture mode runs the hook picture-mode-hook (see section Hooks).