home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / lisp / lispnews / text0314.txt < prev    next >
Encoding:
Text File  |  1985-11-10  |  1.2 KB  |  22 lines

  1. Since comments are not part of a Lisp form returned by `read', clearly
  2. no pretty-print function can do what you want.  Certainly a far more
  3. complicated pretty-printer could be written which would be passed an
  4. ascii file to read and which would somehow preserve comments inside the
  5. form in order to regurgitate them during formatting.  The problem has
  6. several complications, however, such as how to handle ascii Lisp text
  7. with conditionalized inclusions (`#+' constructions)...
  8.  
  9. Instead, what you want is probably provided the Lisp-mode `grind'
  10. facilities available in several popular text editors -- in particular,
  11. EMACS.  (I know CCA EMACS works, and believe Gosling EMACS does also.)
  12. In these editors a couple keystrokes will specify a region of text and
  13. apply one of several Lisp-indentation algorithms to it.  They almost
  14. always indent in reasonable ways, and attempt to do reasonable things
  15. with comments, at least.  The ones with which I am familiar will *not*,
  16. however, adjust line length length by moving either comment or Lisp
  17. text from line to line.  This is not a great problem for normal
  18. human-typed text, such as programs, since one tends not to type
  19. absurdly long lines.
  20.  
  21.  
  22.