home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / emacs-18.59-src.tgz / emacs-18.59-src.tar / fsf / emacs18 / etc / CCADIFF < prev    next >
Lisp/Scheme  |  1996-09-28  |  7KB  |  160 lines

  1. Differences between GNU Emacs and CCA Emacs.
  2. Copyright (c) 1985 Richard M. Stallman
  3.  
  4.    Permission is granted to anyone to make or distribute verbatim copies
  5.    of this document as received, in any medium, provided that the
  6.    copyright notice and permission notice are preserved,
  7.    and that the distributor grants the recipient permission
  8.    for further redistribution as permitted by this notice.
  9.  
  10. * GNU Emacs Lisp vs CCA Elisp.
  11.  
  12. GNU Emacs Lisp does not have a distinction between Lisp functions
  13. and Emacs functions, or between Lisp variables and Emacs variables.
  14. The Lisp and the editor are integrated.  A Lisp function defined
  15. with defun is callable as an editor command if you put an
  16. interactive calling spec in it; for example, 
  17.   (defun forward-character (n)
  18.     (interactive "p")
  19.     (goto-char (+ (point) n)))
  20. defines a function of one argument that moves point forward by
  21. a specified number of characters.  Programs could call this function,
  22. as in (forward-character 6), or it could be assigned to a key,
  23. in which case the "p" says to pass the prefix numeric arg as
  24. the function's argument.  As a result of this feature, you often
  25. need not have two different functions, one to be called by programs
  26. and another to read arguments from the user conveniently; the same
  27. function can do both.
  28.  
  29. CCA Elisp tries to be a subset of Common Lisp and tries to
  30. have as many Common Lisp functions as possible (though it is still
  31. only a small fraction of full Common Lisp).  GNU Emacs Lisp
  32. is somewhat similar to Common Lisp just because of my Maclisp
  33. and Lisp Machine background, but it has several distinct incompatibilities
  34. in both syntax and semantics.  Also, I have not attempted to
  35. provide many Common Lisp functions that you could write in Lisp,
  36. or others that provide no new capability in the circumstances.
  37.  
  38. GNU Emacs Lisp does not have packages, readtables, or character objects
  39. (it uses integers to represent characters).
  40.  
  41. On the other hand, windows, buffers, relocatable markers and processes
  42. are first class objects in GNU Emacs Lisp.  You can get information about them
  43. and do things to them in a Lispy fashion.  Not so in CCA Emacs.
  44.  
  45. In GNU Emacs Lisp, you cannot open a file and read or write characters
  46. or Lisp objects from it.  This feature is painful to support, and
  47. is not fundamentally necessary in an Emacs, because instead you
  48. can read the file into a buffer, read or write characters or
  49. Lisp objects in the buffer, and then write the buffer into the file.
  50.  
  51. On the other hand, GNU Emacs Lisp does allow you to rename, delete, add
  52. names to, and copy files; also to find out whether a file is a
  53. directory, whether it is a symbolic link and to what name, whether
  54. you can read it or write it, find out its directory component,
  55. expand a relative pathname, find completions of a file name, etc.,
  56. which you cannot do in CCA Elisp.
  57.  
  58. GNU Emacs Lisp uses dynamic scope exclusively.  This enables you to
  59. bind variables which affect the execution of the editor, such as
  60. indent-tabs-mode.
  61.  
  62. GNU Emacs Lisp code is normally compiled into byte code.  Most of the
  63. standard editing commands are written in Lisp, and many are
  64. dumped, pure, in the Emacs that users normally run.
  65.  
  66. GNU Emacs allows you to interrupt a runaway Lisp program with
  67. Control-g.
  68.  
  69. * GNU Emacs Editing Advantages
  70.  
  71. GNU Emacs is faster for many things, especially insertion of text
  72. and file I/O.
  73.  
  74. GNU Emacs allows you to undo more than just the last command
  75. with the undo command (C-x u, or C-_).  You can undo quite a ways back.
  76. Undo information is separate for each buffer; changes in one buffer
  77. do not affect your ability to undo in another buffer.
  78.  
  79. GNU Emacs commands that want to display some output do so by putting
  80. it in a buffer and displaying that buffer in a window.  This
  81. technique comes from Gosling Emacs.  It has both advantages and
  82. disadvantages when compared with the technique, copied by CCA Emacs
  83. from my original Emacs which inherited it from TECO, of having "type
  84. out" which appears on top of the text in the current window but
  85. disappears automatically at the next input character.
  86.  
  87. GNU Emacs does not use the concept of "subsystems".  Instead, it uses
  88. highly specialized major modes.  For example, dired in GNU Emacs has
  89. the same commands as dired does in other versions of Emacs, give or
  90. take a few, but it is a major mode, not a subsystem.  The advantage
  91. of this is that you do not have to "exit" from dired and lose the
  92. state of dired in order to edit files again.  You can simply switch
  93. to another buffer, and switch back to the dired buffer later.  You
  94. can also have several dired buffers, looking at different directories.
  95.  
  96. It is still possible to write a subsystem--your own command loop--
  97. in GNU Emacs, but it is not recommended, since writing a major mode
  98. for a special buffer is better.
  99.  
  100. Recursive edits are also rarely used, for the same reason: it is better
  101. to make a new buffer and put it in a special major mode.  Sending
  102. mail is done this way.
  103.  
  104. GNU Emacs expects everyone to use find-file (C-x C-f) for reading
  105. in files; its C-x C-v command kills the current buffer and then finds
  106. the specified file.
  107.  
  108. As a result, users do not need to think about the complexities
  109. of subsystems, recursive edits, and various ways to read in files
  110. or what to do if a buffer contains changes to some other file.
  111.  
  112. GNU Emacs uses its own format of tag table, made by the "etags"
  113. program.  This format makes finding a tag much faster.
  114.  
  115. Dissociated Press is supported.
  116.  
  117.  
  118. * GNU Emacs Editing Disadvantages.
  119.  
  120. GNU Emacs does not display the location of the mark.
  121.  
  122. GNU Emacs does not have a concept of numbers of buffers,
  123. or a permanent ordering of buffers, or searching through multiple
  124. buffers.  The tags-search command provides a way to search
  125. through several buffers automatically.
  126.  
  127. GNU Emacs does not provide commands to visit files without
  128. setting the buffer's default directory.  Users can write such
  129. commands in Lisp by copying the code of the standard file
  130. visiting commands and modifying them.
  131.  
  132. GNU Emacs does not support "plus options" in the command
  133. arguments or in buffer-selection commands, except for line numbers.
  134.  
  135. GNU Emacs does not support encryption.  Down with security!
  136.  
  137. GNU Emacs does not support replaying keystroke files,
  138. and does not normally write keystroke files.
  139.  
  140.  
  141. * Neutral Differences
  142.  
  143. GNU Emacs uses TAB, not ESC, to complete file names, buffer names,
  144. command names, etc.
  145.  
  146. GNU Emacs uses ESC to terminate searches, instead of
  147. the C-d uses by CCA Emacs.  (Actually, this character is controlled
  148. by a parameter in GNU Emacs.)  C-M-s in GNU Emacs is an interactive
  149. regular expression search, but you can get to a noninteractive
  150. one by typing ESC right after the C-M-s.
  151.  
  152. In GNU Emacs, C-x s asks, for each modified file buffer, whether
  153. to save it.
  154.  
  155. GNU Emacs indicates line continuation with "\" and line
  156. truncation (at either margin) with "$".
  157.  
  158. The command to resume a tags-search or tags-query-replace in
  159. GNU Emacs is Meta-Comma.
  160.