[Next] [Previous] [Up] [Top] [Contents] [Index]

Lisp-based editing

Cutting and pasting with Emacs commands

In addition to the standard Macintosh commands for cutting and pasting, Fred supports a number of Emacs commands for cutting and pasting. The Fred commands have two advantages over the Macintosh commands:

  • They provide fine grain control over the text which is cut. For example, with a single keystroke you can cut a word, line, or expression.
  • They store multiple pieces of cut text. Whereas the Macintosh clipboard can hold only a single item, the Fred kill-ring can hold any number of pieces of text.

    • Move to the start of the line containing "Hello, world!".
    • Press Control k
      Control k is "kill line". It "kills" (removes) text from the cursor to the end of the line and places it on the kill ring. Subsequent Control k's will kill following lines.
    • Type (format nil
    • Press Control y
      Control y "yanks" (pastes) the top item from the kill ring into the editor window. The top line of the window should now read
      (format nil "Hello, world!"
    • Continue editing.
      When you are done, the top line should read
      (format nil "Hello ~a" my-name)


  • Gettmg Started with MCL - 19 OCT 1996
    [Next] [Previous] [Up] [Top] [Contents] [Index]

    Generated with Harlequin WebMaker