home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / edit / jade / man / jade.info-7 (.txt) < prev    next >
GNU Info File  |  1994-10-16  |  50KB  |  981 lines

  1. This is Info file jade.info, produced by Makeinfo-1.55 from the input
  2. file jade.texi.
  3. START-INFO-DIR-ENTRY
  4. * Jade: (jade).            An editor for X11 and AmigaDOS
  5. END-INFO-DIR-ENTRY
  6.    This is Edition 1.3, last updated 7 October 1994, of `The Jade
  7. Manual', for Jade, Version 3.2.
  8.    Jade is a text editor for X11 (on Unix) and the Amiga.
  9.    Copyright 1993, 1994 John Harper.
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.    Permission is granted to copy and distribute modified versions of
  14. this manual under the conditions for verbatim copying, provided that
  15. the entire resulting derived work is distributed under the terms of a
  16. permission notice identical to this one.
  17. File: jade.info,  Node: The Current Buffer,  Prev: The Buffer List,  Up: Buffers
  18. The Current Buffer
  19. ------------------
  20.    The "current buffer" is the buffer being displayed in the current
  21. window (*note Windows::.), all functions which take an optional BUFFER
  22. argument will operate on the current buffer if this argument is
  23. undefined.  Similarly if a WINDOW argument to a function is left
  24. undefined the current window will be used.
  25.  - Function: current-buffer &optional WINDOW
  26.      Returns the buffer being displayed by the window WINDOW (or the
  27.      current window).
  28.           (current-buffer)
  29.               => #<buffer programmer.texi>
  30.    The `set-current-buffer' function sets the current buffer of a
  31. window.  If, when the window is next redisplayed (i.e. after each
  32. command), the current buffer is different to what it was at the last
  33. redisplay the new buffer will be displayed in the window.
  34.  - Function: set-current-buffer BUFFER &optional WINDOW
  35.      Sets the buffer that the window is displaying.
  36.      Usually a window's current buffer will be the buffer which is at
  37.      the head of the window's `buffer-list'. The function `goto-buffer'
  38.      can be used to set both of these at once.
  39.  - Function: goto-buffer BUFFER
  40.      Set the current buffer to BUFFER which is either a buffer or a
  41.      string naming a buffer. The selected buffer is moved to the head
  42.      of the window's `buffer-list'.
  43.      If BUFFER is a string and no buffer exists of that name a new one
  44.      is created.
  45.    Often you will want to temporarily switch to a different current
  46. buffer, that is what the `with-buffer' special form is for.
  47.  - Special Form: with-buffer BUFFER FORMS...
  48.      Temporarily sets the current buffer to the value of evaluating
  49.      BUFFER, then evaluates the FORMS in sequence. The old value of the
  50.      current buffer is reinstated and the structure returns the value
  51.      of the last of the FORMS to be evaluated.
  52.      If the implicit progn evaluating FORMS is exited abnormally the
  53.      old value of the current buffer will still be reinstated.
  54.      If the window is redisplayed while the FORMS are being evaluated
  55.      (i.e.  in a recursive edit) the new buffer will be drawn into the
  56.      window.
  57.           (with-buffer new-buffer         ;Enter a recursive edit in
  58.             (recursive-edit))             ; the buffer `new-buffer'.
  59. File: jade.info,  Node: Windows,  Next: Positions,  Prev: Buffers,  Up: Programming Jade
  60. Windows
  61. =======
  62.    A "window" is a Lisp object representing a window (a rectangular
  63. section of the display) open in the windowing-system you are running
  64. Jade in.
  65.    Windows have two main functions, firstly to provide a means of seeing
  66. the contents of a buffer and secondly to receive input events. For more
  67. details about event handling see *Note Event Loop::.
  68.    A window *always* displays a buffer and there is *always* at least
  69. one window open. The editor remembers which of the open windows is the
  70. "current window", this is normally the window it last received an input
  71. event from, though it can be set by programs.
  72.    For some basic details about using windows see *Note Using Windows::.
  73.  - Function: windowp OBJECT
  74.      This function returns `t' if its argument is a window.
  75.  - Variable: window-list
  76.      This variable's value is a list of all the currently open windows.
  77.      The order of the elements in the list is insignificant.
  78.           window-list
  79.               => (#<window 20971528 *Info*> #<window 20971524 *jade*>)
  80. * Menu:
  81. * Opening Windows::             Creating new windows
  82. * Closing Windows::             Deleting windows
  83. * Iconifying Windows::          Temporarily removing windows
  84. * Displaying Messages::         Messages to the user
  85. * The Current Window::          The activated window, used by default
  86. * Window Font::                 Each window may use a different font
  87. * Window Information::          Details of a window's current state
  88. * Rendering::                   How buffers are drawn in windows
  89. * Block Marking::               Highlighting a region of a window
  90. File: jade.info,  Node: Opening Windows,  Next: Closing Windows,  Up: Windows
  91. Opening Windows
  92. ---------------
  93.  - Function: open-window &optional BUFFER X Y WIDTH HEIGHT
  94.      Opens a new window and returns it. If BUFFER is defined it is the
  95.      buffer to display in the new window, otherwise the current buffer
  96.      is displayed.
  97.      The X and Y arguments are the pixel coordinates of the new window's
  98.      top left corner in the display. The WIDTH and HEIGHT arguments are
  99.      the size of the window in columns and rows of characters
  100.      respectively.
  101.      What happens when the position and size of the window is undefined
  102.      will depend on the underlying window system, on the Amiga the
  103.      window will probably be the same as the current window, in X11 the
  104.      window manager will probably let the user size it interactively.
  105.      The new window will have its `buffer-list' variable initialised
  106.      suitably and it will be added to the head of the `window-list'
  107.      variable.
  108.    The `make-window' function is the lowest level of creating a new
  109. window, `open-window' uses it to open the window.
  110.  - Function: make-window &optional X Y WIDTH HEIGHT
  111.      Creates a new window and returns it, the arguments are similar to
  112.      those of the same name in the `open-window' function. The window
  113.      will display the current buffer.
  114.      After the window is created the `make-window-hook' will be called
  115.      with the window as its argument.
  116.  - Hook: make-window-hook
  117.      Hook called each time a new window is created. It has one
  118.      argument, the new window.
  119.  - Variable: pub-screen
  120.      This window-local variable is only used on the Amiga version of
  121.      Jade; it holds the name of the public screen which windows are
  122.      opened on. By default this is the Workbench screen.
  123.      When a window is opened it inherits this value from the current
  124.      window at the time.
  125. File: jade.info,  Node: Closing Windows,  Next: Iconifying Windows,  Prev: Opening Windows,  Up: Windows
  126. Closing Windows
  127. ---------------
  128.    Unlike buffers, window objects don't have indefinite extent, even
  129. when a window is incapable of being referenced the object will not be
  130. destroyed by the garbage collector; count the user looking at the window
  131. as a reference!
  132.    When the window is closed (by the `destroy-window' function) the
  133. object loses its `window-ness' and the garbage collector is free to
  134. reclaim its memory.
  135.  - Function: close-window &optional WINDOW
  136.      This function closes the window WINDOW (or the current window) and
  137.      deletes its entry from the `window-list' variable.
  138.      If this window is the only one the editor has open the user is
  139.      asked if it's okay to lose any modified buffers before the window
  140.      is closed.
  141.  - Function: close-other-windows &optional WINDOW
  142.      Uses `close-window' to close all windows except WINDOW (or the
  143.      current window).
  144.  - Function: destroy-window WINDOW
  145.      Closes the window WINDOW. After a window object has been closed it
  146.      is no longer a member of the type `window'.
  147.      Before closing the window the `destroy-window-hook' is evaluated
  148.      with the window being destroyed as an argument.
  149.      When the last window is closed the editor will exit automatically.
  150.      Like the `destroy-buffer' function, this function is dangerous if
  151.      used carelessly.
  152.      Both `close-window' and `close-other-windows' eventually call this
  153.