diff --git a/.places b/.places new file mode 100644 index 0000000..bdb792c Binary files /dev/null and b/.places differ diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e71149d --- /dev/null +++ b/ChangeLog @@ -0,0 +1,18 @@ +Thu Apr 26 13:36:18 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Makefile (paths.h): Make sed alter each name in the path. + +Tue Aug 30 13:43:43 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Makefile (install.sysv): Use cpio, not tar. + +Wed Aug 3 19:20:13 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Makefile (lockdir): Rename `lock' target. + Depend on it from install*, not from `all'. + +Mon May 16 02:08:08 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * Makefile: Changed LIBDIR and BINDIR back to /usr/local/{emacs,bin} + to match build-install and paths.h. + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..8087fc6 --- /dev/null +++ b/INSTALL @@ -0,0 +1,161 @@ +GNU Emacs Installation Guide +Copyright (c) 1988 Free software Foundation, Inc. + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and permission notice are preserved, + and that the distributor grants the recipient permission + for further redistribution as permitted by this notice. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them, + and that any new or changed statements about the activities + of the Free Software Foundation are approved by the Foundation. + + +PREPARATION + +0) Make sure your system has enough swapping space allocated + to handle a program whose pure code is 400k bytes or + and whose data area is at least 150k and can reach 600k + bytes or much more. If the swapping space is insufficient, you + will get an error in the command temacs -l loadup inc dump, + found in $BUILD/src/ymakefile, or possibly when running the + final dumped Emacs. + +1) Choose a place in the file structure for the main directory + of Emacs code to reside. This will ultimately have + subdirectories named src, lisp, etc, etc. Call this name + $EMACS. Let $BUILD stand for the name the directory has now. + +2) Copy $BUILD/src/config.h-dist to $BUILD/src/config.h, + and edit it to set the right options for your system. The file + $BUILD/etc/MACHINES may help you decide what to put there. + If you need to override any of the definitions in the s- and m- + files for your system and machine, do so by editing config.h, + not by changing the s- and m- files. Occasionally you may + need to redefine parameters used in etc/movemail.c. + +3) Declare the place in the file system where Emacs will + be once installed. This is done in the file `src/paths.h'. + + If you are using the shell-script `build-install' + edit the `set' command that sets the variable `EMACS'. + If you are using `make' in the main Emacs directory to do + the installation, edit the definition of `LIBDIR' in `Makefile' + in that directory. `build-install' and `make' edit `src/paths.h' + automatically. + + If you are doing the building by hand (not using `build-install' or + `make') then you yourself must copy $BUILD/src/paths.h-dist to + paths.h, and edit it to contain the correct directory names: + $EMACS/lisp for the directory for Lisp libraries, and $EMACS/etc for + the directory for executables and text files. + + Emacs will use these names once it has been built. + During building, Emacs searches the directory ../lisp for + Lisp files before the directories specified in paths.h, and + executable files are found in ../etc. So the main Emacs + directory $BUILD can be anywhere while Emacs is built, but + must be renamed to $EMACS afterwards in order for Emacs to + work properly. + +4) Look at $BUILD/lisp/paths.el; if some of those values + are not right for your system, create a file + $BUILD/lisp/site-init.el containing Lisp code to override them. + You would use the Lisp function `setq'. For example, + + (setq news-inews-program "/usr/bin/inews") + + is how you would override the default value of the + variable news-inews-program (which is "/usr/local/inews"). + +5) Put into $BUILD/lisp/site-init.el any Lisp code + you want loaded into Emacs before it is dumped out. + + This file is nonexistent in the distribution. + You do not need to create it, if you have nothing + to put in it. + +6) Decide what compiler switches to use. + You might want to replace the `-g' in the file $BUILD/src/ymakefile + with `-O'. If you are not running on 4.2 on a vax, + it is possible that no debugger you have will be able + to run Emacs with its symbol table, so you might as well + use `-O' instead. If you do have a debugger that works, + it is probably best to use `-g' so that you are not + helpless in the face of a problem. + +7) If you wish to compile with GCC, you should use -traditional. + This is needed for certain include files. For more info, refer + the INSTALL file of GCC. + +8) Refer to the file $BUILD/etc/TERMS for information on + fields you may wish to add to various termcap entries. + +9) Run `make' in the main directory of the Emacs distribution + to finish building and installing Emacs in the standard way. + You are done! + + +BUILDING GNU EMACS +The steps below are done by the shell script `build-install' +or by running `make' in the main directory of the Emacs distribution. + +1) Cd to $BUILD/etc and run `make'. + This creates files named `ctags' and `etags' and `loadst' + and `make-docfile' and `digest-doc' and `test-distrib'. + +2) Cd to $BUILD/src and Run `make' + This refers to files in the $BUILD/lisp and $BUILD/etc subdirectories + using names ../lisp and ../etc. + + This creates a file $BUILD/src/xemacs which is the runnable Emacs, + assigning it a new version number by incrementing the version + stored in $BUILD/lisp/version.el. + + It also creates a file in $BUILD/etc, whose name is + DOC followed by the current Emacs version. + This file contains documentation strings for all the + functions in Emacs. Each time you run make to make a new xemacs, + a new DOC file with a new name is made. You must keep + the DOC file for an Emacs version as long as you keep using + that Emacs version. + + +INSTALLATION +The steps below are done by the shell script `build-install' +or by running `make' in the main directory of the Emacs distribution. + +0) mv $BUILD $EMACS if $BUILD and $EMACS are not the same. + This moves the main Emacs directory to the name you have told + Emacs (via paths.h) it is going to have. + +1) Move the file $EMACS/xemacs to /usr/local/bin/emacs, + or some other name in users' search paths. + `xemacs' has an alternate name $EMACS/src/emacs-EMACSVERSION; + you may wish to make a symbolic link + named /usr/local/bin/emacs pointing to that alternate name, + as an easy way of installing different versions. + + You can delete $EMACS/src/temacs. + +3) Move the programs ctags and etags from $EMACS/etc + to /usr/local/bin. These programs are run by users as shell commands. + + The program $EMACS/etc/loadst is invoked by Emacs when appropriate. + + The programs $EMACS/etc/make-docfile and $EMACS/etc/test-distrib + are not used any more; they were used in building Emacs. + + $EMACS/etc/digest-doc can be used to convert DOC into a + file for users to read. There is no important reason to move it. + +4) The files in $EMACS/src subdirectory, except for xemacs, + are not used by Emacs once it is built. + + +See the file PROBLEMS in this directory for a list of various +problems sometimes encountered, and what to do about them. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2ddfebd --- /dev/null +++ b/Makefile @@ -0,0 +1,54 @@ +LIBDIR = /usr/lib/emacs +BINDIR = /usr/bin + +installsrc: + tar cf - . | (cd $(SRCROOT); tar xfBp - ) + +clean: + (cd etc; make clean) + (cd src; make clean) + +install: all + -rm -rf $(DSTROOT)$(LIBDIR) + mkdirs $(DSTROOT)$(LIBDIR) +# (cd $(DSTROOT)$(LIBDIR); mkdirs etc info lisp man) + (cd $(DSTROOT)$(LIBDIR); mkdirs etc info lisp; mkdirs -m 777 lock) +# We don't have room for this. Only snag the binaries (and strip them). +# cp etc/* $(DSTROOT)$(LIBDIR)/etc +# -rm -f $(DSTROOT)$(LIBDIR)/etc/*.c + cp etc/DOC-* $(DSTROOT)$(LIBDIR)/etc + install -c -s -m 755 etc/ctags $(DSTROOT)$(LIBDIR)/etc/ctags + install -c -s -m 755 etc/cvtmail $(DSTROOT)$(LIBDIR)/etc/cvtmail + install -c -s -m 755 etc/digest-doc $(DSTROOT)$(LIBDIR)/etc/digest-doc + install -c -s -m 755 etc/emacsclient $(DSTROOT)$(LIBDIR)/etc/emacsclient + install -c -s -m 755 etc/env $(DSTROOT)$(LIBDIR)/etc/env + install -c -s -m 755 etc/fakemail $(DSTROOT)$(LIBDIR)/etc/fakemail + install -c -s -m 755 etc/loadst $(DSTROOT)$(LIBDIR)/etc/loadst + install -c -s -m 755 etc/make-docfile $(DSTROOT)$(LIBDIR)/etc/make-docfile + install -c -s -m 755 etc/movemail $(DSTROOT)$(LIBDIR)/etc/movemail + install -c -s -m 755 etc/server $(DSTROOT)$(LIBDIR)/etc/server + install -c -s -m 755 etc/sorted-doc $(DSTROOT)$(LIBDIR)/etc/sorted-doc + install -c -s -m 755 etc/test-distrib $(DSTROOT)$(LIBDIR)/etc/test-distrib + install -c -s -m 755 etc/yow $(DSTROOT)$(LIBDIR)/etc/yow + install -c -m 644 etc/TUTORIAL $(DSTROOT)$(LIBDIR)/etc/TUTORIAL + install -c -m 644 etc/NEWS $(DSTROOT)$(LIBDIR)/etc/NEWS + install -c -m 644 etc/COPYING $(DSTROOT)$(LIBDIR)/etc/COPYING + install -c -m 644 etc/DISTRIB $(DSTROOT)$(LIBDIR)/etc/DISTRIB + cp info/* $(DSTROOT)$(LIBDIR)/info + tar cf - lisp | (cd $(DSTROOT)$(LIBDIR); tar xf -) +# cp man/* $(DSTROOT)$(LIBDIR)/man + -/etc/chown -R root $(DSTROOT)$(LIBDIR) + chmod -R a+r $(DSTROOT)$(LIBDIR) + mkdirs $(DSTROOT)$(BINDIR) + install -c -s -m 755 etc/etags $(DSTROOT)$(BINDIR)/etags + install -c -s -m 755 src/xemacs $(DSTROOT)$(BINDIR)/xemacs + -rm -f $(DSTROOT)$(BINDIR)/emacs + mv $(DSTROOT)$(BINDIR)/xemacs $(DSTROOT)$(BINDIR)/emacs + + +all: + (cd etc; make all) + (cd src; make all) + + + diff --git a/PROBLEMS b/PROBLEMS new file mode 100644 index 0000000..121f475 --- /dev/null +++ b/PROBLEMS @@ -0,0 +1,562 @@ +This file describes various problems that have been encountered +in compiling, installing and running GNU Emacs. + +* Error compiling sysdep.c, "sioctl.h: no such file or directory". + +Among USG systems with TIOCGWINSZ, some require sysdep.c to include +the file sioctl.h; on others, sioctl.h does not exist. We don't know +how to distinguish these two kind of systems, so currently we try to +include sioctl.h on all of them. If this #include gets an error, just +delete it. + +* X Windows doesn't work if DISPLAY uses a hostname. + +People have reported kernel bugs in certain systems that cause Emacs +not to work with X Windows if DISPLAY is set using a host name. But +the problem does not occur if DISPLAY is set to `unix:0.0'. I think +the bug has to do with SIGIO or FIONREAD. + +You may be able to compensate for the bug by doing (set-input-mode nil nil). +However, that has the disadvantage of turning off interrupts, so that +you are unable to quit out of a Lisp program by typing C-g. + +The easy way to do this is to put + + (setq x-sigio-bug t) + +in your site-init.el file. + +* Watch out for .emacs files and EMACSLOADPATH environment vars + +These control the actions of Emacs. +~/.emacs is your Emacs init file. +EMACSLOADPATH overrides which directories the function +"load" will search. + +If you observe strange problems, check for these and get rid +of them, then try again. + +* Fatal signal in the command temacs -l loadup inc dump + +This command is the final stage of building Emacs. It is run by the +Makefile in the src subdirectory, or by build.com on VMS. + +It has been known to get fatal errors due to insufficient swapping +space available on the machine. + +On 68000's, it has also happened because of bugs in the +subroutine `alloca'. Verify that `alloca' works right, even +for large blocks (many pages). + +* test-distrib says that the distribution has been clobbered +* or, temacs prints "Command key out of range 0-127" +* or, temacs runs and dumps xemacs, but xemacs totally fails to work. +* or, temacs gets errors dumping xemacs + +This can be because the .elc files have been garbled. Do not be +fooled by the fact that most of a .elc file is text: these are +binary files and can contain all 256 byte values. + +In particular `shar' cannot be used for transmitting GNU Emacs. +It typically truncates "lines". What appear to be "lines" in +a binary file can of course be of any length. Even once `shar' +itself is made to work correctly, `sh' discards null characters +when unpacking the shell archive. + +I have also seen character \177 changed into \377. I do not know +what transfer means caused this problem. Various network +file transfer programs are suspected of clobbering the high bit. + +The only verified ways to transfer GNU Emacs are `tar', kermit (in +binary mode on Unix), and rcp or internet ftp between two Unix systems, +or chaosnet cftp using raw mode. + +If you have a copy of Emacs that has been damaged in its +nonprinting characters, you can fix them: + + 1) Record the names of all the .elc files. + 2) Delete all the .elc files. + 3) Recompile alloc.c with a value of PURESIZE twice as large. + You might as well save the old alloc.o. + 4) Remake xemacs. It should work now. + 5) Running xemacs, do Meta-x byte-compile-file repeatedly + to recreate all the .elc files that used to exist. + You may need to increase the value of the variable + max-lisp-eval-depth to succeed in running the compiler interpreted + on certain .el files. 400 was sufficient as of last report. + 6) Reinstall the old alloc.o (undoing changes to alloc.c if any) + and remake temacs. + 7) Remake xemacs. It should work now, with valid .elc files. + +* temacs prints "Pure Lisp storage exhausted" + +This means that the Lisp code loaded from the .elc and .el +files during temacs -l loadup inc dump took up more +space than was allocated. + +This could be caused by + 1) adding code to the preloaded Lisp files + 2) adding more preloaded files in loadup.el + 3) having a site-init.el or site-load.el which loads files. + Note that ANY site-init.el or site-load.el is nonstandard; + if you have received Emacs from some other site + and it contains a site-init.el or site-load.el file, consider + deleting that file. + 4) getting the wrong .el or .elc files + (not from the directory you expected). + 5) deleting some .elc files that are supposed to exist. + This would cause the source files (.el files) to be + loaded instead. They take up more room, so you lose. + 6) a bug in the Emacs distribution which underestimates + the space required. + +If the need for more space is legitimate, change the definition +of PURESIZE in config.h. + +But in some of the cases listed above, this problem is a consequence +of something else that is wrong. Be sure to check and fix the real +problem. + +* Changes made to .el files do not take effect. + +You may have forgotten to recompile them into .elc files. +Then the old .elc files will be loaded, and your changes +will not be seen. To fix this, do M-x byte-recompile-directory +and specify the directory that contains the Lisp files. + +* The dumped Emacs (xemacs) crashes when run, trying to write pure data. + +Two causes have been seen for such problems. + +1) On a system where getpagesize is not a system call, it is defined +as a macro. If the definition (in both unexec.c and malloc.c) is wrong, +it can cause problems like this. You might be able to find the correct +value in the man page for a.out (5). + +2) Some systems allocate variables declared static among the +initialized variables. Emacs makes all initialized variables in most +of its files pure after dumping, but the variables declared static and +not initialized are not supposed to be pure. On these systems you +may need to add "#define static" to the m- or the s- file. + +* Compilation errors on VMS. + +You will get warnings when compiling on VMS because there are +variable names longer than 32 (or whatever it is) characters. +This is not an error. Ignore it. + +VAX C does not support #if defined(foo). Uses of this construct +were removed, but some may have crept back in. They must be rewritten. + +There is a bug in the C compiler which fails to sign extend characters +in conditional expressions. The bug is: + char c = -1, d = 1; + int i; + + i = d ? c : d; +The result is i == 255; the fix is to typecast the char in the +conditional expression as an (int). Known occurrences of such +constructs in Emacs have been fixed. + +* rmail gets error getting new mail + +rmail gets new mail from /usr/spool/mail/$USER using a program +called `movemail'. This program interlocks with /bin/mail using +the protocol defined by /bin/mail. + +There are two different protocols in general use. One of them uses +the `flock' system call. The other involves creating a lock file; +`movemail' must be able to write in /usr/spool/mail in order to do +this. You control which one is used by defining, or not defining, +the macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes. +IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR +SYSTEM, YOU CAN LOSE MAIL! + +If your system uses the lock file protocol, and fascist restrictions +prevent ordinary users from writing the lock files in /usr/spool/mail, +you may need to make `movemail' setgid to a suitable group such as +`mail'. + +* Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0. + +Some people have found that Emacs was unable to connect to the local +host by name, as in DISPLAY=prep:0 if you are running on prep, but +could handle DISPLAY=unix:0. Here is what tale@rpi.edu said: + + Seems as + though gethostbyname was bombing somewhere along the way. Well, we + had just upgrade from SunOS 3.5 (which X11 was built under) to SunOS + 4.0.1. Any new X applications which tried to be built with the pre + OS-upgrade libraries had the same problems which Emacs was having. + Missing /etc/resolv.conf for a little while (when one of the libraries + was built?) also might have had a hand in it. + + The result of all of this (with some speculation) was that we rebuilt + X and then rebuilt Emacs with the new libraries. Works as it should + now. Hoorah. + +* Emacs spontaneously displays "I-search: " at the bottom of the screen. + +This means that Control-S/Control-Q "flow control" is being used. +C-s/C-q flow control is bad for Emacs editors because it takes away +C-s and C-q as user commands. Since editors do not output long streams +of text without user commands, there is no need for a user-issuable +"stop output" command in an editor; therefore, a properly designed +flow control mechanism would transmit all possible input characters +without interference. Designing such a mechanism is easy, for a person +with at least half a brain. + +There are three possible reasons why flow control could be taking place: + + 1) Terminal has not been told to disable flow control + 2) Insufficient padding for the terminal in use + 3) Some sort of terminal concentrator or line switch is responsible + +First of all, many terminals have a set-up mode which controls +whether they generate flow control characters. This must be +set to "no flow control" in order for Emacs to work. Sometimes +there is an escape sequence that the computer can send to turn +flow control off and on. If so, perhaps the termcap `ti' string +should turn flow control off, and the `te' string should turn it on. + +Once the terminal has been told "no flow control", you may find it +needs more padding. The amount of padding Emacs sends is controlled +by the termcap entry for the terminal in use, and by the output baud +rate as known by the kernel. The shell command `stty' will print +your output baud rate; `stty' with suitable arguments will set it if +it is wrong. Setting to a higher speed causes increased padding. If +the results are wrong for the correct speed, there is probably a +problem in the termcap entry. You must speak to a local Unix wizard +to fix this. Perhaps you are just using the wrong terminal type. + +For terminals that lack a "no flow control" mode, sometimes just +giving lots of padding will prevent actual generation of flow control +codes. You might as well try it. + +If you are really unlucky, your terminal is connected to the computer +through a concentrator which sends flow control to the computer, or it +insists on sending flow control itself no matter how much padding you +give it. You are screwed! You should replace the terminal or +concentrator with a properly designed one. In the mean time, +some drastic measures can make Emacs semi-work. + +One drastic measure to ignore C-s and C-q, while sending enough +padding that the terminal will not really lose any output. +Ignoring C-s and C-q can be done by using keyboard-translate-table +to map them into an undefined character such as C-^ or C-\. Sending +lots of padding is done by changing the termcap entry. Here is how +to make such a keyboard-translate-table: + + (let ((the-table (make-string 128 0))) + ;; Default is to translate each character into itself. + (let ((i 0)) + (while (< i 128) + (aset the-table i i) + (setq i (1+ i)))) + ;; Swap C-s with C-\ + (aset the-table ?\C-\\ ?\C-s) + (aset the-table ?\C-s ?\C-\\) + ;; Swap C-q with C-^ + (aset the-table ?\C-^ ?\C-q) + (aset the-table ?\C-q ?\C-^) + (setq keyboard-translate-table the-table)) + +An even more drastic measure is to make Emacs use flow control. +To do this, evaluate the Lisp expression (set-input-mode nil t). +Emacs will then interpret C-s and C-q as flow control commands. (More +precisely, it will allow the kernel to do so as it usually does.) You +will lose the ability to use them for Emacs commands. Also, as a +consequence of using CBREAK mode, the terminal's Meta-key, if any, +will not work, and C-g will be liable to cause a loss of output which +will produce garbage on the screen. (These problems apply to 4.2BSD; +they may not happen in 4.3 or VMS, and I don't know what would happen +in sysV.) You can use keyboard-translate-table, as shown above, +to map two other input characters (such as C-^ and C-\) into C-s and +C-q, so that you can still search and quote. + +I have no intention of ever redisigning the Emacs command set for +the assumption that terminals use C-s/C-q flow control. This +flow control technique is a bad design, and terminals that need +it are bad merchandise and should not be purchased. If you can +get some use out of GNU Emacs on inferior terminals, I am glad, +but I will not make Emacs worse for properly designed systems +for the sake of inferior systems. + +* Control-S and Control-Q commands are ignored completely. + +For some reason, your system is using brain-damaged C-s/C-q flow +control despite Emacs's attempts to turn it off. Perhaps your +terminal is connected to the computer through a concentrator +that wants to use flow control. + +You should first try to tell the concentrator not to use flow control. +If you succeed in this, try making the terminal work without +flow control, as described in the preceding section. + +If that line of approach is not successful, map some other characters +into C-s and C-q using keyboard-translate-table. The example above +shows how to do this with C-^ and C-\. + +* Screen is updated wrong, but only on one kind of terminal. + +This could mean that the termcap entry you are using for that +terminal is wrong, or it could mean that Emacs has a bug handing +the combination of features specified for that terminal. + +The first step in tracking this down is to record what characters +Emacs is sending to the terminal. Execute the Lisp expression +(open-termscript "./emacs-script") to make Emacs write all +terminal output into the file ~/emacs-script as well; then do +what makes the screen update wrong, and look at the file +and decode the characters using the manual for the terminal. +There are several possibilities: + +1) The characters sent are correct, according to the terminal manual. + +In this case, there is no obvious bug in Emacs, and most likely you +need more padding, or possibly the terminal manual is wrong. + +2) The characters sent are incorrect, due to an obscure aspect + of the terminal behavior not described in an obvious way + by termcap. + +This case is hard. It will be necessary to think of a way for +Emacs to distinguish between terminals with this kind of behavior +and other terminals that behave subtly differently but are +classified the same by termcap; or else find an algorithm for +Emacs to use that avoids the difference. Such changes must be +tested on many kinds of terminals. + +3) The termcap entry is wrong. + +See the file etc/TERMS for information on changes +that are known to be needed in commonly used termcap entries +for certain terminals. + +4) The characters sent are incorrect, and clearly cannot be + right for any terminal with the termcap entry you were using. + +This is unambiguously an Emacs bug, and can probably be fixed +in termcap.c, tparam.c, term.c, scroll.c, cm.c or dispnew.c. + +* Output from Control-V is slow. + +On many bit-map terminals, scrolling operations are fairly slow. +Often the termcap entry for the type of terminal in use fails +to inform Emacs of this. The two lines at the bottom of the screen +before a Control-V command are supposed to appear at the top after +the Control-V command. If Emacs thinks scrolling the lines is fast, +it will scroll them to the top of the screen. + +If scrolling is slow but Emacs thinks it is fast, the usual reason is +that the termcap entry for the terminal you are using does not +specify any padding time for the `al' and `dl' strings. Emacs +concludes that these operations take only as much time as it takes to +send the commands at whatever line speed you are using. You must +fix the termcap entry to specify, for the `al' and `dl', as much +time as the operations really take. + +Currently Emacs thinks in terms of serial lines which send characters +at a fixed rate, so that any operation which takes time for the +terminal to execute must also be padded. With bit-map terminals +operated across networks, often the network provides some sort of +flow control so that padding is never needed no matter how slow +an operation is. You must still specify a padding time if you want +Emacs to realize that the operation takes a long time. This will +cause padding characters to be sent unnecessarily, but they do +not really cost much. They will be transmitted while the scrolling +is happening and then discarded quickly by the terminal. + +Most bit-map terminals provide commands for inserting or deleting +multiple lines at once. Define the `AL' and `DL' strings in the +termcap entry to say how to do these things, and you will have +fast output without wasted padding characters. These strings should +each contain a single %-spec saying how to send the number of lines +to be scrolled. These %-specs are like those in the termcap +`cm' string. + +You should also define the `IC' and `DC' strings if your terminal +has a command to insert or delete multiple characters. These +take the number of positions to insert or delete as an argument. + +A `cs' string to set the scrolling region will reduce the amount +of motion you see on the screen when part of the screen is scrolled. + +* You type Control-H (Backspace) expecting to delete characters. + +Put `stty dec' in your .login file and your problems will disappear +after a day or two. + +The choice of Backspace for erasure was based on confusion, caused by +the fact that backspacing causes erasure (later, when you type another +character) on most display terminals. But it is a mistake. Deletion +of text is not the same thing as backspacing followed by failure to +overprint. I do not wish to propagate this confusion by conforming +to it. + +For this reason, I believe `stty dec' is the right mode to use, +and I have designed Emacs to go with that. If there were a thousand +other control characters, I would define Control-h to delete as well; +but there are not very many other control characters, and I think +that providing the most mnemonic possible Help character is more +important than adapting to people who don't use `stty dec'. + +If you are obstinate about confusing buggy overprinting with deletion, +you can redefine Backspace in your .emacs file: + (global-set-key "\b" 'delete-backward-char) +You may then wish to put the function help-command on some +other key. I leave to you the task of deciding which key. + +* Editing files through RFS gives spurious "file has changed" warnings. +It is possible that a change in Emacs 18.37 gets around this problem, +but in case not, here is a description of how to fix the RFS bug that +causes it. + + Date: Wed, 28 Jan 87 15:18:40 EST + From: Bill Sommerfeld + Sender: wesommer@athena.mit.edu + To: toddb%crl.tek.csnet@relay.cs.net + Cc: bug-rfs, bug-gnu-emacs@prep.ai.mit.edu + Subject: Bug in RFS server (fsync()) + + There was a serious pair of bugs in the handling of the fsync() system + call in the RFS server. + + The first is that the fsync() call is handled as another name for the + close() system call (!!). It appears that fsync() is not used by very + many programs; Emacs version 18 does an fsync() before closing files + to make sure that the bits are on the disk. + + This is fixed by the enclosed patch to the RFS server. + + The second, more serious problem, is that fsync() is treated as a + non-blocking system call (i.e., it's implemented as a message that + gets sent to the remote system without waiting for a reply). Fsync is + a useful tool for building atomic file transactions. Implementing it + as a non-blocking RPC call (when the local call blocks until the sync + is done) is a bad idea; unfortunately, changing it will break the RFS + protocol. Any suggestions? + + Bill Sommerfeld + MIT Project Athena + + (as always, your line numbers may vary) + + % rcsdiff -c -r1.2 serversyscall.c + RCS file: RCS/serversyscall.c,v + retrieving revision 1.2 + diff -c -r1.2 serversyscall.c + *** /tmp/,RCSt1003677 Wed Jan 28 15:15:02 1987 + --- serversyscall.c Wed Jan 28 15:14:48 1987 + *************** + *** 163,169 **** + /* + * No return sent for close or fsync! + */ + ! if (syscall == RSYS_close || syscall == RSYS_fsync) + proc->p_returnval = deallocate_fd(proc, msg->m_args[0]); + else + { + --- 166,172 ---- + /* + * No return sent for close or fsync! + */ + ! if (syscall == RSYS_close) + proc->p_returnval = deallocate_fd(proc, msg->m_args[0]); + else + { + +* ld complains because `alloca' is not defined on your system. + +Alloca is a library function in 4.2bsd, which is used very heavily by +GNU Emacs. Use of malloc instead is very difficult, as you would have +to arrange for the storage to be freed, and do so even in the case of +a longjmp happening inside a subroutine. Many subroutines in Emacs +can do longjmp. + +If your system does not support alloca, try defining the symbol +C_ALLOCA in the m-...h file for that machine. This will enable the use +in Emacs of a portable simulation for alloca. But you will find that +Emacs's performance and memory use improve if you write a true +alloca in assembler language. + +alloca (N) should return the address of an N-byte block of memory +added dynamically to the current stack frame. + +* Vax C compiler bugs affecting Emacs. + +You may get one of these problems compiling Emacs: + + foo.c line nnn: compiler error: no table entry for op STASG + foo.c: fatal error in /lib/ccom + +These are due to bugs in the C compiler; the code is valid C. +Unfortunately, the bugs are unpredictable: the same construct +may compile properly or trigger one of these bugs, depending +on what else is in the source file being compiled. Even changes +in header files that should not affect the file being compiled +can affect whether the bug happens. In addition, sometimes files +that compile correctly on one machine get this bug on another machine. + +As a result, it is hard for me to make sure this bug will not affect +you. I have attempted to find and alter these constructs, but more +can always appear. However, I can tell you how to deal with it if it +should happen. The bug comes from having an indexed reference to an +array of Lisp_Objects, as an argument in a function call: + Lisp_Object *args; + ... + ... foo (5, args[i], ...)... +putting the argument into a temporary variable first, as in + Lisp_Object *args; + Lisp_Object tem; + ... + tem = args[i]; + ... foo (r, tem, ...)... +causes the problem to go away. +The `contents' field of a Lisp vector is an array of Lisp_Objects, +so you may see the problem happening with indexed references to that. + +* 68000 C compiler problems + +Various 68000 compilers have different problems. +These are some that have been observed. + +** Using value of assignment expression on union type loses. +This means that x = y = z; or foo (x = z); does not work +if x is of type Lisp_Object. + +** "cannot reclaim" error. + +This means that an expression is too complicated. You get the correct +line number in the error message. The code must be rewritten with +simpler expressions. + +** XCONS, XSTRING, etc macros produce incorrect code. + +If temacs fails to run at all, this may be the cause. +Compile this test program and look at the assembler code: + +struct foo { char x; unsigned int y : 24; }; + +lose (arg) + struct foo arg; +{ + test ((int *) arg.y); +} + +If the code is incorrect, your compiler has this problem. +In the XCONS, etc., macros in lisp.h you must replace (a).u.val with +((a).u.val + coercedummy) where coercedummy is declared as int. + +This problem will not happen if the m-...h file for your type +of machine defines NO_UNION_TYPE. That is the recommended setting now. + +* C compilers lose on returning unions + +I hear that some C compilers cannot handle returning +a union type. Most of the functions in GNU Emacs return +type Lisp_Object, which is currently defined as a union. + +This problem will not happen if the m-...h file for your type +of machine defines NO_UNION_TYPE. That is the recommended setting now. + diff --git a/README b/README new file mode 100644 index 0000000..6eba1ad --- /dev/null +++ b/README @@ -0,0 +1,46 @@ +This directory holds the latest distribution version of GNU Emacs. + The subdirectory `src' holds the C code, + `lisp' holds the Lisp code for the editing commands, + `etc' holds various associated documentation files + and programs that Emacs runs, + `info' holds the Info documentation tree. + `man' holds the source of the Emacs manual. + `gdb' holds the new GNU source-level debugger. + It runs only on Vaxes and suns now; you are encouraged to port + it to other machines. + See etc/DEBUG for info on how to debug Emacs. + `cpp' holds a C preprocessor for use instead of the installed one + when the installed one fails to distinguish more than 8 characters + in a symbol name. + `shortnames' holds programs and data files for creating files of #define's + used to convert long symbol names to distinct short ones + for C compiles that cannot distinguish more than 8 characters. + +The file INSTALL in this directory says how to bring up + GNU Emacs on Unix, once you have loaded the entire subtree of this + directory. + +The files `build-install' and `Makefile' help automate the process of + building and installing emacs. The former is a shell script. See + INSTALL for more info. + +The file PROBLEMS contains information on many common + problems that occur in building, installing and running Emacs. + +The `etc' subdirectory contains several other files, + named in capital letters, which you should look at + when installing GNU Emacs. + +The file 'emacs.com' in this directory is for VMS. It defines + logical names and commands such as `emacs', so you must edit + it to specify the file and directory names used on your machine. + This file must be executed in each session to enable you to run + the installed Emacs. It should be executed by your `login.com' file, + or else perhaps it can be executed once at system boot time. + +The file `kepteditor.com' in this directory is also for VMS. + When a user says to run Emacs, it really runs this command file. + +See the files VMSINSTALL and VMSNOTES for more information on VMS use. + + diff --git a/README_Franz b/README_Franz new file mode 100644 index 0000000..6e0c3db --- /dev/null +++ b/README_Franz @@ -0,0 +1,379 @@ + +The following diffs represent the changes made by Franz Inc. to the +standard GNU Emacs 18.53 [from prep.ai.mit.edu on 4/14/89 in the +directory /u2/emacs, file emacs-18.53.tar.Z]. The changes were either +to fix bugs in GNU Emacs or to add features necessary for the +Emacs/Lisp interface. + + Kevin Layer + Franz Inc. + 5/23/89 + +============================= ./etc/server.c +68a69 +> char *server_file; +87,93c88,97 +< if ((homedir = getenv ("HOME")) == NULL) +< { +< fprintf (stderr,"No home directory\n"); +< exit (1); +< } +< strcpy (server.sun_path, homedir); +< strcat (server.sun_path, "/.emacs_server"); +--- +> if ((server_file = getenv ("EMACS_SERVER")) != NULL) { +> strcat (server.sun_path, server_file); +> } else { +> if ((homedir = getenv ("HOME")) == NULL) { +> fprintf (stderr,"No home directory\n"); +> exit (1); +> } +> strcpy (server.sun_path, homedir); +> strcat (server.sun_path, "/.emacs_server"); +> } +============================= ./etc/emacsclient.c +59a60 +> char *server_file; +79,85c80,89 +< if ((homedir = getenv ("HOME")) == NULL) +< { +< fprintf (stderr, "No home directory\n"); +< exit (1); +< } +< strcpy (server.sun_path, homedir); +< strcat (server.sun_path, "/.emacs_server"); +--- +> if ((server_file = getenv ("EMACS_SERVER")) != NULL) { +> strcat (server.sun_path, server_file); +> } else { +> if ((homedir = getenv ("HOME")) == NULL) { +> fprintf (stderr,"No home directory\n"); +> exit (1); +> } +> strcpy (server.sun_path, homedir); +> strcat (server.sun_path, "/.emacs_server"); +> } +============================= ./lisp/loadup.el +115c115,117 +< (message "Dumping under names xemacs and %s" name)) +--- +> (message "Dumping under name xemacs") +> ;; (message "Dumping under names xemacs and %s" name) +> ) +121,126c123,128 +< (let ((name (concat "emacs-" emacs-version))) +< (while (string-match "[^-+_.a-zA-Z0-9]+" name) +< (setq name (concat (downcase (substring name 0 (match-beginning 0))) +< "-" +< (substring name (match-end 0))))) +< (add-name-to-file "xemacs" name t)) +--- +> ;; (let ((name (concat "emacs-" emacs-version))) +> ;; (while (string-match "[^-+_.a-zA-Z0-9]+" name) +> ;; (setq name (concat (downcase (substring name 0 (match-beginning 0))) +> ;; "-" +> ;; (substring name (match-end 0))))) +> ;; (add-name-to-file "xemacs" name t)) +============================= ./src/emacs.c +227,231d226 +< #ifdef BSD +< /* interrupt_input has trouble if we aren't in a separate process group. */ +< setpgrp (getpid (), getpid ()); +< #endif +< +============================= ./src/malloc.c +580c580 +< if ((p = (struct mhead *) mem) == 0) +--- +> if (mem == 0) +582c582 +< p -= (8 / sizeof (struct mhead)); +--- +> p = (struct mhead *) (mem - ((sizeof *p + 7) & ~7)); +600c600 +< nbytes = (n + sizeof *p + EXTRA + 7) & ~7; +--- +> nbytes = (n + ((sizeof *p + 7) & ~7) + EXTRA + 7) & ~7; +============================= ./src/process.c +686a687,697 +> +> DEFUN ("process-kill-without-query-p", Fprocess_kill_without_query_p, +> Sprocess_kill_without_query_p, 1, 1, 0, +> "Return t or nil, depending on whether or not PROCESS will be killed\n\ +> without query.") +> (proc) +> register Lisp_Object proc; +> { +> CHECK_PROCESS (proc, 0); +> return XPROCESS (proc)->kill_without_query; +> } +1064a1076,1079 +> #ifdef HAVE_UNIX_DOMAIN +> #include +> #endif HAVE_UNIX_DOMAIN +> +1066c1081,1082 +< 4, 4, 0, +--- +> 4, 4, 0, +> #ifdef HAVE_UNIX_DOMAIN +1070a1087,1088 +> If SERVICE is 0, then HOST is taken to be the name of a socket file, and a\n\ +> Unix domain socket is opened.\n\ +1079c1097,1113 +< specifying a port number to connect to.") +--- +> specifying a port number to connect to." +> #else +> "Open a TCP connection for a service to a host.\n\ +> Returns a subprocess-object to represent the connection.\n\ +> Input and output work as for subprocesses; `delete-process' closes it.\n\ +> Args are NAME BUFFER HOST SERVICE.\n\ +> NAME is name for process. It is modified if necessary to make it unique.\n\ +> BUFFER is the buffer (or buffer-name) to associate with the process.\n\ +> Process output goes at end of that buffer, unless you specify\n\ +> an output stream or filter function to handle the output.\n\ +> BUFFER may be also nil, meaning that this process is not associated\n\ +> with any buffer\n\ +> Third arg is name of the host to connect to.\n\ +> Fourth arg SERVICE is name of the service desired, or an integer\n\ +> specifying a port number to connect to." +> #endif HAVE_UNIX_DOMAIN +> ) +1085a1120,1123 +> #ifdef HAVE_UNIX_DOMAIN +> struct sockaddr_un server; +> int unix_domain = 0; +> #endif HAVE_UNIX_DOMAIN +1095c1133,1140 +< port = htons ((unsigned short) XINT (service)); +--- +> { +> #ifdef HAVE_UNIX_DOMAIN +> if (XINT (service) == 0) +> unix_domain = 1; +> else +> #endif HAVE_UNIX_DOMAIN +> port = htons ((unsigned short) XINT (service)); +> } +1105,1107c1150,1161 +< host_info = gethostbyname (XSTRING (host)->data); +< if (host_info == 0) +< error ("Unknown host \"%s\"", XSTRING(host)->data); +--- +> #ifdef HAVE_UNIX_DOMAIN +> if (unix_domain) +> { +> server.sun_family = AF_UNIX; +> strcpy (server.sun_path, XSTRING (host)->data); +> } +> else +> #endif HAVE_UNIX_DOMAIN +> { +> host_info = gethostbyname (XSTRING (host)->data); +> if (host_info == 0) +> error ("Unknown host \"%s\"", XSTRING(host)->data); +1109,1112c1163,1167 +< bzero (&address, sizeof address); +< bcopy (host_info->h_addr, (char *) &address.sin_addr, host_info->h_length); +< address.sin_family = host_info->h_addrtype; +< address.sin_port = port; +--- +> bzero (&address, sizeof address); +> bcopy (host_info->h_addr, (char *) &address.sin_addr, host_info->h_length); +> address.sin_family = host_info->h_addrtype; +> address.sin_port = port; +> } +1114,1115c1169,1176 +< s = socket (host_info->h_addrtype, SOCK_STREAM, 0); +< if (s < 0) +--- +> #ifdef HAVE_UNIX_DOMAIN +> if (unix_domain) +> s = socket (AF_UNIX, SOCK_STREAM, 0); +> else +> #endif HAVE_UNIX_DOMAIN +> s = socket (host_info->h_addrtype, SOCK_STREAM, 0); +> +> if (s < 0) +1118,1119c1179,1190 +< if (connect (s, &address, sizeof address) == -1) +< error ("Host \"%s\" not responding", XSTRING (host)->data); +--- +> #ifdef HAVE_UNIX_DOMAIN +> if (unix_domain) +> { +> if (connect (s, &server, strlen (server.sun_path) + 2) < 0) +> error ("connect failed for socket: \"%s\"", XSTRING (host)->data); +> } +> else +> #endif HAVE_UNIX_DOMAIN +> { +> if (connect (s, &address, sizeof address) == -1) +> error ("Host \"%s\" not responding", XSTRING (host)->data); +> } +1199c1270 +< 0, 1, 0, +--- +> 0, 2, 0, +1203,1205c1274,1277 +< from PROCESS.") +< (proc) +< register Lisp_Object proc; +--- +> from PROCESS. Non-nil arg TIMEOUT means wait for that many seconds, -1\n\ +> return immediately.") +> (proc, timeout) +> register Lisp_Object proc, timeout; +1207,1208c1279,1285 +< if (NULL (proc)) +< wait_reading_process_input (-1, 0, 0); +--- +> if (NULL (proc)) { +> if (XTYPE(timeout) == Lisp_Int) +> timeout = XINT(timeout); +> else +> timeout = -1; +> wait_reading_process_input (timeout, 0, 0); +> } +1210a1288,1291 +> if (XTYPE(timeout) == Lisp_Int) +> timeout = XINT(timeout); +> else +> timeout = 0; +1212c1293 +< wait_reading_process_input (0, XPROCESS (proc), 0); +--- +> wait_reading_process_input (timeout, XPROCESS (proc), 0); +2169a2251 +> defsubr (&Sprocess_kill_without_query_p); +============================= ./src/s-bsd4-3.h +77a78,84 +> * Define HAVE_UNIX_DOMAIN is system supports 4.2-compatible UNIX +> * domain sockets. +> */ +> +> #define HAVE_UNIX_DOMAIN +> +> /* +============================= ./src/s-bsd4-2.h +77a78,84 +> * Define HAVE_UNIX_DOMAIN is system supports 4.2-compatible UNIX +> * domain sockets. +> */ +> +> #define HAVE_UNIX_DOMAIN +> +> /* +============================= ./src/s-rtu.h +90a91,97 +> * Define HAVE_UNIX_DOMAIN is system supports 4.2-compatible UNIX +> * domain sockets. +> */ +> +> #define HAVE_UNIX_DOMAIN +> +> /* +============================= ./src/s-hpux.h +90a91,97 +> * Define HAVE_UNIX_DOMAIN is system supports 4.2-compatible UNIX +> * domain sockets. +> */ +> +> #define HAVE_UNIX_DOMAIN +> +> /* +============================= ./src/syntax.c +510a511 +> case Squote: /* DKL 5/23/89 */ +1031a1033,1034 +> Lisp_Object Vparse_partial_sexp_result; +> +1036a1040 +> Lisp_Object val1, val2, val3, val4, val5, val6, val7; +1054,1060c1058,1085 +< return Fcons (make_number (state.depth), +< Fcons (state.prevlevelstart < 0 ? Qnil : make_number (state.prevlevelstart), +< Fcons (state.thislevelstart < 0 ? Qnil : make_number (state.thislevelstart), +< Fcons (state.instring >= 0 ? make_number (state.instring) : Qnil, +< Fcons (state.incomment ? Qt : Qnil, +< Fcons (state.quoted ? Qt : Qnil, +< Fcons (make_number (state.mindepth), Qnil))))))); +--- +> val1 = make_number (state.depth); +> val2 = state.prevlevelstart < 0 ? Qnil : make_number (state.prevlevelstart); +> val3 = state.thislevelstart < 0 ? Qnil : make_number (state.thislevelstart); +> val4 = state.instring >= 0 ? make_number (state.instring) : Qnil; +> val5 = state.incomment ? Qt : Qnil; +> val6 = state.quoted ? Qt : Qnil; +> val7 = make_number (state.mindepth); +> if (NULL (Vparse_partial_sexp_result)) +> return Fcons (val1, +> Fcons (val2, +> Fcons (val3, +> Fcons (val4, +> Fcons (val5, +> Fcons (val6, +> Fcons (val7, Qnil))))))); +> else +> { +> Lisp_Object xx = Vparse_partial_sexp_result; +> +> Fsetcar(xx, val1), xx = Fcdr(xx); +> Fsetcar(xx, val2), xx = Fcdr(xx); +> Fsetcar(xx, val3), xx = Fcdr(xx); +> Fsetcar(xx, val4), xx = Fcdr(xx); +> Fsetcar(xx, val5), xx = Fcdr(xx); +> Fsetcar(xx, val6), xx = Fcdr(xx); +> Fsetcar(xx, val7), xx = Fcdr(xx); +> return Vparse_partial_sexp_result; +> } +1133a1159,1163 +> +> Vparse_partial_sexp_result = Qnil; +> +> DEFVAR_LISP ("parse-partial-sexp-result", &Vparse_partial_sexp_result, +> "If non-nil, it should be a list of length 7."); +============================= ./src/ymakefile +135c135 +< CFLAGS= C_DEBUG_SWITCH -Demacs $(MYCPPFLAG) C_SWITCH_MACHINE C_SWITCH_SYSTEM +--- +> CFLAGS= C_OPTIMIZE_SWITCH -Demacs $(MYCPPFLAG) C_SWITCH_MACHINE C_SWITCH_SYSTEM +273c273 +< ./temacs -batch -l inc-vers +--- +> /* ./temacs -batch -l inc-vers */ +============================= ./src/m-news800.h +74c74 +< #define SEGMENT_MASK (SEGSIZ - 1) +--- +> /* #define SEGMENT_MASK (SEGSIZ - 1) */ +76,77c76 +< /* No sigmask defined anywhere else that I know of. */ +< #define sigmask(n) (1 << ((n) - 1)) +--- +> /* the following is not needed on NEWS-OS Release 3.2 (4.3BSD compatible) */ +78a78 +> /* #define sigmask(n) (1 << ((n) - 1)) */ +============================= ./src/fileio.c +1365a1366,1380 +> DEFUN ("file-size", Ffile_size, Sfile_size, 1, 1, 0, +> "Return the size of FILE, as an integer.") +> (filename) +> Lisp_Object filename; +> { +> Lisp_Object abspath; +> struct stat st; +> +> abspath = expand_and_dir_to_file (filename, bf_cur->directory); +> +> if (stat (XSTRING (abspath)->data, &st) < 0) +> return Qnil; +> return make_number (st.st_size); +> } +> +2169a2185 +> defsubr (&Sfile_size); +============================= ./src/x11term.c +87d86 +< #include diff --git a/SGS_ENV b/SGS_ENV new file mode 100644 index 0000000..852fa9f --- /dev/null +++ b/SGS_ENV @@ -0,0 +1,34 @@ +# +# NeXT Version +# +# SGS_ENV file for version roots +# +# This SGS_ENV file should exist in the version root +# of all version trees. It will normally be placed in +# the master version root and be cloned to all development +# versions. +# +# BASIC definitions for the SGS tools +# +# The MASTER USER for this project. +# The master versions of the project software reside +# in the master user's tree and are owned by the master user. +# +# The PROJECT_NAME for this project. +# The project name is used searching either the master's or +# developer's home/SGS_ENV files to determine the project +# root or the list of project developers (see ~osdev/SGS_ENV) +# +MASTER_USER=comp +PROJECT_NAME=emacs_proj +# +# DONT_DIFF is an egrep(1) pattern which should match all files that +# not interesting to diff or integrate. +# +DONT_DIFF:/tags$|\.o$|/errs$|/make\.out$|\.a$ +# +# Definitions for cross(1) +# +# SGS_VERBOSE says "echo all `translated' commands" +# +SGS_VERBOSE diff --git a/build-install b/build-install new file mode 100644 index 0000000..3203f76 --- /dev/null +++ b/build-install @@ -0,0 +1,29 @@ +#!/bin/csh -fx +# +#Shell script for building and installing Emacs. + +set EMACS=/usr/local/emacs +set BIN=/usr/local/bin + +/bin/sed "s;/usr/local/emacs;$EMACS;" < src/paths.h-dist > src/paths.h + +(cd etc; make) || exit 1 +(cd src; make) || exit 1 + +if (`pwd` != `(cd $EMACS; pwd)`) then + mv `pwd` $EMACS + if ($status) then + mkdir $EMACS + echo mv `pwd` to $EMACS failed--using tar to copy. + tar cf - . | (cd $EMACS; umask 0; tar xf -) + if ($status) then + echo tar-copying `pwd` to $EMACS failed. + exit 1 + endif + endif +endif + +cp $EMACS/etc/{ctags,etags} $BIN +mv $EMACS/src/xemacs $BIN/emacs +rm $EMACS/src/temacs +chmod 777 $BIN/{ctags,etags,emacs} diff --git a/etc/3B-MAXMEM b/etc/3B-MAXMEM new file mode 100644 index 0000000..91cf81c --- /dev/null +++ b/etc/3B-MAXMEM @@ -0,0 +1,75 @@ +Date: Mon, 16 Feb 87 15:04:41 EST +From: katinsky@gauss.rutgers.edu (David Katinsky) +To: rms@prep.ai.mit.edu +Subject: 3b2 procedure to raise MAXMEM + +Below is the procedure I followed to allow enough memory for GnuEmacs to run +on my 3b2/400. The end result of this is that a process can snarf up to 2Mb +of memory. This can be a bit dangerous on a 2Mb machine, but I tried it and +it worked ok. + +------------------------------------------------------------------------------- + +In the simplest case, these are the procedures to reconfigure a 3bx kernel. + + + +1] cd /etc/master.d + +`ls` shows the files to be: + +README ctc* hdelog idisk ipc iuart kernel mau +mem msg ports* prf sem shm stubs sxt +sys xt + +2] Edit the file which contains the parameter[s] you wish to change. +In the following excerpt from /etc/master.d/kernel the value MAXMEM +was raised from 256 to 1024. + +In V.3.0 and later releases, the parameter in question is MAXUMEM +instead of MAXMEM. + + + * + * The following entries form the tunable parameter table. + * + + + NCALL = 30 + NPROC = 60 + NTEXT = 58 + NCLIST = 188 + * maxmem is number of pages (2K) was 256 --dmk + MAXMEM = 1024 + MAXUP = 25 + * hashbuf must be a power of 2 + NHBUF = 128 + NPBUF = 8 + +3] cd /boot + +4] mkboot -k KERNEL + +5] shutdown -i5 -g0 -y + +This will take the machine down and bring it back up into firmware +mode. When you see that the machine has reached this state, type the +firmware password (default=mcp). The machine will ask for the name of +a program to execute. At this prompt enter /etc/system . The machine +should start to boot and display its configuration data. + + + +8701271222 dmk + + [katinsky@topaz.rutgers.edu] +------------------------------------------------------------------------------- + + + +I do not feel that having the default firmware password is a +problem... but if you wish to edit it out, feel free. + + dmk + + diff --git a/etc/APOLLO b/etc/APOLLO new file mode 100644 index 0000000..0939684 --- /dev/null +++ b/etc/APOLLO @@ -0,0 +1,39 @@ +The Apollo has a bizarre operating system which does not permit +Emacs to be dumped with preloaded pure Lisp code. Therefore, each +time you start Emacs on this system, the standard Lisp code is loaded +into it. Expect it to take a long time. You can prevent loading of +the standard Lisp code by specifying the -nl switch. It must +come at the beginning of the command line; only the -t and -batch +switches may come before it. + +You must use m-apollo.h in the config.h file, together with +s-bsd4.2.h. + +There is one remaining problem on the Apollo. You must replace +the CPP line in src/Makefile with "CPP = /usr/lib/cpp". +The C preprocessor lives there rather than in /lib/cpp because the +Aegis OS uses the /lib directory as the repository for shared libraries. + + +Here is a design for a method of dumping and reloading the relevant +necessary impure areas of Emacs. + +On dumping, you need to dump only the array `pure' plus the +locations that contain values of forwarded Lisp variables or that are +protected for garbage collection. The former can be found by a +garbage- collection-like technique, and the latter are in the +staticprolist vector (see alloc.c for both things). + +Reloading would work in an Emacs that has just been started; except +when a switch is specified to inhibit this, it would read the dump +file and set all the appropriate locations. The data loaded must be +relocated, but that's not hard. Those locations that are of type +Lisp_Object can be found by a technique like garbage-collection, and +those of them that point to storage can be relocated. The other data +read from the file will not need to be relocated. + +The switch to inhibit loading the data base would be used when it +is time to dump a new data base. + +This would take a few seconds, which is much faster than loading +the Lisp code of Emacs from scratch. diff --git a/etc/APPLE b/etc/APPLE new file mode 100644 index 0000000..8573c48 --- /dev/null +++ b/etc/APPLE @@ -0,0 +1,57 @@ + +@unnumbered Special Report: Apple's New Look and Feel + +You might have read about the new look-and-feel copyright lawsuit, +Apple vs. Hewlett Packard and Microsoft. Apple claims the power to +stop people from writing any program that works even vaguely like a +Macintosh. If they and other look-and-feel plaintiffs triumph, they +will use this new power over the public to put an end to free software +that could substitute for commercial software. + +In the weeks after the suit was filed, USENET reverberated with +condemnation for Apple. GNU supporters Richard Stallman, John Gilmore, and +Paul Rubin decided to take action against Apple's no-longer-deserved +reputation as a force for progress. Apple's reputation comes from having +made better computers; but now, Apple is working to make all non-Apple +computers worse. If this deprives the public of the future work of many +companies, the harm done would be many times the good that any one company +does. Our hope was that if the user community realizes how destructive +Apple's present actions are, Apple would lose customers and have more +trouble finding employees. + +Our method of action was to print 5000 buttons that say ``Keep Your Lawyers +Off My Computer'' and hand them out at the West Coast Computer Faire. The +center of the button shows the rainbow-apple logo with a Gigeresque mouth +full of ferocious teeth. The picture was drawn by Etienne Suvasa, who also +drew the cover for the GNU Emacs manual. We call the picture ``Apple's New +Look and Feel''. + +We gave out nearly 4000 buttons at the show (saving the rest for +afterwards). The result was a great success: the extent of anger at Apple +was apparent to everyone at the show. Many of the invited speakers at the +show wore our buttons, spoke about them, or even waved them from the +podium. The press noticed this: at least one Macintosh user's magazine +carried a photo of the button afterwards. + +Some of you may be considering using, buying, or recommending Macintoshes; +you might even be writing programs for them or thinking about it. Please +think twice and look for an alternative. Doing those things means more +success for Apple, and this could encourage Apple to persist in its +aggression. It also encourages other companies to try similar +obstructionism. + +[It is because of this boycott that we don't include support for Macontosh +Unix in GNU software.] + +You might think that your current project ``needs'' a Macintosh now. If +you find yourself thinking this way, consider the far future. You probably +plan to be alive a year or two from now, and working on some other project. +You will want to get good computers for that, too. But an Apple monopoly +could easily make the price of such computers at that time several times +what it would otherwise be. Your decision to use some other kind of +machine, or to defer your purchases now, might make sure that the machines +your next project needs are affordable when you need them. + +Newspapers report that Macintosh clones will be available soon. If +you must buy a Macintosh-like machine, buy a clone. Don't feed the +lawyers! diff --git a/etc/CCADIFF b/etc/CCADIFF new file mode 100644 index 0000000..8fd780f --- /dev/null +++ b/etc/CCADIFF @@ -0,0 +1,159 @@ +Differences between GNU Emacs and CCA Emacs. +Copyright (c) 1985 Richard M. Stallman + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and permission notice are preserved, + and that the distributor grants the recipient permission + for further redistribution as permitted by this notice. + +* GNU Emacs Lisp vs CCA Elisp. + +GNU Emacs Lisp does not have a distinction between Lisp functions +and Emacs functions, or between Lisp variables and Emacs variables. +The Lisp and the editor are integrated. A Lisp function defined +with defun is callable as an editor command if you put an +interactive calling spec in it; for example, + (defun forward-character (n) + (interactive "p") + (goto-char (+ (point) n))) +defines a function of one argument that moves point forward by +a specified number of characters. Programs could call this function, +as in (forward-character 6), or it could be assigned to a key, +in which case the "p" says to pass the prefix numeric arg as +the function's argument. As a result of this feature, you often +need not have two different functions, one to be called by programs +and another to read arguments from the user conveniently; the same +function can do both. + +CCA Elisp tries to be a subset of Common Lisp and tries to +have as many Common Lisp functions as possible (though it is still +only a small fraction of full Common Lisp). GNU Emacs Lisp +is somewhat similar to Common Lisp just because of my Maclisp +and Lisp Machine background, but it has several distinct incompatibilities +in both syntax and semantics. Also, I have not attempted to +provide many Common Lisp functions that you could write in Lisp, +or others that provide no new capability in the circumstances. + +GNU Emacs Lisp does not have packages, readtables, or character objects +(it uses integers to represent characters). + +On the other hand, windows, buffers, relocatable markers and processes +are first class objects in GNU Emacs Lisp. You can get information about them +and do things to them in a Lispy fashion. Not so in CCA Emacs. + +In GNU Emacs Lisp, you cannot open a file and read or write characters +or Lisp objects from it. This feature is painful to support, and +is not fundamentally necessary in an Emacs, because instead you +can read the file into a buffer, read or write characters or +Lisp objects in the buffer, and then write the buffer into the file. + +On the other hand, GNU Emacs Lisp does allow you to rename, delete, add +names to, and copy files; also to find out whether a file is a +directory, whether it is a symbolic link and to what name, whether +you can read it or write it, find out its directory component, +expand a relative pathname, find completions of a file name, etc., +which you cannot do in CCA Elisp. + +GNU Emacs Lisp uses dynamic scope exclusively. This enables you to +bind variables which affect the execution of the editor, such as +indent-tabs-mode. + +GNU Emacs Lisp code is normally compiled into byte code. Most of the +standard editing commands are written in Lisp, and many are +dumped, pure, in the Emacs that users normally run. + +GNU Emacs allows you to interrupt a runaway Lisp program with +Control-g. + +* GNU Emacs Editing Advantages + +GNU Emacs is faster for many things, especially insertion of text +and file I/O. + +GNU Emacs allows you to undo more than just the last command +with the undo command (C-x u, or C-_). You can undo quite a ways back. +Undo information is separate for each buffer; changes in one buffer +do not affect your ability to undo in another buffer. + +GNU Emacs commands that want to display some output do so by putting +it in a buffer and displaying that buffer in a window. This +technique comes from Gosling Emacs. It has both advantages and +disadvantages when compared with the technique, copied by CCA Emacs +from my original Emacs which inherited it from TECO, of having "type +out" which appears on top of the text in the current window but +disappears automatically at the next input character. + +GNU Emacs does not use the concept of "subsystems". Instead, it uses +highly specialized major modes. For example, dired in GNU Emacs has +the same commands as dired does in other versions of Emacs, give or +take a few, but it is a major mode, not a subsystem. The advantage +of this is that you do not have to "exit" from dired and lose the +state of dired in order to edit files again. You can simply switch +to another buffer, and switch back to the dired buffer later. You +can also have several dired buffers, looking at different directories. + +It is still possible to write a subsystem--your own command loop-- +in GNU Emacs, but it is not recommended, since writing a major mode +for a special buffer is better. + +Recursive edits are also rarely used, for the same reason: it is better +to make a new buffer and put it in a special major mode. Sending +mail is done this way. + +GNU Emacs expects everyone to use find-file (C-x C-f) for reading +in files; its C-x C-v command kills the current buffer and then finds +the specified file. + +As a result, users do not need to think about the complexities +of subsystems, recursive edits, and various ways to read in files +or what to do if a buffer contains changes to some other file. + +GNU Emacs uses its own format of tag table, made by the "etags" +program. This format makes finding a tag much faster. + +Dissociated Press is supported. + + +* GNU Emacs Editing Disadvantages. + +GNU Emacs does not display the location of the mark. + +GNU Emacs does not have a concept of numbers of buffers, +or a permanent ordering of buffers, or searching through multiple +buffers. The tags-search command provides a way to search +through several buffers automatically. + +GNU Emacs does not provide commands to visit files without +setting the buffer's default directory. Users can write such +commands in Lisp by copying the code of the standard file +visiting commands and modifying them. + +GNU Emacs does not support "plus options" in the command +arguments or in buffer-selection commands, except for line numbers. + +GNU Emacs does not support encryption. Down with security! + +GNU Emacs does not support replaying keystroke files, +and does not normally write keystroke files. + + +* Neutral Differences + +GNU Emacs uses TAB, not ESC, to complete file names, buffer names, +command names, etc. + +GNU Emacs uses ESC to terminate searches, instead of +the C-d uses by CCA Emacs. (Actually, this character is controlled +by a parameter in GNU Emacs.) C-M-s in GNU Emacs is an interactive +regular expression search, but you can get to a noninteractive +one by typing ESC right after the C-M-s. + +In GNU Emacs, C-x s asks, for each modified file buffer, whether +to save it. + +GNU Emacs indicates line continuation with "\" and line +truncation (at either margin) with "$". + +The command to resume a tags-search or tags-query-replace in +GNU Emacs is Meta-Comma. diff --git a/etc/COOKIES b/etc/COOKIES new file mode 100644 index 0000000..d1c4ece --- /dev/null +++ b/etc/COOKIES @@ -0,0 +1,157 @@ +[Someone sent this in from California, and we decided to extend +our campaign against information hoarding to recipes as well +as software. (Recipes are the closest thing, not involving computers, +to software.) + +The story appears to be a myth, according to the Chicago Tribune, +which says that Mrs Fields Cookies hoards the information completely. +Therefore, this recipe can be thought of as a compatible replacement. +We have reports that the cookies it makes are pretty good.] + +Someone at PG&E called the Mrs. Fields Cookie office +and requested the recipe for her cookies. They asked +her for her charge card number, and she gave it to them +thinking the cost would be $15 to $25. It turned out +to be $200! + +Therefore, this person is giving the recipe to anyone +and everyone she knows (and doesn't know) so that +someone can get use of her $200. Anyway, just keep +passing it on. + +Cream together: 2 cups butter + 2 cups sugar + 2 cups brown sugar + +Add: 4 eggs + 2 tsp. vanilla + +Mis together in +separate bowl: 4 cups flour + 5 cups oatmeal (put small + amounts of oatmeal in blender until it turns to + powder. Measure out 5 cups of oatmeal and only + "powderize" that, NOT 5 cups "powderized" oatmeal) + + 1 tsp salt + 2 tsp baking powder + 2 tsp baking soda + +Mix: All of the above + +Add: 24 oz. bag of chocolate chips and + 1 finely grated 8 oz Hershey bar (plain) + +Add: 3 cups chopped nuts (any kind) + +Bake on greased cookie sheet (make golf ball sized balls) and +bake about two inches apart. Bake at 350 degrees for 8 - 10 +minutes. DO NOT OVERBAKE. Makes 112. + +From: ucdavis!lll-lcc!hplabs!parcvax!bane@ucbvax.berkeley.edu (John R. Bane) +Subject: Re: free cookie foundation? + +Hi! I "stole" your very expensive cookie recipe off the net. If you +want to send me your SnailMail address, I'll be glad to send you a +dollar (I would like to suggest this to the net, but I think there is +some netiquette rule against asking for money - or is that only money +for oneself?) to help defray the cost (it's not much, but if EVERYone +who took the recipe sent you a dollar, it would help). + +Here also is another cookie recipe which I'm very fond of. + +Makes 6-8 dozen +Bake at 375 degrees for ~10 min. + +Cream together: + +1 cup shortening (I use Weight Watcher's Reduced Calorie Margarine!) +1/4 cup peanut butter (I recommend the non-sugared kind) +1/2 cup sugar +1/2 cup brown sugar +2 eggs +1 teaspoon vanilla + +Add: + +1/2 cup flour +1 teaspoon soda +1/2 teaspoon salt +2 cups rolled oats (I use the 5-min variety) +1-2 cups chocolate chips (I use 2 cups semi-sweet - ummmm!) +1 cup nuts (I use pecan pieces - don't get them crushed, or the extra + oil will make greasy cookies) +1 cup shredded or flaked coconut + +(The nuts were listed as optional and I added the coconut myself, but +I really love them there! You could also add things like m&m's, or +raisons (I don't care for raisons in cookies, but you might). I've +always wanted to try banana chips.) + +Mix well. Drop by teaspoonfuls on greased cookie sheet (I use pam). +Bake at 375 degrees for approx. 10 min. + +My aunt found this recipe in an Amish book called something like +"Eating Well When The Whole World Is Starving," and although I thought +a cookie recipe was a bit odd for a book like that, they are about the +healthiest a cookie is ever likely to get. + +They are also very easy to make (no blending, sifting, rolling, etc.) +and extrememly delicious. I get rave reviews and recipe requests whenever +I make them. + + - rene + +Chocolate Chip Cookies - Glamorous, crunchy, rich with chocolate bits & nuts. + +Also known as "Toll House" Cookies ... from Kenneth and Ruth Wakefield's +charming New England Toll House on the outskirts of Whitman, Massachusetts. +These cookies were first introduced to American homemakers in 1939 through +our series of radio talks on "Famous Foods From Famous Eating Places." + +Mix Thoroughly : + 2/3 cup soft shortening ( part butter ) + 1/2 cup granulated sugar + 1/2 cup brown sugar ( packed ) + 1 egg + 1 tsp vanilla + +Sift together and stir in : + 1-1/2 cups sifted flour (*) + 1/2 tsp soda + 1/2 tsp salt + +Stir in : + 1/2 cup cut-up nuts + 6 oz package of semi-sweet chocolate pieces ( about 1-1/4 cups ) + + +(*) for a softer, more rounded cookie, use 1-3/4 cups sifted flour. + + +Drop rounded teaspoonfuls about 2" apart on ungreased baking sheet. Bake until +delicately browned ... cookies should still be soft. Cool slightly before you +remove them from the baking sheet. + +Temperature: 375 F. ( modern oven ) +Time: bake 8 - 10 minutes +Amount: 4 - 5 dozen 2" cookies + + +===== + +Personal comments : + +I find it tastes better with a mixture of shortening and butter, as they say. + +You don't need << all >> of that sugar, and it can be whatever color you want. + +The nuts are optional. Feel free to play with the recipe. I put oatmeal in it, +reducing flour accordingly, and sometimes cinnamon. + +I also find it useful to grease the cookie sheets. + +I think I'm going to go bake some now ... + +-- richard + diff --git a/etc/COPYING b/etc/COPYING new file mode 100644 index 0000000..3ce8da9 --- /dev/null +++ b/etc/COPYING @@ -0,0 +1,146 @@ + GNU EMACS GENERAL PUBLIC LICENSE + (Clarified 11 Feb 1988) + + Copyright (C) 1985, 1987, 1988 Richard M. Stallman + Everyone is permitted to copy and distribute verbatim copies + of this license, but changing it is not allowed. You can also + use this wording to make the terms for other programs. + + The license agreements of most software companies keep you at the +mercy of those companies. By contrast, our general public license is +intended to give everyone the right to share GNU Emacs. To make +sure that you get the rights we want you to have, we need to make +restrictions that forbid anyone to deny you these rights or to ask you +to surrender the rights. Hence this license agreement. + + Specifically, we want to make sure that you have the right to give +away copies of Emacs, that you receive source code or else can get it +if you want it, that you can change Emacs or use pieces of it in new +free programs, and that you know you can do these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of Emacs, you must give the recipients all the rights that you +have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + Also, for our own protection, we must make certain that everyone +finds out that there is no warranty for GNU Emacs. If Emacs is +modified by someone else and passed on, we want its recipients to know +that what they have is not what we distributed, so that any problems +introduced by others will not reflect on our reputation. + + Therefore we (Richard Stallman and the Free Software Fundation, +Inc.) make the following terms which say what you must do to be +allowed to distribute or change GNU Emacs. + + COPYING POLICIES + + 1. You may copy and distribute verbatim copies of GNU Emacs source code +as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy a valid copyright notice "Copyright +(C) 1988 Free Software Foundation, Inc." (or with whatever year is +appropriate); keep intact the notices on all files that refer to this +License Agreement and to the absence of any warranty; and give any +other recipients of the GNU Emacs program a copy of this License +Agreement along with the program. You may charge a distribution fee +for the physical act of transferring a copy. + + 2. You may modify your copy or copies of GNU Emacs source code or +any portion of it, and copy and distribute such modifications under +the terms of Paragraph 1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating + that you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, + that in whole or in part contains or is a derivative of GNU Emacs + or any part thereof, to be licensed at no charge to all third + parties on terms identical to those contained in this License + Agreement (except that you may choose to grant more extensive + warranty protection to some or all third parties, at your option). + + c) if the modified program serves as a text editor, cause it when + started running in the simplest and usual way, to print an + announcement including a valid copyright notice "Copyright (C) + 1988 Free Software Foundation, Inc." (or with the year that is + appropriate), saying that there is no warranty (or else, saying + that you provide a warranty) and that users may redistribute the + program under these conditions, and telling the user how to view a + copy of this License Agreement. + + d) You may charge a distribution fee for the physical act of + transferring a copy, and you may at your option offer warranty + protection in exchange for a fee. + +Mere aggregation of another unrelated program with this program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other program under the scope of these terms. + + 3. You may copy and distribute GNU Emacs (or a portion or derivative of it, +under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal + shipping charge) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +For an executable file, complete source code means all the source code for +all modules it contains; but, as a special exception, it need not include +source code for modules which are standard libraries that accompany the +operating system on which the executable file runs. + + 4. You may not copy, sublicense, distribute or transfer GNU Emacs +except as expressly provided under this License Agreement. Any attempt +otherwise to copy, sublicense, distribute or transfer GNU Emacs is void and +your rights to use GNU Emacs under this License agreement shall be +automatically terminated. However, parties who have received computer +software programs from you with this License Agreement will not have +their licenses terminated so long as such parties remain in full compliance. + + 5. If you wish to incorporate parts of GNU Emacs into other free programs +whose distribution conditions are different, write to the Free Software +Foundation. We have not yet worked out a simple rule that can be stated +here, but we will often permit this. We will be guided by the two goals of +preserving the free status of all derivatives of our free software and of +promoting the sharing and reuse of software. + +Your comments and suggestions about our licensing policies and our +software are welcome! Please contact the Free Software Foundation, Inc., +675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296. + + NO WARRANTY + + BECAUSE GNU EMACS IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY +NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, +RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE GNU EMACS "AS IS" +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY +AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE GNU EMACS +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY +SERVICING, REPAIR OR CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL FREE SOFTWARE +FOUNDATION, INC., RICHARD M. STALLMAN, AND/OR ANY OTHER PARTY WHO MAY +MODIFY AND REDISTRIBUTE GNU EMACS AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY +FREE SOFTWARE FOUNDATION, INC.) THE PROGRAM, EVEN IF YOU HAVE BEEN +ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY +OTHER PARTY. diff --git a/etc/ChangeLog b/etc/ChangeLog new file mode 100644 index 0000000..fe88185 --- /dev/null +++ b/etc/ChangeLog @@ -0,0 +1,155 @@ +Sun Jul 8 18:18:00 1990 Richard Stallman (rms at geech) + + * emacsclient.c [BSD]: Include errno.h. + Declare sys_nerr and sys_errlist. + +Wed Jul 4 15:40:33 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * wakeup.c: New file. + * Makefile (wakeup): New rule. + +Wed May 30 15:40:59 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * emacsclient.c: Print program name in error messages. + Handle failure of getwd. + Handle +LINE arguments in SYSVIPC case. + These are most of the changes already in the version 19 file. + +Mon May 28 21:54:59 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * loadst.c (main): Conditional to get load average on Apollo. + +Sun Dec 24 23:54:28 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * etags.c (readline): Separate out init of `pend'. + +Thu Jun 15 12:53:43 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * movemail.c [USG]: Define F_OK, etc., if not in header. + +Fri May 12 22:08:09 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * etags.c (readline): Split call to xrealloc for 3b1 cc bug. + +Tue Apr 18 21:31:25 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * loadst.c: on bsd4.3, use gettimeofday instead of CPUSTATES. + +Thu Mar 16 13:43:07 1989 Randall Smith (randy at sugar-bombs.ai.mit.edu) + + * MACHINES: m-sequent.h works for symmetry also. + +Mon Mar 13 17:03:06 1989 Randall Smith (randy at sugar-bombs.ai.mit.edu) + + * MACHINES: Added note mentioning m-news3.0.h. + +Tue Feb 21 12:58:55 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * movemail.c: On sysv, include unistd.h. + +Tue Jan 3 13:29:46 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * movemail.c: Check access before doing real work. + Check that outfile is in a writable directory. + On fatal error, delete the lock file. + +Fri Dec 30 16:37:27 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * movemail.c: Use `access' to check input and output files. + +Wed Dec 28 23:16:28 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * emacsclient.c [USG]: Don't append cwd if abs pathname is spec'd. + +Wed Nov 30 15:21:13 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * movemail.c: Do fsync before closing output. + +Tue Nov 29 09:59:54 1988 Richard Mlynarik (mly at pickled-brain.ai.mit.edu) + + * movemail.c: Better error message when can't create tempname. + This file needs a great deal of extra error-checking and lucid reporting... + +Tue Nov 15 10:00:21 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * movemail.c: Close output and check errors before deleting input. + +Thu Aug 4 19:42:45 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * emacsclient.c: Args like +DIGITS are passed through unchanged. + +Tue Jul 12 22:08:00 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * server.c: If both BSD and HAVE_SYSVIPC, use the latter. + * emacsclient.c: Likewise. + In the HAVE_SYSVIPC alternative, if BSD, use getwd instead of getcwd. + +Thu Jun 23 08:40:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * etags.c: Handle `typedef struct foo {' (price@mcc.com). + (istoken) New string-comparison macro. + (consider_token): New arg `level'. New state `tag_ok' in `tydef'. + +Tue Jun 14 04:25:58 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * etags.c: Changes for VMS. + Always define ETAGS on VMS. + Define macros GOOD and BAD for success and failure exit codes. + (begtk, intk): Allow `$' in identifiers + (main): Don't support -B, -F or -u on VMS. + Alternate loop for scanning filename arguments. + (system): Delete definition of this function. + + * etags-vmslib.c (system): Undefine this; VMS now provides it. + +Wed Jun 8 08:18:21 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * loadst.c: Prevent multiple-def errors on BSD and BSD4_3 + around include of param.h. (Like fns.c.) + +Mon May 16 01:06:26 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * loadst.c (load_average): Move load-average code to this new fn. + Add conditionals to compute load ave on UMAX. + +Sat May 14 01:24:53 1988 Richard Stallman (rms at lucky-charms.ai.mit.edu) + + * loadst.c: Change DK_HEADER_FILE to DKSTAT_HEADER_FILE + with opposite sense. + +Fri May 13 18:09:39 1988 Chris Hanson (cph at kleph) + + * emacsclient.c: Delete references to unused variable `out'. This + caused a bus error when used under hp-ux. + +Fri May 6 10:42:31 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * loadst.c: Control dk.h conditional with DK_HEADER_FILE. + +Wed May 4 16:08:43 1988 Richard Stallman (rms at rice-krispies.ai.mit.edu) + + * etags.c (find_entries): `.t' or `.sch' means scheme code. + +Fri Apr 29 00:22:26 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * loadst.c: Add BSD4_3 conditional for file dk.h instead of dkstat.h. + +Thu Apr 28 08:55:46 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * movemail.c: #undef close, since config can #define it on V.3. + * emacsclient.c, fakemail.c, loadst.c, server.c: likewise. + +Tue Apr 26 07:33:01 1988 Richard Stallman (rms at lucky-charms.ai.mit.edu) + + * etags.c (TEX_mode, etc.): Remove superfluous backslashes from + invalid escape sequences such as `\{'. + + * loadst.c: Add `sequent' conditional for file dk.h. + +Sun Mar 20 13:17:13 1988 Richard M. Stallman (rms at wilson) + + * server.c [not BSD and not HAVE_SYSVIPC]: fix error message. + + * loadst.c (main) [XENIX]: use /usr/spool/mail, not /usr/mail. + + diff --git a/etc/DEBUG b/etc/DEBUG new file mode 100644 index 0000000..2fc8782 --- /dev/null +++ b/etc/DEBUG @@ -0,0 +1,113 @@ +Debugging GNU Emacs +Copyright (c) 1985 Richard M. Stallman. + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and permission notice are preserved, + and that the distributor grants the recipient permission + for further redistribution as permitted by this notice. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +On 4.2 you will probably find that dbx does not work for +debugging GNU Emacs. For one thing, dbx does not keep the +inferior process's terminal modes separate from its own. +For another, dbx does not put the inferior in a separate +process group, which makes trouble when an inferior uses +interrupt input, which GNU Emacs must do on 4.2. + +dbx has also been observed to have other problems, +such as getting incorrect values for register variables +in stack frames other than the innermost one. + +The Emacs distribution now contains GDB, the new source-level +debugger for the GNU system. GDB works for debugging Emacs. +GDB currently runs on vaxes under 4.2 and on Sun 2 and Sun 3 +systems. + + +** Some useful techniques + +`Fsignal' is a very useful place to stop in. +All Lisp errors go through there. + +It is useful, when debugging, to have a guaranteed way +to return to the debugger at any time. If you are using +interrupt-drived input, which is the default, then Emacs is using +RAW mode and the only way you can do it is to store +the code for some character into the variable stop_character: + + set stop_character = 29 + +makes Control-] (decimal code 29) the stop character. +Typing Control-] will cause immediate stop. You cannot +use the set command until the inferior process has been started. +Put a breakpoint early in `main', or suspend the Emacs, +to get an opportunity to do the set command. + +If you are using cbreak input (see the Lisp function set-input-mode), +then typing Control-g will cause a SIGINT, which will return control +to the debugger immediately unless you have done + + ignore 3 (in dbx) +or handle 3 nostop noprint (in gdb) + +You will note that most of GNU Emacs is written to avoid +declaring a local variable in an inner block, even in +cases where using one would be the cleanest thing to do. +This is because dbx cannot access any of the variables +in a function which has even one variable defined in an +inner block. A few functions in GNU Emacs do have variables +in inner blocks, only because I wrote them before realizing +that dbx had this problem and never rewrote them to avoid it. + +I believe that GDB does not have such a problem. + + +** If GDB does not run and your debuggers can't load Emacs. + +On some systems, no debugger can load Emacs with a symbol table, +perhaps because they all have fixed limits on the number of symbols +and Emacs exceeds the limits. Here is a method that can be used +in such an extremity. Do + + nm -n temacs > nmout + strip temacs + adb temacs + 0xd:i + 0xe:i + 14:i + 17:i + :r -l loadup (or whatever) + +It is necessary to refer to the file `nmout' to convert +numeric addresses into symbols and vice versa. + +It is useful to be running under a window system. +Then, if Emacs becomes hopelessly wedged, you can create +another window to do kill -9 in. kill -ILL is often +useful too, since that may make Emacs dump core or return +to adb. + + +** Debugging incorrect screen updating. + +To debug Emacs problems that update the screen wrong, it is useful +to have a record of what input you typed and what Emacs sent to the +screen. To make these records, do + +(open-dribble-file "~/.dribble") +(open-termscript "~/.termscript") + +The dribble file contains all characters read by Emacs from the +terminal, and the termscript file contains all characters it sent to +the terminal. The use of the directory `~/' prevents interference +with any other user. + +If you have unreproduceable display problems, put those two expressions +in your ~/.emacs file. When the problem happens, exit the Emacs that +you were running, kill it, and rename the two files. Then you can start +another Emacs without clobbering those files, and use it to examine them. diff --git a/etc/DIFF b/etc/DIFF new file mode 100644 index 0000000..2a21ee8 --- /dev/null +++ b/etc/DIFF @@ -0,0 +1,779 @@ +How is this Emacs different from all other Emacses? -*-Outline-*- + (Actually, from Twenex Emacs) + +* Copyright (c) 1985 Richard M. Stallman + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and permission notice are preserved, + and that the distributor grants the recipient permission + for further redistribution as permitted by this notice. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +* Fundamental concepts. + +** There is no concept of "typeout" in GNU Emacs. + +Any time that a command wants to display some output, +it creates a buffer (usually with a name surrounded by asterisks) +and displays it in a window. + +This provides some advantages: + you can edit some more while looking at the output; + you can copy parts of the output into other buffers. + +It also has a disadvantage that you must type a command +in order to make the output disappear. +You can use C-x 1 to get rid of all windows except the +selected one. To be more selective, you can switch to +the window you want to get rid of and then type C-x 0 +(delete-window). + +You also need to type a command to scroll the other +window if not all the output fits in it. Meta-Control-v +will usually do the job. + +** There is no concept of a "subsystem" in GNU Emacs. + +Where Twenex Emacs would use a subsystem, GNU Emacs +instead creates a buffer and redefines commands in it. + +For example, when you send mail in GNU Emacs, you use +a buffer named *mail* which is in Mail Mode. You can +switch away from this buffer to any other buffer and +resume normal editing; then switch back and resume +composing mail. You do not have to "exit" from +composing mail in order to do ordinary editing. + +This has many advantages, but it also has a disadvantage: +Subsystems in Emacs tend to have "exit" commands that return you +to whatever you were doing before entering the subsystem. +In GNU Emacs the idea of what to return to is not well defined, +so it is not clear what an "exit" command should do. +The only way to "exit" in general is to type C-x b, C-x C-f, or +some other suitable command to switch buffers. Some +subsystem-like major modes, such as Info and Mail mode, provide +commands to "exit" by switching to the previously selected +buffer. + +** Files are always visited in their own buffers. + +Beginning users of Twenex Emacs were told how to edit +using a single buffer and reading one file after another +into that buffer. Use of a new buffer for each file was +regarded as a more advanced mode. + +In GNU Emacs, the idea of using a single buffer for various +files, one by one, has been dropped, given that the address +space is expected to be large enough for many buffers. C-x +C-f (find-file), which behaves nearly the same as in Twenex +Emacs, is in GNU Emacs the canonical way for all users to +visit files. + +Various commands need to read files into Emacs in the course +of their execution. In Twenex Emacs the user must tell them +whether to reuse buffers or create new ones, using the variable +Tags Find File. In GNU Emacs, these commands always use +C-x C-f. + +The command C-x C-v does still exist; it kills the current +buffer and reads the specified file into a new buffer. +It is equivalent to kill-buffer followed by find-file. + +Since there is no reusing of buffers, there is no point in +calling the initial buffer "main". So the initial buffer +in GNU Emacs is called "*scratch*" and is intended for typing +Lisp expressions to be evaluated. + +** File name defaulting. + +GNU Emacs records a separate working directory for each buffer. +Normally this is the directory on which the buffer's file +resides; for buffers not visiting any file, it is copied from +the buffer that was current when it was created. The current buffer's +working directory can be printed with M-x pwd and set with M-x cd. + +GNU Emacs shows you the default directory by inserting it in +the minibuffer when a file name is being read. You can type +the filename you want at the end of the default as if the +default were not there, or you can edit and alter the default. + +If you want file /lose/big when the default /foo/defaultdir/ +has been inserted for you, you need not kill the default; simply +type at the end of it: /foo/defaultdir//lose/big. Such a file +name is not ordinarily considered valid, but GNU Emacs +considers it equivalent to /lose/big. + +Likewise, if you want file quux in your home directory, just add +~/quux to the end of the supplied text, to get +/foo/defaultdir/~/quux. GNU Emacs sees "/~" and throws away +everything before the "~". + +You can refer to environment variables also within file names. +$ followed by the environment variable name is replaced by the +variable's value. The variable name should either be followed +by a nonalphanumeric character (which counts as part of the +file name) or be surrounded by braces {...} (which do not count +as part of the file name). Thus, if variable USER has value "rms", +"x/$USER-foo" is expanded to "x/rms-foo", and "x${USER}foo" +is expanded to "xrmsfoo". Note that this substitution is not +performed by the primitive file operation functions of GNU Emacs, +but rather by the interactive file name reader. It is also +available as a separate primitive, in the function +substitute-in-file-name. + +** Exit commands C-z, C-x C-c and C-x C-z. + +There are two ways to exit GNU Emacs: killing and suspending. +Killing is like what Control-c does to ordinary Unix programs. +In GNU Emacs, you type C-x C-c to kill it. (This offers to +save any modified file buffers before really killing Emacs.) +Suspending is like what Control-z does to ordinary Unix programs. +To suspend GNU Emacs, type C-x C-z, or type just C-z. +Note that C-z suspends ordinary programs instantly, but +Emacs does not suspend until it reads the C-z. + +Usually it is better to suspend: once a system is smart +enough to have job control, why ever kill an editor? +You'll just have to make a new one in a minute. +This is why the convenient command C-z is provided for +suspending. + +C-c is used as a prefix key for mode-specific commands and for users' +own commands. We deliberately do not make C-c ever kill Emacs, +because it should not be so easy to do something irreversible. + +** Quitting with C-g. + +If you type C-g while GNU Emacs is waiting for input, it +is an ordinary command (which is defined to beep). If you +type C-g while Lisp code is executing, it sets a flag which +causes a special signal, nearly the same as an error, to +happen atthe next safe place in Lisp execution. This usually +has the effect of aborting the current command in a safe way. + +Because at times there have been bugs causing GNU Emacs to loop +without checking the quit flag, a special feature causes +GNU Emacs to be suspended immediately if you type a second C-g +while the flag is already set. So you can always get out +of GNU Emacs. Normally GNU Emacs recognizes and clears the quit flag +quickly enough to prevent this from happening. + +When you resume GNU Emacs after a suspension caused by multiple C-g, it +asks two questions before resuming execution: + Checkpoint? + Dump core? +Answer each one with `y' or `n' and a Return. + `y' to Checkpoint? causes immediate auto-saving of all + buffers in which auto-saving is enabled. + `y' to Dump core? causes an illegal instruction to be executed. + This is to enable a wizard to figure out why GNU Emacs was + looping without checking for quits. Execution does not continue + after a core dump. If you answer `n', execution continues. +With luck, GNU Emacs will ultimately check the quit flag, +and quit normally. If not, and you type another C-g, it +is suspended again. + +If GNU Emacs is not really hung, just slow, you may invoke +the double C-g feature without really meaning to. Then just +resume and answer `n' to both questions, and you will +arrive at your former state. Presumably the quit you +wanted will finish happening soon. + +These questions are not asked if you suspend GNU Emacs with the C-z +command. Continuing GNU Emacs after a C-z takes you straight back +into editing. + +** Undoing with C-x u or C-_ + +You can undo many commands--up to 10,000 characters worth. +Each time you type C-x u or C-_, another command or batch of change +is undone. Undo information is stored per buffer, and the undo +command always applies to the current buffer. A numeric argument +serves as a repeat count. + +Consecutive self-inserting characters are undone in groups of twenty. + +** Different character set. + +GNU Emacs does not expect anyone ever to have a keyboard in which +the Control key sets an independent bit which may accompany any +character. The only control characters that can exist are the +ASCII control characters. + +There is, as a result, no "control prefix" character. + +** Control-h is the Help character. + +I'm amazed it took me so long to get this idea. In Twenex Emacs, C-h +and C-b are equivalent commands, making C-h redundant. C-h is not +only easy to type, it is mnemonic for "Help". So in GNU Emacs the +Help character is C-h. + +** Completion is done by TAB, not ESC. + +ESC in the minibuffer is a Meta prefix, same as at top level. + +** The string-argument reader is the minibuffer is an editor window. + +In GNU Emacs, the line at the bottom of the screen is the minibuffer. +Commands that want string arguments always use this line to read them, +and you can use the ordinary Emacs editing commands to edit the +input. You can terminate input with Return because Return is defined +as the exit-minibuffer command when in the minibuffer. If you +are using a command that needs several arguments, terminate each +one with Return. You cannot separate arguments with Escape +the way you would in Twenex Emacs. + +The minibuffer window does not overlay other editor windows; +it is a nearly ordinary editor window which lacks a mode line +and is "turned off" when not in use. While it IS in use, you +can switch windows to and from the minibuffer, kill text in other +windows and yank in the minibuffer, etc. + +You can even issue a command that uses the minibuffer while in the +minibuffer. This gets you temporarily into a recursive minibuffer. +However, this is allowed only if you enable it, since it could be +confusing for beginners. + +When you exit the minibuffer, the cursor immediately moves back to +column zero of the minibuffer line, to show you that the exit +command has been obeyed. The minibuffer contents remain on the screen +until the end of the command, unless some other text is displayed there. + +A single Control-g exits the minibuffer. + +** There are no &'s or ^R's or spaces in function names. + +For example, the function which is called ^R Forward Word +in Twenex Emacs is called forward-word in GNU Emacs. + +** The extension language is Lisp rather than TECO. + +Libraries must be written in Lisp. Meta-ESC reads a Lisp +expression, evaluates it, and prints the result. Note that +Meta-ESC is "disabled" by default, so that beginning users +do not get into the minibuffer by accident in a confusing way. + +Data types available include integers (which double as characters), +strings, symbols, lists, vectors, buffers, buffer pointers, +windows, and process channels. + +For now, to learn about writing Lisp code for GNU Emacs, read some of +the source code, which is in directory ../lisp. Also, all Lisp +primitives have self-documentation you can read with C-h f. + +** Enabling the error handler. + +GNU Emacs has a Lisp debugger/stepper/trace package, but normally +errors do not enter the debugger because that is slow, and unlikely to +be of interest to most users. Set the variable debug-on-error to t to +cause errors to invoke the debugger. Set debug-on-quit to cause quit +signals (caused by C-g) to invoke the debugger. + +* Other changes. + +** More than two windows are allowed. + +C-x 2 splits the current window into two windows, + one above the other. Initially they both display + the same buffer. + + C-x 2 now accepts a numeric argument to specify the number of + lines to give to the uppermost of the two windows it makes. + +C-x 0 kills the current window, making all others larger. +C-x 1 kills all windows except the current one. +C-x O switches to the next window down. + It rotates from the bottom one to the top one. + An argument serves as a repeat count; negative arguments + circulate in the reverse order. + +If the same buffer is displayed in several windows, +changes made in it are redisplayed in all of them. + +** Side by side windows are supported. + +The command C-x 5 splits the current window into +two side-by-side windows. + +C-x } makes the selected window ARG columns wider at the +expense of the windows at its sides. C-x { makes the selected +window ARG columns narrower. An argument to C-x 5 specifies +how many columns to give to the leftmost of the two windows made. + +** Horizontal scrolling of the lines in a window is implemented. + +C-x < (scroll-left) scrolls all displayed lines left, +with the numeric argument (default 1) saying how far to scroll. +When the window is scrolled left, some amount of the beginning +of each nonempty line is replaced by an "$". +C-x > scrolls right. If a window has no text hidden at the left +margin, it cannot be scrolled any farther right than that. +When nonzero leftwards scrolling is in effect in a window. +lines are automatically truncated at the window's right margin +regardless of the value of the variable truncate-lines in the +buffer being displayed. + +** Return key does not use up empty lines. + +In Twenex Emacs, the Return command advances over an existing +empty line in some cases. In GNU Emacs, the Return command always +makes inserts a newline. Twenex Emacs was designed at a time when +most display terminals did not have the ability to scroll part +of the screen, and using existing empty lines made redisplay faster. +Nowadays, terminals that cannot scroll part of the screen are rare, +so there is no need to make Return behave in a more complicated manner. + +** Help m. + +Typing C-h m displays documentation of the current major mode., +telling you what special commands and features are available +and how to use them or get more information on them. + +This is simply the documentation, as a function, of the +symbol which is the value of major-mode. Each major mode +function has been given documentation intended for C-h m. + +** Display-hiding features. + +*** Hiding indented lines + +The command C-x $ with numeric argument N causes lines indented by N +or more columns to become invisible. All you see is " ..." appended +to the previous line, in place of any number of consecutive invisible +lines. + +*** Outline Mode. + +Outline mode is designed for editing outline-structured +files, such as this one. + +Headings should be lines starting with one or more asterisks. +Major headings have one asterisk, subheadings two, etc. +Lines not starting with asterisks are body text. + +You can make the body under a heading, or the subheadings +under a heading, temporarily invisible, or visible again. +Invisible lines are attached to the end of the previous line +so they go with it if you kill it and yank it back. + +Commands: +Meta-} next-visible-heading move by visible headings +Meta-{ previous-visible-heading move by visible headings + +Meta-x hide-body make all body text invisible (not headings). +Meta-x show-all make everything in buffer visible. + +The remaining commands are used when dot is on a heading line. +They apply to some of the body or subheadings of that heading. +C-c C-h hide-subtree make text and subheadings invisible. +C-c C-s show-subtree make text and subheadings visible. +C-c C-i show-children make direct subheadings visible. + No effect on body, or subheadings 2 or more levels down. + With arg N, affects subheadings N levels down. +M-x hide-entry make immediately following body invisible. +M-x show-entry make it visible. +M-x hide-leaves make text under heading and under its subheadings invisible. + The subheadings remain visible. +M-x show-branches make all subheadings at all levels visible. + +** C mode is fancy. + +C mode assumes that you put the initial open-brace of +a function definition at the beginning of a line. +If you use the popular indenting style that puts this +open-brace at the end of a line containing a type declaration, +YOU WILL LOSE: C mode does not know a function starts there. + +Open-brace at the beginning of a line makes it possible +for C mode to find function boundaries with total reliability; +something I consider vital and which cannot be done +if the other style is used. + +The Tab command indents C code very cleverly. +I know of only one cases in which Tab does not indent C code nicely: + Expressions continued over several lines with few parentheses. + Tab does not know the precedences of C operators, so it does + not know which lines of the expression should go where. + Using parentheses to indicate the nesting of operators + except within a line makes this problem go away. + +The indenting algorithm is entirely written in Lisp. + +Tab with a numeric argument in Twenex Emacs indents +that many lines. It is different in GNU Emacs: it means +to shift all the lines of a bracketed expression by the +same amount as the line being indented. For example, if you have + if (foo) + { + hack (); + /** Well? */ + } +and type C-u Tab on the line with the open brace, you get + if (foo) + { + hack (); + /* Well? */ + } +from indenting the brace line and then shifting the +lines within the braces rigidly with the first one. + +Meta-Control-q works as in Lisp mode; it should be +used with dot just before a bracketed grouping, and +indents each line INSIDE that grouping using Tab. +If used instead of C-u Tab in the previous example, it makes + if (foo) + { + hack (); + /* Well? */ + } + +Meta-Control-h puts mark at the end of the current C function +and puts dot before it. + +Most other Meta-Control commands intended for Lisp expressions +work usefully in C mode as well. + +** Meta-g (fill-region) is different. + +In Twenex Emacs, Meta-g fills the region with no paragraph +boundaries except for blank and indented lines. In GNU Emacs, +it divides the region into paragraphs in the same manner as +Meta-], and fills each paragraph separately. There is also +the function fill-region-as-paragraph which fills the region +regarding at as a single paragraph regardless even of blank +or indented lines. + +** Indented Text Mode instead of Edit Indented Text. + +Twenex Emacs has a command Edit Indented Text which temporarily +alters some commands for editing indented paragraphs. +GNU Emacs has instead a separate major mode, Indented Text Mode, +which is different from ordinary Text Mode in just the same +alterations. Specifically, in Indented Text Mode, +Tab runs the function indent-relative, and auto filling indents +the newly created lines. + +** But rectangle commands are implemented. + +C-x r stores the rectangle described by dot and mark +into a register; it reads the register name from the keyboard. +C-x g, the command to insert the contents of a register, +can be used to reinsert the rectangle elsewhere. + +Other rectangle commands include + open-rectangle: + insert a blank rectangle in the position and size + described by dot and mark, at its corners; + the existing text is pushed to the right. + clear-rectangle: + replace the rectangle described by dot ane mark + with blanks. The previous text is deleted. + delete-rectangle: + delete the text of the specified rectangle, + moving the text beyond it on each line leftward. + kill-rectangle + like delete-rectangle but also stores the text of + the rectangle in the "rectangle kill buffer". + More precisely, it stores the text as a list of strings + (one string for each line) in the variable killed-rectangle. + yank-rectangle + inserts the text of the last killed rectangle. + extract-rectangle and delete-extract-rectangle + these functions return the text of a rectangle + as a list of strings. They are for use in writing + other functions that operate on rectangles. + +** Keyboard Macros + +The C-x ( command for defining a keyboard macro can in GNU Emacs +be given a numeric argument, which means that the new macro +starts out not empty but rather as the same as the last +keyboard macro entered. In addition, that last keyboard +macro is replayed when the C-x ( is typed. C-x ( with an +argument is thus equivalent to typing plain C-x ( and then +retyping the last keyboard macro entered. + +The command write-kbd-macro and append-kbd-macro can be used to +save a keyboard macro definition in a file. It is represented as +a Lisp expression which, when evaluated, will define the keyboard +macro. write-kbd-macro writes the specified file from scratch, +whereas append-kbd-macro adds to any existing text in the file. +Both expect the keyboard macro to be saved to be specified by +name; this means you must use the command name-last-kbd-macro to +give the macro a name before you can save it. + +** The command to resume a terminated tags-search or tags-query-replace + +is Meta-comma in GNU Emacs. + +** Auto Save is on by default. + +Auto Save mode is enabled by default in all buffers +that are visiting files. + +The file name used for auto saving is made by prepending +"#" to the file name visited. + +** Backup files. + +Since Unix stupidly fails to have file version numbers, +GNU Emacs compensates slightly in the customary fashion: +when a file is modified and saved for the first time in +a particular GNU Emacs run, the original file is renamed, +appending "~" to its name. Thus, foo.c becomes foo.c~. + +Emacs can also put a version number into the name of the backup file, +as in foo.c.~69~ for version number 69. This is an optional feature +that the user has to enable. + +** Mode Line differences. + +Each window in GNU Emacs has its own mode line, which always +displays the status of that window's buffer and nothing else. +The mode line appears at the bottom of the window. It is +full of dashes, to emphasize the boundaries between windows, +and is displayed in inverse video if the terminal supports it. +The information usually available includes: + +** Local Modes feature changed slightly. + +GNU Emacs supports local mode lists much like those in Twenex Emacs, +but you can only set variables, not commands. You write + +Local variables: +tab-width: 10 +end: + +in the last page of a file, if you want to make tab-width be ten in a +file's buffer. The value you specify must be a Lisp object! +It will be read, but not evaluated. So, to specify a string, +you MUST use doublequotes. For "false", in variables whose +meanings are true or false, you MUST write nil . + +Two variable names are special: "mode" and "eval". +Mode is used for specifying the major mode (as in Twenex Emacs). + +mode: text + +specifies text mode. Eval is used for requesting the evaluation +of a Lisp expression; its value is ignored. Thus, + +eval: (set-syntax-table lisp-mode-syntax-table) + +causes Lisp Mode syntax to be used. + + +Note that GNU Emacs looks for the string "Local variables:" +whereas Twenex Emacs looks for "Local modes:". This incompatibility +id deliberate, so that neither one will see local settings +intended for the other. + +** Lisp code libraries. + +Libraries of commands, and init files, are written in Lisp. +libraries conventionally have names ending in .el, while the +init file is named .emacs and is in your home directory. + +Use Meta-x load-library to load a library. Most standard libraries +load automatically if you try to use the commands in them. + +Meta-x byte-compile-file filename +compiles the file into byte code which loads and runs faster +than Lisp source code. The file of byte code is given a name +made by appending "c" to the end of the input file name. + +Meta-x byte-recompile-directory directoryname +compiles all files in the specified directory (globbing not allowed) +which have been compiled before but have been changed since then. + +Meta-x load-library automatically checks for a compiled file +before loading the source file. + +Libraries once loaded do not retain their identity within GNU +Emacs. Therefore, you cannot tell just what was loaded from a +library, and you cannot un-load a library. Normally, libraries +are written so that loading one has no effect on the editing +operations that you would have used if you had not loaded the +library. + +** Dired features. + +You can do dired on partial directories --- any pattern +the shell can glob. Dired creates a buffer named after +the directory or pattern, so you can dired several different +directories. If you repeat dired on the same directory or +pattern, it just reselects the same buffer. Use Meta-x Revert +on that buffer to read in the current contents of the directory. + +** Directory listing features. + +C-x C-d now uses the default output format of `ls', +which gives just file names in multiple columns. +C-u C-x C-d passes the -l switch to `ls'. + +Both read a directory spec from the minibuffer. It can +be any pattern that the shell can glob. + +** Compiling other programs. + +Meta-x compile allows you to run make, or any other compilation +command, underneath GNU Emacs. Error messages go into a buffer whose +name is *compilation*. If you get error messages, you can use the +command C-x ` (that is a backquote) to find the text of the next +error message. + +You must specify the command to be run as an argument to M-x compile. +A default is placed in the minibuffer; you can kill it and start +fresh, edit it, or just type Return if it is what you want. +The default is the last compilation command you used; initially, +it is "make -k". + +** Searching multiple files. + +Meta-x grep searches many files for a regexp by invoking grep +and reading the output of grep into a buffer. You can then +move to the text lines that grep found, using the C-x ` command +just as after M-x compile. + +** Running inferior shells. + +Do Meta-x shell to make an inferior shell together with a buffer +which serves to hold "terminal" input and output of the shell. +The shell used is specified by the environment variable ESHELL, +or by SHELL if ESHELL is not set. + +Use C-h m whilst in the *shell* buffer to get more detailed info. + +The inferior shell loads the file .emacs_csh or.emacs_sh +(or similar using whatever name the shell has) when it starts up. + +M-! executes a shell command in an inferior shell +and displays the output from it. With a prefix argument, +it inserts the output in the current buffer after dot +and sets the mark after the output. The shell command +gets /dev/null as its standard input. + +M-| is like M-! but passes the contents of the region +as input to the shell command. A prefix argument makes +the output from the command replace the contents of the region. + +** Sending mail. + +Once you enter Mail Mode using C-x m or C-x 4 m or M-x mail, +C-c becomes a prefix character for mail-related editing commands. +C-c C-s is vital; that's how you send the message. C-c C-c sends +and then switches buffers or kills the current window. +Use C-h m to get a list of the others. + +** Regular expressions. + +GNU Emacs has regular expression facilities like those of most +Unix editors, but more powerful: + +*** -- + -- + ++ specifies repetition of the preceding expression 1 or more +times. It is in other respect like *, which specifies repetition +0 or more times. + +*** -- ? -- + +? is like * but matches at most one repetition of the preceding +expression. + +*** -- \| -- + +\| specifies an alternative. Two regular expressions A and B with \| in +between form an expression that matches anything that either A or B will +match. Thus, "foo\|bar" matches either "foo" or "bar" but no other +string. + +\| applies to the larges possible surrounding expressions. Only a +surrounding \( ... \) grouping can limit the grouping power of \|. + +Full backtracking capability exists when multiple \|'s are used. + +*** -- \( ... \) -- + +\( ... \) are a grouping construct that serves three purposes: + +1. To enclose a set of \| alternatives for other operations. + Thus, "\(foo\|bar\)x" matches either "foox" or "barx". +2. To enclose a complicated expression for * to operate on. + Thus, "ba\(na\)*" matches "bananana", etc., with any number + of na's (zero or more). +3. To mark a matched substring for future reference. + +Application 3 is not a consequence of the idea of a parenthetical +grouping; it is a separate feature which happens to be assigned as a +second meaning to the same \( ... \) construct because there is no +conflict in practice between the two meanings. Here is an explanation +of this feature. + + -- \digit -- + +After the end of a \( ... \) construct, the matcher remembers the +beginning and end of the text matched by that construct. Then, later on +in the regular expression, you can use \ followed by a digit to mean, +``match the same text matched this time by the \( ... \) construct.'' +The first nine \( ... \) constructs that appear in a regular expression +are assigned numbers 1 through 9 in order of their beginnings. \1 +through \9 can be used to refer to the text matched by the corresponding +\( ... \) construct. + +For example, "\(.*\)\1" matches any string that is composed of two +identical halves. The "\(.*\)" matches the first half, which can be +anything, but the \1 that follows must match the same exact text. + +*** -- \` -- + +Matches the empty string, but only if it is at the beginning of the buffer. + +*** -- \' -- + +Matches the empty string, but only if it is at the end of the buffer. + +*** -- \b -- + +Matches the empty string, but only if it is at the beginning or end of +a word. Thus, "\bfoo\b" matches any occurrence of "foo" as a separate word. +"\bball\(s\|\)\b" matches "ball" or "balls" as a separate word. + +*** -- \B -- + +Matches the empty string, provided it is NOT at the beginning or end of +a word. + +*** -- \< -- + +Matches the empty string, provided it is at the beginning of a word. + +*** -- \> -- + +Matches the empty string, provided it is at the end of a word. + +*** -- \w -- + +Matches any word-constituent character. The editor syntax table determines +which characters these are. + +*** -- \W -- + +Matches any character that is not a word-constituent. + +*** -- \s -- + +Matches any character whose syntax is . is a letter that +represents a syntax code: thus, "w" for word constituent, "-" for +whitespace, "(" for open-parenthesis, etc. Thus, "\s(" matches any +character with open-parenthesis syntax. + +*** -- \S -- + +Matches any character whose syntax is not . diff --git a/etc/DISTRIB b/etc/DISTRIB new file mode 100644 index 0000000..3729e19 --- /dev/null +++ b/etc/DISTRIB @@ -0,0 +1,213 @@ + GNU Emacs availability information, 8 November 1989 + Copyright (C) 1986, 1987, 1988 Richard M. Stallman + + Permission is granted to anyone to make or distribute + verbatim copies of this document provided that the + copyright notice and this permission notice are preserved. + + The prices on the order form below EXPIRE in June 1990 + +GNU Emacs is legally owned by the Free Software Foundation, but we +regard the foundation actually as its custodian on behalf of the +public, since all software ought to be the common property of mankind. + +The foundation permits everyone to have and run copies of GNU Emacs, +at no charge, and to redistribute copies under certain conditions +which are designed to make sure that that all modified versions of GNU +Emacs remain as free as the versions we distribute. These conditions +are stated in the document "GNU Emacs General Public License", a copy +of which is required to be distributed with every copy of GNU Emacs. +It is usually in a file named COPYING in the same directory as this +file. + +If you do not know anyone to get a copy of GNU Emacs from, you can +order a tape from the Free Software Foundation. We distribute Emacs +version 18 on 1600bpi industry standard mag tape in tar format. We +will also ship it on 1/4" Sun cartridge tapes in tar format and on +1600bpi magtape in VMS interchange (aka backup) format. We also +distribute nicely typeset copies of the Emacs manual and the Emacs +reference card. See the order form at the end of this file. + +If you have Internet access, you can copy the latest Emacs +distribution from host prep.ai.mit.edu. There are several ways to do +this; see the file `FTP' in the same directory as this file for more +information. Even better, get the latest version of the file from +`/u2/emacs/etc/FTP' on prep.ai.mit.edu for the most current +arrangements. It may also be possible to copy Emacs via uucp; the +file `FTP' contains information on that too. + +Emacs has been run on both Berkeley Unix and System V Unix, on a +variety of types of cpu. It also works on VMS and on Apollo +computers, though with some deficiencies that reflect problems in +these operating systems. See the file MACHINES in this directory for +a full list of machines that GNU Emacs has been tested on, with +machine-specific installation notes and warnings. + +Note that there is significant variation between Unix systems +supposedly running the same version of Unix; it is possible that what +works in GNU Emacs for me does not work on your system due to such an +incompatibility. Since I must avoid reading Unix source code, I +cannot even guess what such problems may exist. + +GNU Emacs is distributed with no warranty (see the General Public +License for full details, in the file COPYING in this directory), and +neither I nor the Free Software Foundation promises any kind of +support or assistance to users. The foundation keeps a list of people +who are willing to offer support and assistance for hire. It is +usually in a file named SERVICE in the same directory as this file. + +However, I plan to continue to improve GNU Emacs and keep it reliable, +so please send me any complaints and suggestions you have. I will +probably fix anything that is clearly (to me) a malfunction. I may +make an improvement if I consider it worth the effort, but you should +not be surprised if I don't think I can spare time for it. I hope to +keep Emacs stable now, and avoid putting much time into it, so I can +work on other parts of the GNU system. + +If you are on the Internet, report bugs to +bug-gnu-emacs@prep.ai.mit.edu; on UUCP, use the address +...!ucbvax!bug-gnu-emacs%prep.ai.mit.edu. Otherwise, phone the +foundation at +1 617 876-3296, or write to the address listed below. + +If you are a computer manufacturer, I encourage you to ship a copy of +GNU Emacs with every computer you deliver. The same copying +permission terms apply to computer manufacturers as to everyone else. +You should consider making a donation to help support the GNU project; +if you estimate what it would cost to distribute some commercial +product and divide it by five, that is a good amount. + +If you like GNU Emacs, please express your satisfaction with a +donation: send me or the Foundation what you feel Emacs has been worth +to you. If you are glad that I developed GNU Emacs and distribute it +as freeware, rather than following the obstructive and antisocial +practices typical of software developers, reward me for doing so! + +Your donations will help to support the development of more useful +software to be distributed on the same basis as GNU Emacs. Eventually +we will have a complete imitation of the Unix operating system, called +GNU (Gnu's Not Unix), which will run Unix user programs. For more +information on GNU, see the file GNU in this directory. + + + Richard M Stallman + Chief GNUisance, + President of the Free Software Foundation + + Free Software Foundation Order Form + 2 Jan 1990 + + This form is effective January 1990--June 1990. + +Prices and contents of tapes are subject to change without notice. + +All software and publications are distributed with permission to copy +and redistribute. + +TeX source for each manual is on the appropriate tape. + +All software from the Free Software Foundation is provided on an "as +is" basis, with no warranty of any kind. + +Quantity Price Item + +________ $150 GNU Emacs source code and other software, for Unix systems, + on 1600bpi reel-to-reel 9-track tape in tar format. + The tape includes: + * MIT Scheme (a dialect of Lisp) + * T, Yale's implementation of Scheme + * Bison (a free, compatible replacement for yacc) + * Hack (a rogue-like game) + * GNU Chess (a chess playing program with an interface to X). + * GDB (the GNU source-level C debugger) + * The X window system (a window system for bitmap + displays written at MIT) (version 10r4) + +________ $150 GNU Beta Test software, for Unix systems, on tape as + in previous item. + The tape includes: + * GCC (the GNU C Compiler) + * G++ (the C++ front end to GCC) + * Bash (GNUs' Bourne Again SHell) + * Bison (a free, compatible replacement for yacc) + * Flex (Vern Paxson fast rewrite of lex) + * Ghostscript (a Postscript interpreter) + * Gawk (the GNU implementation of the AWK programming language) + * Gas (the GNU Assembler) + * Gnuplot (an interactive mathematical plotting program) + * Compress (a file compression program) + * GNU object file utilities (ar, ld, make, gprof, size, nm, + strip, ranlib, et al.) + * other GNU utilities (make, diff, grep, tar, et al.) + * the freed files from the 4.3BSD-Tahoe distribution + +________ $150 MIT X Window System X11R3, for Unix systems, + on tape as in previous item. + +________ $175 GNU Emacs and other software, for Suns, as in the first item, + on DC300XLP 1/4inch cartridge tape, in QIC-24 encoding in + tar format. + +________ $175 GNU Beta Test tape, for Suns, as in the second item, + on tape as in previous item. + +________ $175 MIT X Window System X11R3, as in the third item, + on tape as in previous item. + +________ $150 GNU Emacs source code and binaries, for VMS, on 1600 + bpi reel-to-reel 9-track tape in VMS backup format. + +________ $150 GNU C compiler source code and binaries, for VMS, on + tape as in previous item. Includes Bison and GAS. + +________ $15 GNU Emacs manual, ~300 pages. The manual is phototypeset, + offset printed, and spiral bound; it includes a reference card. + +Thus, a 1600 bpi tape and one Emacs manual come to $165. + +________ $60 Box of six GNU Emacs manuals, each with reference card. + +________ $1 One GNU Emacs reference card, without the manual. + +________ $5 Packet of ten GNU Emacs reference cards. + +________ $10 GDB Manual, ~70 pages, side stapled. + +________ $10 Texinfo Manual, ~100 pages, side stapled. Texinfo is GNU's + structured documentation system, included with GNU Emacs. + Texinfo is used to produce both on-line and printed documents. + This manual describes how to write Texinfo documents. + +________ $10 Termcap Manual, ~60 pages, side stapled. Documents the + termcap library and GNU's extensions to it. The GNU termcap + library is included with GNU Emacs. + +________ $10 Bison Manual, ~80 pages, side stapled. + +________ $10 Gawk Manual, ~100 pages, side stapled. + +________ $10 Make Manual, ~100 pages, side stapled. +-------- + +________ Sub Total + +________ If ordering from Massachusetts:} add 5% sales tax. + +________ If outside of North America and Hawaii: for shipping costs, + please add $60 for each box of Emacs manuals; please add $15 for + each tape or unboxed manual. + +________ Optional tax deductible donation. +-------- + +________ Total paid + +Orders are filled upon receipt of check or money order. We do not have +the staff to handle the billing of unpaid orders. Please help keep +our lives simple by including your payment with your order. + +Make checks payable to Free Software Foundation. Mail orders to: + + Free Software Foundation, Inc. + 675 Mass Ave + Cambridge, MA 02139 + diff --git a/etc/FTP b/etc/FTP new file mode 100644 index 0000000..e48841d --- /dev/null +++ b/etc/FTP @@ -0,0 +1,195 @@ +How to get GNU Software by Internet FTP or by UUCP. Last updated 4 June 1988 + +* No Warranties + +We distribute software in the hope that it will be useful, but +without any warranty. No author or distributor of this software +accepts responsibility to anyone for the consequences of using it or +for whether it serves any particular purpose or works at all, unless +he says so in writing. + +* Updates + +If you find this file in the Emacs distribution, there is a chance +it is out of date. If you plan to FTP files from prep.ai.mit.edu, +you might as well start by FTPing the current version of this file, +which is `/u2/emacs/etc/FTP'. + +* FTPing GNU Software + +** GNU Emacs and How To FTP It + +If you are on the Internet (see also "** Alternative Internet FTP +Sources" below), you can at present copy the latest distribution +version of GNU Emacs from the file /u2/emacs/edist.tar on host +prep.ai.mit.edu (or the file /u2/emacs/edist.tar.Z which has been run +through compress after tar). These files are about 7 and 3 megabytes +long, respectively. After you unpack the distribution, be sure to +look at the files README and INSTALL. + +Because of difficulties in transferring large files, often a split +version of the tar file is created. This is a directory named +/u2/emacs/edist.tar-M.N-split or perhaps +/u2/emacs/edist.tar-M.N.Z-split, containing files of 100000 +characters each. There is generally no trouble in ftping files of +this size. They can be combined with cat to make a tar file or +compressed tar file. + +Some ftp'ers have found it necessary for successful file transfer: + - to set the binary/image mode + - to use another of prep.ai.mit.edu internet addresses than the +default for your machine. They are (as of 22 Oct 86): + 128.52.14.14 + 128.52.22.14 + 128.52.32.14 + +Files of differences from previous widely distributed GNU Emacs +versions to the present version are also available on prep.ai.mit.edu +under names of the form diff-OO.OO-NN.NN in directory /u2/emacs . +These are made with diff -rc2. Sometimes there are compressed +versions of these difference files as well; their names have .Z +appended. + +The Emacs manual in source form is included in the distribution. +The dvi file produced by TeX is not included, but a copy may be +available for ftp under the name /u2/emacs/emacs.dvi. + +** Copying Only Recently Changed Files + +A special version of rcp exists which allows you, on an Internet host, +to copy all GNU Emacs files whose last-mod-dates don't match your +files. See the file /u2/emacs/etc/RCP on prep.ai.mit.edu for +information on using it. + +** Scheme and How To FTP It + +The latest distribution version of C Scheme is in the directory +/u2/scheme/dist. To obtain a "tarred" copy of this directory, telnet +to prep.ai.mit.edu and log in as scheme (password: scheme). A file called +dist.tar will be created (if there isn't one already), and you will be +given a choice of the file transfer program to run (of all the ones +supported by PREP). It should be self-explanatory (ha, ha! [try ? for +help]). + +Read the files INSTALL and README in the top level C Scheme directory. + +** GDB and How To FTP It. + +GDB, the GNU source-level C debugger, is part of the Emacs distribution. +It can be found separately in the directory /u2/emacs/dist/gdb as +65 separate files. If there is a demand, separate tar files of +GDB can be made available. + +** The VMS version of GCC and How To FTP It. + +Jonathan Corbet has made the "bootstrap files" for the GNU C compiler +available for pseudo-anonymous FTP on rdss.ucar.edu. The full gcc +sources are also available, for anybody who wants to start from scratch. + +Jonathan Corbet also requests that you please limit your access to +outside the hours of 8-6 (mountain time) on weekdays. RDSS is a +*very* busy machine during the day. Jonathan notes, "I don't think I +have to tell you what will happen if my users feel they are being +slowed down by outside people grabbing software." + +The procedure is this: FTP to rdss.ucar.edu (128.117.80.1), and log in +with a username of FTP, password FTP. Cd into the [.gcc] directory, +and grab either or both of these files: + bootstrap.bck The bootstrap files -- not much more than the + .exe files. About 1.3 mb. + gcc.bck The full-blown gcc source code. About 5mb. +Both of these files are backup savesets, and should thus be grabbed +in binary mode. + +SPAN people can grab the same files from rdss::du:[ftp.gcc]. If your +node database does not know about rdss, use 9452 instead. + +Jonathan Corbet is with the +National Center for Atmospheric Research, Field Observing Facility +Internet: corbet@rdss.ucar.edu +SPAN: rdss::corbet (rdss = 9452) +Usenet: ...!ncar!rdss!corbet + +** Other GNU Software and How To FTP It. + +This software is available on prep.ai.mit.edu under directory +/u2/emacs. Files containing diff from previous versions are often +available. Compressed versions of the tar or diff files are often +available (indicated by a .Z suffix). Much of this software is in +beta test (probably still buggy), and is being made available for use +by hackers who like to test software. M.N indicates a version number. + +Bison bison.tar +GNU Assembler (gas) gas-dist.tar BETA TEST +GNU C Compiler (gcc) gcc.tar-M.N Late BETA TEST +GNU C++ Compiler (g++) g++.tar-M.N BETA TEST +GNU C++ Library dist-libg++.tar.Z BETA TEST +GNU C++ Debugger (gdb+) gdb+.tar-M.N.Z BETA TEST +GNU AWK (gawk) awk.tar BETA TEST +GNU Make make.tar-M.N.Z BETA TEST +GNU ld, gprof, size, nm and strip + binutils.tar BETA TEST +GNU Chess gnuchess.tar.Z +GNU Buttons and Designs button.M.N.ps + +** Alternative Internet FTP Sources + +The administrators of simtel20.arpa maintains copies of GNU +distributed software for MILNET/DDN hosts. It is available via +anonymous ftp from PD: in the original tar or tar.Z +format. + +The administrators of louie.udel.edu maintains copies of GNU Emacs and +the compress program. The files are available via anonymous ftp under +directory ~ftp/gnu. louie's addresses are (as of 21 Feb 1987): + +10.0.0.96 louie udel-louie eecis3 udel-relay udel +192.5.39.3 louie.udel.edu udel-louie.arpa udel-louie louie udel-relay udel udel.edu + +Emacs and other GNU programs may be available on nic.nyser.net, in +/usb/gnu/emacs-dist.tar{,.Z}. Anonymous ftp starts you in directory +/usb. + +Emacs and other GNU programs may be available on uunet.uu.net, +spam.istc.sri.com, scam.berkeley.edu and bu-it.bu.edu via anonymous ftp. + +* Getting GNU software in England + +jpo@cs.nott.ac.uk is willing to distribute those GNU sources he has +available. The smaller items are available from the info-server (send +to info-server@cs.nott.ac.uk) the larger items by negotiation. Due to +communication costs this service is only available within the UK. + +BattenIG@computer-science.birmingham.ac.uk is also willing to +distribute those GNU sources he has available. He can also write +tapes in qic-21, qic-24 and VMS TK50s formats. + +* Getting GNU software via UUCP + +OSU is distributing via UUCP: GNU Emacs, GNU Bison, GNU Debugger +(gdb), GNU C Compiler (gcc) (& G++ & GDB+), MIT C Scheme, GNU Chess, +GNU Assembler (gas), GNU Awk (gawk), Compress, News, RN, NNTP, Patch, +some Appletalk stuff, and some of the Internet Requests For Comment +(RFC). See their periodic postings on the Usenet newsgroup +comp.sources.d for informational updates. Current details from Karl +Kleinpaste or or +<...!osu-cis!karl>; or Bob Sutterfield . + +Information on how to uucp some GNU programs is available via +electronic mail from: arnold@skeeve.UUCP, ihnp4!hutch!barber, +hqda-ai!merlin, hao!scicom!qetzal!upba!ugn!nepa!denny, acornrc!bob, +gatech!uflorida!codas!killer!wisner, mit-eddie!bloom-beacon!ht!spt!gz, +bigtex!james and postmaster@uunet.uu.net. + +* If You Like The Software + +If you like the software developed and distributed by the Free +Software Foundation, please express your satisfaction with a donation. +Your donations will help to support the Foundation and make our future +efforts successful, including a complete development and operating +system, called GNU (Gnu's Not Un*x), which will run Un*x user +programs. For more information on GNU and the Foundation, contact us +at the above address. + +Ordering a distribution tape from the Foundation is often a good +way to bring your company or university to make a donation. diff --git a/etc/GNU b/etc/GNU new file mode 100644 index 0000000..023fe28 --- /dev/null +++ b/etc/GNU @@ -0,0 +1,475 @@ + The GNU Manifesto + +Copyright (C) 1985 Richard M. Stallman + (Copying permission notice at the end.) + +What's GNU? Gnu's Not Unix! + +GNU, which stands for Gnu's Not Unix, is the name for the complete +Unix-compatible software system which I am writing so that I can give it +away free to everyone who can use it. Several other volunteers are helping +me. Contributions of time, money, programs and equipment are greatly +needed. + +So far we have an Emacs text editor with Lisp for writing editor commands, +a source level debugger, a yacc-compatible parser generator, a linker, and +around 35 utilities. A shell (command interpreter) is nearly completed. A +new portable optimizing C compiler has compiled itself and may be released +this year. An initial kernel exists but many more features are needed to +emulate Unix. When the kernel and compiler are finished, it will be +possible to distribute a GNU system suitable for program development. We +will use @TeX{} as our text formatter, but an nroff is being worked on. We +will use the free, portable X window system as well. After this we will +add a portable Common Lisp, an Empire game, a spreadsheet, and hundreds of +other things, plus on-line documentation. We hope to supply, eventually, +everything useful that normally comes with a Unix system, and more. + +GNU will be able to run Unix programs, but will not be identical to Unix. +We will make all improvements that are convenient, based on our experience +with other operating systems. In particular, we plan to have longer +filenames, file version numbers, a crashproof file system, filename +completion perhaps, terminal-independent display support, and perhaps +eventually a Lisp-based window system through which several Lisp programs +and ordinary Unix programs can share a screen. Both C and Lisp will be +available as system programming languages. We will try to support UUCP, +MIT Chaosnet, and Internet protocols for communication. + +GNU is aimed initially at machines in the 68000/16000 class with virtual +memory, because they are the easiest machines to make it run on. The extra +effort to make it run on smaller machines will be left to someone who wants +to use it on them. + +To avoid horrible confusion, please pronounce the `G' in the word `GNU' +when it is the name of this project. + + +Who Am I? + +I am Richard Stallman, inventor of the original much-imitated EMACS editor, +formerly at the Artificial Intelligence Lab at MIT. I have worked +extensively on compilers, editors, debuggers, command interpreters, the +Incompatible Timesharing System and the Lisp Machine operating system. I +pioneered terminal-independent display support in ITS. Since then I have +implemented one crashproof file system and two window systems for Lisp +machines, and designed a third window system now being implemented; this +one will be ported to many systems including use in GNU. [Historical note: +The window system project was not completed; GNU now plans to use the +X window system.] + + +Why I Must Write GNU + +I consider that the golden rule requires that if I like a program I must +share it with other people who like it. Software sellers want to divide +the users and conquer them, making each user agree not to share with +others. I refuse to break solidarity with other users in this way. I +cannot in good conscience sign a nondisclosure agreement or a software +license agreement. For years I worked within the Artificial Intelligence +Lab to resist such tendencies and other inhospitalities, but eventually +they had gone too far: I could not remain in an institution where such +things are done for me against my will. + +So that I can continue to use computers without dishonor, I have decided to +put together a sufficient body of free software so that I will be able to +get along without any software that is not free. I have resigned from the +AI lab to deny MIT any legal excuse to prevent me from giving GNU away. + + +Why GNU Will Be Compatible with Unix + +Unix is not my ideal system, but it is not too bad. The essential features +of Unix seem to be good ones, and I think I can fill in what Unix lacks +without spoiling them. And a system compatible with Unix would be +convenient for many other people to adopt. + + +How GNU Will Be Available + +GNU is not in the public domain. Everyone will be permitted to modify and +redistribute GNU, but no distributor will be allowed to restrict its +further redistribution. That is to say, proprietary modifications will not +be allowed. I want to make sure that all versions of GNU remain free. + + +Why Many Other Programmers Want to Help + +I have found many other programmers who are excited about GNU and want to +help. + +Many programmers are unhappy about the commercialization of system +software. It may enable them to make more money, but it requires them to +feel in conflict with other programmers in general rather than feel as +comrades. The fundamental act of friendship among programmers is the +sharing of programs; marketing arrangements now typically used essentially +forbid programmers to treat others as friends. The purchaser of software +must choose between friendship and obeying the law. Naturally, many decide +that friendship is more important. But those who believe in law often do +not feel at ease with either choice. They become cynical and think that +programming is just a way of making money. + +By working on and using GNU rather than proprietary programs, we can be +hospitable to everyone and obey the law. In addition, GNU serves as an +example to inspire and a banner to rally others to join us in sharing. +This can give us a feeling of harmony which is impossible if we use +software that is not free. For about half the programmers I talk to, this +is an important happiness that money cannot replace. + + +How You Can Contribute + +I am asking computer manufacturers for donations of machines and money. +I'm asking individuals for donations of programs and work. + +One consequence you can expect if you donate machines is that GNU will run +on them at an early date. The machines should be complete, ready to use +systems, approved for use in a residential area, and not in need of +sophisticated cooling or power. + +I have found very many programmers eager to contribute part-time work for +GNU. For most projects, such part-time distributed work would be very hard +to coordinate; the independently-written parts would not work together. +But for the particular task of replacing Unix, this problem is absent. A +complete Unix system contains hundreds of utility programs, each of which +is documented separately. Most interface specifications are fixed by Unix +compatibility. If each contributor can write a compatible replacement for +a single Unix utility, and make it work properly in place of the original +on a Unix system, then these utilities will work right when put together. +Even allowing for Murphy to create a few unexpected problems, assembling +these components will be a feasible task. (The kernel will require closer +communication and will be worked on by a small, tight group.) + +If I get donations of money, I may be able to hire a few people full or +part time. The salary won't be high by programmers' standards, but I'm +looking for people for whom building community spirit is as important as +making money. I view this as a way of enabling dedicated people to devote +their full energies to working on GNU by sparing them the need to make a +living in another way. + + +Why All Computer Users Will Benefit + +Once GNU is written, everyone will be able to obtain good system software +free, just like air. + +This means much more than just saving everyone the price of a Unix license. +It means that much wasteful duplication of system programming effort will +be avoided. This effort can go instead into advancing the state of the +art. + +Complete system sources will be available to everyone. As a result, a user +who needs changes in the system will always be free to make them himself, +or hire any available programmer or company to make them for him. Users +will no longer be at the mercy of one programmer or company which owns the +sources and is in sole position to make changes. + +Schools will be able to provide a much more educational environment by +encouraging all students to study and improve the system code. Harvard's +computer lab used to have the policy that no program could be installed on +the system if its sources were not on public display, and upheld it by +actually refusing to install certain programs. I was very much inspired by +this. + +Finally, the overhead of considering who owns the system software and what +one is or is not entitled to do with it will be lifted. + +Arrangements to make people pay for using a program, including licensing of +copies, always incur a tremendous cost to society through the cumbersome +mechanisms necessary to figure out how much (that is, which programs) a +person must pay for. And only a police state can force everyone to obey +them. Consider a space station where air must be manufactured at great +cost: charging each breather per liter of air may be fair, but wearing the +metered gas mask all day and all night is intolerable even if everyone can +afford to pay the air bill. And the TV cameras everywhere to see if you +ever take the mask off are outrageous. It's better to support the air +plant with a head tax and chuck the masks. + +Copying all or parts of a program is as natural to a programmer as +breathing, and as productive. It ought to be as free. + + +Some Easily Rebutted Objections to GNU's Goals + + "Nobody will use it if it is free, because that means + they can't rely on any support." + "You have to charge for the program + to pay for providing the support." + +If people would rather pay for GNU plus service than get GNU free without +service, a company to provide just service to people who have obtained GNU +free ought to be profitable. + +We must distinguish between support in the form of real programming work +and mere handholding. The former is something one cannot rely on from a +software vendor. If your problem is not shared by enough people, the +vendor will tell you to get lost. + +If your business needs to be able to rely on support, the only way is to +have all the necessary sources and tools. Then you can hire any available +person to fix your problem; you are not at the mercy of any individual. +With Unix, the price of sources puts this out of consideration for most +businesses. With GNU this will be easy. It is still possible for there to +be no available competent person, but this problem cannot be blamed on +distibution arrangements. GNU does not eliminate all the world's problems, +only some of them. + +Meanwhile, the users who know nothing about computers need handholding: +doing things for them which they could easily do themselves but don't know +how. + +Such services could be provided by companies that sell just hand-holding +and repair service. If it is true that users would rather spend money and +get a product with service, they will also be willing to buy the service +having got the product free. The service companies will compete in quality +and price; users will not be tied to any particular one. Meanwhile, those +of us who don't need the service should be able to use the program without +paying for the service. + + "You cannot reach many people without advertising, + and you must charge for the program to support that." + "It's no use advertising a program people can get free." + +There are various forms of free or very cheap publicity that can be used to +inform numbers of computer users about something like GNU. But it may be +true that one can reach more microcomputer users with advertising. If this +is really so, a business which advertises the service of copying and +mailing GNU for a fee ought to be successful enough to pay for its +advertising and more. This way, only the users who benefit from the +advertising pay for it. + +On the other hand, if many people get GNU from their friends, and such +companies don't succeed, this will show that advertising was not really +necessary to spread GNU. Why is it that free market advocates don't want +to let the free market decide this? + + "My company needs a proprietary operating system + to get a competitive edge." + +GNU will remove operating system software from the realm of competition. +You will not be able to get an edge in this area, but neither will your +competitors be able to get an edge over you. You and they will compete in +other areas, while benefitting mutually in this one. If your business is +selling an operating system, you will not like GNU, but that's tough on +you. If your business is something else, GNU can save you from being +pushed into the expensive business of selling operating systems. + +I would like to see GNU development supported by gifts from many +manufacturers and users, reducing the cost to each. + + "Don't programmers deserve a reward for their creativity?" + +If anything deserves a reward, it is social contribution. Creativity can +be a social contribution, but only in so far as society is free to use the +results. If programmers deserve to be rewarded for creating innovative +programs, by the same token they deserve to be punished if they restrict +the use of these programs. + + "Shouldn't a programmer be able to ask for a reward for his creativity?" + +There is nothing wrong with wanting pay for work, or seeking to maximize +one's income, as long as one does not use means that are destructive. But +the means customary in the field of software today are based on +destruction. + +Extracting money from users of a program by restricting their use of it is +destructive because the restrictions reduce the amount and the ways that +the program can be used. This reduces the amount of wealth that humanity +derives from the program. When there is a deliberate choice to restrict, +the harmful consequences are deliberate destruction. + +The reason a good citizen does not use such destructive means to become +wealthier is that, if everyone did so, we would all become poorer from the +mutual destructiveness. This is Kantian ethics; or, the Golden Rule. +Since I do not like the consequences that result if everyone hoards +information, I am required to consider it wrong for one to do so. +Specifically, the desire to be rewarded for one's creativity does not +justify depriving the world in general of all or part of that creativity. + + "Won't programmers starve?" + +I could answer that nobody is forced to be a programmer. Most of us cannot +manage to get any money for standing on the street and making faces. But +we are not, as a result, condemned to spend our lives standing on the +street making faces, and starving. We do something else. + +But that is the wrong answer because it accepts the questioner's implicit +assumption: that without ownership of software, programmers cannot possibly +be paid a cent. Supposedly it is all or nothing. + +The real reason programmers will not starve is that it will still be +possible for them to get paid for programming; just not paid as much as +now. + +Restricting copying is not the only basis for business in software. It is +the most common basis because it brings in the most money. If it were +prohibited, or rejected by the customer, software business would move to +other bases of organization which are now used less often. There are +always numerous ways to organize any kind of business. + +Probably programming will not be as lucrative on the new basis as it is +now. But that is not an argument against the change. It is not considered +an injustice that sales clerks make the salaries that they now do. If +programmers made the same, that would not be an injustice either. (In +practice they would still make considerably more than that.) + + "Don't people have a right to control how their creativity is used?" + +"Control over the use of one's ideas" really constitutes control over other +people's lives; and it is usually used to make their lives more difficult. + +People who have studied the issue of intellectual property rights carefully +(such as lawyers) say that there is no intrinsic right to intellectual +property. The kinds of supposed intellectual property rights that the +government recognizes were created by specific acts of legislation for +specific purposes. + +For example, the patent system was established to encourage inventors to +disclose the details of their inventions. Its purpose was to help society +rather than to help inventors. At the time, the life span of 17 years for +a patent was short compared with the rate of advance of the state of the +art. Since patents are an issue only among manufacturers, for whom the +cost and effort of a license agreement are small compared with setting up +production, the patents often do not do much harm. They do not obstruct +most individuals who use patented products. + +The idea of copyright did not exist in ancient times, when authors +frequently copied other authors at length in works of non-fiction. This +practice was useful, and is the only way many authors' works have survived +even in part. The copyright system was created expressly for the purpose +of encouraging authorship. In the domain for which it was invented--books, +which could be copied economically only on a printing press--it did little +harm, and did not obstruct most of the individuals who read the books. + +All intellectual property rights are just licenses granted by society +because it was thought, rightly or wrongly, that society as a whole would +benefit by granting them. But in any particular situation, we have to ask: +are we really better off granting such license? What kind of act are we +licensing a person to do? + +The case of programs today is very different from that of books a hundred +years ago. The fact that the easiest way to copy a program is from one +neighbor to another, the fact that a program has both source code and +object code which are distinct, and the fact that a program is used rather +than read and enjoyed, combine to create a situation in which a person who +enforces a copyright is harming society as a whole both materially and +spiritually; in which a person should not do so regardless of whether the +law enables him to. + + "Competition makes things get done better." + +The paradigm of competition is a race: by rewarding the winner, we +encourage everyone to run faster. When capitalism really works this way, +it does a good job; but its defenders are wrong in assuming it always works +this way. If the runners forget why the reward is offered and become +intent on winning, no matter how, they may find other strategies--such as, +attacking other runners. If the runners get into a fist fight, they will +all finish late. + +Proprietary and secret software is the moral equivalent of runners in a +fist fight. Sad to say, the only referee we've got does not seem to +object to fights; he just regulates them ("For every ten yards you run, you +are allowed one kick."). He really ought to break them up, and penalize +runners for even trying to fight. + + "Won't everyone stop programming without a monetary incentive?" + +Actually, many people will program with absolutely no monetary incentive. +Programming has an irresistible fascination for some people, usually the +people who are best at it. There is no shortage of professional musicians +who keep at it even though they have no hope of making a living that way. + +But really this question, though commonly asked, is not appropriate to the +situation. Pay for programmers will not disappear, only become less. So +the right question is, will anyone program with a reduced monetary +incentive? My experience shows that they will. + +For more than ten years, many of the world's best programmers worked at the +Artificial Intelligence Lab for far less money than they could have had +anywhere else. They got many kinds of non-monetary rewards: fame and +appreciation, for example. And creativity is also fun, a reward in itself. + +Then most of them left when offered a chance to do the same interesting +work for a lot of money. + +What the facts show is that people will program for reasons other than +riches; but if given a chance to make a lot of money as well, they will +come to expect and demand it. Low-paying organizations do poorly in +competition with high-paying ones, but they do not have to do badly if the +high-paying ones are banned. + + "We need the programmers desperately. If they demand that we + stop helping our neighbors, we have to obey." + +You're never so desperate that you have to obey this sort of demand. +Remember: millions for defense, but not a cent for tribute! + + "Programmers need to make a living somehow." + +In the short run, this is true. However, there are plenty of ways that +programmers could make a living without selling the right to use a program. +This way is customary now because it brings programmers and businessmen the +most money, not because it is the only way to make a living. It is easy to +find other ways if you want to find them. Here are a number of examples. + +A manufacturer introducing a new computer will pay for the porting of +operating systems onto the new hardware. + +The sale of teaching, hand-holding and maintenance services could also +employ programmers. + +People with new ideas could distribute programs as freeware, asking for +donations from satisfied users, or selling hand-holding services. I have +met people who are already working this way successfully. + +Users with related needs can form users' groups, and pay dues. A group +would contract with programming companies to write programs that the +group's members would like to use. + +All sorts of development can be funded with a Software Tax: + + Suppose everyone who buys a computer has to pay x percent of + the price as a software tax. The government gives this to + an agency like the NSF to spend on software development. + + But if the computer buyer makes a donation to software development + himself, he can take a credit against the tax. He can donate to + the project of his own choosing--often, chosen because he hopes to + use the results when it is done. He can take a credit for any amount + of donation up to the total tax he had to pay. + + The total tax rate could be decided by a vote of the payers of + the tax, weighted according to the amount they will be taxed on. + + The consequences: + * the computer-using community supports software development. + * this community decides what level of support is needed. + * users who care which projects their share is spent on + can choose this for themselves. + +In the long run, making programs free is a step toward the post-scarcity +world, where nobody will have to work very hard just to make a living. +People will be free to devote themselves to activities that are fun, +such as programming, after spending the necessary ten hours a week +on required tasks such as legislation, family counseling, robot +repair and asteroid prospecting. There will be no need to be able +to make a living from programming. + +We have already greatly reduced the amount of work that the whole +society must do for its actual productivity, but only a little of this +has translated itself into leisure for workers because much +nonproductive activity is required to accompany productive activity. +The main causes of this are bureaucracy and isometric struggles +against competition. Free software will greatly reduce these +drains in the area of software production. We must do this, +in order for technical gains in productivity to translate into +less work for us. + +Copyright (C) 1985 Richard M. Stallman + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and permission notice are preserved, + and that the distributor grants the recipient permission + for further redistribution as permitted by this notice. + + Modified versions may not be made. + diff --git a/etc/GOSDIFF b/etc/GOSDIFF new file mode 100644 index 0000000..a283c1a --- /dev/null +++ b/etc/GOSDIFF @@ -0,0 +1,614 @@ +Advantages of Gosling Emacs: + +1. The program itself is much smaller. +GNU Emacs uses about 250k more pure storage. +As a result, Gosling Emacs can run on machines +that cannot run GNU Emacs. There is not much difference +in the amount of impure storage in the two programs. + +2. In some versions there is support for other forks to +establish communications channels to Emacs (using sockets?). + +3. There is a direct interface to dbm (data bases). + + +Advantages of GNU Emacs: + +* True Lisp, not Mocklisp. + +GNU Emacs's extension language has real symbols, lists +and vectors. Many extensions are much simpler, and some +become possible that were nearly impossible in Gosling Emacs. +Many primitives can have cleaner interfaces, and some features +need not be put in as special primitives because you can do +them easily yourself. + +* But Mocklisp still works. + +An automatic conversion package plus a run-time library +allows you to convert a Mocklisp library into a Lisp library. + +* Commands are better crafted. + +For example, nearly every editing function for which a +numeric argument would make sense as a repeat count does +accept a repeat count, and does handle a negative argument +in the way you would expect. + +* The manual is clearer. + +Everyone tells me it is a very good manual. + +* Better on-line documentation. + +Both functions and variables have documentation strings that +describe exactly how to use them. + +* C mode is smart. + +It really knows how to indent each line correctly, +for most popular indentation styles. (Some variables +control which style is used.) + +* Compatible with PDP-10 Emacs, Multics Emacs and Zmacs. + +The commands in GNU Emacs are nearly the same as in the +original Emacs and the other Emacses which imitated it. +(A few have been changed to fit the Unix environment better.) + +* Support for Gosling's Emacs commands. + +M-x set-gosmacs-bindings rebinds many editing commands for +compatibility with Gosling's Emacs. +M-x set-gnu-bindings reverses the change. + +* Side-by-side windows. + +You can split a GNU Emacs window either horizontally or +vertically. + +* Redisplay is faster. + +GNU Emacs sends about the same stuff to the terminal that +Gosling's does, but GNU Emacs uses much less CPU time to +decide what to do. + +* Entirely termcap-driven. + +GNU Emacs has nearly no special code for any terminal type. Various +new termcap strings make it possible to handle all terminals nearly as +fast as they could be handled by special-case code. + +* Display-hiding features. + +For example, Outline Mode makes it possible for you to edit +an outline, making entire sub-branches of the outline visible +or invisible when you wish. + +* You can interrupt with Control-G. + +Even a looping Lisp program can be stopped this way. +And even a loop in C code does not stop you from killing +Emacs and getting back to your shell. + +* Per-buffer Undo. + +You can undo the last several changes, in each buffer +independently. + +* The editor code itself is clean. + +Many people have remarked on how much they enjoy reading +the code for GNU Emacs. + + +One other note: The program etc/cvtmail that comes with GNU Emacs can +be used to convert a mail directory for Gosling Emacs's Rmail into a +Unix mail file that you could read into GNU Emacs's Rmail. + + +A detailed comparison by Rodney Zykowitz (rtgvax!ramin@eddie.mit.edu) + +Enclosed are two difference listings. The first one is a cross-reference +by Key bindings. The second is by alphabetized function name. +Only those functions normally bound to keys in a +"standard" version are included. As far as I know it excludes +bindings added here locally (but what do I know...) + +The Gosling's is version 2.02 and runs on VMS 4.2. The Gnu is +version 16.56.1 running under Ultrix 1.1. + + +And could someone send me some info on Gnu on VMS. I seem to have entirely +missed that posting. If it is hopeless, I just might sit down and write +a Gnu emulator for Unipress and a Unipress emulator for Gnu... But the +thought of that already makes me wanna.... + + +ramin... +Standard disclaimer excluded for humanitarian purposes. + + + +Command Binding Cross-references. By key code: + + VMS (Unipress) GNU Emacs +Key Binding Binding +--- ------- --------------- +^@ set-mark set-mark-command +^A beginning-of-line beginning-of-line +^B backward-character backward-char +^C exit-emacs exit-recursive-edit +^D delete-next-character delete-char +^E end-of-line end-of-line +^F forward-character forward-char +^G illegal-operation +^H delete-previous-character help-command +^H-v describe-variable +^H-w where-is +^H-t help-with-tutorial +^H-s describe-syntax +^H-n view-emacs-news +^H-^N view-emacs-news +^H-m describe-mode +^H-l view-lossage +^H-i info +^H-f describe-function +^H-d describe-function +^H-k describe-key +^H-c describe-key-briefly +^H-b describe-bindings +^H-a command-apropos +^H-^D describe-distribution +^H-^C describe-copying +^H-? help-for-help +^H-^H help-for-help +^I self-insert indent-for-tab-command +^J newline-and-indent newline-and-indent +^K kill-to-end-of-line kill-line +^L redraw-display recenter +^M newline newline +^N next-line next-line +^O newline-and-backup open-line +^P previous-line previous-line +^Q quote-character quoted-insert +^R search-reverse isearch-backward +^S search-forward isearch-forward +^T transpose-characters transpose-chars +^U argument-prefix universal-argument +^V next-page scroll-up +^W delete-to-killbuffer kill-region +^X ^X-prefix Control-x-prefix +^X-^A add-mode-abbrev +^X-^B list-buffers list-buffers +^X-^C exit-emacs save-buffers-kill-emacs +^X-^D describe-word-in-buffer list-directory +^X-^E compile-it eval-last-sexp +^X-^F write-pause-or-exit find-file +^X-^H inverse-add-mode-abbrev +^X-^I insert-file indent-rigidly +^X-^L downcase-region +^X-^M write-modified-files +^X-^N next-error set-goal-column +^X-^O use-old-buffer delete-blank-linkes +^X-^P mark-page +^X-^Q toggle-read-only +^X-^R read-file find-file-read-only +^X-^S write-current-file save-buffer +^X-^T transpose-lines +^X-^U new-undo upcase-region +^X-^V visit-file find-alternate-file +^X-^W write-named-file write-file +^X-^X exchange-dot-and-mark exchange-dot-and-mark +^X-^Z shrink-window suspend-emacs +^X-ESC repeat-complex-command +^X-! execute-monitor-command +^X-$ set-selective-display +^X-( start-remembering start-kbd-macro +^X-) stop-remembering end-kbd-macro +^X-+ add-global-abbrev +^X-- inverse-add-global-abbrev +^X-. set-fill-prefix +^X-/ dot-to-register +^X-0 delete-window +^X-1 delete-other-windows delete-other-windows +^X-2 split-current-window split-window-vertically +^X-4 ctl-x-4-prefix +^X-4-^F find-file-other-window +^X-4-. find-tag-other-window +^X-4-b pop-to-buffer +^X-4-d dired-other-window +^X-4-f find-file-other-window +^X-4-m mail-other-window +^X-5 split-window-horizontally +^X-; set-comment-column +^X-< scroll-left +^X-= what-cursor-position +^X-> scroll-right +^X-[ backward-page +^X-] forward-page +^X-^ enlarge-window +^X-` next-error +^X-a append-to-buffer +^X-b switch-to-buffer switch-to-buffer +^X-d delete-window dired +^X-e execute-keyboard-macro call-last-kbd-macro +^X-f set-fill-column +^X-g insert-register +^X-h mark-whole-buffer +^X-i insert-file +^X-j register-to-dot +^X-k kill-buffer +^X-l count-lines-page +^X-m mail +^X-n next-window narrow-to-region +^X-o other-window +^X-p previous-window narrow-to-page +^X-q kbd-macro-query +^X-r copy-rectangle-to-register +^X-s save-some-buffers +^X-u advertised-undo +^X-w widen +^X-x copy-to-register +^X-z enlarge-window +^X-{ shrink-window-horizontally +^X-} enlarge-window-horizontally +^X-DEL backward-kill-sentence +^Y yank-from-killbuffer yank +^Z scroll-one-line-up suspend-emacs +ESC ESC-prefix +ESC-^@ mark-sexp +ESC-^A beginning-of-defun +ESC-^B backward-sexp +ESC-^C exit-emacs exit-recursive-edit +ESC-^D down-list +ESC-^E end-of-defun +ESC-^F forward-sexp +ESC-^H mark-defun +ESC-^J indent-new-comment-line +ESC-^K kill-sexp +ESC-^N forward-list +ESC-^O split-line +ESC-^P backward-list +ESC-^S isearch-forward-regexp +ESC-^T transpose-sexps +ESC-^U backward-up-list +ESC-^V page-next-window scroll-other-window +ESC-^W delete-region-to-buffer append-next-kill +ESC-^Y yank-buffer +ESC-ESC execute-mlisp-line eval-expression +ESC-^^ case-region-invert +ESC-^\ indent-region +ESC- just-one-space +ESC-! line-to-top-of-window shell-command +ESC-$ spell-word +ESC-% query-replace +ESC-' abbrev-prefix-mark +ESC-( backward-paragraph insert-parentheses +ESC-) forward-paragraph move-past-close-and-reindent +ESC-, beginning-of-window tags-loop-continue +ESC-- meta-minus negative-argument +ESC-. end-of-window find-tag +ESC-0..ESC-9 meta-digit digit-argument +ESC-; indent-for-comment +ESC-< beginning-of-file beginning-of-buffer +ESC-= count-lines-region +ESC-> end-of-file end-of-buffer +ESC-@ mark-word +ESC-[ backward-paragraph +ESC-\ delete-horizontal-space +ESC-] forward-paragraph +ESC-? apropos +ESC-^ case-word-invert delete-indentation +ESC-a backward-sentence backward-sentence +ESC-b backward-word backward-word +ESC-d delete-next-word kill-word +ESC-e forward-sentence forward-sentence +ESC-f forward-word forward-word +ESC-g fill-region +ESC-h delete-previous-word mark-paragraph +ESC-j indent-C-procedure indent-new-comment-line +ESC-k kill-sentence +ESC-l case-word-lower downcase-word +ESC-q query-replace-string fill-paragraph +ESC-r replace-string move-to-window-line +ESC-t transpose-words +ESC-u case-word-upper upcase-word +ESC-v previous-page scroll-down +ESC-w copy-region-as-kill +ESC-x execute-extended-command execute-extended-command +ESC-y yank-pop +ESC-z scroll-one-line-down zap-to-char +ESC-| shell-command-on-region +ESC-~ not-modified +ESC-DEL backward-kill-word +^_ return-to-monitor + .., self-insert +- minus +.../ self-insert +0..9 digit +:..~ self-insert +^? delete-previous-character + + + + +Command Binding Cross-references. By name: + +Command VMS (Unipress) Key GNU Key +----------------------------- --------------------- ------------ +abbrev-prefix-mark ESC-' +add-global-abbrev ^X-+ +add-mode-abbrev ^X-^A +advertised-undo ^X-u +append-next-kill ESC-^W +append-to-buffer ^X-a +apropos ESC-? +argument-prefix ^U +backward-char ^B +backward-character ^B +backward-kill-sentence ^X-DEL +backward-kill-word ESC-DEL +backward-list ESC-^P +backward-page ^X-[ +backward-paragraph ESC-( +backward-paragraph ESC-[ +backward-sentence ESC-a +backward-sentence ESC-a +backward-sexp ESC-^B +backward-up-list ESC-^U +backward-word ESC-b +backward-word ESC-b +beginning-of-buffer ESC-< +beginning-of-defun ESC-^A +beginning-of-file ESC-< +beginning-of-line ^A +beginning-of-line ^A +beginning-of-window ESC-, +call-last-kbd-macro ^X-e +case-region-invert ESC-^^ +case-word-invert ESC-^ +case-word-lower ESC-l +case-word-upper ESC-u +command-apropos ^H-a +compile-it ^X-^E +control-x-prefix ^X +control-x-prefix ^X +copy-rectangle-to-register ^X-r +copy-region-as-kill ESC-w +copy-to-register ^X-x +count-lines-page ^X-l +count-lines-region ESC-= +ctl-x-4-prefix ^X-4 +delete-blank-linkes ^X-^O +delete-char ^D +delete-horizontal-space ESC-\ +delete-indentation ESC-^ +delete-next-character ^D +delete-next-word ESC-d +delete-other-windows ^X-1 +delete-other-windows ^X-1 +delete-previous-character ^H ^? +delete-previous-character ^? +delete-previous-word ESC-h +delete-region-to-buffer ESC-^W +delete-to-killbuffer ^W +delete-window ^X-0 +delete-window ^X-d +describe-bindings ^H-b +describe-copying ^H-^C +describe-distribution ^H-^D +describe-function ^H-f +describe-function ^H-d +describe-key ^H-k +describe-key-briefly ^H-c +describe-mode ^H-m +describe-syntax ^H-s +describe-variable ^H-v +describe-word-in-buffer ^X-^D +digit 0..9 +digit 0..9 +digit-argument ESC-0..ESC-9 +dired ^X-d +dired-other-window ^X-4-d +dot-to-register ^X-/ +down-list ESC-^D +downcase-region ^X-^L +downcase-word ESC-l +end-kbd-macro ^X-) +end-of-buffer ESC-> +end-of-defun ESC-^E +end-of-file ESC-> +end-of-line ^E +end-of-line ^E +end-of-window ESC-. +enlarge-window ^X-^ +enlarge-window ^X-z +enlarge-window-horizontally ^X-} +esc-prefix ESC +esc-prefix ESC +eval-expression ESC-ESC +eval-last-sexp ^X-^E +exchange-dot-and-mark ^X-^X +exchange-dot-and-mark ^X-^X +execute-extended-command ESC-x +execute-extended-command ESC-x +execute-keyboard-macro ^X-e +execute-mlisp-line ESC-ESC +execute-monitor-command ^X-! +exit-emacs ^C +exit-emacs ^X-^C +exit-emacs ESC-^C +exit-recursive-edit ^C +exit-recursive-edit ESC-^C +fill-paragraph ESC-q +fill-region ESC-g +find-alternate-file ^X-^V +find-file ^X-^F +find-file-other-window ^X-4-^F +find-file-other-window ^X-4-f +find-file-read-only ^X-^R +find-tag ESC-. +find-tag-other-window ^X-4-. +forward-char ^F +forward-character ^F +forward-list ESC-^N +forward-page ^X-] +forward-paragraph ESC-) +forward-paragraph ESC-] +forward-sentence ESC-e +forward-sentence ESC-e +forward-sexp ESC-^F +forward-word ESC-f +forward-word ESC-f +help-command ^H +help-for-help ^H-? +help-for-help ^H-^H +help-with-tutorial ^H-t +illegal-operation ^G +indent-C-procedure ESC-j +indent-for-comment ESC-; +indent-for-tab-command ^I +indent-new-comment-line ESC-^J +indent-new-comment-line ESC-j +indent-region ESC-^\ +indent-rigidly ^X-^I +info ^H-i +insert-file ^X-^I +insert-file ^X-i +insert-parentheses ESC-( +insert-register ^X-g +inverse-add-global-abbrev ^X-- +inverse-add-mode-abbrev ^X-^H +isearch-backward ^R +isearch-forward ^S +isearch-forward-regexp ESC-^S +just-one-space ESC- +kbd-macro-query ^X-q +kill-buffer ^X-k +kill-line ^K +kill-region ^W +kill-sentence ESC-k +kill-sexp ESC-^K +kill-to-end-of-line ^K +kill-word ESC-d +line-to-top-of-window ESC-! +list-buffers ^X-^B +list-buffers ^X-^B +list-directory ^X-^D +mail ^X-m +mail-other-window ^X-4-m +mark-defun ^X-^H +mark-page ^X-^P +mark-paragraph ESC-h +mark-sexp ESC-^@ +mark-whole-buffer ^X-h +mark-word ESC-@ +meta-digit ESC-0..ESC-9 +meta-minus ESC-- +minus - +minus - +move-past-close-and-reindent ESC-) +move-to-window-line ESC-r +narrow-to-page ^X-p +narrow-to-region ^X-n +negative-argument ESC-- +new-undo ^X-^U +newline ^M +newline ^M +newline-and-backup ^O +newline-and-indent ^J +newline-and-indent ^J +next-error ^X-^N +next-error ^X-` +next-line ^N +next-line ^N +next-page ^V +next-window ^X-n +not-modified ESC-~ +open-line ^O +other-window ^X-o +page-next-window ESC-^V +pop-to-buffer ^X-4-b +previous-line ^P +previous-line ^P +previous-page ESC-v +previous-window ^X-p +query-replace ESC-% +query-replace-string ESC-q +quote-character ^Q +quoted-insert ^Q +read-file ^X-^R +recenter ^L +redraw-display ^L +register-to-dot ^X-j +repeat-complex-command ^X-ESC +replace-string ESC-r +return-to-monitor ^_(CTL-/) +save-buffer ^X-^S +save-buffers-kill-emacs ^X-^C +save-some-buffers ^X-s +scroll-down ESC-v +scroll-left ^X-< +scroll-one-line-down ESC-z +scroll-one-line-up ^Z +scroll-other-window ESC-^V +scroll-right ^X-> +scroll-up ^V +search-forward ^S +search-reverse ^R +self-insert ^I +self-insert .., +self-insert .../ +self-insert :..~ +set-comment-column ^X-; +set-fill-column ^X-f +set-fill-prefix ^X-. +set-goal-column ^X-^N +set-mark ^@ +set-mark-command ^@ +set-selective-display ^X-$ +shell-command ESC-! +shell-command-on-region ESC-| +shrink-window ^X-^Z +shrink-window-horizontally ^X-{ +spell-word ESC-$ +split-current-window ^X-2 +split-line ESC-^O +split-window-horizontally ^X-5 +split-window-vertically ^X-2 +start-kbd-macro ESC-( +start-remembering ^X-( +stop-remembering ^X-) +suspend-emacs ^X-^Z +suspend-emacs ^Z +switch-to-buffer ^X-b +switch-to-buffer ^X-b +tags-loop-continue ESC-, +toggle-read-only ^X-^Q +transpose-characters ^T +transpose-chars ^T +transpose-lines ^X-^T +transpose-sexps ESC-^T +transpose-words ESC-t +universal-argument ^U +upcase-region ^X-^U +upcase-word ESC-u +use-old-buffer ^X-^O +view-emacs-news ^H-^N +view-emacs-news ^H-n +view-lossage ^H-l +visit-file ^X-^V +what-cursor-position ^X-= +where-is ^H-w +widen ^X-w +write-current-file ^X-^S +write-file ^X-^W +write-modified-files ^X-^M +write-named-file ^X-^W +write-pause-or-exit ^X-^F +yank ^Y +yank-buffer ESC-^Y +yank-from-killbuffer ^Y +yank-pop ESC-y +zap-to-char ESC-z diff --git a/etc/INTERVIEW b/etc/INTERVIEW new file mode 100644 index 0000000..db04936 --- /dev/null +++ b/etc/INTERVIEW @@ -0,0 +1,434 @@ + + GNU'S NOT UNIX + + Conducted by David Betz and Jon Edwards + + Richard Stallman discusses his public-domain + UNIX-compatible software system + with BYTE editors + (July 1986) + +Copyright (C) 1986 Richard Stallman. Permission is granted to make and +distribute copies of this article as long as the copyright and this notice +appear on all copies. + +Richard Stallman has undertaken probably the most ambitious free software +development project to date, the GNU system. In his GNU Manifesto, +published in the March 1985 issue of Dr. Dobb's Journal, Stallman described +GNU as a "complete Unix-compatible software system which I am writing so +that I can give it away free to everyone who can use it... Once GNU is +written, everyone will be able to obtain good system software free, just +like air." (GNU is an acronym for GNU's Not UNIX; the "G" is pronounced.) + + Stallman is widely known as the author of EMACS, a powerful text editor +that he developed at the MIT Artificial Intelligence Laboratory. It is no +coincidence that the first piece of software produced as part of the GNU +project was a new implementation of EMACS. GNU EMACS has already achieved a +reputation as one of the best implementations of EMACS currently available +at any price. + +BYTE: We read your GNU Manifesto in the March 1985 issue of Dr. Dobb's. +What has happened since? Was that really the beginning, and how have you +progressed since then? + +Stallman: The publication in Dr. Dobb's wasn't the beginning of the +project. I wrote the GNU Manifesto when I was getting ready to start the +project, as a proposal to ask computer manufacturers for funding. They +didn't want to get involved, and I decided that rather than spend my time +trying to pursue funds, I ought to spend it writing code. The manifesto was +published about a year and a half after I had written it, when I had barely +begun distributing the GNU EMACS. Since that time, in addition to making +GNU EMACS more complete and making it run on many more computers, I have +nearly finished the optimizing C compiler and all the other software that +is needed for running C programs. This includes a source-level debugger +that has many features that the other source-level debuggers on UNIX don't +have. For example, it has convenience variables within the debugger so you +can save values, and it also has a history of all the values that you have +printed out, making it tremendously easier to chase around list structures. + +BYTE: You have finished an editor that is now widely distributed and you +are about to finish the compiler. + +Stallman: I expect that it will be finished this October. + +BYTE: What about the kernel? + +Stallman: I'm currently planning to start with the kernel that was written +at MIT and was released to the public recently with the idea that I would +use it. This kernel is called TRIX; it's based on remote procedure call. I +still need to add compatibility for a lot of the features of UNIX which it +doesn't have currently. I haven't started to work on that yet. I'm +finishing the compiler before I go to work on the kernel. I am also going +to have to rewrite the file system. I intend to make it failsafe just by +having it write blocks in the proper order so that the disk structure is +always consistent. Then I want to add version numbers. I have a complicated +scheme to reconcile version numbers with the way people usually use UNIX. +You have to be able to specify filenames without version numbers, but you +also have to be able to specify them with explicit version numbers, and +these both need to work with ordinary UNIX programs that have not been +modified in any way to deal with the existence of this feature. I think I +have a scheme for doing this, and only trying it will show me whether it +really does the job. + +BYTE: Do you have a brief description you can give us as to how GNU as a +system will be superior to other systems? We know that one of your goals is +to produce something that is compatible with UNIX. But at least in the area +of file systems you have already said that you are going to go beyond UNIX +and produce something that is better. + +Stallman: The C compiler will produce better code and run faster. The +debugger is better. With each piece I may or may not find a way to improve +it. But there is no one answer to this question. To some extent I am +getting the benefit of reimplementation, which makes many systems much +better. To some extent it's because I have been in the field a long time +and worked on many other systems. I therefore have many ideas to bring to +bear. One way in which it will be better is that practically everything in +the system will work on files of any size, on lines of any size, with any +characters appearing in them. The UNIX system is very bad in that regard. +It's not anything new as a principle of software engineering that you +shouldn't have arbitrary limits. But it just was the standard practice in +writing UNIX to put those in all the time, possibly just because they were +writing it for a very small computer. The only limit in the GNU system is +when your program runs out of memory because it tried to work on too much +data and there is no place to keep it all. + +BYTE: And that isn't likely to be hit if you've got virtual memory. You may +just take forever to come up with the solution. + +Stallman: Actually these limits tend to hit in a time long before you take +forever to come up with the solution. + +BYTE: Can you say something about what types of machines and environments +GNU EMACS in particular has been made to run under? It's now running on +VAXes; has it migrated in any form to personal computers? + +Stallman: I'm not sure what you mean by personal computers. For example, is +a Sun a personal computer? GNU EMACS requires at least a megabyte of +available memory and preferably more. It is normally used on machines that +have virtual memory. Except for various technical problems in a few C +compilers, almost any machine with virtual memory and running a fairly +recent version of UNIX will run GNU EMACS, and most of them currently do. + +BYTE: Has anyone tried to port it to Ataris or Macintoshes? + +Stallman: The Atari 1040ST still doesn't have quite enough memory. The next +Atari machine, I expect, will run it. I also think that future Ataris will +have some forms of memory mapping. Of course, I am not designing the +software to run on the kinds of computers that are prevalent today. I knew +when I started this project it was going to take a few years. I therefore +decided that I didn't want to make a worse system by taking on the +additional challenge of making it run in the currently constrained +environment. So instead I decided I'm going to write it in the way that +seems the most natural and best. I am confident that in a couple of years +machines of sufficient size will be prevalent. In fact, increases in memory +size are happening so fast it surprises me how slow most of the people are +to put in virtual memory; I think it is totally essential. + +BYTE: I think people don't really view it as being necessary for +single-user machines. + +Stallman: They don't understand that single user doesn't mean single +program. Certainly for any UNIX-like system it's important to be able to +run lots of different processes at the same time even if there is only one +of you. You could run GNU EMACS on a nonvirtual-memory machine with enough +memory, but you couldn't run the rest of the GNU system very well or a UNIX +system very well. + +BYTE: How much of LISP is present in GNU EMACS? It occurred to me that it +may be useful to use that as a tool for learning LISP. + +Stallman: You can certainly do that. GNU EMACS contains a complete, +although not very powerful, LISP system. It's powerful enough for writing +editor commands. It's not comparable with, say, a Common LISP System, +something you could really use for system programming, but it has all the +things that LISP needs to have. + +BYTE: Do you have any predictions about when you would be likely to +distribute a workable environment in which, if we put it on our machines or +workstations, we could actually get reasonable work done without using +anything other than code that you distribute? + +Stallman: It's really hard to say. That could happen in a year, but of +course it could take longer. It could also conceivably take less, but +that's not too likely anymore. I think I'll have the compiler finished in a +month or two. The only other large piece of work I really have to do is in +the kernel. I first predicted GNU would take something like two years, but +it has now been two and a half years and I'm still not finished. Part of +the reason for the delay is that I spent a lot of time working on one +compiler that turned out to be a dead end. I had to rewrite it completely. +Another reason is that I spent so much time on GNU EMACS. I originally +thought I wouldn't have to do that at all. + +BYTE: Tell us about your distribution scheme. + +Stallman: I don't put software or manuals in the public domain, and the +reason is that I want to make sure that all the users get the freedom to +share. I don't want anyone making an improved version of a program I wrote +and distributing it as proprietary. I don't want that to ever be able to +happen. I want to encourage the free improvements to these programs, and +the best way to do that is to take away any temptation for a person to make +improvements nonfree. Yes, a few of them will refrain from making +improvements, but a lot of others will make the same improvements and +they'll make them free. + +BYTE: And how do you go about guaranteeing that? + +Stallman: I do this by copyrighting the programs and putting on a notice +giving people explicit permission to copy the programs and change them but +only on the condition that they distribute under the same terms that I +used, if at all. You don't have to distribute the changes you make to any +of my programs--you can just do it for yourself, and you don't have to give +it to anyone or tell anyone. But if you do give it to someone else, you +have to do it under the same terms that I use. + +BYTE: Do you obtain any rights over the executable code derived from the C +compiler? + +Stallman: The copyright law doesn't give me copyright on output from the +compiler, so it doesn't give me a way to say anything about that, and in +fact I don't try to. I don't sympathize with people developing proprietary +products with any compiler, but it doesn't seem especially useful to try to +stop them from developing them with this compiler, so I am not going to. + +BYTE: Do your restrictions apply if people take pieces of your code to +produce other things as well? + +Stallman: Yes, if they incorporate with changes any sizable piece. If it +were two lines of code, that's nothing; copyright doesn't apply to that. +Essentially, I have chosen these conditions so that first there is a +copyright, which is what all the software hoarders use to stop everybody +from doing anything, and then I add a notice giving up part of those +rights. So the conditions talk only about the things that copyright applies +to. I don't believe that the reason you should obey these conditions is +because of the law. The reason you should obey is because an upright person +when he distributes software encourages other people to share it further. + +BYTE: In a sense you are enticing people into this mode of thinking by +providing all of these interesting tools that they can use but only if they +buy into your philosophy. + +Stallman: Yes. You could also see it as using the legal system that +software hoarders have set up against them. I'm using it to protect the +public from them. + +BYTE: Given that manufacturers haven't wanted to fund the project, who do +you think will use the GNU system when it is done? + +Stallman: I have no idea, but it is not an important question. My purpose +is to make it possible for people to reject the chains that come with +proprietary software. I know that there are people who want to do that. +Now, there may be others who don't care, but they are not my concern. I +feel a bit sad for them and for the people that they influence. Right now a +person who perceives the unpleasantness of the terms of proprietary +software feels that he is stuck and has no alternative except not to use a +computer. Well, I am going to give him a comfortable alternative. + Other people may use the GNU system simply because it is technically +superior. For example, my C compiler is producing about as good a code as I +have seen from any C compiler. And GNU EMACS is generally regarded as being +far superior to the commercial competition. And GNU EMACS was not funded by +anyone either, but everyone is using it. I therefore think that many people +will use the rest of the GNU system because of its technical advantages. +But I would be doing a GNU system even if I didn't know how to make it +technically better because I want it to be socially better. The GNU project +is really a social project. It uses technical means to make a change in +society. + +BYTE: Then it is fairly important to you that people adopt GNU. It is not +just an academic exercise to produce this software to give it away to +people. You hope it will change the way the software industry operates. + +Stallman: Yes. Some people say no one will ever use it because it doesn't +have some attractive corporate logo on it, and other people say that they +think it is tremendously important and everyone's going to want to use it. +I have no way of knowing what is really going to happen. I don't know any +other way to try to change the ugliness of the field that I find myself in, +so this is what I have to do. + +BYTE: Can you address the implications? You obviously feel that this is an +important political and social statement. + +Stallman: It is a change. I'm trying to change the way people approach +knowledge and information in general. I think that to try to own knowledge, +to try to control whether people are allowed to use it, or to try to stop +other people from sharing it, is sabotage. It is an activity that benefits +the person that does it at the cost of impoverishing all of society. One +person gains one dollar by destroying two dollars' worth of wealth. I think +a person with a conscience wouldn't do that sort of thing except perhaps if +he would otherwise die. And of course the people who do this are fairly +rich; I can only conclude that they are unscrupulous. I would like to see +people get rewards for writing free software and for encouraging other +people to use it. I don't want to see people get rewards for writing +proprietary software because that is not really a contribution to society. +The principle of capitalism is the idea that people manage to make money by +producing things and thereby are encouraged to do what is useful, +automatically, so to speak. But that doesn't work when it comes to owning +knowledge. They are encouraged to do not really what's useful, and what +really is useful is not encouraged. I think it is important to say that +information is different from material objects like cars and loaves of +bread because people can copy it and share it on their own and, if nobody +attempts to stop them, they can change it and make it better for +themselves. That is a useful thing for people to do. This isn't true of +loaves of bread. If you have one loaf of bread and you want another, you +can't just put your loaf of bread into a bread copier. you can't make +another one except by going through all the steps that were used to make +the first one. It therefore is irrelevant whether people are permitted to +copy it--it's impossible. + Books were printed only on printing presses until recently. It was +possible to make a copy yourself by hand, but it wasn't practical because +it took so much more work than using a printing press. And it produced +something so much less attractive that, for all intents and purposes, you +could act as if it were impossible to make books except by mass producing +them. And therefore copyright didn't really take any freedom away from the +reading public. There wasn't anything that a book purchaser could do that +was forbidden by copyright. + But this isn't true for computer programs. It's also not true for tape +cassettes. It's partly false now for books, but it is still true that for +most books it is more expensive and certainly a lot more work to Xerox them +than to buy a copy, and the result is still less attractive. Right now we +are in a period where the situation that made copyright harmless and +acceptable is changing to a situation where copyright will become +destructive and intolerable. So the people who are slandered as "pirates" +are in fact the people who are trying to do something useful that they have +been forbidden to do. The copyright laws are entirely designed to help +people take complete control over the use of some information for their own +good. But they aren't designed to help people who want to make sure that +the information is accessible to the public and stop others from depriving +the public. I think that the law should recognize a class of works that are +owned by the public, which is different from public domain in the same +sense that a public park is different from something found in a garbage +can. It's not there for anybody to take away, it's there for everyone to +use but for no one to impede. Anybody in the public who finds himself being +deprived of the derivative work of something owned by the public should be +able to sue about it. + +BYTE: But aren't pirates interested in getting copies of programs because +they want to use those programs, not because they want to use that +knowledge to produce something better? + +Stallman: I don't see that that's the important distinction. More people +using a program means that the program contributes more to society. You +have a loaf of bread that could be eaten either once or a million times. + +BYTE: Some users buy commercial software to obtain support. How does your +distribution scheme provide support? + +Stallman: I suspect that those users are misled and are not thinking +clearly. It is certainly useful to have support, but when they start +thinking about how that has something to do with selling software or with +the software being proprietary, at that point they are confusing +themselves. There is no guarantee that proprietary software will receive +good support. Simply because sellers say that they provide support, that +doesn't mean it will be any good. And they may go out of business. In fact, +people think that GNU EMACS has better support than commercial EMACSes. One +of the reasons is that I'm probably a better hacker than the people who +wrote the other EMACSes, but the other reason is that everyone has sources +and there are so many people interested in figuring out how to do things +with it that you don't have to get your support from me. Even just the free +support that consists of my fixing bugs people report to me and +incorporating that in the next release has given people a good level of +support. You can always hire somebody to solve a problem for you, and when +the software is free you have a competitive market for the support. You can +hire anybody. I distribute a service list with EMACS, a list of people's +names and phone numbers and what they charge to provide support. + +BYTE: Do you collect their bug fixes? + +Stallman: Well, they send them to me. I asked all the people who wanted to +be listed to promise that they would never ask any of their customers to +keep secret whatever they were told or any changes they were given to the +GNU software as part of that support. + +BYTE: So you can't have people competing to provide support based on their +knowing the solution to some problem that somebody else doesn't know. + +Stallman: No. They can compete based on their being clever and more likely +to find the solution to your problem, or their already understanding more +of the common problems, or knowing better how to explain to you what you +should do. These are all ways they can compete. They can try to do better, +but they cannot actively impede their competitors. + +BYTE: I suppose it's like buying a car. You're not forced to go back to the +original manufacturer for support or continued maintenance. + +Stallman: Or buying a house--what would it be like if the only person who +could ever fix problems with your house was the contractor who built it +originally? That is the kind of imposition that's involved in proprietary +software. People tell me about a problem that happens in UNIX. Because +manufacturers sell improved versions of UNIX, they tend to collect fixes +and not give them out except in binaries. The result is that the bugs don't +really get fixed. + +BYTE: They're all duplicating effort trying to solve bugs independently. + +Stallman: Yes. Here is another point that helps put the problem of +proprietary information in a social perspective. Think about the liability +insurance crisis. In order to get any compensation from society, an injured +person has to hire a lawyer and split the money with that lawyer. This is a +stupid and inefficient way of helping out people who are victims of +accidents. And consider all the time that people put into hustling to take +business away from their competition. Think of the pens that are packaged +in large cardboard packages that cost more than the pen--just to make sure +that the pen isn't stolen. Wouldn't it be better if we just put free pens +on every street corner? And think of all the toll booths that impede the +flow of traffic. It's a gigantic social phenomenon. People find ways of +getting money by impeding society. Once they can impede society, they can +be paid to leave people alone. The waste inherent in owning information +will become more and more important and will ultimately make the difference +between the utopia in which nobody really has to work for a living because +it's all done by robots and a world just like ours where everyone spends +much time replicating what the next fellow is doing. + +BYTE: Like typing in copyright notices on the software. + +Stallman: More like policing everyone to make sure that they don't have +forbidden copies of anything and duplicating all the work people have +already done because it is proprietary. + +BYTE: A cynic might wonder how you earn your living. + +Stallman: From consulting. When I do consulting, I always reserve the right +to give away what I wrote for the consulting job. Also, I could be making +my living by mailing copies of the free software that I wrote and some that +other people wrote. Lots of people send in $150 for GNU EMACS, but now this +money goes to the Free Software Foundation that I started. The foundation +doesn't pay me a salary because it would be a conflict of interest. +Instead, it hires other people to work on GNU. As long as I can go on +making a living by consulting I think that's the best way. + +BYTE: What is currently included in the official GNU distribution tape? + +Stallman: Right now the tape contains GNU EMACS (one version fits all +computers); Bison, a program that replaces YACC; MIT Scheme, which is +Professor Sussman's super-simplified dialect of LISP; and Hack, a +dungeon-exploring game similar to Rogue. + +BYTE: Does the printed manual come with the tape as well? + +Stallman: No. Printed manuals cost $15 each or copy them yourself. Copy +this interview and share it, too. + +BYTE: How can you get a copy of that? + +Stallman: Write to the Free Software Foundation, 675 Massachusetts Ave., +Cambridge, MA 02139. + +BYTE: What are you going to do when you are done with the GNU system? + +Stallman: I'm not sure. Sometimes I think that what I'll go on to do is the +same thing in other areas of software. + +BYTE: So this is just the first of a whole series of assaults on the +software industry? + +Stallman: I hope so. But perhaps what I'll do is just live a life of ease +working a little bit of the time just to live. I don't have to live +expensively. The rest of the time I can find interesting people to hang +around with or learn to do things that I don't know how to do. + +Editorial Note: BYTE holds the right to provide this interview on BIX but +will not interfere with its distribution. + +Richard Stallman, 545 Technology Square, Room 703, Cambridge, MA 02139. +Copyright (C) 1986 Richard Stallman. Permission is granted to make and +distribute copies of this article as long as the copyright and this notice +appear on all copies. diff --git a/etc/LEDIT b/etc/LEDIT new file mode 100644 index 0000000..ff274ce --- /dev/null +++ b/etc/LEDIT @@ -0,0 +1,77 @@ +Date: 17 Apr 85 15:45:42 EST (Wed) +From: Martin David Connor + + Date: Sat, 13 Apr 85 16:28:15 est + From: Richard M. Stallman + + Can you help this person? Also, can you give me the rest of ledit + to distribute, plus some info on how to use it? + +I have put the files "ledit.l" and "leditcfns.c" on prep:~mdc. +Much to my disgust ledit.l relied on some bogus little package of +functions on HT, so I had to massage it a bit. + +To get it to work, one must: + + - Compile leditcfns.c with something like: + + cc leditcfns.c + + - Edit ledit.l, changing the line beginning "(cfasl" to + have the right pathname for the cfns file you compiled in + the last step. + + - Compile ledit.l with: + + liszt ledit.l + +Then put the following lines in your .lisprc file: + + ;load in functions for emacs interface + (load "//src//mdc//ledit//ledit") ; Location of Ledit library + (set-proc-str "%gnumacs") ; Name of editor + +Then you can use ^E to get from LISP back to gnumacs. + +Here is the part of my .emacs file that pertains to ledit. + + ;;; Set up ledit mode + (setq ledit-go-to-lisp-string "%lisp") + (setq lisp-mode-hook 'ledit-from-lisp-mode) + + Date: Sat, 13 Apr 85 11:26:32 cst + From: neves@wisc-ai.arpa (David Neves) + + This is a documentation question. + I cannot figure out how to use Ledit. I suspect I need some + function on the Franz Lisp end of things to go to Emacs and read in + the temporary file. Is this true? Is the Lisp job started within + Emacs or outside of emacs? I'm just plain confused. Perhaps a couple + of words from someone in the know would help. + + A related question. I have been using a shell buffer when interacting + with Lisp (ie. put a definition in the kill buffer and then yank it + into the shell buffer to redefine it). This is nice but tends to fill + up the shell buffer with lots of code (I'd rather keep calls to functions + in the shell and not the functions themselves). + My question: Is using the shell buffer "better" than ledit? Am I using + it in the best way (i.e. copying definitions from an edit buffer to the + shell buffer)? -Thanks, David Neves + +I have found that ledit works well for doing programming development +when you are changing lots of little pieces of a file and don't wish +to recompile the whole file. Of course M-X Compile is very nice for +calling up a liszt on a buffer and watching it in the another window. +Of course the interface of something like NIL is even better because +you can compile your function directly into your lisp. But since NIL +doesn't run under Unix, this is probably the next best thing. + +I have tried the 2 window method (shell in lower window, lisp code in +upper), and have found it a little awkward. It does have certain +advantages, but most of the time, I get be fine using M-C-D to save a +defun for lisp, and C-X Z to jump back to LISP. C-E RETURN from lisp +is also mnemonic for getting back to gnumacs. + +I hope this helps somewhat. + + diff --git a/etc/MACHINES b/etc/MACHINES new file mode 100644 index 0000000..234165d --- /dev/null +++ b/etc/MACHINES @@ -0,0 +1,619 @@ +This is a list of the status of GNU Emacs on various machines and systems. +Last updated 10 July 1990. + +Systems: + For each type of system, the name of the appropriate s- header file + is given. + +Berkeley 4.1 (s-bsd4-1.h) + + Works on vaxes. + +Berkeley 4.2 (s-bsd4-2.h) + + Works on several machines. + +Berkeley 4.3 (s-bsd4-3.h) + + Works, on Vaxes at least. + +System V rel 0 (s-usg5-0.h) + + Works, on Vaxes and 3bxxx's. + There are some problems in 18.37 due to shortnames/cccp problems: + use the emacs 17 cpp if you have it. + +System V rel 2 (s-usg5-2.h) + + Works on various machines. + On some (maybe all) machines the library -lPW exists and contains + a version of `alloca'. On these machines, to use it, put + #define HAVE_ALLOCA + #define LIB_STANDARD -lPW -lc + in the m-...h file for the machine. + + If you find that the character Meta-DEL makes Emacs crash, + find where function init_sys_modes in sysdep.c sets sg.c_cc[VQUIT] + and make it store 7 there. I have as yet no evidence of whether + this problem, known in HP-UX, exists in other system V versions. + + If you are compiling to work with X11 release 4, you may need + to define HAVE_RANDOM in config.h. + +System V rel 2.2 (s-usg5-2-2.h) + + In 5.2.2 AT&T undid, incompatibly, their previous incompatible + change to the way the nlist library is called. A different s- file + is used to enable the other interface. + + They call themselves the right choice--can't they choose? + + Emacs version 18 unexec is currently not working properly + on 5.2.2. Nobody knows why yet. A workaround is to define + NO_REMAP. It is not yet known whether this applies to all + machines running 5.2.2. + + If you are compiling to work with X11 release 4, you may need + to define HAVE_RANDOM in config.h. + +System V rel 3 (s-usg5-3.h) + + Some versions of this system support ptys and BSD-style sockets. + On such systems, you should define HAVE_PTYS and HAVE_SOCKETS in config.h. + + Sorry, shared libraries do not work with Emacs currently (in 18.55). + They will be supported in the future. + + If you are compiling to work with X11 release 4, you may need + to define HAVE_RANDOM in config.h. + +Ultrix (s-bsd4-2.h) + + DEC's Ultrix OS is essentially Berkeley 4.2. It does not correctly + implement certain features of 4.3. + + Ultrix 3.0 has incompatibilities in its X library if you have the + Ultrix version of X (UWS version 2.0). To solve them, you need to + prevent XvmsAlloc.o in Xlib from being used. Israel Pinkas says: + + I added the following lines to config.h after the X defines: + + #if defined(ultrix) && defined(X11) + #define OBJECTS_SYSTEM calloc.o + #endif + + Then I ran the following: + + ar x /usr/lib/libc.a calloc.o + + The problem is said to be gone in UWS version 2.1. + +Uniplus 5.2 (s-unipl5-2.h) + + Works, on Dual machines at least. + +VMS (s-vms.h) + + Works except for certain features (directory listing, dired, + sending and receiving mail) that use synchronous subprocesses. + We need people to write alternative implementations of these + facilities. + + Note that Emacs for VMS is usually distributed in a special + VMS distribution. See the file ../VMSINSTALL for info on moving + Unix distributions to VMS, and other VMS-related topics. + +Xenix + + Should work in 18.50, but you will need to edit the files + etc/Makefile and src/ymakefile + (see the comments that mention "Xenix" for what to change.) + Compiling Emacs with -O is said not to work. + + If you want Emacs to work with Smail (installed as /usr/bin/smail) + then add the line #define SMAIL to config.h. + + The file etc/XENIX suggests some useful things to do to Xenix + to make the Emacs meta key work. + +Machines: + For each type of machine, the names of the m- and s- header files + are given. + +Alliant (m-alliant4.h or m-alliant.h or m-alliant1.h; s-bsd4-2.h) + + 18.52 works on system version 4. Previous Emacs versions were + known to work on previous system versions. + + Use m-alliant1.h on version 1 of their operating system + and use m-alliant.h on version 2 or 3. + Use m-alliant4.h on version 4. + +Altos 3068 (m-altos.h; s-usg5-2.h) + + Changes, very minimal, for 18.36 have been merged in 18.38. + +Amdahl UTS (m-amdahl.h; s-usg5-2-2.h) + + Small changes for 18.38 were merged in 18.39. It is mostly + working, but at last report a bug sometimes causes Emacs to + grab very large amounts of memory. No fix or explanation + has yet been reported. It may be possible to find this bug + if you find which Emacs command it happens within and then + run that command with a breakpoint set at malloc. + + The 5.2u370 compiler is so brain damaged that it is not + even worth trying to use it. Success was obtained with the + uts native C compiler on uts version 5.2.5. + +Apollo running Domain (m-apollo.h; s-bsd4-2.h) + + 18.52 works, to some extent. + Code for dumping Emacs has been written, but we cannot + distribute it yet. + There are reports of bugs in cc -O on this system. + + In etc/Makefile, don't expect emacsclient and server to + compile. You might want to remove them from your makefile. + + Supposedly something in dired.c runs into a compiler bug. + Paraphrasing the statement should avoid the problem. + I havenot yet received word as to the exact statement this is. + +AT&T 3b2, 3b5, 3b15, 3b20 (m-att3b.h; s-usg5-2-2.h) + + Emacs will probably not work with certain kernel constants too small. + + In param.h CDLIMIT should be at least (1L << 12) in order to allow + processes to write up to 2 Mbyte files. If it's too small, + you can perhaps fix it using the file `ulimit.hack' in this directory. + + Note that for V.3.1 and later releases, this parameter is configurable + by normal means in /etc/master.d/kernel; examine that file for the + symbol CDLIMIT or ULIMIT, and raise it by several powers of 2. Then + do normal kernel rebuild things via "cd /boot; mkboot -k KERNEL" and so + forth. Do not use ulimit.hack if you have V.3.1 or later. + + In seg.h NSEGP and STACKSEG should be at least 16 and 4 respectively + to allow processes with total size of up to 2Mbytes. + However, I'm told it is unlikely this would fail to be true. + + The MAXMEM may also prevent Emacs from running. The file + 3B-MAXMEM in this directory explains how to increase MAXMEM. + +AT&T 7300 or 3b1 (m-7300.h; s-usg5-2-2.h) + + 18.52 seems to work. If you have strange troubles with dumping Emacs, + delete the last few lines from m-7300.h and recompile. These lines + are supposed to produce a sharable executable. + + m-7300.h defines SHORTNAMES because operating system versions + older than 3.5 did not support long symbol names. Version 3.5 does + support them, so you can remove the #define SHORTNAMES in that version. + +CCI 5/32, 6/32 + + See "Tahoe". + +Celerity (m-celerity.h; s-bsd4-2.h) + + Version 18.49 works. + +Convex (m-convex.h; s-bsd4-3.h) + + 18.53 is supposed to work. + +Cydra 5 (m-cydra5.h; s-usg5-3.h) + + 18.51 worked in one version of their operating system but stopped + working in a newer version. This has not been fixed. + +DECstation (m-pmax.h; s-bsd4-2.h) + + Works, as of 18.55. See under Ultrix for problems using X windows + on Ultrix. Note that this is a MIPS machine. + +Dual running System V (m-dual.h; s-usg5-2.h) + + As of 17.46, this works except for a few changes + needed in unexec.c. + +Dual running Uniplus (m-dual.h; s-unipl5-2.h) + + Works, as of 17.51. + +Elxsi 6400 (m-elxsi; s-usg5-2.h) + + 18.36 required one small change that's installed in 18.38. + + m-elxsi.h currenty specifies CANNOT_DUMP. + The Elxsi can in principle dump, but the necessary changes to + unexec, which involve byte-swapping, were too ugly to install. + If someone submits simple code that supports dumping on the Elxsi, + it can be installed and CANNOT_DUMP can be turned off. + +Encore machine (m-ns16000.h; s-umax.h) + + This machine bizarrely uses 4.2BSD modified to use the COFF format + for object files. Works (as of 18.40). For the APC processor you + must enable two lines at the end of s-umax.h, which are commented + out in the file as distributed. + + WARNING: If you compile Emacs with the "-O" compiler switch, you + must also use the "-q enter_exits" switch so that all functions have + stack frames. Otherwise routines that call `alloca' all lose. + + A kernel bug in some system versions causes input characters to be lost + occasionally. + +GEC 93 (m-gec93.h; s-usg5-2.h?) + + Changes are partially merged in version 18, but + certainly require more work. + +Gould (m-gould.h; s-bsd4-2.h or s-bsd4-3.h) + + 18.36 worked on versions 1.2 and 2.0 of the operating system. + + On UTX/32 2.0, use s-bsd4-3.h. + + On UTX/32 1.2 and UTX/32S 1.0, use s-bsd4-2.h and note that compiling + etc/sorted-doc tickles a compiler bug: remove the -g flag to cc in the + makefile. + + UTX/32 1.3 has a bug in the bcopy library routine. Fix it by + #undef BSTRING in m-gould.h. + +HP 9000 series 200 or 300 (m-hp9000s300.h; s-hpux.h or s-bsd4-3.h) + + Version 18 works. + These machines are 68000-series CPUs running HP-UX + (a derivative of sysV with some BSD features) or BSD 4.3 ported by Utah. + The choice of s- file determines which system Emacs is built for. + + Series 200 HPUX runs Emacs only if it has the "HP-UX upgrade". + + The series 500 has a seriously incompatible memory architecture + which relocates data in memory during execution of a program, + and support for it would be difficult to implement. + + Note that HP has used two incompatible assembler syntaxes, + and has recently changed the format of C function frames. + src/crt0.c and src/alloca.s have been conditionalised for the new + assembler and new function-entry sequence. You may need to define + OLD_HP_ASSEMBLER if you are using an older hpux version. If you + have an official (bought from HP) series 300 machine you have + the new assembler. Kernels that are 5.+ or later have new + assembler. A Series 200 that has been upgraded to a 68010 + processor and a 5.+ kernel has the new compiler. + + Define C_SWITCH_MACHINE to be +X to make a version of Emacs that + runs on both 68010 and 68020 based hp-ux's. + + Define HPUX_68010 if you are using the new assembler, for + a system that has a 68010 without a 68881. This is to say, + a s200 (upgraded) or s310. + + Define the symbol HPUX_NET if you have the optional network features + that include the `netunam' system call. This is refered to as + Network Services (NS/9000) in HP literature. + + If you are compiling to work with X11 release 4, you may need + to define HAVE_RANDOM in config.h. + +HP 9000 series 800 (Spectrum) (m-hp9000s800.h; s-hpux.h) + + These files support HP's Precision Architecture machines + running HP-UX. It has been moderately tested on the Series + 840. + +High Level Hardware Orion (m-orion.h; s-bsd4-2.h) + + This is the original microprogrammed hardware. + m- file ought to work. + +High Level Hardware Orion 1/05 (m-orion105.h; s-bsd4-2.h) + + Changes merged in 18.52. This is the one with the Clipper cpu. + + C compiler has a bug; it loops compiling eval.c. + Compile it by hand without optimization. + +IBM PS2 (m-ibmps2-aix.h; s-usg5-2-2.h) + + Changes mostly merged in 18.55. You may need to put an #ifndef AIX + conditional around the definition of closedir in sysdep.c, and + perhaps delete the #include of sioctl.h. You may need to copy + /usr/lib/samples/hft/hftctl.c to the Emacs src directory. + +IBM RT/PC (m-ibmrt.h or m-ibmrt-aix.h; s-bsd4-2.h or s-usg5-2-2.h) + + 18.52 works on both operating systems. + Use s-bsd-4-2.h for the 4.2-like system and s-usg5-2-2.h for AIX. + + On BSD, if you have trouble, try compiling with a different compiler. + + On AIX, the file /usr/lib/samples/hft/hftctl.c must be compiled into + hftctl.o, with this result left in the src directory (hftctl.c is + part of the standard AIX distribution). + + window.c must not be compiled with -O on AIX. + +Integrated Solutions `Optimum V' (m-isi-ov.h; s-bsd4-2.h or s-bsd4-3.h) + + 18.52 said to work on some sort of ISI machine. + Version 18.45 worked (running on a Optimum V (VME bus, 68020) + BSD 4.2 (3.05e) system). 18.42 is reported to work on + a Qbus 68010 system. Has not been tried on `WorkStation' `Cluster + Compute Node' `Cluster WorkStation' or `Server Node' (Love the + StudLYCaps) + + Compilation with -O is rumored to break something. + + On recent system versions, you may need to undefine the macro UMAX + in etc/loadst.c and src/getpagesize.h. They stupidly defined this + in a system header file, which confuses Emacs (which thinks that UMAX + indicates the Umax operating system). + +Intel 80386 (m-intel386.h; s-bsd4-2.h, s-usg5-2-2.h, + s-usg5-3.h, s-386ix.h or s-xenix.h) + + Changes merged in 18.50 for all three operating systems. + If you are using Xenix, see notes above under Xenix. + + Some sysV.3 systems seem to have bugs in `opendir'; + for them, alter `config.h' to define NONSYSTEM_DIR_LIBRARY + and undefine SYSV_SYSTEM_DIR. + + If you use optimization on V.3, you may need the option -W2,'-y 0' + to prevent certain faulty optimization. Otherwise, fns.c won't work. + + On 386/ix, it has been reported that it does not work to use shared + libraries, so you must override the definition of LIBX11_SYSTEM in + s-usg5-3.h, if you want to use X11. + + There is no consistency in the handling of certain system header files + on V.3. + + Some versions have sys/sioctl.h, and require it in sysdep.c. + But some versions do not have sys/sioctl.h. + Some versions have been known to need sys/ttold.h, sys/stream.h, + and sys/ptem.h included in sysdep.c. + Some versions convince sysdep.c to try to use `struct tchars' + but define `struct tc' instead; add `#define tchars tc' + to config.h to solve this problem. + Some systems have problems that can be solved by inserting + #undef TIOCGETC + in sysdep.c, near the place where this is done for XENIX. + +Iris 2500 (m-irist.h; s-iris3-5.h or s-iris3-6.h) + + Version 18 said to work; use s-irist3-5.h for system version 2.5 + and s-iris3-6.h for system version 3.6. + +Iris 2500 Turbo (m-irist.h; s-iris3-5.h or s-iris3-6.h) + + 18.49 works. Use s-iris3-6.h for system versions 3.6 and up. + Note that the 3030 is the same machine as this. + +Iris 4D (m-iris4d.h; s-iris3-6.h or s-irix3-3.h) + + Changes for 18.49 are merged in 18.50. 18.52 seems to work. + The system version called Irix 3.3 is newer than what was called 3.6. + + Note that the compilation of etc/loadst.c requires editing etc/Makefile. + See the comment in that file. + + Someone says that with the yellow pages you must change two definitions + in m-iris4d.h as follows: + + #define LIBS_MACHINE -lsun -lbsd -lPW -lmld + #define C_SWITCH_MACHINE -I/usr/include/sun -I/usr/include/bsd + +Macintosh + + We are boycotting Apple because of Apple's efforts to take away + our freedom to write compatible imitations of existing software. + If you value your freedom to write such programs, we urge you + not to buy from Apple, not to develop software for Apple, and + certainly not to accept a job with Apple. + + See the file APPLE in this directory for more information. + +Masscomp (m-masscomp.h; s-rtu.h) + + 18.36 worked on a 5500DP running RTU v3.1a and compiler version 3.2 + with minor fixes that are included in 18.37. However, bizarre behavior + was reported for 18.36 on a Masscomp (model and version unknown but probably + a 68020 system). The report sounds like a compiler bug. + + A compiler bug affecting statements like + unsigned char k; unsigned char *p;... x = p[k]; + has been reported for "C version 1.2 under RTU 3.1". We do not wish + to take the time to install the numerous workarounds required to + compensate for this bug; go complain to Masscomp. + + For RTU version 3.1, define FIRST_PTY_LETTER to be 'p' in s-rtu.h + (or #undef and redefine it in config.h) so that ptys will be used. + + GNU Emacs is said to have no chance of compiling on RTU versions + prior to v3.0. + +Megatest (m-mega68.h; s-bsd4-2.h) + + Emacs 15 worked; do not have any reports about Emacs 16 or 17 + but any new bugs are probably not difficult. + +Mips (m-mips.h; s-usg5-2-2.h) + + Changes merged in 18.39. Some fixes in 18.56. + +NCR Tower 32 (m-tower32.h; s-usg5-2.h) + + Works as of 17.56. + +Nixdorf Targon 31 (m-targon31.h; s-usg5-2-2.h) + + m- file for version 17 is included in 18 + but whether it works is not known. + src/unexec.c bombs if compiled with -O. + Note that the "Targon 35" is really a Pyramid. + +Nu (TI or LMI) (m-nu.h; s-usg5-2.h) + + Version 18 is believed to work. + +Plexus (m-plexus.h; s-usg5-2.h) + + Works as of 17.56. + +Pmax, Mips from DEC (m-pmax.h; s-bsd4-2.h) + + See under DECstation, above. + +Prime EXL (m-intel386.h, s-usg5-3.h) + + 18.54 should work. + +Pyramid (m-pyramid.h; s-bsd4-2.h) + + In OSx 4.0, it seems necessary to add the following two lines + to m-pyramid.h: + #define _longjmp longjmp + #define _setjmp setjmp + + In Pyramid system 2.5 there has been a compiler bug making + Emacs crash just after screen-splitting with Qnil containing 0. + A compiler that fixes this is Pyramid customer number 8494, + internal number 1923. + + Some versions of the pyramid compiler get fatal + errors when the -gx compiler switch is used; if this + happens to you, change src/m-pyramid.h to define + C_DEBUG_SWITCH with an empty definition. + + Some old system versions may require you to define PYRAMID_OLD + in when alloca.s is preprocessed, in order to define _longjmp and _setjmp. + +Sequent (m-sequent.h; s-bsd4-2.h) + + For balance and symmetry. Emacs 18.51 should work on system version + 3.0. 18.5[23] is said to work. Delete some lines at the end of + m-sequent.h for earlier system versions. + +SONY News (m-news.h; s-bsd4-2.h, or s-bsd4-3.h for system release 3) + + 18.52 should work. + +Stride (m-stride.h; s-usg5-2.h) + + Works (most recent news for 18.30) on their release 2.0. + For release 2.2, see the end of m-stride.h. + It may be possible to run on their V.1 system but changes + in the s- file would be needed. + +Sun 1, 2 and 3 (m-sun1.h, m-sun2.h, m-sun3.h; s-bsd4-2.h or s-sunos4.h) + + There are three m- files for different versions of SunOS. + All are derived from Berkeley 4.2. Emacs 17 has run on all of them. + Whether you should use m-sun1.h, m-sun2.h or m-sun3.h depends + on the VERSION OF THE OPERATING SYSTEM you have. + You will need to use m-sun3.h on Sun 2's running SunOS release 3. + + For SunOS release 4 on a Sun 3, use m-sun3.h and s-sunos4.h. + See the file etc/SUNBUG for how to solve problems caused by bugs in + the "export" version of SunOS 4. + + If you want to use SunWindows, define HAVE_SUN_WINDOWS + in config.h to enable a special interface called `emacstool'. + The definition must *precede* the #include "m-sun3.h". + System version 3.2 is required for this facility to work. + + We recommend that you instead use the X window system, which + has technical advantages, is an industry standard, and is also + free software. + + If you are compiling for X windows, and the X window library was + compiled to use the 68881, then you must edit config.h according + the comments at the end of m-sun3.h. + + Note that Emacs on a Sun is not really as big as it looks. + As dumped, it includes around 200k of zeros between the + original text section and the original data section + (now remapped as part of the text). These are never + swapped in. + + To build a single Emacs that will run on Sun 2 and Sun 3 + HARDWARE, just build it on the Sun 2. + +Sun 4 (m-sparc.h; s-bsd4-2.h or s-sunos4.h) + + Changes merged in 18.50. Some people say optimizing compilation + does not work; some say that -O2 (whatever that is) works + perhaps with a small change. + + Use s-sunos4.h for operating system version 4. + See the file etc/SUNBUG for how to solve problems caused by bugs in + the "export" version of SunOS 4. + +Sun Roadrunner (m-sun386.h; s-sunos4.h) + + Changes merged in 18.51. + +Tahoe (m-tahoe.h; s-bsd4-2.h or s-bsd4-3.h) + + 18.52 known to work on some Tahoes, but a compiler bug intervenes + on others. Some Emacs versions have worked in Unisys 1r4 + (not in 1r3) and CCI I.21. + + If you have trouble compiling etc/loadst.c, turn off the definition + of DKSTAT_HEADER_FILE in m-tahoe.h. + +Tektronix 16000 box (6130?) (m-16000.h; s-bsd4-2.h) + + Emacs 17.61 worked. + +Tektronix 4300 (m-tex4300.h; s-bsd4-3.h) + + Emacs 18.51 should work. + +Ustation E30 (SS5E) (m-ustation.h; s-unipl5-2.h). + + Changes merged in 18.52; don't know whether they work. + +Vax running Berkeley Unix (m-vax.h; s-bsd4-1.h, s-bsd4-2.h or s-bsd4-3.h) + + Works. + +Vax running Ultrix (m-vax.h; s-bsd4-2.h) + + Works. See under Ultrix for problems using X windows on Ultrix. + +Vax running System V rel 2 (m-vax.h; s-usg5-2.h) + + 18.27 Works. + +Vax running System V rel 0 (m-vax.h; s-usg5-0.h) + + Works as of 18.36. + +Vax running VMS (m-vax.h; s-vms.h but on VMS they are m_vax.h and s_vms.h) + + 18.36 believed to work. Addition of features is necessary to make + this Emacs version more usable. + +Whitechapel MG1 (m-mg1.h, s-?) + + May work. Supposedly no changes were needed except the m- file. + I do not know what Unix version runs on them. + +Wicat (m-wicat.h; s-usg5-2.h) + + Changes merged as of 18.6; whether they work is unknown. + See comments in m-wicat.h for things you should change + depending on the system and compiler version you have. + +Local variables: +mode: text +fill-prefix: " " +End: diff --git a/etc/MAILINGLISTS b/etc/MAILINGLISTS new file mode 100644 index 0000000..436e611 --- /dev/null +++ b/etc/MAILINGLISTS @@ -0,0 +1,314 @@ + GNU Project electronic mailing lists. Last Updated 20 Feb 1989 + +* GNU mailing lists are also distributed as USENET news groups + +The mailing lists are gated both ways with the gnu.all newsgroups at +ohio-state.edu. The one-to-one correspondence is indicated below. If +you don't know if your site is on USENET, ask your system administrator. +If you are a USENET site and don't get the gnu.all newsgroups, please +ask your USENET administrator to get them. If he has your feeds ask +their feeds, you should win. And everyone else wins: newsgroups make +better use of the limited bandwidth of the computer networks and your +home machine than mailing list traffic; and staying off the mailing +lists make better use of the people who maintain the lists and the +machines that the GNU people working with rms use (i.e. we have more +time to produce code!!). Thanx. + +* Getting the mailing lists directly + +If several users at your site or local network would like to read a list +and you aren't a USENET site, Project GNU would prefer if you would set +up one address that redistributes locally. This reduces overhead on our +machine, your gateway machine, and the network(s) used to transport the +mail from us to you. + +* How to subscribe and reporting bugs in the mailing lists + +Send messages ABOUT these lists, such as reports of mail problems, or +requests to be added or removed, to info-gnu-emacs-request (or +info-gnu-request, bug-gdb-request, etc.), NOT to info-gnu-emacs (or +info-gnu, etc.). These -request addresses go only to the +people who can do something about your requests or problems, and thus +avoids disturbing everyone else. + +All GNU mailing lists are unmoderated, mail reflectors, except info-gnu. +They are very large lists, please don't send them anything that is not +seriously important to many people. + +All addresses below are in internet format. Consult the mail guru for +your computer to figure out address syntaxes from other networks. From +UUCP machines: + ..!ucbvax!prep.ai.mit.edu!ADDRESS + ..!mit-eddie!mit-prep!ADDRESS + +If a message you mail to a list is returned from a MAILER-DAEMON (often +with the line: + ----- Transcript of session follows ----- + ), don't resend the message to the list. All this return means is that +your original message failed to reach a few addresses on the list. Such +messages are NEVER a reason to resend a piece of mail a 2nd time. This +just bothers all (N - few) of the readers of the list with a message +they have already seen. It also wastes computer and network resources. + +It is appropriate to send these to the -request address for a list, and +ask them to check the problem out. + +* Specific Requests for Information to: gnu@prep.ai.mit.edu + +Specific requests for information about obtaining GNU software, or GNU +activities in Cambridge and elsewhere can be directed to: +gnu@prep.ai.mit.edu + +* General Information about info-* lists + +Most of the time, when you reply to a message sent to an info-* list, +the reply should not go to the info-* list. But most mailer reading +programs supply all the recipients of the original as recipients of the +reply, by default. Make a point of deleting the info-* address from the +list when it does not belong. This prevents bothering all readers of a +list, and reduces network congestion. + +* General Information about bug-* lists and reporting program bugs + +If you think something is a bug in a program, it might be one; or, it +might be a misunderstanding or even a feature. Before beginning to +report bugs, please read the section ``Reporting Emacs Bugs'' toward the +end of the GNU Emacs reference manual (or GEM's built-in Info system) +for a discussion of how and when to send in bug reports. Always include +the version number of the program, as well as the operating system and +machine the program was ran on. A debugger backtrace of any core dump, +can also be useful. Be careful to separate out hypothesis from fact! +For GNU Emacs bugs, type "M-x emacs-version". For bugs in GNU Emacs +lisp, set variable debug-on-error to t, and re-enter the command(s) that +cause the error message; GEM will pop up a debug buffer if something is +wrong; please include a copy of the buffer in your bug report. + +Do not expect an answer for a bug report, except sometimes in the form +of a fix for the bug in the next release. Reporting a bug is done to +get the bug fixed for everyone. Likewise, we maintainers fix bugs in +order to help the entire community. We see no such duty to aid +individuals one at a time, such as by sending them individual messages, +and have no time to do this since we are busy doing things for the +entire community. If you want help for yourself in particular, you may +have to hire someone. The GNU project maintains a list of people +providing such services. It is distributed with GNU Emacs in file +../etc/SERVICE, and can be requested from gnu@prep.ai.mit.edu. + +Anything addressed to the implementors and maintainers of a GNU program +via a bug-* list, should NOT be sent to the corresponding info-* list. +Bug reports reach the GNU maintainers quickest when they are sent to the +bug-* mailing list submittal address. Bug reports sent to the gnu.*.bug +newsgroups can be delayed several days. Bug reports sent to the comp.* +never make it to GNU maintainers - mail them directly! + +* info-gnu-request@prep.ai.mit.edu to subscribe to info-gnu +** USENET newsgroup: gnu.announce +** List submittal address: info-gnu@prep.ai.mit.edu + +This list distributes progress reports on the GNU Project, and asks +people for various kinds of help. It is NOT for general discussion. + +The list is filtered to remove items meant for info-gnu-request, that +can be answered by the moderator without bothering the list, or should +have been sent to another list. + +* bug-gnu-emacs-request@prep.ai.mit.edu to subscribe to bug-gnu-emacs +** USENET newsgroup: gnu.emacs.bug +** Gnu Emacs bug reports to: bug-gnu-emacs@prep.ai.mit.edu + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in GNU Emacs to the active maintainers of GNU Emacs. It is +the place to report GNU Emacs bugs by all users of GNU Emacs. + +Subscribers to bug-gnu-emacs automatically receive all info-gnu-emacs +messages. + +* info-gnu-emacs-request@prep.ai.mit.edu to subscribe to info-gnu-emacs +** USENET newsgroup: gnu.emacs (and one-way into comp.emacs) +** submittal address: info-gnu-emacs@prep.ai.mit.edu + +This list covers general questions and announcements about GNU Emacs. +Since it is a very large list, send it only those items that are +seriously important to many people. It is also gated one way to +USENET's newsgroup comp.emacs (once known as net.emacs). Do not report +GNU Emacs bugs to comp.emacs, instead mail them to +bug-gnu-emacs@prep.ai.mit.edu. Users at non-USENET sites may receive +all articles from comp.emacs by making their request to: +unix-emacs-request@bbn.com + +* vms-gnu-emacs-request@harvard.harvard.edu to subscribe to vms-gnu-emacs +** USENET newsgroup: gnu.emacs.vms +** submittal address: vms-gnu-emacs@harvard.harvard.edu +*** UUCP: ..!uunet!harvard!vms-gnu-emacs-request + +This list was a working group who did the initial port of GNU Emacs to +the VMS operating system. It still discusses problems and solutions to +the VMS port and the distribution of it. + +* gnu-manual-request@a.cs.uiuc.edu to subscribe to gnu-manual +** USENET newsgroup: gnu.emacs.lisp.manual +** submittal address: gnu-manual@a.cs.uiuc.edu +*** UUCP: ..!ihnp4!uiucdcs!gnu-manual-request + +This list is a working group whose volunteers write, proofread and +comment on the developing GNU Emacs Lisp programmers manual. + +* bug-gdb-request@prep.ai.mit.edu to subscribe to bug-gdb +** USENET newsgroup: gnu.gdb.bug +** GDB bug reports to: bug-gdb@prep.ai.mit.edu + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in GDB (Gnu's DeBugger) to the active maintainers of GDB. +It is the place to report GDB bugs by all users of GDB. + +Always report the version number gdb reports on startup, as well as the +operating system and hardware. + +There is neither a info-gdb list nor a gnu.gdb newsgroup at this time. + +* bug-gcc-request@prep.ai.mit.edu to subscribe to bug-gcc +** USENET newsgroup: gnu.gcc.bug +** GCC bug reports to: bug-gcc@prep.ai.mit.edu + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in the GNU C Compiler to its active developers. It is the +place to report GCC bugs by all testers of GCC. The GNU C Compiler +still has bugs in it, and is not quite ready for everyday use. + +Always report the version number of gcc, as well as the operating system +and hardware. + +Subscribers to bug-gcc automatically receive all info-gcc messages. + +* info-gcc-request@prep.ai.mit.edu to subscribe to info-gcc +** USENET newsgroup: gnu.gcc +** submittal address: info-gcc@prep.ai.mit.edu + +This list reports new releases and proven bug fixes to testers of the +GNU C Compiler. + +* bug-g++-request@prep.ai.mit.edu to subscribe to bug-g++ +** USENET newsgroup: gnu.g++.bug +** G++ and GDB+ bug reports: bug-g++@prep.ai.mit.edu + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in the GNU C++ Compiler and it's debugger GDB+ to their +active developers. It is the place to report G++ and GDB+ bugs by all +testers of G++ and GDB+. The GNU C++ Compiler is still in test release, +and is NOT ready for everyday use. + +Always report the version number of g++, as well as the operating system +and hardware. + +G++ uses the GNU C-Compiler back end. Active developers may wish to +subscribe to bug-gcc@prep.ai.mit.edu as well. + +GDB+ uses much code from GDB. Active developers may wish to subscribe +to bug-gdb@prep.ai.mit.edu as well. + +Subscribers to bug-g++ automatically receive all info-g++ messages. + +* info-g++-request@prep.ai.mit.edu to subscribe to info-g++ +** USENET newsgroup: gnu.g++ (and one-way into comp.lang.c++) +** submittal address: info-g++@prep.ai.mit.edu + +This list reports new releases, informations about ports and proven bug +fixes to testers of the GNU C++ Compiler. It is also gated one way to +USENET's newsgroup comp.lang.c++. Do not report g++ bugs to +comp.lang.c++, mail them to bug-g++@prep.ai.mit.edu instead. + +* bug-lib-g++-request@prep.ai.mit.edu to subscribe to bug-lib-g++ +** USENET newsgroup: gnu.g++.lib.bug +** lib-g++ bug reports to: bug-lib-g++@prep.ai.mit.edu + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in lib-g++ (Gnu's library for C++) to the active +maintainers of lib-g++. It is the place to report lib-g++ bugs by all +users of lib-g++. + +Always report the version number of lib-g++, as well as the operating +system and hardware. + +There is neither a info-lib-g++ list nor a gnu.g++.lib newsgroup at +this time. Announcements of new releases of lib-g++ are made on both +info-g++ and bug-lib-g++. + +* bug-ghostscript-request@prep.ai.mit.edu to subscribe to bug-ghostscript +** USENET newsgroup: gnu.ghostscript.bug +** Ghostscript bug reports to: bug-ghostscript@prep.ai.mit.edu + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in Ghostscript to the active maintainers of ghostscript. +It is the place to report bugs in Ghostscript by all users of +them. + +Always report the version number of the GNU program, as well as the +operating system and hardware. + +For now, new releases of Ghostscript will also be announced on this list. + +GhostScript is the GNU project implementation of a language and graphics +library with a remarkable similarity to PostScript(tm). + +There is neither a info-ghostscript list nor a gnu.ghostscript newsgroup +at this time. + +* info-gnu-chess-request@prep.ai.mit.edu to subscribe to info-gnu-chess +** USENET newsgroup: gnu.chess +** submittal address: info-gnu-chess@prep.ai.mit.edu + +This list reports new releases and information about the program GNU +Chess. + +* bug-gnu-utils-request@prep.ai.mit.edu to subscribe to bug-gnu-utils +** USENET newsgroup: gnu.utils.bug +** GNU Utilities bug reports to: bug-gnu-utils@prep.ai.mit.edu + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in GNU programs not covered by other bug-* mailing +lists/gnu.*.bug newsgroups to the active maintainers of these programs. +It is the place to report bugs in these GNU programs by all users of +them. + +Always report the version number of the GNU program, as well as the +operating system and hardware. + +There is neither a info-gnu-utils list nor a gnu.utils newsgroup at this +time. + +* info-gnus-request%flab.Fujitsu.JUNET@uunet.UU.NET to subscribe +** USENET newsgroup: NONE YET +** Send contributions to: info-gnus%flab.Fujitsu.JUNET@uunet.UU.NET + +The list is intended to exchange valuable information about GNUS, such +as bug reports, useful hooks, and extensions of GNUS. GNUS is an +NNTP-base network news reader for GNU Emacs (which also handles news +spools). English and Japanese are the official languages of the list. + +* info-gnus-english-request@cis.ohio-state.edu to subscribe +** USENET newsgroup: gnu.emacs.gnus +** Send contributions to: info-gnus-english@cis.ohio-state.edu + +The list has the same charter as info-gnus. The difference is that +English is the only official language of the list. + +info-gnu-english/comp.emacs.gnus is forward to info-gnus, but NOT +vice-versa. + +* bug-gnu-emacs-ada-request@esl.com to subscribe to bug-gnu-emacs-ada +** USENET newsgroup: NONE PLANNED +** GNU-EMACS-ADA bug reports to: bug-gnu-emacs-ada@esl.com + +This list distributes bug reports, fixes for bugs, and suggestions for +improvements in GNU Emacs' editing support of the Ada programming +language. + +Always report the version number, as well as the operating system +and hardware. + +There is neither a info-gnu-emacs-ada mailing list nor a newsgroup. + +Local variables: +mode: outline +fill-column: 72 +End: diff --git a/etc/MOTIVATION b/etc/MOTIVATION new file mode 100644 index 0000000..37ed36f --- /dev/null +++ b/etc/MOTIVATION @@ -0,0 +1,176 @@ +STUDIES FIND REWARD OFTEN NO MOTIVATOR + +Creativity and intrinsic interest diminish if task is done for gain + +By Alfie Kohn +Special to the Boston Globe +[reprinted with permission of the author + from the Monday 19 January 1987 Boston Globe] + +In the laboratory, rats get Rice Krispies. In the classroom the top +students get A's, and in the factory or office the best workers get +raises. It's an article of faith for most of us that rewards promote +better performance. + +But a growing body of research suggests that this law is not nearly as +ironclad as was once thought. Psychologists have been finding that +rewards can lower performance levels, especially when the performance +involves creativity. + +A related series of studies shows that intrinsic interest in a task - +the sense that something is worth doing for its own sake - typically +declines when someone is rewarded for doing it. + +If a reward - money, awards, praise, or winning a contest - comes to +be seen as the reason one is engaging in an activity, that activity +will be viewed as less enjoyable in its own right. + +With the exception of some behaviorists who doubt the very existence +of intrinsic motivation, these conclusions are now widely accepted +among psychologists. Taken together, they suggest we may unwittingly +be squelching interest and discouraging innovation among workers, +students and artists. + +The recognition that rewards can have counter-productive effects is +based on a variety of studies, which have come up with such findings +as these: Young children who are rewarded for drawing are less likely +to draw on their own that are children who draw just for the fun of +it. Teenagers offered rewards for playing word games enjoy the games +less and do not do as well as those who play with no rewards. +Employees who are praised for meeting a manager's expectations suffer +a drop in motivation. + +Much of the research on creativity and motivation has been performed +by Theresa Amabile, associate professor of psychology at Brandeis +University. In a paper published early last year on her most recent +study, she reported on experiments involving elementary school and +college students. Both groups were asked to make "silly" collages. +The young children were also asked to invent stories. + +The least-creative projects, as rated by several teachers, were done +by those students who had contracted for rewards. "It may be that +commissioned work will, in general, be less creative than work that is +done out of pure interest," Amabile said. + +In 1985, Amabile asked 72 creative writers at Brandeis and at Boston +University to write poetry. Some students then were given a list of +extrinsic (external) reasons for writing, such as impressing teachers, +making money and getting into graduate school, and were asked to think +about their own writing with respect to these reasons. Others were +given a list of intrinsic reasons: the enjoyment of playing with +words, satisfaction from self-expression, and so forth. A third group +was not given any list. All were then asked to do more writing. + +The results were clear. Students given the extrinsic reasons not only +wrote less creatively than the others, as judged by 12 independent +poets, but the quality of their work dropped significantly. Rewards, +Amabile says, have this destructive effect primarily with creative +tasks, including higher-level problem-solving. "The more complex the +activity, the more it's hurt by extrinsic reward," she said. + +But other research shows that artists are by no means the only ones +affected. + +In one study, girls in the fifth and sixth grades tutored younger +children much less effectively if they were promised free movie +tickets for teaching well. The study, by James Gabarino, now +president of Chicago's Erikson Institute for Advanced Studies in Child +Development, showed that tutors working for the reward took longer to +communicate ideas, got frustrated more easily, and did a poorer job in +the end than those who were not rewarded. + +Such findings call into question the widespread belief that money is +an effective and even necessary way to motivate people. They also +challenge the behaviorist assumption that any activity is more likely +to occur if it is rewarded. Amabile says her research "definitely +refutes the notion that creativity can be operantly conditioned." + +But Kenneth McGraw, associate professor of psychology at the +University of Mississippi, cautions that this does not mean +behaviorism itself has been invalidated. "The basic principles of +reinforcement and rewards certainly work, but in a restricted context" +- restricted, that is, to tasks that are not especially interesting. + +Researchers offer several explanations for their surprising findings +about rewards and performance. + +First, rewards encourage people to focus narrowly on a task, to do it +as quickly as possible and to take few risks. "If they feel that +'this is something I hve to get through to get the prize,' the're +going to be less creative," Amabile said. + +Second, people come to see themselves as being controlled by the +reward. They feel less autonomous, and this may interfere with +performance. "To the extent one's experience of being +self-determined is limited," said Richard Ryan, associate psychology +professor at the University of Rochester, "one's creativity will be +reduced as well." + +Finally, extrinsic rewards can erode intrinsic interest. People who +see themselves as working for money, approval or competitive success +find their tasks less pleasurable, and therefore do not do them as +well. + +The last explanation reflects 15 years of work by Ryan's mentor at the +University of Rochester, Edward Deci. In 1971, Deci showed that +"money may work to buy off one's intrinsic motivation for an activity" +on a long-term basis. Ten years later, Deci and his colleagues +demonstrated that trying to best others has the same effect. Students +who competed to solve a puzzle quickly were less likely than those who +were not competing to keep working at it once the experiment was over. + +Control plays role + +There is general agreement, however, that not all rewards have the +same effect. Offering a flat fee for participating in an experiment - +similar to an hourly wage in the workplace - usually does not reduce +intrinsic motivation. It is only when the rewards are based on +performing a given task or doing a good job at it - analogous to +piece-rate payment and bonuses, respectively - that the problem +develops. + +The key, then, lies in how a reward is experienced. If we come to +view ourselves as working to get something, we will no longer find +that activity worth doing in its own right. + +There is an old joke that nicely illustrates the principle. An +elderly man, harassed by the taunts of neighborhood children, finally +devises a scheme. He offered to pay each child a dollar if they would +all return Tuesday and yell their insults again. They did so eagerly +and received the money, but he told them he could only pay 25 cents on +Wednesday. When they returned, insulted him again and collected their +quarters, he informed them that Thursday's rate would be just a penny. +"Forget it," they said - and never taunted him again. + +Means to and end + +In a 1982 study, Stanford psychologist Mark L. Lepper showed that any +task, no matter how enjoyable it once seemed, would be devalued if it +were presented as a means rather than an end. He told a group of +preschoolers they could not engage in one activity they liked until +they first took part in another. Although they had enjoyed both +activities equally, the children came to dislike the task that was a +prerequisite for the other. + +It should not be surprising that when verbal feedback is experienced +as controlling, the effect on motivation can be similar to that of +payment. In a study of corporate employees, Ryan found that those who +were told, "Good, you're doing as you /should/" were "significantly +less intrinsically motivated than those who received feedback +informationally." + +There's a difference, Ryan says, between saying, "I'm giving you this +reward because I recognize the value of your work" and "You're getting +this reward because you've lived up to my standards." + +A different but related set of problems exists in the case of +creativity. Artists must make a living, of course, but Amabile +emphasizes that "the negative impact on creativity of working for +rewards can be minimized" by playing down the significance of these +rewards and trying not to use them in a controlling way. Creative +work, the research suggests, cannot be forced, but only allowed to +happen. + +/Alfie Kohn, a Cambridge, MA writer, is the author of "No Contest: The +Case Against Competition," recently published by Houghton Mifflin Co., +Boston, MA. ISBN 0-395-39387-6. / diff --git a/etc/Makefile b/etc/Makefile new file mode 100644 index 0000000..b844efc --- /dev/null +++ b/etc/Makefile @@ -0,0 +1,82 @@ +CFLAGS= -g -O +# For Xenix. Needed for movemail +# LOADLIBES= -lx + +# Used shared libraries to save space... Also use compact object format... +# These two together save 80% of the space for these utilities. +LOADLIBES= -lsys_s -object + +EXECUTABLES = test-distrib etags ctags loadst make-docfile \ + digest-doc sorted-doc movemail cvtmail fakemail yow env \ + server emacsclient + +all: ${EXECUTABLES} + +strip: + strip ${EXECUTABLES} + +distclean: + -rm -f ${EXECUTABLES} *~ \#* DOC* core + +clean: + -rm -f ${EXECUTABLES} *~ \#* DOC* core + +# This justs verifies that the non-ASCII characters +# in the file `testfile' have no been clobbered by +# whatever means were used to copy and distribute Emacs. +# If they were clobbered, all the .elc files were clobbered too. +test-distrib: test-distrib.c + $(CC) -o test-distrib test-distrib.c $(LOADLIBES) + ./test-distrib + +etags: etags.c + $(CC) -o etags ${CFLAGS} -DETAGS etags.c $(LOADLIBES) + +ctags: etags.c + $(CC) -o ctags ${CFLAGS} -DCTAGS etags.c $(LOADLIBES) + +loadst: loadst.c ../src/config.h + $(CC) -o loadst ${CFLAGS} loadst.c $(LOADLIBES) + +make-docfile: make-docfile.c + $(CC) -o make-docfile ${CFLAGS} make-docfile.c $(LOADLIBES) + +digest-doc: digest-doc.c + $(CC) -o digest-doc ${CFLAGS} digest-doc.c $(LOADLIBES) + +sorted-doc: sorted-doc.c + $(CC) -o sorted-doc ${CFLAGS} sorted-doc.c $(LOADLIBES) + +# +movemail: movemail.c ../src/config.h + $(CC) -o movemail ${CFLAGS} movemail.c $(LOADLIBES) + +cvtmail: cvtmail.c + $(CC) -o cvtmail ${CFLAGS} cvtmail.c $(LOADLIBES) + +fakemail: fakemail.c ../src/config.h + $(CC) -o fakemail ${CFLAGS} fakemail.c $(LOADLIBES) + +yow: yow.c + $(CC) -o yow ${CFLAGS} yow.c $(LOADLIBES) + +# this is silly -- just use emacs to edit this file! +# (in any case this program doesn't preserve alphabetical ordering, +# which is why I'm removing it) +#addyow: addyow.c +# $(CC) -o addyow ${CFLAGS} addyow.c $(LOADLIBES) + +env: env.c ../src/config.h + $(CC) -o env -DEMACS ${CFLAGS} env.c $(LOADLIBES) + +server: server.c ../src/config.h + $(CC) -o server ${CFLAGS} server.c $(LOADLIBES) + +emacsclient: emacsclient.c ../src/config.h + $(CC) -o emacsclient ${CFLAGS} emacsclient.c $(LOADLIBES) + +# This one is NOT included in EXECUTABLES. +# See ../src/ymakefile. +emacstool: emacstool.c + $(CC) emacstool.c -o emacstool -g -lsuntool -lsunwindow -lpixrect $(LOADLIBES) + diff --git a/etc/NEWS b/etc/NEWS new file mode 100644 index 0000000..313dcb0 --- /dev/null +++ b/etc/NEWS @@ -0,0 +1,1607 @@ +GNU Emacs NEWS -- history of user-visible changes. 17-Aug-1988 +Copyright (C) 1988 Free Software Foundation, Inc. +See the end for copying conditions. + +Changes in version 18.52. + +* X windows version 10 is supported under system V. + +* Pop-up menus are now supported with the same Lisp interface in +both version 10 and 11 of X windows. + +* C-x 4 a is a new command to edit a change-log entry in another window. + +* The emacs client program now allows an option +NNN to specify the +line number to go to in the file whose name follows. Thus, + emacsclient foo.c +45 bar.c +will find the files `foo.c' and `bar.c', going to line 45 in `bar.c'. + +* Dired allows empty directories to be deleted like files. + +* When the terminal type is used to find a terminal-specific file to +run, Emacs now tries the entire terminal type first. If that doesn't +yield a file that exists, the last hyphen and what follows it is +stripped. If that doesn't yield a file that exists, the previous +hyphen is stripped, and so on until all hyphens are gone. For +example, if the terminal type is `aaa-48-foo', Emacs will try first +`term/aaa-48-foo.el', then `term/aaa-48.el' and finally `term/aaa.el'. + +Underscores now receive the same treatment as hyphens. + +* Texinfo features: @defun, etc. texinfo-show-structure. +New template commands. texinfo-format-region. + +* The special "local variable" `eval' is now ignored if you are running +as root. + +* New command `c-macro-expand' shows the result of C macro expansion +in the region. It works using the C preprocessor, so its results +are completely accurate. + +* Errors in trying to auto save now flash error messages for a few seconds. + +* Killing a buffer now sends SIGHUP to the buffer's process. + +* New hooks. + +** `spell-region' now allows you to filter the text before spelling-checking. +If the value of `spell-filter' is non-nil, it is called, with no arguments, +looking at a temporary buffer containing a copy of the text to be checked. +It can alter the text freely before the spell program sees it. + +** The variable `lpr-command' now specifies the command to be used when +you use the commands to print text (such as M-x print-buffer). + +** Posting netnews now calls the value of `news-inews-hook' (if not nil) +as a function of no arguments before the actual posting. + +** Rmail now calls the value of `rmail-show-message-hook' (if not nil) +as a function of no arguments, each time a new message is selected. + +** `kill-emacs' calls the value of `kill-emacs-hook' as a function of no args. + +* New libraries. +See the source code of each library for more information. + +** icon.el: a major mode for editing programs written in Icon. + +** life.el: a simulator for the cellular automaton "life". Load the +library and run M-x life. + +** doctex.el: a library for converting the Emacs `etc/DOC' file of +documentation strings into TeX input. + +** saveconf.el: a library which records the arrangement of windows and +buffers when you exit Emacs, and automatically recreates the same +setup the next time you start Emacs. + +** uncompress.el: a library that automatically uncompresses files +when you visit them. + +** c-fill.el: a mode for editing filled comments in C. + +** kermit.el: an extended version of shell-mode designed for running kermit. + +** spook.el: a library for adding some "distract the NSA" keywords to every +message you send. + +** hideif.el: a library for hiding parts of a C program based on preprocessor +conditionals. + +** autoinsert.el: a library to put in some initial text when you visit +a nonexistent file. The text used depends on the major mode, and +comes from a directory of files created by you. + +* New programming features. + +** The variable `window-system-version' now contains the version number +of the window system you are using (if appropriate). When using X windows, +its value is either 10 or 11. + +** (interactive "N") uses the prefix argument if any; otherwise, it reads +a number using the minibuffer. + +** VMS: there are two new functions `vms-system-info' and `shrink-to-icon'. +The former allows you to get many kinds of system status information. +See its self-documentation for full details. +The second is used with the window system: it iconifies the Emacs window. + +** VMS: the new function `define-logical-name' allows you to create +job-wide logical names. The old function `define-dcl-symbol' has been +removed. + +Changes in version 18.50. + +* X windows version 11 is supported. + +Define X11 in config.h if you want X version 11 instead of version 10. + +* The command M-x gdb runs the GDB debugger as an inferior. +It asks for the filename of the executable you want to debug. + +GDB runs as an inferior with I/O through an Emacs buffer. All the +facilities of Shell mode are available. In addition, each time your +program stops, and each time you select a new stack frame, the source +code is displayed in another window with an arrow added to the line +where the program is executing. + +Special GDB-mode commands include M-s, M-n, M-i, M-u, M-d, and C-c C-f +which send the GDB commands `step', `next', `stepi', `up', `down' +and `finish'. + +In any source file, the commands C-x SPC tells GDB to set a breakpoint +on the current line. + +* M-x calendar displays a three-month calendar. + +* C-u 0 C-x C-s never makes a backup file. + +This is a way you can explicitly request not to make a backup. + +* `term-setup-hook' is for users only. + +Emacs never uses this variable for internal purposes, so you can freely +set it in your `.emacs' file to make Emacs do something special after +loading any terminal-specific setup file from `lisp/term'. + +* `copy-keymap' now copies recursive submaps. + +* New overlay-arrow feature. + +If you set the variable `overlay-arrow-string' to a string +and `overlay-arrow-position' to a marker, that string is displayed on +the screen at the position of that marker, hiding whatever text would +have appeared there. If that position isn't on the screen, or if +the buffer the marker points into isn't displayed, there is no effect. + +* -batch mode can read from the terminal. + +It now works to use `read-char' to do terminal input in a noninteractive +Emacs run. End of file causes Emacs to exit. + +* Variables `data-bytes-used' and `data-bytes-free' removed. + +These variables cannot really work because the 24-bit range of an +integer in (most ports of) GNU Emacs is not large enough to hold their +values on many systems. + +Changes in version 18.45, since version 18.41. + +* C indentation parameter `c-continued-brace-offset'. + +This parameter's value is added to the indentation of any +line that is in a continuation context and starts with an open-brace. +For example, it applies to the open brace shown here: + + if (x) + { + +The default value is zero. + +* Dabbrev expansion (Meta-/) preserves case. + +When you use Meta-/ to search the buffer for an expansion of an +abbreviation, if the expansion found is all lower case except perhaps +for its first letter, then the case pattern of the abbreviation +is carried over to the expansion that replaces it. + +* TeX-mode syntax. + +\ is no longer given "escape character" syntax in TeX mode. It now +has the syntax of an ordinary punctuation character. As a result, +\[...\] and such like are considered to balance each other. + +* Mail-mode automatic Reply-to field. + +If the variable `mail-default-reply-to' is non-`nil', then each time +you start to compose a message, a Reply-to field is inserted with +its contents taken from the value of `mail-default-reply-to'. + +* Where is your .emacs file? + +If you run Emacs under `su', so your real and effective uids are +different, Emacs uses the home directory associated with the real uid +(the name you actually logged in under) to find the .emacs file. + +Otherwise, Emacs uses the environment variable HOME to find the .emacs +file. + +The .emacs file is not loaded at all if -batch is specified. + +* Prolog mode is the default for ".pl" files. + +* File names are not case-sensitive on VMS. + +On VMS systems, all file names that you specify are converted to upper +case. You can use either upper or lower case indiscriminately. + +* VMS-only function 'define-dcl-symbol'. + +This is a new name for the function formerly called +`define-logical-name'. + +Editing Changes in Emacs 18 + +* Additional systems and machines are supported. + +GNU Emacs now runs on Vax VMS. However, many facilities that are normally +implemented by running subprocesses do not work yet. This includes listing +a directory and sending mail. There are features for running subprocesses +but they are incompatible with those on Unix. I hope that some of +the VMS users can reimplement these features for VMS (compatibly for +the user, if possible). + +VMS wizards are also asked to work on making the subprocess facilities +more upward compatible with those on Unix, and also to rewrite their +internals to use the same Lisp objects that are used on Unix to +represent processes. + +In addition, the TI Nu machine running Unix system V, the AT&T 3b, and +the Wicat, Masscomp, Integrated Solutions, Alliant, Amdahl uts, Mips, +Altos 3068 and Gould Unix systems are now supported. The IBM PC-RT is +supported under 4.2, but not yet under system V. The GEC 93 is close +to working. The port for the Elxsi is partly merged. See the file +MACHINES for full status information and machine-specific installation +advice. + +* Searching is faster. + +Forward search for a text string, or for a regexp that is equivalent +to a text string, is now several times faster. Motion by lines and +counting lines is also faster. + +* Memory usage improvements. + +It is no longer possible to run out of memory during garbage +collection. As a result, running out of memory is never fatal. This +is due to a new garbage collection algorithm which compactifies +strings in place rather than copying them. Another consequence of the +change is a reduction in total memory usage and a slight increase in +garbage collection speed. + +* Display changes. + +** Editing above top of screen. + +When you delete or kill or alter text that reaches to the top of the +screen or above it, so that display would start in the middle of a +line, Emacs will usually attempt to scroll the text so that display +starts at the beginning of a line again. + +** Yanking in the minibuffer. + +The message "Mark Set" is no longer printed when the minibuffer is +active. This is convenient with many commands, including C-y, that +normally print such a message. + +** Cursor appears in last line during y-or-n questions. + +Questions that want a `y' or `n' answer now move the cursor +to the last line, following the question. + +* Library loading changes. + +`load' now considers all possible suffixes (`.elc', `.el' and none) +for each directory in `load-path' before going on to the next directory. +It now accepts an optional fourth argument which, if non-nil, says to +use no suffixes; then the file name must be given in full. The search +of the directories in `load-path' goes on as usual in this case, but +it too can be prevented by passing an absolute file name. + +The value of `load-path' no longer by default includes nil (meaning to +look in the current default directory). The idea is that `load' should +be used to search the path only for libraries to be found in the standard +places. If you want to override system libraries with your own, place +your own libraries in one special directory and add that directory to the +front of `load-path'. + +The function `load' is no longer a command; that is to say, `M-x load' +is no longer allowed. Instead, there are two commands for loading files. +`M-x load-library' is equivalent to the old meaning of `M-x load'. +`M-x load-file' reads a file name with completion and defaulting +and then loads exactly that file, with no searching and no suffixes. + +* Emulation of other editors. + +** `edt-emulation-on' starts emulating DEC's EDT editor. + +Do `edt-emulation-off' to return Emacs to normal. + +** `vi-mode' and `vip-mode' starts emulating vi. + +These are two different vi emulations provided by GNU Emacs users. +We are interested in feedback as to which emulation is preferable. + +See the documentation and source code for these functions +for more information. + +** `set-gosmacs-bindings' emulates Gosling Emacs. + +This command changes many global bindings to resemble those of +Gosling Emacs. The previous bindings are saved and can be restored using +`set-gnu-bindings'. + +* Emulation of a display terminal. + +Within Emacs it is now possible to run programs (such as emacs or +supdup) which expect to do output to a visual display terminal. + +See the function `terminal-emulator' for more information. + +* New support for keypads and function keys. + +There is now a first attempt at terminal-independent support for +keypad and function keys. + +Emacs now defines a standard set of key-names for function and keypad +keys, and provides standard hooks for defining them. Most of the +standard key-names have default definitions built into Emacs; you can +override these in a terminal-independent manner. The default definitions +and the conventions for redefining them are in the file `lisp/keypad.el'. + +These keys on the terminal normally work by sending sequences of +characters starting with ESC. The exact sequences used vary from +terminal to terminal. Emacs interprets them in two stages: +in the first stage, terminal-dependent sequences are mapped into +the standard key-names; then second stage maps the standard key-names +into their definitions in a terminal-independent fashion. + +The terminal-specific file `term/$TERM.el' now is responsible only for +establishing the mapping from the terminal's escape sequences into +standard key-names. It no longer knows what Emacs commands are +assigned to the standard key-names. + +One other change in terminal-specific files: if the value of the TERM +variable contains a hyphen, only the part before the first hyphen is +used in forming the name of the terminal-specific file. Thus, for +terminal type `aaa-48', the file loaded is now `term/aaa.el' rather +than `term/aaa-48.el'. + +* New startup command line options. + +`-i FILE' or `-insert FILE' in the command line to Emacs tells Emacs to +insert the contents of FILE into the current buffer at that point in +command line processing. This is like using the command M-x insert-file. + +`-funcall', `-load', `-user' and `-no-init-file' are new synonyms for +`-f', `-l', `-u' and `-q'. + +`-nw' means don't use a window system. If you are using a terminal +emulator on the X window system and you want to run Emacs to work through +the terminal emulator instead of working directly with the window system, +use this switch. + +* Buffer-sorting commands. + +Various M-x commands whose names start with `sort-' sort parts of +the region: + +sort-lines divides the region into lines and sorts them alphabetically. +sort-pages divides into pages and sorts them alphabetically. +sort-paragraphs divides into paragraphs and sorts them alphabetically. +sort-fields divides into lines and sorts them alphabetically + according to one field in the line. + The numeric argument specifies which field (counting + from field 1 at the beginning of the line). Fields in a line + are separated by whitespace. +sort-numeric-fields + is similar but converts the specified fields to numbers + and sorts them numerically. +sort-columns divides into lines and sorts them according to the contents + of a specified range of columns. + +Refer to the self-documentation of these commands for full usage information. + +* Changes in various commands. + +** `tags-query-replace' and `tags-search' change. + +These functions now display the name of the file being searched at the moment. + +** `occur' output now serves as a menu. `occur-menu' command deleted. + +`M-x occur' now allows you to move quickly to any of the occurrences +listed. Select the `*Occur*' buffer that contains the output of `occur', +move point to the occurrence you want, and type C-c C-c. +This will move point to the same occurrence in the buffer that the +occurrences were found in. + +The command `occur-menu' is thus obsolete, and has been deleted. + +One way to get a list of matching lines without line numbers is to +copy the text to another buffer and use the command `keep-lines'. + +** Incremental search changes. + +Ordinary and regexp incremental searches now have distinct default +search strings. Thus, regexp searches recall only previous regexp +searches. + +If you exit an incremental search when the search string is empty, +the old default search string is kept. The default does not become +empty. + +Reversing the direction of an incremental search with C-s or C-r +when the search string is empty now does not get the default search +string. It leaves the search string empty. A second C-s or C-r +will get the default search string. As a result, you can do a reverse +incremental regexp search with C-M-s C-r. + +If you add a `*', `?' or `\|' to an incremental search regexp, +point will back up if that is appropriate. For example, if +you have searched for `ab' and add a `*', point moves to the +first match for `ab*', which may be before the match for `ab' +that was previously found. + +If an incremental search is failing and you ask to repeat it, +it will start again from the beginning of the buffer (or the end, +if it is a backward search). + +The search-controlling parameters `isearch-slow-speed' and +`isearch-slow-window-lines' have now been renamed to start with +`search' instead of `isearch'. Now all the parameters' names start +with `search'. + +If `search-slow-window-lines' is negative, the slow search window +is put at the top of the screen, and the absolute value or the +negative number specifies the height of it. + +** Undo changes + +The undo command now will mark the buffer as unmodified only when it is +identical to the contents of the visited file. + +** C-M-v in minibuffer. + +If while in the minibuffer you request help in a way that uses a +window to display something, then until you exit the minibuffer C-M-v +in the minibuffer window scrolls the window of help. + +For example, if you request a list of possible completions, C-M-v can +be used reliably to scroll the completion list. + +** M-TAB command. + +Meta-TAB performs completion on the Emacs Lisp symbol names. The sexp +in the buffer before point is compared against all existing nontrivial +Lisp symbols and completed as far as is uniquely determined by them. +Nontrivial symbols are those with either function definitions, values +or properties. + +If there are multiple possibilities for the very next character, a +list of possible completions is displayed. + +** Dynamic abbreviation package. + +The new command Meta-/ expands an abbreviation in the buffer before point +by searching the buffer for words that start with the abbreviation. + +** Changes in saving kbd macros. + +The commands `write-kbd-macro' and `append-kbd-macro' have been +deleted. The way to save a keyboard macro is to use the new command +`insert-kbd-macro', which inserts Lisp code to define the macro as +it is currently defined into the buffer before point. Visit a Lisp +file such as your Emacs init file `~/.emacs', insert the macro +definition (perhaps deleting an old definition for the same macro) +and then save the file. + +** C-x ' command. + +The new command C-x ' (expand-abbrev) expands the word before point as +an abbrev, even if abbrev-mode is not turned on. + +** Sending to inferior Lisp. + +The command C-M-x in Lisp mode, which sends the current defun to +an inferior Lisp process, now works by writing the text into a temporary +file and actually sending only a `load'-form to load the file. +As a result, it avoids the Unix bugs that used to strike when the +text was above a certain length. + +With a prefix argument, this command now makes the inferior Lisp buffer +appear on the screen and scrolls it so that the bottom is showing. + +Two variables `inferior-lisp-load-command' and `inferior-lisp-prompt', +exist to customize these feature for different Lisp implementations. + +** C-x p now disabled. + +The command C-x p, a nonrecomended command which narrows to the current +page, is now initially disabled like C-x n. + +* Dealing with files. + +** C-x C-v generalized + +This command is now allowed even if the current buffer is not visiting +a file. As usual, it kills the current buffer and replaces it with a +newly found file. + +** M-x recover-file improved; auto save file names changed. + +M-x recover-file now checks whether the last auto-save file is more +recent than the real visited file before offering to read in the +auto-save file. If the auto-save file is newer, a directory listing +containing the two files is displayed while you are asked whether you +want the auto save file. + +Visiting a file also makes this check. If the auto-save file is more recent, +a message is printed suggesting that you consider using M-x recover file. + +Auto save file names now by default have a `#' at the end as well +as at the beginning. This is so that `*.c' in a shell command +will never match auto save files. + +On VMS, auto save file names are made by appending `_$' at the front +and `$' at the end. + +When you change the visited file name of a buffer, the auto save file +is now renamed to belong to the new visited file name. + +You can customize the way auto save file names are made by redefining +the two functions `make-auto-save-file-name' and `auto-save-file-name-p', +both of which are defined in `files.el'. + +** Modifying a buffer whose file is changed on disk is detected instantly. + +On systems where clash detection (locking of files being edited) is +implemented, Emacs also checks the first time you modify a buffer +whether the file has changed on disk since it was last visited or saved. +If it has, you are asked to confirm that you want to change the buffer. + +** Exiting Emacs offers to save `*mail*'. + +Emacs can now know about buffers that it should offer to save on exit +even though they are not visiting files. This is done for any buffer +which has a non-nil local value of `buffer-offer-save'. By default, +Mail mode provides such a local value. + +** Backup file changes. + +If a backup file cannot be written in the directory of the visited file +due to fascist file protection, a backup file is now written in your home +directory as `~/%backup%~'. Only one such file is made, ever, so only +the most recently made such backup is available. + +When backup files are made by copying, the last-modification time of the +original file is now preserved in the backup copy. + +** Visiting remote files. + +On an internet host, you can now visit and save files on any other +internet host directly from Emacs with the commands M-x ftp-find-file +and M-x ftp-write-file. Specify an argument of the form HOST:FILENAME. +Since standard internet FTP is used, the other host may be any kind +of machine and is not required to have any special facilities. + +The first time any one remote host is accessed, you will be asked to +give the user name and password for use on that host. FTP is reinvoked +each time you ask to use it, but previously specified user names and +passwords are remembered automatically. + +** Dired `g' command. + +`g' in Dired mode is equivalent to M-x revert-buffer; it causes the +current contents of the same directory to be read in. + +* Changes in major modes. + +** C mode indentation change. + +The binding of Linefeed is no longer changed by C mode. It once again +has its normal meaning, which is to insert a newline and then indent +afterward. + +The old definition did one additional thing: it reindented the line +before the new newline. This has been removed because it made the +command twice as slow. The only time it was really useful was after the +insertion of an `else', since the fact of starting with `else' may change +the way that line is indented. Now you will have to type TAB again +yourself to reindent the `else' properly. + +If the variable `c-tab-always-indent' is set to `nil', the TAB command +in C mode, with no argument, will just insert a tab character if there +is non-whitespace preceding point on the current line. Giving it a +prefix argument will force reindentation of the line (as well as +of the compound statement that begins after point, if any). + +** Fortran mode now exists. + +This mode provides commands for motion and indentation of Fortran code, +plus built-in abbrevs for Fortran keywords. For details, see the manual +or the on-line documentation of the command `fortran-mode'. + +** Scribe mode now exists. + +This mode does something useful for editing files of Scribe input. +It is used automatically for files with names ending in ".mss". + +** Modula2 and Prolog modes now exist. + +These modes are for editing programs in the languages of the same names. +They can be selected with M-x modula-2-mode and M-x prolog-mode. + +** Telnet mode changes. + +The telnet mode special commands have now been assigned to C-c keys. +Most of them are the same as in Shell mode. + +** Picture mode changes. + +The special picture-mode commands to specify the direction of cursor +motion after insertion have been moved to C-c keys. The commands to +specify diagonal motion were already C-c keys; they are unchanged. +The keys to specify horizontal or vertical motion are now +C-c < (left), C-c > (right), C-c ^ (up) and C-c . (down). + +** Nroff mode comments. + +Comments are now supported in Nroff mode. The standard comment commands +such as M-; and C-x ; know how to insert, align and delete comments +that start with backslash-doublequote. + +** LaTeX mode. + +LaTeX mode now exists. Use M-x latex-mode to select this mode, and +M-x plain-tex-mode to select the previously existing mode for Plain +TeX. M-x tex-mode attempts to examine the contents of the buffer and +choose between latex-mode and plain-tex-mode accordingly; if the +buffer is empty or it cannot tell, the variable `TeX-default-mode' +controls the choice. Its value should be the symbol for the mode to +be used. + +The facilities for running TeX on all or part of the buffer +work with LaTeX as well. + +Some new commands available in both modes: + +C-c C-l recenter the window showing the TeX output buffer + so most recent line of output can be seen. +C-c C-k kill the TeX subprocess. +C-c C-q show the printer queue. +C-c C-f close a block (appropriate for LaTeX only). + If the current line contains a \begin{...}, + this inserts an \end{...} on the following line + and puts point on a blank line between them. + +** Outline mode changes. + +Invisible lines in outline mode are now indicated by `...' at the +end of the previous visible line. + +The special outline heading motion commands are now all on C-c keys. +A few new ones have been added. Here is a full list: + +C-c C-n Move to next visible heading (formerly M-}) +C-c C-p Move to previous visible heading (formerly M-{) +C-c C-f Move to next visible heading at the same level. + Thus, if point is on a level-2 heading line, + this command moves to the next visible level-2 heading. +C-c C-b Move to previous visible heading at the same level. +C-c C-u Move up to previous visible heading at a higher level. + +The variable `outline-regexp' now controls recognition of heading lines. +Any line whose beginning matches this regexp is a heading line. +The depth in outline structure is determined by the length of +the string that matches. + +A line starting with a ^L (formfeed) is now by default considered +a header line. + +* Mail reading and sending. + +** MH-E changes. + +MH-E has been extensively modified and improved since the v17 release. +It contains many new features, including commands to: extracted failed +messages, kill a draft message, undo changes to a mail folder, monitor +delivery of a letter, print multiple messages, page digests backwards, +insert signatures, and burst digests. Also, many commands have been +made to able to deal with named sequences of messages, instead of +single messages. MH-E also has had numerous bugs fixed and commands +made to run faster. Furthermore, its keybindings have been changed to +be compatible with Rmail and the rest of GNU Emacs. + +** Mail mode changes. + +The C-c commands of mail mode have been rearranged: + +C-c s, C-c c, C-c t and C-c b (move point to various header fields) +have been reassigned as C-c C-f C-s, C-c C-f C-c, C-c C-f C-t and C-c +C-f C-b. C-c C-f is for "field". + +C-c y, C-c w and C-c q have been changed to C-c C-y, C-c C-w and C-c C-q. + +Thus, C-c LETTER is always unassigned. + +** Rmail C-r command changed to w. + +The Rmail command to edit the current message is now `w'. This change +has been made because people frequently type C-r while in Rmail hoping +to do a reverse incremental search. That now works. + +* Rnews changes. + +** Caesar rotation added. + +The function news-caesar-buffer-body performs encryption and +decryption of the body of a news message. It defaults to the USENET +standard of 13, and accepts any numeric arg between 1 to 25 and -25 to -1. +The function is bound to C-c C-r in both news-mode and news-reply-mode. + +** rmail-output command added. + +The C-o command has been bound to rmail-output in news-mode. +This allows one to append an article to a file which is in either Unix +mail or RMAIL format. + +** news-reply-mode changes. + +The C-c commands of news reply mode have been rearranged and changed, +so that C-c LETTER is always unassigned: + +C-c y, C-c w and C-c q have been changed to C-c C-y, C-c C-w and C-c C-q. + +C-c c, C-c t, and C-c b (move to various mail header fields) have been +deleted (they make no sense for posting and replying to USENET). + +C-c s (move to Subject: header field) has been reassigned as C-c C-f +C-s. C-c C-f is for "field". Several additional move to news header +field commands have been added. + +The local news-reply-mode bindings now look like this: + +C-c C-s news-inews (post the message) C-c C-c news-inews +C-c C-f move to a header field (and create it if there isn't): + C-c C-f C-n move to Newsgroups: C-c C-f C-s move to Subj: + C-c C-f C-f move to Followup-To: C-c C-f C-k move to Keywords: + C-c C-f C-d move to Distribution: C-c C-f C-a move to Summary: +C-c C-y news-reply-yank-original (insert current message, in NEWS). +C-c C-q mail-fill-yanked-message (fill what was yanked). +C-c C-r caesar rotate all letters by 13 places in the article's body (rot13). + +* Existing Emacs usable as a server. + +Programs such as mailers that invoke "the editor" as an inferior +to edit some text can now be told to use an existing Emacs process +instead of creating a new editor. + +To do this, you must have an Emacs process running and capable of +doing terminal I/O at the time you want to invoke it. This means that +either you are using a window system and give Emacs a separate window +or you run the other programs as inferiors of Emacs (such as, using +M-x shell). + +First prepare the existing Emacs process by loading the `server' +library and executing M-x server-start. (Your .emacs can do this +automatically.) + +Now tell the other programs to use, as "the editor", the Emacs client +program (etc/emacsclient, located in the same directory as this file). +This can be done by setting the environment variable EDITOR. + +When another program invokes the emacsclient as "the editor", the +client actually transfers the file names to be edited to the existing +Emacs, which automatically visits the files. + +When you are done editing a buffer for a client, do C-x # (server-edit). +This marks that buffer as done, and selects the next buffer that the client +asked for. When all the buffers requested by a client are marked in this +way, Emacs tells the client program to exit, so that the program that +invoked "the editor" will resume execution. + +You can only have one server Emacs at a time, but multiple client programs +can put in requests at the same time. + +The client/server work only on Berkeley Unix, since they use the Berkeley +sockets mechanism for their communication. + +Changes in Lisp programming in Emacs version 18. + +* Init file changes. + +** Suffixes no longer accepted on `.emacs'. + +Emacs will no longer load a file named `.emacs.el' or `emacs.elc' +in place of `.emacs'. This is so that it will take less time to +find `.emacs'. If you want to compile your init file, give it another +name and make `.emacs' a link to the `.elc' file, or make it contain +a call to `load' to load the `.elc' file. + +** `default-profile' renamed to `default', and loaded after `.emacs'. + +It used to be the case that the file `default-profile' was loaded if +and only if `.emacs' was not found. + +Now the name `default-profile' is not used at all. Instead, a library +named `default' is loaded after the `.emacs' file. `default' is loaded +whether the `.emacs' file exists or not. However, loading of `default' +can be prevented if the `.emacs' file sets `inhibit-default-init' to non-nil. + +In fact, you would call the default file `default.el' and probably would +byte-compile it to speed execution. + +Note that for most purposes you are better off using a `site-init' library +since that will be loaded before the runnable Emacs is dumped. By using +a `site-init' library, you avoid taking up time each time Emacs is started. + +** inhibit-command-line has been eliminated. + +This variable used to exist for .emacs files to set. It has been +eliminated because you can get the same effect by setting +command-line-args to nil and setting inhibit-startup-message to t. + +* `apply' is more general. + +`apply' now accepts any number of arguments. The first one is a function; +the rest are individual arguments to pass to that function, except for the +last, which is a list of arguments to pass. + +Previously, `apply' required exactly two arguments. Its old behavior +follows as a special case of the new definition. + +* New code-letter for `interactive'. + +(interactive "NFoo: ") is like (interactive "nFoo: ") in reading +a number using the minibuffer to serve as the argument; however, +if a prefix argument was specified, it uses the prefix argument +value as the argument, and does not use the minibuffer at all. + +This is used by the `goto-line' and `goto-char' commands. + +* Semantics of variables. + +** Built-in per-buffer variables improved. + +Several built-in variables which in the past had a different value in +each buffer now behave exactly as if `make-variable-buffer-local' had +been done to them. + +These variables are `tab-width', `ctl-arrow', `truncate-lines', +`fill-column', `left-margin', `mode-line-format', `abbrev-mode', +`overwrite-mode', `case-fold-search', `auto-fill-hook', +`selective-display', `selective-display-ellipses'. + +To be precise, each variable has a default value which shows through +in most buffers and can be accessed with `default-value' and set with +`set-default'. Setting the variable with `setq' makes the variable +local to the current buffer. Changing the default value has retroactive +effect on all buffers in which the variable is not local. + +The variables `default-case-fold-search', etc., are now obsolete. +They now refer to the default value of the variable, which is not +quite the same behavior as before, but it should enable old init files +to continue to work. + +** New per-buffer variables. + +The variables `fill-prefix', `comment-column' and `indent-tabs-mode' +are now per-buffer. They work just like `fill-column', etc. + +** New function `setq-default'. + +`setq-default' sets the default value of a variable, and uses the +same syntax that `setq' accepts: the variable name is not evaluated +and need not be quoted. + +`(setq-default case-fold-search nil)' would make searches case-sensitive +in all buffers that do not have local values for `case-fold-search'. + +** Functions `global-set' and `global-value' deleted. + +These functions were never used except by mistake by users expecting +the functionality of `set-default' and `default-value'. + +* Changes in defaulting of major modes. + +When `default-major-mode' is `nil', new buffers are supposed to +get their major mode from the buffer that is current. However, +certain major modes (such as Dired mode, Rmail mode, Rmail Summary mode, +and others) are not reasonable to use in this way. + +Now such modes' names have been given non-`nil' `mode-class' properties. +If the current buffer's mode has such a property, Fundamental mode is +used as the default for newly created buffers. + +* `where-is-internal' requires additional arguments. + +This function now accepts three arguments, two of them required: +DEFINITION, the definition to search for; LOCAL-KEYMAP, the keymap +to use as the local map when doing the searching, and FIRST-ONLY, +which is nonzero to return only the first key found. + +This function returns a list of keys (strings) whose definitions +(in the LOCAL-KEYMAP or the current global map) are DEFINITION. + +If FIRST-ONLY is non-nil, it returns a single key (string). + +This function has changed incompatibly in that now two arguments +are required when previously only one argument was allowed. To get +the old behavior of this function, write `(current-local-map)' as +the expression for the second argument. + +The incompatibility is sad, but `nil' is a legitimate value for the +second argument (it means there is no local keymap), so it cannot also +serve as a default meaning to use the current local keymap. + +* Abbrevs with hooks. + +When an abbrev defined with a hook is expanded, it now performs the +usual replacement of the abbrev with the expansion before running the +hook. Previously the abbrev itself was deleted but the expansion was +not inserted. + +* Function `scan-buffer' deleted. + +Use `search-forward' or `search-backward' in place of `scan-buffer'. +You will have to rearrange the arguments. + +* X window interface improvements. + +** Detect release of mouse buttons. + +Button-up events can now be detected. See the file `lisp/x-mouse.el' +for details. + +** New pop-up menu facility. + +The new function `x-popup-menu' pops up a menu (in a X window) +and returns an indication of which selection the user made. +For more information, see its self-documentation. + +* M-x disassemble. + +This command prints the disassembly of a byte-compiled Emacs Lisp function. + +Would anyone like to interface this to the debugger? + +* `insert-buffer-substring' can insert part of the current buffer. + +The old restriction that the text being inserted had to come from +a different buffer is now lifted. + +When inserting text from the current buffer, the text to be inserted +is determined from the specified bounds before any copying takes place. + +* New function `substitute-key-definition'. + +This is a new way to replace one command with another command as the +binding of whatever keys may happen to refer to it. + +(substitute-key-definition OLDDEF NEWDEF KEYMAP) looks through KEYMAP +for keys defined to run OLDDEF, and rebinds those keys to run NEWDEF +instead. + +* New function `insert-char'. + +Insert a specified character, a specified number of times. + +* `mark-marker' changed. + +When there is no mark, this now returns a marker that points +nowhere, rather than `nil'. + +* `ding' accepts argument. + +When given an argument, the function `ding' does not terminate +execution of a keyboard macro. Normally, `ding' does terminate +all macros that are currently executing. + +* New function `minibuffer-depth'. + +This function returns the current depth in minibuffer activations. +The value is zero when the minibuffer is not in use. +Values greater than one are possible if the user has entered the +minibuffer recursively. + +* New function `documentation-property'. + +(documentation-property SYMBOL PROPNAME) is like (get SYMBOL PROPNAME), +except that if the property value is a number `documentation-property' +will take that number (or its absolute value) as a character position +in the DOC file and return the string found there. + +(documentation-property VAR 'variable-documentation) is the proper +way for a Lisp program to get the documentation of variable VAR. + +* New documentation-string expansion feature. + +If a documentation string (for a variable or function) contains text +of the form `\', it means that all command names specified in +`\[COMMAND]' construct from that point on should be turned into keys +using the value of the variable FOO as the local keymap. Thus, for example, + + `\\[eval-defun] evaluates the defun containing point.' + +will expand into + + "ESC C-x evaluates the defun containing point." + +regardless of the current major mode, because ESC C-x is defined to +run `eval-defun' in the keymap `emacs-lisp-mode-map'. The effect is +to show the key for `eval-defun' in Emacs Lisp mode regardless of the +current major mode. + +The `\<...>' construct applies to all `\[...]' constructs that follow it, +up to the end of the documentation string or the next `\<...>'. + +Without `\<...>', the keys for commands specified in `\[...]' are found +in the current buffer's local map. + +The current global keymap is always searched second, whether `\<...>' +has been used or not. + +* Multiple hooks allowed in certain contexts. + +The old hook variables `find-file-hook', `find-file-not-found-hook' and +`write-file-hook' have been replaced. + +The replacements are `find-file-hooks', `find-file-not-found-hooks' +and `write-file-hooks'. Each holds a list of functions to be called; +by default, `nil', for no functions. The functions are called in +order of appearance in the list. + +In the case of `find-file-hooks', all the functions are executed. + +In the case of `find-file-not-found-hooks', if any of the functions +returns non-`nil', the rest of the functions are not called. + +In the case of `write-file-hooks', if any of the functions returns +non-`nil', the rest of the functions are not called, and the file is +considered to have been written already; so actual writing in the +usual way is not done. If `write-file-hooks' is local to a buffer, +it is set to its global value if `set-visited-file-name' is called +(and thus by C-x C-w as well). + +`find-file-not-found-hooks' and `write-file-hooks' can be used +together to implement editing of files that are not stored as Unix +files: stored in archives, or inside version control systems, or on +other machines running other operating systems and accessible via ftp. + +* New hooks for suspending Emacs. + +Suspending Emacs runs the hook `suspend-hook' before suspending +and the hook `suspend-resume-hook' if the suspended Emacs is resumed. +Running a hook is done by applying the variable's value to no arguments +if the variable has a non-`nil' value. If `suspend-hook' returns +non-`nil', then suspending is inhibited and so is running the +`suspend-resume-hook'. The non-`nil' value means that the `suspend-hook' +has done whatever suspending is required. + +* Disabling commands can print a special message. + +A command is disabled by giving it a non-`nil' `disabled' property. +Now, if this property is a string, it is included in the message +printed when the user tries to run the command. + +* Emacs can open TCP connections. + +The function `open-network-stream' opens a TCP connection to +a specified host and service. Its value is a Lisp object that represents +the connection. The object is a kind of "subprocess", and I/O are +done like I/O to subprocesses. + +* Display-related changes. + +** New mode-line control features. + +The display of the mode line used to be controlled by a format-string +that was the value of the variable `mode-line-format'. + +This variable still exists, but it now allows more general values, +not just strings. Lists, cons cells and symbols are also meaningful. + +The mode line contents are created by outputting various mode elements +one after the other. Here are the kinds of objects that can be +used as mode elements, and what they do in the display: + + string the contents of the string are output to the mode line, + and %-constructs are replaced by other text. + + t or nil ignored; no output results. + + symbol the symbol's value is used. If the value is a string, + the string is output verbatim to the mode line + (so %-constructs are not interpreted). Otherwise, + the symbol's value is processed as a mode element. + + list (whose first element is a string or list or cons cell) + the elements of the list are treated as as mode elements, + so that the output they generate is concatenated, + + list (whose car is a symbol) + if the symbol's value is non-nil, the second element of the + list is treated as a mode element. Otherwise, the third + element (if any) of the list is treated as a mode element. + + cons (whose car is a positive integer) + the cdr of the cons is used as a mode element, but + the text it produces is padded, if necessary, to have + at least the width specified by the integer. + + cons (whose car is a negative integer) + the cdr of the cons is used as a mode element, but + the text it produces is truncated, if necessary, to have + at most the width specified by the integer. + +There is always one mode element to start with, that being the value of +`mode-line-format', but if this value is a list then it leads to several +more mode elements, which can lead to more, and so on. + +There is one new %-construct for mode elements that are strings: +`%n' displays ` Narrow' for a buffer that is narrowed. + +The default value of `mode-line-format' refers to several other variables. +These variables are `mode-name', `mode-line-buffer-identification', +`mode-line-process', `mode-line-modified', `global-mode-string' and +`minor-mode-alist'. The first four are local in every buffer in which they +are changed from the default. + +mode-name Name of buffer's major mode. Local in every buffer. + +mode-line-buffer-identification + Normally the list ("Emacs: %17b"), it is responsible + for displaying text to indicate what buffer is being shown + and what kind of editing it is doing. `Emacs' means + that a file of characters is being edited. Major modes + such as Info and Dired which edit or view other kinds + of data often change this value. This variables becomes + local to the current buffer if it is setq'd. + +mode-line-process + Normally nil, this variable is responsible for displaying + information about the process running in the current buffer. + M-x shell-mode and M-x compile alter this variable. + +mode-line-modified + This variable is responsible for displaying the indication + of whether the current buffer is modified or read-only. + By default its value is `("--%*%*-")'. + +minor-mode-alist + This variable is responsible for displaying text for those + minor modes that are currently enabled. Its value + is a list of elements of the form (VARIABLE STRING), + where STRING is to be displayed if VARIABLE's value + (in the buffer whose mode line is being displayed) + is non-nil. This variable is not made local to particular + buffers, but loading some libraries may add elements to it. + +global-mode-string + This variable is used to display the time, if you ask + for that. + +The idea of these variables is to eliminate the need for major modes +to alter mode-line-format itself. + +** `window-point' valid for selected window. + +The value returned by `window-point' used to be incorrect when its +argument was the selected window. Now the value is correct. + +** Window configurations may be saved as Lisp objects. + +The function `current-window-configuration' returns a special type of +Lisp object that represents the current layout of windows: the +sizes and positions of windows, which buffers appear in them, and +which parts of the buffers appear on the screen. + +The function `set-window-configuration' takes one argument, which must +be a window configuration object, and restores that configuration. + +** New hook `temp-output-buffer-show-hook'. + +This hook allows you to control how help buffers are displayed. +Whenever `with-output-to-temp-buffer' has executed its body and wants +to display the temp buffer, if this variable is bound and non-`nil' +then its value is called with one argument, the temp buffer. +The hook function is solely responsible for displaying the buffer. +The standard manner of display--making the buffer appear in a window--is +used only if there is no hook function. + +** New function `minibuffer-window'. + +This function returns the window used (sometimes) for displaying +the minibuffer. It can be used even when the minibuffer is not active. + +** New feature to `next-window'. + +If the optional second argument is neither `nil' nor `t', the minibuffer +window is omitted from consideration even when active; if the starting +window was the last non-minibuffer window, the value will be the first +non-minibuffer window. + +** New variable `minibuffer-scroll-window'. + +When this variable is non-`nil', the command `scroll-other-window' +uses it as the window to be scrolled. Displays of completion-lists +set this variable to the window containing the display. + +** New argument to `sit-for'. + +A non-nil second argument to `sit-for' means do not redisplay; +just wait for the specified time or until input is available. + +** Deleted function `set-minor-mode'; minor modes must be changed. + +The function `set-minor-mode' has been eliminated. The display +of minor mode names in the mode line is now controlled by the +variable `minor-mode-alist'. To specify display of a new minor +mode, it is sufficient to add an element to this list. Once that +is done, you can turn the mode on and off just by setting a variable, +and the display will show its status automatically. + +** New variable `cursor-in-echo-area'. + +If this variable is non-nil, the screen cursor appears on the +last line of the screen, at the end of the text displayed there. + +Binding this variable to t is useful at times when reading single +characters of input with `read-char'. + +** New per-buffer variable `selective-display-ellipses'. + +If this variable is non-nil, an ellipsis (`...') appears on the screen +at the end of each text line that is followed by invisible text. + +If this variable is nil, no ellipses appear. Then there is no sign +on the screen that invisible text is present. + +Text is made invisible under the control of the variable +`selective-display'; this is how Outline mode and C-x $ work. + +** New variable `no-redraw-on-reenter'. + +If you set this variable non-nil, Emacs will not clear the screen when +you resume it after suspending it. This is for the sake of terminals +with multiple screens of memory, where the termcap entry has been set +up to switch between screens when Emacs is suspended and resumed. + +** New argument to `set-screen-height' or `set-screen-width'. + +These functions now take an optional second argument which says +what significance the newly specified height or width has. + +If the argument is nil, or absent, it means that Emacs should +believe that the terminal height or width really is as just specified. + +If the argument is t, it means Emacs should not believe that the +terminal really is this high or wide, but it should use the +specific height or width as the number of lines or columns to display. +Thus, you could display only 24 lines on a screen known to have 48 lines. + +What practical difference is there between using only 24 lines for display +and really believing that the terminal has 24 lines? + +1. The ``real'' height of the terminal says what the terminal command +to move the cursor to the last line will do. + +2. The ``real'' height of the terminal determines how much padding is +needed. + +* File-related changes. + +** New parameter `backup-by-copying-when-mismatch'. + +If this variable is non-`nil', then when Emacs is about to save a +file, it will create the backup file by copying if that would avoid +changing the file's uid or gid. + +The default value of this variable is `nil', because usually it is +useful to have the uid of a file change according to who edited it +last. I recommend thet this variable be left normally `nil' and +changed with a local variables list in those particular files where +the uid needs to be preserved. + +** New parameter `file-precious-flag'. + +If this variable is non-`nil', saving the buffer tries to avoid +leaving an incomplete file due to disk full or other I/O errors. +It renames the old file before saving. If saving is successful, +the renamed file is deleted; if saving gets an error, the renamed +file is renamed back to the name you visited. + +Backups are always made by copying for such files. + +** New variable `buffer-offer-save'. + +If the value of this variable is non-`nil' in a buffer then exiting +Emacs will offer to save the buffer (if it is modified and nonempty) +even if the buffer is not visiting a file. This variable is +automatically made local to the current buffer whenever it is set. + +** `rename-file', `copy-file', `add-name-to-file' and `make-symbolic-link'. + +The third argument to these functions used to be `t' or `nil'; `t' +meaning go ahead even if the specified new file name already has a file, +and `nil' meaning to get an error. + +Now if the third argument is a number it means to ask the user for +confirmation in this case. + +** New optional argument to `copy-file'. + +If `copy-file' receives a non-nil fourth argument, it attempts +to give the new copy the same time-of-last-modification that the +original file has. + +** New function `file-newer-than-file-p'. + +(file-newer-than-file-p FILE1 FILE2) returns non-nil if FILE1 has been +modified more recently than FILE2. If FILE1 does not exist, the value +is always nil; otherwise, if FILE2 does not exist, the value is t. +This is meant for use when FILE2 depends on FILE1, to see if changes +in FILE1 make it necessary to recompute FILE2 from it. + +** Changed function `file-exists-p'. + +This function is no longer the same as `file-readable-p'. +`file-exists-p' can now return t for a file that exists but which +the fascists won't allow you to read. + +** New function `file-locked-p'. + +This function receives a file name as argument and returns `nil' +if the file is not locked, `t' if locked by this Emacs, or a +string giving the name of the user who has locked it. + +** New function `file-name-sans-versions'. + +(file-name-sans-versions NAME) returns a substring of NAME, with any +version numbers or other backup suffixes deleted from the end. + +** New functions for directory names. + +Although a directory is really a kind of file, specifying a directory +uses a somewhat different syntax from specifying a file. +In Emacs, a directory name is used as part of a file name. + +On Unix, the difference is small: a directory name ends in a slash, +while a file name does not: thus, `/usr/rms/' to name a directory, +while `/usr/rms' names the file which holds that directory. + +On VMS, the difference is considerable: `du:[rms.foo]' specifies a +directory, but the name of the file that holds that directory is +`du:[rms]foo.dir'. + +There are two new functions for converting between directory names +and file names. `directory-file-name' takes a directory name and +returns the name of the file in which that directory's data is stored. +`file-name-as-directory' takes the name of a file and returns +the corresponding directory name. These always understand Unix file name +syntax; on VMS, they understand VMS syntax as well. + +For example, (file-name-as-directory "/usr/rms") returns "/usr/rms/" +and (directory-file-name "/usr/rms/") returns "/usr/rms". +On VMS, (file-name-as-directory "du:[rms]foo.dir") returns "du:[rms.foo]" +and (directory-file-name "du:[rms.foo]") returns "du:[rms]foo.dir". + +** Value of `file-attributes' changed. + +The function file-attributes returns a list containing many kinds of +information about a file. Now the list has eleven elements. + +The tenth element is `t' if deleting the file and creating another +file of the same name would result in a change in the file's group; +`nil' if there would be no change. You can also think of this as +comparing the file's group with the default group for files created in +the same directory by you. + +The eleventh element is the inode number of the file. + +** VMS-only function `file-name-all-versions'. + +This function returns a list of all the completions, including version +number, of a specified version-number-less file name. This is like +`file-name-all-completions', except that the latter returns values +that do not include version numbers. + +** VMS-only variable `vms-stmlf-recfm'. + +On a VMS system, if this variable is non-nil, Emacs will give newly +created files the record format `stmlf'. This is necessary for files +that must contain lines of arbitrary length, such as compiled Emacs +Lisp. + +When writing a new version of an existing file, Emacs always keeps +the same record format as the previous version; so this variable has +no effect. + +This variable has no effect on Unix systems. + +** `insert-file-contents' on an empty file. + +This no longer sets the buffer's "modified" flag. + +** New function (VMS only) `define-logical-name': + +(define-logical-name LOGICAL TRANSLATION) defines a VMS logical name +LOGICAL whose translation is TRANSLATION. The new name applies to +the current process only. + +** Deleted variable `ask-about-buffer-names'. + +If you want buffer names for files to be generated in a special way, +you must redefine `create-file-buffer'. + +* Subprocess-related changes. + +** New function `process-list'. + +This function takes no arguments and returns a list of all +of Emacs's asynchronous subprocesses. + +** New function `process-exit-status'. + +This function, given a process, process name or buffer as argument, +returns the exit status code or signal number of the process. +If the process has not yet exited or died, this function returns 0. + +** Process output ignores `buffer-read-only'. + +Output from a process will go into the process's buffer even if the +buffer is read only. + +** Switching buffers in filter functions and sentinels. + +Emacs no longer saves and restore the current buffer around calling +the filter and sentinel functions, so these functions can now +permanently alter the selected buffer in a straightforward manner. + +** Specifying environment variables for subprocesses. + +When a subprocess is started with `start-process' or `call-process', +the value of the variable `process-environment' is taken to +specify the environment variables to give the subprocess. The +value should be a list of strings, each of the form "VAR=VALUE". + +`process-environment' is initialized when Emacs starts up +based on Emacs's environment. + +** New variable `process-connection-type'. + +If this variable is `nil', when a subprocess is created, Emacs uses +a pipe rather than a pty to communicate with it. Normally this +variable is `t', telling Emacs to use a pty if ptys are supported +and one is available. + +** New function `waiting-for-user-input-p'. + +This function, given a subprocess as argument, returns `t' if that +subprocess appears to be waiting for input sent from Emacs, +or `nil' otherwise. + +** New hook `shell-set-directory-error-hook'. + +The value of this variable is called, with no arguments, whenever +Shell mode gets an error trying to keep track of directory-setting +commands (such as `cd' and `pushd') used in the shell buffer. + +* New functions `user-uid' and `user-real-uid'. + +These functions take no arguments and return, respectively, +the effective uid and the real uid of the Emacs process. +The value in each case is an integer. + +* New variable `print-escape-newlines' controls string printing. + +If this variable is non-`nil', then when a Lisp string is printed +by the Lisp printing function `prin1' or `print', newline characters +are printed as `\n' rather than as a literal newline. + +* New function `sysnetunam' on HPUX. + +This function takes two arguments, a network address PATH and a +login string LOGIN, and executes the system call `netunam'. +It returns `t' if the call succeeds, otherwise `nil'. + +News regarding installation: + +* Many `s-...' file names changed. + +Many `s-...' files have been renamed. All periods in such names, +except the ones just before the final `h', have been changed to +hyphens. Thus, `s-bsd4.2.h' has been renamed to `s-bsd4-2.h'. + +This is so a Unix distribution can be moved mechanically to VMS. + +* `DOCSTR...' file now called `DOC-...'. + +The file of on-line documentation strings, that used to be +`DOCSTR.mm.nn.oo' in this directory, is now called `DOC-mm.nn.oo'. +This is so that it can port to VMS using the standard conventions +for translating filenames for VMS. + +This file also now contains the doc strings for variables as +well as functions. + +* Emacs no longer uses floating point arithmetic. + +This may make it easier to port to some machines. + +* Macros `XPNTR' and `XSETPNTR'; flag `DATA_SEG_BITS'. + +These macros exclusively are used to unpack a pointer from a Lisp_Object +and to insert a pointer into a Lisp_Object. Redefining them may help +port Emacs to machines in which all pointers to data objects have +certain high bits set. + +If `DATA_SEG_BITS' is defined, it should be a number which contains +the high bits to be inclusive or'ed with pointers that are unpacked. + +* New flag `HAVE_X_MENU'. + +Define this flag in `config.h' in addition to `HAVE_X_WINDOWS' +to enable use of the Emacs interface to X Menus. On some operating +systems, the rest of the X interface works properly but X Menus +do not work; hence this separate flag. See the file `src/xmenu.c' +for more information. + +* Macros `ARRAY_MARK_FLAG' and `DONT_COPY_FLAG'. + +* `HAVE_ALLOCA' prevents assembly of `alloca.s'. + +* `SYSTEM_MALLOC' prevents use of GNU `malloc.c'. + +SYSTEM_MALLOC, if defined, means use the system's own `malloc' routines +rather than those that come with Emacs. + +Use this only if absolutely necessary, because if it is used you do +not get warnings when space is getting low. + +* New flags to control unexec. + +See the file `unexec.c' for a long comment on the compilation +switches that suffice to make it work on many machines. + +* `PNTR_COMPARISON_TYPE' + +Pointers that need to be compared for ordering are converted to this type +first. Normally this is `unsigned int'. + +* `HAVE_VFORK', `HAVE_DUP2' and `HAVE_GETTIMEOFDAY'. + +These flags just say whether certain system calls are available. + +* New macros control compiler switches, linker switches and libraries. + +The m- and s- files can now control in a modular fashion the precise +arguments passed to `cc' and `ld'. + +LIBS_STANDARD defines the standard C libraries. Default is `-lc'. +LIBS_DEBUG defines the extra libraries to use when debugging. Default `-lg'. +LIBS_SYSTEM can be defined by the s- file to specify extra libraries. +LIBS_MACHINE can be defined by the m- file to specify extra libraries. +LIBS_TERMCAP defines the libraries for Termcap or Terminfo. + It is defined by default in a complicated fashion but the m- or s- file + can override it. + +LD_SWITCH_SYSTEM can be defined by the s- file to specify extra `ld' switches. + The default is `-X' on BSD systems except those few that use COFF object files. +LD_SWITCH_MACHINE can be defined by the m- file to specify extra `ld' switches. + +C_DEBUG_SWITCH defines the switches to give `cc' when debugging. Default `-g'. +C_OPTIMIZE_SWITCH defines the switches to give `cc' to optimize. Default `-O'. +C_SWITCH_MACHINE can be defined by the m- file to specify extra `cc' switches. + +For older news, see the file ONEWS. + +---------------------------------------------------------------------- +Copyright information: + +Copyright (C) 1988 Free Software Foundation, Inc. + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +Local variables: +mode: text +end: diff --git a/etc/ONEWS b/etc/ONEWS new file mode 100644 index 0000000..ad593ec --- /dev/null +++ b/etc/ONEWS @@ -0,0 +1,1346 @@ +GNU Emacs NEWS -- history of user-visible changes. 26-Mar-1986 +Copyright (C) 1986 Richard M. Stallman. +See the end for copying conditions. + +Changes in Emacs 17 + +* Frustrated? + +Try M-x doctor. + +* Bored? + +Try M-x hanoi. + +* Brain-damaged? + +Try M-x yow. + +* Sun3, Tahoe, Apollo, HP9000s300, Celerity, NCR Tower 32, + Sequent, Stride, Encore, Plexus and AT&T 7300 machines supported. + +The Tahoe, Sun3, Sequent and Celerity use 4.2. In regard to the +Apollo, see the file APOLLO in this directory. NCR Tower32, +HP9000s300, Stride and Nu run forms of System V. System V rel 2 also +works on Vaxes now. See etc/MACHINES. + +* System V Unix supported, including subprocesses. + +It should be possible now to bring up Emacs on a machine running +mere unameliorated system V Unix with no major work; just possible bug +fixes. But you can expect to find a handful of those on any machine +that Emacs has not been run on before. + +* Berkeley 4.1 Unix supported. + +See etc/MACHINES. + +* Portable `alloca' provided. + +Emacs can now run on machines that do not and cannot support the library +subroutine `alloca' in the canonical fashion, using an `alloca' emulation +written in C. + +* On-line manual. + +Info now contains an Emacs manual, with essentially the same text +as in the printed manual. + +The manual can now be printed with a standard TeX. + +Nicely typeset and printed copies of the manual are available +from the Free Software Foundation. + +* Backup file version numbers. + +Emacs now supports version numbers in backup files. + +The first time you save a particular file in one editing session, +the old file is copied or renamed to serve as a backup file. +In the past, the name for the backup file was made by appending `~' +to the end of the original file name. + +Now the backup file name can instead be made by appending ".~NN~" to +the original file name, where NN stands for a numeric version. Each +time this is done, the new version number is one higher than the +highest previously used. + +Thus, the active, current file does not have a version number. +Only the backups have them. + +This feature is controlled by the variable `version-control'. If it +is `nil', as normally, then numbered backups are made only for files +that already have numbered backups. Backup names with just `~' are +used for files that have no numbered backups. + +If `version-control' is `never', then the backup file's name is +made with just `~' in any case. + +If `version-control' is not `nil' or `never', numbered backups are +made unconditionally. + +To prevent unlimited consumption of disk space, Emacs can delete +old backup versions automatically. Generally Emacs keeps the first +few backups and the latest few backups, deleting any in between. +This happens every time a new backup is made. The two variables that +control the deletion are `kept-old-versions' and `kept-new-versions'. +Their values are, respectively, the number of oldest backups to keep +and the number of newest ones to keep, each time a new backup is made. +The value of `kept-new-versions' includes the backup just created. +By default, both values are 2. + +If `trim-versions-without-asking' is non-`nil', the excess middle versions +are deleted without a murmur. If it is `nil', the default, then you +are asked whether the excess middle versions should really be deleted. + +Dired has a new command `.' which marks for deletion all but the latest +and oldest few of every numeric series of backups. `kept-old-versions' +controls the number of oldest versions to keep, and `dired-kept-versions' +controls the number of latest versions to keep. A numeric argument to +the `.' command, if positive, specifies the number of latest versions +to keep, overriding `dired-kept-versions'. A negative argument specifies +the number of oldest versions to keep, using minus the argument to override +`kept-old-versions'. + +* Immediate conflict detection. + +Emacs now locks the files it is modifying, so that if +you start to modify within Emacs a file that is being +modified in another Emacs, you get an immediate warning. + +The warning gives you three choices: +1. Give up, and do not make any changes. +2. Make changes anyway at your own risk. +3. Make changes anyway, and record yourself as + the person locking the file (instead of whoever + was previously recorded.) + +Just visiting a file does not lock it. It is locked +when you try to change the buffer that is visiting the file. +Saving the file unlocks it until you make another change. + +Locking is done by writing a lock file in a special designated +directory. If such a directory is not provided and told to +Emacs as part of configuring it for your machine, the lock feature +is turned off. + +* M-x recover-file. + +This command is used to get a file back from an auto-save +(after a system crash, for example). It takes a file name +as argument and visits that file, but gets the data from the +file's last auto save rather than from the file itself. + +* M-x normal-mode. + +This command resets the current buffer's major mode and local +variables to be as specified by the visit filename, the -*- line +and/or the Local Variables: block at the end of the buffer. +It is the same thing normally done when a file is first visited. + +* Echo area messages disappear shortly if minibuffer is in use. + +Any message in the echo area disappears after 2 seconds +if the minibuffer is active. This allows the minibuffer +to become visible again. + +* C-z on System V runs a subshell. + +On systems which do not allow programs to be suspended, the C-z command +forks a subshell that talks directly to the terminal, and then waits +for the subshell to exit. This gets almost the effect of suspending +in that you can run other programs and then return to Emacs. However, +you cannot log out from the subshell. + +* C-c is always a prefix character. + +Also, subcommands of C-c which are letters are always +reserved for the user. No standard Emacs major mode +defines any of them. + +* Picture mode C-c commands changed. + +The old C-c k command is now C-c C-w. +The old C-c y command is now C-c C-x. + +* Shell mode commands changed. + +All the special commands of Shell mode are now moved onto +the C-c prefix. Most are not changed aside from that. +Thus, the old Shell mode C-c command (kill current job) +is now C-c C-c; the old C-z (suspend current job) is now C-c C-z, +etc. + +The old C-x commands are now C-c commands. C-x C-k (kill output) +is now C-c C-o, and C-x C-v (show output) is now C-c C-r. + +The old M-= (copy previous input) command is now C-c C-y. + +* Shell mode recognizes aliases for `pushd', `popd' and `cd'. + +Shell mode now uses the variable `shell-pushd-regexp' as a +regular expression to recognize any command name that is +equivalent to a `pushd' command. By default it is set up +to recognize just `pushd' itself. If you use aliases for +`pushd', change the regexp to recognize them as well. + +There are also `shell-popd-regexp' to recognize commands +with the effect of a `popd', and `shell-cd-regexp' to recognize +commands with the effect of a `cd'. + +* "Exit" command in certain modes now C-c C-c. + +These include electric buffer menu mode, electric command history +mode, Info node edit mode, and Rmail edit mode. In all these +modes, the command to exit used to be just C-c. + +* Outline mode changes. + +Lines that are not heading lines are now called "body" lines. +The command `hide-text' is renamed to `hide-body'. +The key M-H is renamed to C-c C-h. +The key M-S is renamed to C-c C-s. +The key M-s is renamed to C-c C-i. + +Changes of line visibility are no longer undoable. As a result, +they no longer use up undo memory and no longer interfere with +undoing earlier commands. + +* Rmail changes. + +The s and q commands now both expunge deleted messages before saving; +use C-x C-s to save without expunging. + +The u command now undeletes the current message if it is deleted; +otherwise, it backs up as far as necessary to reach a deleted message, +and undeletes that one. The u command in the summary behaves likewise, +but considers only messages listed in the summary. The M-u command +has been eliminated. + +The o and C-o keys' meanings are interchanged. +o now outputs to an Rmail file, and C-o to a Unix mail file. + +The F command (rmail-find) is renamed to M-s (rmail-search). +Various new commands and features exist; see the Emacs manual. + +* Local bindings described first in describe-bindings. + +* [...], {...} now balance in Fundamental mode. + +* Nroff mode and TeX mode. + +The are two new major modes for editing nroff input and TeX input. +See the Emacs manual for full information. + +* New C indentation style variable `c-brace-imaginary-offset'. + +The value of `c-brace-imaginary-offset', normally zero, controls the +indentation of a statement inside a brace-group where the open-brace +is not the first thing on a line. The value says where the open-brace +is imagined to be, relative to the first nonblank character on the line. + +* Dired improvements. + +Dired now normally keeps the cursor at the beginning of the file name, +not at the beginning of the line. The most used motion commands are +redefined in Dired to position the cursor this way. + +`n' and `p' are now equivalent in dired to `C-n' and `C-p'. + +If any files to be deleted cannot be deleted, their names are +printed in an error message. + +If the `v' command is invoked on a file which is a directory, +dired is run on that directory. + +* `visit-tag-table' renamed `visit-tags-table'. + +This is so apropos of `tags' finds everything you need to +know about in connection with Tags. + +* `mh-e' library uses C-c as prefix. + +All the special commands of `mh-rmail' now are placed on a +C-c prefix rather than on the C-x prefix. This is for +consistency with other special modes with their own commands. + +* M-$ or `spell-word' checks word before point. + +It used to check the word after point. + +* Quitting during autoloading no longer causes trouble. + +Now, when a file is autoloaded, all function redefinitions +and `provide' calls are recorded and are undone if you quit +before the file is finished loading. + +As a result, it no longer happens that some of the entry points +which are normally autoloading have been defined already, but the +entire file is not really present to support them. + +* `else' can now be indented correctly in C mode. + +TAB in C mode now knows which `if' statement an `else' matches +up with, and can indent the `else' correctly under the `if', +even if the `if' contained such things as another `if' statement, +or a `while' or `for' statement, with no braces around it. + +* `batch-byte-compile' + +Runs byte-compile-file on the files specified on the command line. +All the rest of the command line arguments are taken as files to +compile (or, if directories, to do byte-recompile-directory on). +Must be used only with -batch, and kills emacs on completion. +Each file will be processed even if an error occurred previously. +For example, invoke `emacs -batch -f batch-byte-compile *.el'. + +* `-batch' changes. + +`-batch' now implies `-q': no init file is loaded by Emacs when +`-batch' is used. Also, no `term/TERMTYPE.el' file is loaded. Auto +saving is not done except in buffers in which it is explicitly +requested. Also, many echo-area printouts describing what is going on +are inhibited in batch mode, so that the only output you get is the +output you program specifically. + +One echo-area message that is not suppressed is the one that says +that a file is being loaded. That is because you can prevent this +message by passing `t' as the third argument to `load'. + +* Display of search string in incremental search. + +Now, when you type C-s or C-r to reuse the previous search +string, that search string is displayed immediately in the echo area. + +Three dots are displayed after the search string while search +is actually going on. + +* View commands. + +The commands C-x ], C-x [, C-x /, C-x j and C-x o are now +available inside `view-buffer' and `view-file', with their +normal meanings. + +* Full-width windows preferred. + +The ``other-window'' commands prefer other full width windows, +and will split only full width windows. + +* M-x rename-file can copy if necessary. + +When used between different file systems, since actual renaming does +not work, the old file will be copied and deleted. + +* Within C-x ESC, you can pick the command to repeat. + +While editing a previous command to be repeated, inside C-x ESC, +you can now use the commands M-p and M-n to pick an earlier or +later command to repeat. M-n picks the next earlier command +and M-p picks the next later one. The new command appears in +the minibuffer, and you can go ahead and edit it, and repeat it +when you exit the minibuffer. + +Using M-n or M-p within C-x ESC is like having used a different +numeric argument when you ran C-x ESC in the first place. + +The command you finally execute using C-x ESC is added to the +front of the command history, unless it is identical with the +first thing in the command history. + +* Use C-c C-c to exit from editing within Info. + +It used to be C-z for this. Somehow this use of C-z was +left out when all the others were moved. The intention is that +C-z should always suspend Emacs. + +* Default arg to C-x < and C-x > now window width minus 2. + +These commands, which scroll the current window horizontally +by a specified number of columns, now scroll a considerable +distance rather than a single column if used with no argument. + +* Auto Save Files Deleted. + +The default value of `delete-auto-save-files' is now `t', so that +when you save a file for real, its auto save file is deleted. + +* Rnews changes. + +The N, P and J keys in Rnews are renamed to M-n, M-p and M-j. +These keys move among newsgroups. + +The n and p keys for moving sequentially between news articles now +accept repeat count arguments, and the + and - keys, made redundant by +this change, are eliminated. + +The s command for outputting the current article to a file +is renamed as o, to be compatible with Rmail. + +* Sendmail changes. + +If you have a ~/.mailrc file, Emacs searches it for mailing address +aliases, and these aliases are expanded when you send mail in Emacs. + +Fcc fields can now be used in the headers in the *mail* buffer +to specify files in which copies of the message should be put. +The message is written into those files in Unix mail file format. +The message as sent does not contain any Fcc fields in its header. +You can use any number of Fcc fields, but only one file name in each one. +The variable `mail-archive-file-name', if non-`nil', can be a string +which is a file name; an Fcc to that file will be inserted in every +message when you begin to compose it. + +A new command C-c q now exists in Mail mode. It fills the +paragraphs of an old message that had been inserted with C-c y. + +When the *mail* buffer is put in Mail mode, text-mode-hook +is now run in addition to mail-mode-hook. text-mode-hook +is run first. + +The new variable `mail-header-separator' now specifies the string +to use on the line that goes between the headers and the message text. +By default it is still "--text follows this line--". + +* Command history truncated automatically. + +Just before each garbage collection, all but the last 30 elements +of the command history are discarded. + +Incompatible Lisp Programming Changes in Emacs 17 + +* `"e' no longer supported. + +This feature, which allowed Lisp functions to take arguments +that were not evaluated, has been eliminated, because it is +inescapably hard to make the compiler work properly with such +functions. + +You should use macros instead. A simple way to change any +code that uses `"e' is to replace + + (defun foo ("e x y z) ... + +with + + (defmacro foo (x y z) + (list 'foo-1 (list 'quote x) (list 'quote y) (list 'quote z))) + + (defun foo-1 (x y z) ... + +* Functions `region-to-string' and `region-around-match' removed. + +These functions were made for compatibility with Gosling Emacs, but it +turns out to be undesirable to use them in GNU Emacs because they use +the mark. They have been eliminated from Emacs proper, but are +present in mlsupport.el for the sake of converted mocklisp programs. + +If you were using `region-to-string', you should instead use +`buffer-substring'; then you can pass the bounds as arguments and +can avoid setting the mark. + +If you were using `region-around-match', you can use instead +the two functions `match-beginning' and `match-end'. These give +you one bound at a time, as a numeric value, without changing +point or the mark. + +* Function `function-type' removed. + +This just appeared not to be very useful. It can easily be written in +Lisp if you happen to want it. Just use `symbol-function' to get the +function definition of a symbol, and look at its data type or its car +if it is a list. + +* Variable `buffer-number' removed. + +You can still use the function `buffer-number' to find out +a buffer's unique number (assigned in order of creation). + +* Variable `executing-macro' renamed `executing-kbd-macro'. + +This variable is the currently executing keyboard macro, as +a string, or `nil' when no keyboard macro is being executed. + +* Loading term/$TERM. + +The library term/$TERM (where $TERM get replaced by your terminal +type), which is done by Emacs automatically when it starts up, now +happens after the user's .emacs file is loaded. + +In previous versions of Emacs, these files had names of the form +term-$TERM; thus, for example, term-vt100.el, but now they live +in a special subdirectory named term, and have names like +term/vt100.el. + +* `command-history' format changed. + +The elements of this list are now Lisp expressions which can +be evaluated directly to repeat a command. + +* Unused editing commands removed. + +The functions `forward-to-word', `backward-to-word', +`upcase-char', `mark-beginning-of-buffer' and `mark-end-of-buffer' +have been removed. Their definitions can be found in file +lisp/unused.el if you need them. + +Upward Compatible Lisp Programming Changes in Emacs 17 + +* You can now continue after errors and quits. + +When the debugger is entered because of a C-g, due to +a non-`nil' value of `debug-on-quit', the `c' command in the debugger +resumes execution of the code that was running when the quit happened. +Use the `q' command to go ahead and quit. + +The same applies to some kinds of errors, but not all. Errors +signaled with the Lisp function `signal' can be continued; the `c' +command causes `signal' to return. The `r' command causes `signal' to +return the value you specify. The `c' command is equivalent to `r' +with the value `nil'. + +For a `wrong-type-argument' error, the value returned with the `r' +command is used in place of the invalid argument. If this new value +is not valid, another error occurs. + +Errors signaled with the function `error' cannot be continued. +If you try to continue, the error just happens again. + +* `dot' renamed `point'. + +The word `dot' has been replaced with `point' in all +function and variable names, including: + + point, point-min, point-max, + point-marker, point-min-marker, point-max-marker, + window-point, set-window-point, + point-to-register, register-to-point, + exchange-point-and-mark. + +The old names are still supported, for now. + +* `string-match' records position of end of match. + +After a successful call to `string-match', `(match-end 0)' will +return the index in the string of the first character after the match. +Also, `match-begin' and `match-end' with nonzero arguments can be +used to find the indices of beginnings and ends of substrings matched +by subpatterns surrounded by parentheses. + +* New function `insert-before-markers'. + +This function is just like `insert' except in the handling of any +relocatable markers that are located at the point of insertion. +With `insert', such markers end up pointing before the inserted text. +With `insert-before-markers', they end up pointing after the inserted +text. + +* New function `copy-alist'. + +This function takes one argument, a list, and makes a disjoint copy +of the alist structure. The list itself is copied, and each element +that is a cons cell is copied, but the cars and cdrs of elements +remain shared with the original argument. + +This is what it takes to get two alists disjoint enough that changes +in one do not change the result of `assq' on the other. + +* New function `copy-keymap'. + +This function takes a keymap as argument and returns a new keymap +containing initially the same bindings. Rebindings in either one of +them will not alter the bindings in the other. + +* New function `copy-syntax-table'. + +This function takes a syntax table as argument and returns a new +syntax table containing initially the same syntax settings. Changes +in either one of them will not alter the other. + +* Randomizing the random numbers. + +`(random t)' causes the random number generator's seed to be set +based on the current time and Emacs's process id. + +* Third argument to `modify-syntax-entry'. + +The optional third argument to `modify-syntax-entry', if specified +should be a syntax table. The modification is made in that syntax table +rather than in the current syntax table. + +* New function `run-hooks'. + +This function takes any number of symbols as arguments. +It processes the symbols in order. For each symbol which +has a value (as a variable) that is non-nil, the value is +called as a function, with no arguments. + +This is useful in major mode commands. + +* Second arg to `switch-to-buffer'. + +If this function is given a non-`nil' second argument, then the +selection being done is not recorded on the selection history. +The buffer's position in the history remains unchanged. This +feature is used by the view commands, so that the selection history +after exiting from viewing is the same as it was before. + +* Second arg to `display-buffer' and `pop-to-buffer'. + +These two functions both accept an optional second argument which +defaults to `nil'. If the argument is not `nil', it means that +another window (not the selected one) must be found or created to +display the specified buffer in, even if it is already shown in +the selected window. + +This feature is used by `switch-to-buffer-other-window'. + +* New variable `completion-ignore-case'. + +If this variable is non-`nil', completion allows strings +in different cases to be considered matching. The global value +is `nil' + +This variable exists for the sake of commands that are completing +an argument in which case is not significant. It is possible +to change the value globally, but you might not like the consequences +in the many situations (buffer names, command names, file names) +where case makes a difference. + +* Major modes related to Text mode call text-mode-hook, then their own hooks. + +For example, turning on Outline mode first calls the value of +`text-mode-hook' as a function, if it exists and is non-`nil', +and then does likewise for the variable `outline-mode-hook'. + +* Defining new command line switches. + +You can define a new command line switch in your .emacs file +by putting elements on the value of `command-switch-alist'. +Each element of this list should look like + (SWITCHSTRING . FUNCTION) +where SWITCHSTRING is a string containing the switch to be +defined, such as "-foo", and FUNCTION is a function to be called +if such an argument is found in the command line. FUNCTION +receives the command line argument, a string, as its argument. + +To implement a switch that uses up one or more following arguments, +use the fact that the remaining command line arguments are kept +as a list in the variable `command-line-args'. FUNCTION can +examine this variable, and do + (setq command-line-args (cdr command-line-args) +to "use up" an argument. + +* New variable `load-in-progress'. + +This variable is non-`nil' when a file of Lisp code is being read +and executed by `load'. + +* New variable `print-length'. + +The value of this variable is normally `nil'. It may instead be +a number; in that case, when a list is printed by `prin1' or +`princ' only that many initial elements are printed; the rest are +replaced by `...'. + +* New variable `find-file-not-found-hook'. + +If `find-file' or any of its variants is used on a nonexistent file, +the value of `find-file-not-found-hook' is called (if it is not `nil') +with no arguments, after creating an empty buffer. The file's name +can be found as the value of `buffer-file-name'. + +* Processes without buffers. + +In the function `start-process', you can now specify `nil' as +the process's buffer. You can also set a process's buffer to `nil' +using `set-process-buffer'. + +The reason you might want to do this is to prevent the process +from being killed because any particular buffer is killed. +When a process has a buffer, killing that buffer kills the +process too. + +When a process has no buffer, its output is lost unless it has a +filter, and no indication of its being stopped or killed is given +unless it has a sentinel. + +* New function `user-variable-p'. `v' arg prompting changed. + +This function takes a symbol as argument and returns `t' if +the symbol is defined as a user option variable. This means +that it has a `variable-documentation' property whose value is +a string starting with `*'. + +Code `v' in an interactive arg reading string now accepts +user variables only, and completion is limited to the space of +user variables. + +The function `read-variable' also now accepts and completes +over user variables only. + +* CBREAK mode input is the default in Unix 4.3 bsd. + +In Berkeley 4.3 Unix, there are sufficient features for Emacs to +work fully correctly using CBREAK mode and not using SIGIO. +Therefore, this mode is the default when running under 4.3. +This mode corresponds to `nil' as the first argument to +`set-input-mode'. You can still select either mode by calling +that function. + +* Information on memory usage. + +The new variable `data-bytes-used' contains the number +of bytes of impure space allocated in Emacs. +`data-bytes-free' contains the number of additional bytes +Emacs could allocate. Note that space formerly allocated +and freed again still counts as `used', since it is still +in Emacs's address space. + +* No limit on size of output from `format'. + +The string output from `format' used to be truncated to +100 characters in length. Now it can have any length. + +* New errors `void-variable' and `void-function' replace `void-symbol'. + +This change makes it possible to have error messages that +clearly distinguish undefined variables from undefined functions. +It also allows `condition-case' to handle one case without the other. + +* `replace-match' handling of `\'. + +In `replace-match', when the replacement is not literal, +`\' in the replacement string is always treated as an +escape marker. The only two special `\' constructs +are `\&' and `\DIGIT', so `\' followed by anything other than +`&' or a digit has no effect. `\\' is necessary to include +a `\' in the replacement text. + +This level of escaping is comparable with what goes on in +a regular expression. It is over and above the level of `\' +escaping that goes on when strings are read in Lisp syntax. + +* New error `invalid-regexp'. + +A regexp search signals this type of error if the argument does +not meet the rules for regexp syntax. + +* `kill-emacs' with argument. + +If the argument is a number, it is returned as the exit status code +of the Emacs process. If the argument is a string, its contents +are stuffed as pending terminal input, to be read by another program +after Emacs is dead. + +* New fifth argument to `subst-char-in-region'. + +This argument is optional and defaults to `nil'. If it is not `nil', +then the substitutions made by this function are not recorded +in the Undo mechanism. + +This feature should be used with great care. It is now used +by Outline mode to make lines visible or invisible. + +* ` *Backtrace*' buffer renamed to `*Backtrace*'. + +As a result, you can now reselect this buffer easily if you switch to +another while in the debugger. + +Exiting from the debugger kills the `*Backtrace*' buffer, so you will +not try to give commands in it when no longer really in the debugger. + +* New function `switch-to-buffer-other-window'. + +This is the new primitive to select a specified buffer (the +argument) in another window. It is not quite the same as +`pop-to-buffer', because it is guaranteed to create another +window (assuming there is room on the screen) so that it can +leave the current window's old buffer displayed as well. + +All functions to select a buffer in another window should +do so by calling this new function. + +* New variable `minibuffer-help-form'. + +At entry to the minibuffer, the variable `help-form' is bound +to the value of `minibuffer-help-form'. + +`help-form' is expected at all times to contain either `nil' +or an expression to be executed when C-h is typed (overriding +teh definition of C-h as a command). `minibuffer-help-form' +can be used to provide a different default way of handling +C-h while in the minibuffer. + +* New \{...} documentation construct. + +It is now possible to set up the documentation string for +a major mode in such a way that it always describes the contents +of the major mode's keymap, as it has been customized. +To do this, include in the documentation string the characters `\{' +followed by the name of the variable containing the keymap, +terminated with `}'. (The `\' at the beginning probably needs to +be quoted with a second `\', to include it in the doc string.) +This construct is normally used on a line by itself, with no blank +lines before or after. + +For example, the documentation string for the function `c-mode' contains + ... + Paragraphs are separated by blank lines only. + Delete converts tabs to spaces as it moves back. + \\{c-mode-map} + Variables controlling indentation style: + ... + +* New character syntax class "punctuation". + +Punctuation characters behave like whitespace in word and +list parsing, but can be distinguished in regexps and in the +function `char-syntax'. Punctuation syntax is represented by +a period in `modify-syntax-entry'. + +* `auto-mode-alist' no longer needs entries for backup-file names, + +Backup suffixes of all kinds are now stripped from a file's name +before searching `auto-mode-alist'. + +Changes in Emacs 16 + +* No special code for Ambassadors, VT-100's and Concept-100's. + +Emacs now controls these terminals based on the termcap entry, like +all other terminals. Formerly it did not refer to the termcap entries +for those terminal types, and often the termcap entries for those +terminals are wrong or inadequate. If you experience worse behavior +on these terminals than in version 15, you can probably correct it by +fixing up the termcap entry. See ./TERMS for more info. + +See ./TERMS in any case if you find that some terminal does not work +right with Emacs now. + +* Minibuffer default completion character is TAB (and not ESC). + +So that ESC can be used in minibuffer for more useful prefix commands. + +* C-z suspends Emacs in all modes. + +Formerly, C-z was redefined for other purposes by certain modes, +such as Buffer Menu mode. Now other keys are used for those purposes, +to keep the meaning of C-z uniform. + +* C-x ESC (repeat-complex-command) allows editing the command it repeats. + +Instead of asking for confirmation to re-execute a command from the +command history, the command is placed, in its Lisp form, into the +minibuffer for editing. You can confirm by typing RETURN, change some +arguments and then confirm, or abort with C-g. + +* Incremental search does less redisplay on slow terminals. + +If the terminal baud rate is <= the value of `isearch-slow-speed', +incremental searching outside the text on the screen creates +a single-line window and uses that to display the line on which +a match has been found. Exiting or quitting the search restores +the previous window configuration and redisplays the window you +were searching in. + +The initial value of `isearch-slow-speed' is 1200. + +This feature is courtesy of crl@purdue. + +* Recursive minibuffers not allowed. + +If the minibuffer window is selected, most commands that would +use the minibuffer gets an error instead. (Specific commands +may override this feature and therefore still be allowed.) + +Strictly speaking, recursive entry to the minibuffer is still +possible, because you can switch to another window after +entering the minibuffer, and then minibuffer-using commands +are allowed. This is still allowed by a deliberate decision: +if you know enough to switch windows while in the minibuffer, +you can probably understand recursive minibuffers. + +This may be overridden by binding the variable +`enable-recursive-minibuffers' to t. + +* New major mode Emacs-Lisp mode, for editing Lisp code to run in Emacs. + +The mode in which emacs lisp files is edited is now called emacs-lisp-mode +and is distinct from lisp-mode. The latter is intended for use with +lisps external to emacs. + +The hook which is funcalled (if non-nil) on entry to elisp-mode is now +called emacs-lisp-mode-hook. A consequence of this changes is that +.emacs init files which set the value of lisp-mode-hook may need to be +changed to use the new names. + +* Correct matching of parentheses is checked on insertion. + +When you insert a close-paren, the matching open-paren +is checked for validity. The close paren must be the kind +of close-paren that the open-paren says it should match. +Otherwise, a warning message is printed. close-paren immediately +preceded by quoting backslash syntax character is not matched. + +This feature was originally written by shane@mit-ajax. + +* M-x list-command-history +* M-x command-history-mode +* M-x electric-command-history + +`list-command-history' displays forms from the command history subject +to user controlled filtering and limit on number of forms. It leaves +the buffer in `command-history-mode'. M-x command-history-mode +recomputes the command history each time it is invoked via +`list-command-history'. It is like Emacs-Lisp mode except that characters +don't insert themselves and provision is made for re-evaluating an +expression from the list. `electric-command-history' pops up a type +out window with the command history displayed. If the very next +character is Space, the window goes away and the previous window +configuration is restored. Otherwise you can move around in the +history and select an expression for evaluation *inside* the buffer +which invoked `electric-command-history'. The original window +configuration is restored on exit unless the command selected changes +it. + +* M-x edit-picture + +Enters a temporary major mode (the previous major mode is remembered +and can is restored on exit) designed for editing pictures and tables. +Printing characters replace rather than insert themselves with motion +afterwards that is user controlled (you can specify any of the 8 +compass directions). Special commands for movement are provided. +Special commands for hacking tabs and tab stops are provided. Special +commands for killing rectangles and overlaying them are provided. See +the documentation of function edit-picture for more details. + +Calls value of `edit-picture-hook' on entry if non-nil. + +* Stupid C-s/C-q `flow control' supported. + +Do (set-input-mode nil t) to tell Emacs to use CBREAK mode and interpret +C-s and C-q as flow control commands. (set-input-mode t nil) switches +back to interrupt-driven input. (set-input-mode nil nil) uses CBREAK +mode but no `flow control'; this may make it easier to run Emacs under +certain debuggers that have trouble dealing with inferiors that use SIGIO. + +CBREAK mode has certain inherent disadvantages, which are why it is +not the default: + + Meta-keys are ignored; CBREAK mode discards the 8th bit of + input characters. + + Control-G as keyboard input discards buffered output, + and therefore can cause incorrect screen updating. + +The use of `flow control' has its own additional disadvantage: the +characters C-s and C-q are not available as editing commands. You can +partially compensate for this by setting up a keyboard-translate-table +(see file ONEWS) that maps two other characters (such as C-^ and C-\) into +C-s and C-q. Of course, C-^ and C-\ are commonly used as escape +characters in remote-terminal programs. You really can't win except +by getting rid of this sort of `flow control.' + +The configuration switch CBREAK_INPUT is now eliminated. +INTERRUPT_INPUT exists only to specify the default mode of operation; +#define it to make interrupt-driven input the default. + +* Completion of directory names provides a slash. + +If file name completion yields the name of a directory, +a slash is appended to it. + +* Undo can clear modified-flag. + +If you undo changes in a buffer back to a state in which the +buffer was not considered "modified", then it is labelled as +once again "unmodified". + +* M-x run-lisp. + +This command creates an inferior Lisp process whose input and output +appear in the Emacs buffer named `*lisp*'. That buffer uses a major mode +called inferior-lisp-mode, which has many of the commands of lisp-mode +and those of shell-mode. Calls the value of shell-mode-hook and +lisp-mode-hook, in that order, if non-nil. + +Meanwhile, in lisp-mode, the command C-M-x is defined to +send the current defun as input to the `*lisp*' subprocess. + +* Mode line says `Narrow' when buffer is clipped. + +If a buffer has a clipping restriction (made by `narrow-to-region') +then its mode line contains the word `Narrow' after the major and +minor modes. + +* Mode line says `Abbrev' when abbrev mode is on. + +* add-change-log-entry takes prefix argument + +Giving a prefix argument makes it prompt for login name, full name, +and site name, with defaults. Otherwise the defaults are used +with no confirmation. + +* M-x view-buffer and M-x view-file + +view-buffer selects the named buffer, view-file finds the named file; the +resulting buffer is placed into view-mode (a recursive edit). The normal +emacs commands are not available. Instead a set of special commands is +provided which faclitate moving around in the buffer, searching and +scrolling by screenfuls. Exiting view-mode returns to the buffer in which +the view-file or view-buffer command was given. +Type ? or h when viewing for a complete list of view commands. +Each calls value of `view-hook' if non-nil on entry. + +written by shane@mit-ajax. + +* New key commands in dired. + +`v' views (like more) the file on the current line. +`#' marks auto-save files for deletion. +`~' marks backup files for deletion. +`r' renames a file and updates the directory listing if the +file is renamed to same directory. +`c' copies a file and updates the directory listing if the file is +copied to the same directory. + +* New function `electric-buffer-list'. + +This pops up a buffer describing the set of emacs buffers. +Immediately typing space makes the buffer list go away and returns +to the buffer and window which were previously selected. + +Otherwise one may use the c-p and c-n commands to move around in the +buffer-list buffer and type Space or C-z to select the buffer on the +cursor's line. There are a number of other commands which are the same +as those of buffer-menu-mode. + +This is a useful thing to bind to c-x c-b in your `.emacs' file if the +rather non-standard `electric' behaviour of the buffer list suits your taste. +Type C-h after invoking electric-buffer-list for more information. + +Calls value of `electric-buffer-menu-mode-hook' if non-nil on entry. +Calls value of `after-electric-buffer-menu' on exit (select) if non-nil. + +Changes in version 16 for mail reading and sending + +* sendmail prefix character is C-c (and not C-z). New command C-c w. + +For instance C-c C-c (or C-c C-s) sends mail now rather than C-z C-z. +C-c w inserts your `signature' (contents of ~/.signature) at the end +of mail. + +* New feature in C-c y command in sending mail. + +C-c y is the command to insert the message being replied to. +Normally it deletes most header fields and indents everything +by three spaces. + +Now, C-c y does not delete header fields or indent. +C-c y with any other numeric argument does delete most header +fields, but indents by the amount specified in the argument. + +* C-r command in Rmail edits current message. + +It does this by switching to a different major mode +which is nearly the same as Text mode. The only difference +between it and text mode are the two command C-c and C-]. +C-c is defined to switch back to Rmail mode, and C-] +is defined to restore the original contents of the message +and then switch back to Rmail mode. + +C-c and C-] are the only ways "back into Rmail", but you +can switch to other buffers and edit them as usual. +C-r in Rmail changes only the handling of the Rmail buffer. + +* Rmail command `t' toggles header display. + +Normally Rmail reformats messages to hide most header fields. +`t' switches to display of all the header fields of the +current message, as long as it remains current. +Another `t' switches back to the usual display. + +* Rmail command '>' goes to the last message. + +* Rmail commands `a' and `k' set message attributes. +`a' adds an attribute and `k' removes one. You specify +the attrbute by name. You can specify either a built-in +flag such as "deleted" or "filed", or a user-defined keyword +(anything not recognized as built-in). + +* Rmail commands `l' and `L' summarize by attributes. + +These commands create a summary with one line per message, +like `h', but they list only some of the messages. You +specify which attribute (for `l') or attributes (for `L') +the messages should have. + +* Rmail can parse mmdf mail files. + +* Interface to MH mail system. + +mh-e is a front end for GNU emacs and the MH mail system. It +provides a friendly and convient interface to the MH commands. + +To read mail, invoke mh-rmail. This will inc new mail and display the +scan listing on the screen. To see a summary of the mh-e commands, +type ?. Help is available through the usual facilities. + +To send mail, invoke mh-smail. + +mh-e requires a copy of MH.5 that has been compiled with the MHE +compiler switch. + +From larus@berkeley. + +New hooks and parameters in version 16 + +* New variable `blink-matching-paren-distance'. + +This is the maximum number of characters to search for +an open-paren to match an inserted close-paren. +The matching open-paren is shown and checked if it is found +within this distance. + +`nil' means search all the way to the beginning of the buffer. +In this case, a warning message is printed if no matching +open-paren is found. + +This feature was originally written by shane@mit-ajax. + +* New variable `find-file-run-dired' + +If nil, find-file will report an error if an attempt to visit a +directory is detected; otherwise, it runs dired on that directory. +The default is t. + +* Variable `dired-listing-switches' holds switches given to `ls' by dired. + +The value should be a string containing `-' followed by letters. +The letter `l' had better be included and letter 'F' had better be excluded! +The default is "-al". + +This feature was originally written by shane@mit-ajax. + +* New variable `display-time-day-and-date'. + +If this variable is set non-`nil', the function M-x display-time +displays the day and date, as well as the time. + +* New parameter `c-continued-statement-indent'. + +This controls the extra indentation given to a line +that continues a C statement started on the previous line. +By default it is 2, which is why you would see + + if (foo) + bar (); + + +* Changed meaning of `c-indent-level'. + +The value of `c-brace-offset' used to be +subtracted from the value of `c-indent-level' whenever +that value was used. Now it is not. + +As a result, `c-indent-level' is now the offset of +statements within a block, relative to the line containing +the open-brace that starts the block. + +* turn-on-auto-fill is useful value for text-mode-hook. + +(setq text-mode-hook 'turn-on-auto-fill) +is all you have to do to make sure Auto Fill mode is turned +on whenever you enter Text mode. + +* Parameter explicit-shell-file-name for M-x shell. + +This variable, if non-nil, specifies the file name to use +for the shell to run if you do M-x shell. + +Changes in version 16 affecting Lisp programming: + +* Documentation strings adapt to customization. + +Often the documentation string for a command wants to mention +another command. Simply stating the other command as a +character sequence has a disadvantage: if the user customizes +Emacs by moving that function to a different command, the +cross reference in the documentation becomes wrong. + +A new feature allows you to write the documentation string +using a function name, and the command to run that function +is looked up when the documentation is printed. + +If a documentation string contains `\[' (two characters) then +the following text, up to the next `]', is taken as a function name. +Instead of printing that function name, the command that runs it is printed. +(M-x is used to construct a command if no shorter one exists.) + +For example, instead of putting `C-n' in a documentation string +to refer to the C-n command, put in `\[next-line]'. (In practice +you will need to quote the backslash with another backslash, +due to the syntax for strings in Lisp and C.) + +To include the literal characters `\[' in a documentation string, +precede them with `\='. To include the characters `\=', precede +them with `\='. For example, "\\=\\= is the way to quote \\=\\[" +will come out as `\= is the way to quote \['. + +The new function `substitute-command-keys' takes a string possibly +contaning \[...] constructs and replaces those constructs with +the key sequences they currently stand for. + +* Primitives `find-line-comment' and `find-line-comment-body' flushed. + +Search for the value of `comment-start-skip' if you want to find +whether and where a line has a comment. + +* New function `auto-save-file-name-p' + +Should return non-`nil' iff given a string which is the name of an +auto-save file (sans directory name). If you redefine +`make-auto-save-file-name', you should redefine this accordingly. By +default, this function returns `t' for filenames beginning with +character `#'. + +* The value of `exec-directory' now ends in a slash. + +This is to be compatible with most directory names in GNU Emacs. + +* Dribble files and termscript files. + +(open-dribble-file FILE) opens a dribble file named FILE. When a +dribble file is open, every character Emacs reads from the terminal is +written to the dribble file. + +(open-termscript FILE) opens a termscript file named FILE. When a +termscript file is open, all characters sent to the terminal by Emacs +are also written in the termscript file. + +The two of these together are very useful for debugging Emacs problems +in redisplay. + +* Upper case command characters by default are same as lower case. + +If a character in a command is an upper case letter, and is not defined, +Emacs uses the definition of the corresponding lower case letter. +For example, if C-x U is not directly undefined, it is treated as +a synonym for C-x u (undo). + +* Undefined function errors versus undefined variable errors. + +Void-symbol errors now say "boundp" if the symbol's value was void +or "fboundp" if the function definition was void. + +* New function `bury-buffer'. + +The new function `bury-buffer' takes one argument, a buffer object, +and puts that buffer at the end of the internal list of buffers. +So it is the least preferred candidate for use as the default value +of C-x b, or for other-buffer to return. + +* Already-displayed buffers have low priority for display. + +When a buffer is chosen automatically for display, or to be the +default in C-x b, buffers already displayed in windows have lower +priority than buffers not currently visible. + +* `set-window-start' accepts a third argument NOFORCE. + +This argument, if non-nil, prevents the window's force_start flag +from being set. Setting the force_start flag causes the next +redisplay to insist on starting display at the specified starting +point, even if dot must be moved to get it onto the screen. + +* New function `send-string-to-terminal'. + +This function takes one argument, a string, and outputs its contents +to the terminal exactly as specified: control characters, escape +sequences, and all. + +* Keypad put in command mode. + +The terminal's keypad is now put into command mode, as opposed to +numeric mode, while Emacs is running. This is done by means of the +termcap `ks' and `ke' strings. + +* New function `generate-new-buffer' + +This function takes a string as an argument NAME and looks for a +creates and returns a buffer called NAME if one did not already exist. +Otherwise, it successively tries appending suffixes of the form "<1>", +"<2>" etc to NAME until it creates a string which does not name an +existing buffer. A new buffer with that name is the created and returned. + +* New function `prin1-to-string' +This function takes one argument, a lisp object, and returns a string +containing that object's printed representation, such as `prin1' +would output. + +* New function `read-from-minibuffer' +Lets you supply a prompt, initial-contents, a keymap, and specify +whether the result should be interpreted as a string or a lisp object. + +Old functions `read-minibuffer', `eval-minibuffer', `read-string' all +take second optional string argument which is initial contents of +minibuffer. + +* minibuffer variable names changed (names of keymaps) + +minibuf-local-map -> minibuffer-local-map +minibuf-local-ns-map -> minibuffer-local-ns-map +minibuf-local-completion-map -> minibuffer-local-completion-map +minibuf-local-must-match-map -> minibuffer-local-must-match-map + +Changes in version 16 affecting configuring and building Emacs + +* Configuration switch VT100_INVERSE eliminated. + +You can control the use of inverse video on any terminal by setting +the variable `inverse-video', or by changing the termcap entry. If +you like, set `inverse-video' in your `.emacs' file based on +examination of (getenv "TERM"). + +* New switch `-batch' makes Emacs run noninteractively. + +If the switch `-batch' is used, Emacs treats its standard output +and input like ordinary files (even if they are a terminal). +It does not display buffers or windows; the only output to standard output +is what would appear as messages in the echo area, and each +message is followed by a newline. + +The terminal modes are not changed, so that C-z and C-c retain +their normal Unix meanings. Emacs does still read commands from +the terminal, but the idea of `-batch' is that you use it with +other command line arguments that tell Emacs a complete task to perform, +including killing itself. `-kill' used as the last argument is a good +way to accomplish this. + +The Lisp variable `noninteractive' is now defined, to be `nil' +except when `-batch' has been specified. + +* Emacs can be built with output redirected to a file. + +This is because -batch (see above) is now used in building Emacs. + +For older news, see the file ONEWS. + +---------------------------------------------------------------------- +Copyright information: + +Copyright (C) 1985 Richard M. Stallman + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +Local variables: +mode: text +end: diff --git a/etc/OONEWS b/etc/OONEWS new file mode 100644 index 0000000..06b5405 --- /dev/null +++ b/etc/OONEWS @@ -0,0 +1,1165 @@ +Old GNU Emacs NEWS -- history of user-visible changes thru version 15. +Copyright (C) 1985 Richard M. Stallman. +See the end for copying conditions. + +Changes in Emacs 15 + +* Emacs now runs on Sun and Megatest 68000 systems; + also on at least one 16000 system running 4.2. + +* Emacs now alters the output-start and output-stop characters + to prevent C-s and C-q from being considered as flow control + by cretinous rlogin software in 4.2. + +* It is now possible convert Mocklisp code (for Gosling Emacs) to Lisp code + that can run in GNU Emacs. M-x convert-mocklisp-buffer + converts the contents of the current buffer from Mocklisp to + GNU Emacs Lisp. You should then save the converted buffer with C-x C-w + under a name ending in ".el" + + There are probably some Mocklisp constructs that are not handled. + If you encounter one, feel free to report the failure as a bug. + The construct will be handled in a future Emacs release, if that is not + not too hard to do. + + Note that lisp code converted from Mocklisp code will not necessarily + run as fast as code specifically written for GNU Emacs, nor will it use + the many features of GNU Emacs which are not present in Gosling's emacs. + (In particular, the byte-compiler (m-x byte-compile-file) knows little + about compilation of code directly converted from mocklisp.) + It is envisaged that old mocklisp code will be incrementally converted + to GNU lisp code, with M-x convert-mocklisp-buffer being the first + step in this process. + +* Control-x n (narrow-to-region) is now by default a disabled command. + + This means that, if you issue this command, it will ask whether + you really mean it. You have the opportunity to enable the + command permanently at that time, so you will not be asked again. + This will place the form "(put 'narrow-to-region 'disabled nil)" in your + .emacs file. + +* Tags now prompts for the tag table file name to use. + + All the tags commands ask for the tag table file name + if you have not yet specified one. + + Also, the command M-x visit-tag-table can now be used to + specify the tag table file name initially, or to switch + to a new tag table. + +* If truncate-partial-width-windows is non-nil (as it intially is), + all windows less than the full screen width (that is, + made by side-by-side splitting) truncate lines rather than continuing + them. + +* Emacs now checks for Lisp stack overflow to avoid fatal errors. + The depth in eval, apply and funcall may not exceed max-lisp-eval-depth. + The depth in variable bindings and unwind-protects may not exceed + max-specpdl-size. If either limit is exceeded, an error occurs. + You can set the limits to larger values if you wish, but if you make them + too large, you are vulnerable to a fatal error if you invoke + Lisp code that does infinite recursion. + +* New hooks find-file-hook and write-file-hook. + Both of these variables if non-nil should be functions of no arguments. + At the time they are called (current-buffer) will be the buffer being + read or written respectively. + + find-file-hook is called whenever a file is read into its own buffer, + such as by calling find-file, revert-buffer, etc. It is not called by + functions such as insert-file which do not read the file into a buffer of + its own. + find-file-hook is called after the file has been read in and its + local variables (if any) have been processed. + + write-file-hook is called just before writing out a file from a buffer. + +* The initial value of shell-prompt-pattern is now "^[^#$%>]*[#$%>] *" + +* If the .emacs file sets inhibit-startup-message to non-nil, + the messages normally printed by Emacs at startup time + are inhibited. + +* Facility for run-time conditionalization on the basis of emacs features. + + The new variable features is a list of symbols which represent "features" + of the executing emacs, for use in run-time conditionalization. + + The function featurep of one argument may be used to test for the + presence of a feature. It is just the same as + (not (null (memq FEATURE features))) where FEATURE is its argument. + For example, (if (featurep 'magic-window-hack) + (transmogrify-window 'vertical) + (split-window-vertically)) + + The function provide of one argument "announces" that FEATURE is present. + It is much the same as (if (not (featurep FEATURE)) + (setq features (cons FEATURE features))) + + The function require with arguments FEATURE and FILE-NAME loads FILE-NAME + (which should contain the form (provide FEATURE)) unless FEATURE is present. + It is much the same as (if (not (featurep FEATURE)) + (progn (load FILE-NAME) + (if (not featurep FEATURE) (error ...)))) + FILE-NAME is optional and defaults to FEATURE. + +* New function load-average. + + This returns a list of three integers, which are + the current 1 minute, 5 minute and 15 minute load averages, + each multiplied by a hundred (since normally they are floating + point numbers). + +* Per-terminal libraries loaded automatically. + + Emacs when starting up on terminal type T automatically loads + a library named term-T. T is the value of the TERM environment variable. + Thus, on terminal type vt100, Emacs would do (load "term-vt100" t t). + Such libraries are good places to set the character translation table. + + It is a bad idea to redefine lots of commands in a per-terminal library, + since this affects all users. Instead, define a command to do the + redefinitions and let the user's init file, which is loaded later, + call that command or not, as the user prefers. + +* Programmer's note: detecting killed buffers. + + Buffers are eliminated by explicitly killing them, using + the function kill-buffer. This does not eliminate or affect + the pointers to the buffer which may exist in list structure. + If you have a pointer to a buffer and wish to tell whether + the buffer has been killed, use the function buffer-name. + It returns nil on a killed buffer, and a string on a live buffer. + +* New ways to access the last command input character. + + The function last-key-struck, which used to return the last + input character that was read by command input, is eliminated. + Instead, you can find this information as the value of the + variable last-command-char. (This variable used to be called + last-key). + + Another new variable, last-input-char, holds the last character + read from the command input stream regardless of what it was + read for. last-input-char and last-command-char are different + only inside a command that has called read-char to read input. + +* The new switch -kill causes Emacs to exit after processing the + preceding command line arguments. Thus, + emacs -l lib data -e do-it -kill + means to load lib, find file data, call do-it on no arguments, + and then exit. + +* The config.h file has been modularized. + + Options that depend on the machine you are running on are defined + in a file whose name starts with "m-", such as m-vax.h. + Options that depend on the operating system software version you are + running on are defined in a file whose name starts with "s-", + such as s-bsd4.2.h. + + config.h includes one m- file and one s- file. It also defines a + few other options whose values do not follow from the machine type + and system type being used. Installers normally will have to + select the correct m- and s- files but will never have to change their + contents. + +* Termcap AL and DL strings are understood. + + If the termcap entry defines AL and DL strings, for insertion + and deletion of multiple lines in one blow, Emacs now uses them. + This matters most on certain bit map display terminals for which + scrolling is comparatively slow. + +* Bias against scrolling screen far on fast terminals. + + Emacs now prefers to redraw a few lines rather than + shift them a long distance on the screen, when the terminal is fast. + +* New major mode, mim-mode. + + This major mode is for editing MDL code. Perhaps a MDL + user can explain why it is not called mdl-mode. + You must load the library mim-mode explicitly to use this. + +* GNU documentation formatter `texinfo'. + + The `texinfo' library defines a format for documentation + files which can be passed through Tex to make a printed manual + or passed through texinfo to make an Info file. Texinfo is + documented fully by its own Info file; compare this file + with its source, texinfo.texinfo, for additional guidance. + + All documentation files for GNU utilities should be written + in texinfo input format. + + Tex processing of texinfo files requires the Botex macro package. + This is not ready for distribution yet, but will appear at + a later time. + +* New function read-from-string (emacs 15.29) + + read-from-string takes three arguments: a string to read from, + and optionally start and end indices which delimit a substring + from which to read. (They default to 0 and the length of the string, + respectively.) + + This function returns a cons cell whose car is the object produced + by reading from the string and whose cdr is a number giving the + index in the string of the first character not read. That index may + be passed as the second argument to a later call to read-from-string + to read the next form represented by the string. + + In addition, the function read now accepts a string as its argument. + In this case, it calls read-from-string on the whole string, and + returns the car of the result. (ie the actual object read.) + +Changes in Emacs 14 + +* Completion now prints various messages such as [Sole Completion] + or [Next Character Not Unique] to describe the results obtained. + These messages appear after the text in the minibuffer, and remain + on the screen until a few seconds go by or you type a key. + +* The buffer-read-only flag is implemented. + Setting or binding this per-buffer variable to a non-nil value + makes illegal any operation which would modify the textual content of + the buffer. (Such operations signal a buffer-read-only error) + The read-only state of a buffer may be altered using toggle-read-only + (C-x C-q) + The buffers used by Rmail, Dired, Rnews, and Info are now read-only + by default to prevent accidental damage to the information in those + buffers. + +* Functions car-safe and cdr-safe. + These functions are like car and cdr when the argument is a cons. + Given an argument not a cons, car-safe always returns nil, with + no error; the same for cdr-safe. + +* The new function user-real-login-name returns the name corresponding + to the real uid of the Emacs process. This is usually the same + as what user-login-name returns; however, when Emacs is invoked + from su, user-real-login-name returns "root" but user-login-name + returns the name of the user who invoked su. + +Changes in Emacs 13 + +* There is a new version numbering scheme. + + What used to be the first version number, which was 1, + has been discarded since it does not seem that I need three + levels of version number. + + However, a new third version number has been added to represent + changes by user sites. This number will always be zero in + Emacs when I distribute it; it will be incremented each time + Emacs is built at another site. + +* There is now a reader syntax for Meta characters: + \M-CHAR means CHAR or'ed with the Meta bit. For example: + + ?\M-x is (+ ?x 128) + ?\M-\n is (+ ?\n 128) + ?\M-\^f is (+ ?\^f 128) + + This syntax can be used in strings too. Note, however, that + Meta characters are not meaningful in key sequences being passed + to define-key or lookup-key; you must use ESC characters (\e) + in them instead. + + ?\C- can be used likewise for control characters. (13.9) + +* Installation change + The string "../lisp" now adds to the front of the load-path + used for searching for Lisp files during Emacs initialization. + It used to replace the path specified in paths.h entirely. + Now the directory ../lisp is searched first and the directoris + specified in paths.h are searched afterward. + +Changes in Emacs 1.12 + +* There is a new installation procedure. + See the file INSTALL that comes in the top level + directory in the tar file or tape. + +* The Meta key is now supported on terminals that have it. + This is a shift key which causes the high bit to be turned on + in all input characters typed while it is held down. + + read-char now returns a value in the range 128-255 if + a Meta character is typed. When interpreted as command + input, a Meta character is equivalent to a two character + sequence, the meta prefix character followed by the un-metized + character (Meta-G unmetized is G). + + The meta prefix character + is specified by the value of the variable meta-prefix-char. + If this character (normally Escape) has been redefined locally + with a non-prefix definition (such as happens in completing + minibuffers) then the local redefinition is suppressed when + the character is not the last one in a key sequence. + So the local redefinition is effective if you type the character + explicitly, but not effective if the character comes from + the use of the Meta key. + +* `-' is no longer a completion command in the minibuffer. + It is an ordinary self-inserting character. + +* The list load-path of directories load to search for Lisp files + is now controlled by the EMACSLOADPATH environment variable +[[ Note this was originally EMACS-LOAD-PATH and has been changed + again; sh does not deal properly with hyphens in env variable names]] + rather than the EPATH environment variable. This is to avoid + conflicts with other Emacses. + + While Emacs is being built initially, the load-path + is now just ("../lisp"), ignoring paths.h. It does not + ignore EMACSLOADPATH, however; you should avoid having + this variable set while building Emacs. + +* You can now specify a translation table for keyboard + input characters, as a way of exchanging or substituting + keys on the keyboard. + + If the value of keyboard-translate-table is a string, + every character received from the keyboard is used as an + index in that string, and the character at that index in + the string is used as input instead of what was actually + typed. If the actual input character is >= the length of + the string, it is used unchanged. + + One way this feature can be used is to fix bad keyboard + designes. For example, on some terminals, Delete is + Shift-Underscore. Since Delete is a more useful character + than Underscore, it is an improvement to make the unshifted + character Delete and the shifted one Underscore. This can + be done with + + ;; First make a translate table that does the identity translation. + (setq keyboard-translate-table (make-string 128 0)) + (let ((i 0)) + (while (< i 128) + (aset keyboard-translate-table i i) + (setq i (1+ i)))) + + ;; Now alter translations of some characters. + (aset keyboard-translate-table ?\_ ?\^?) + (aset keyboard-translate-table ?\^? ?\_) + + If your terminal has a Meta key and can therefore send + codes up to 255, Meta characters are translated through + elements 128 through 255 of the translate table, and therefore + are translated independently of the corresponding non-Meta + characters. You must therefore establish translations + independently for the Meta characters if you want them too: + + ;; First make a translate table that does the identity translation. + (setq keyboard-translate-table (make-string 256 0)) + (let ((i 0)) + (while (< i 256) + (aset keyboard-translate-table i i) + (setq i (1+ i)))) + + ;; Now alter translations of some characters. + (aset keyboard-translate-table ?\_ ?\^?) + (aset keyboard-translate-table ?\^? ?\_) + + ;; Now alter translations of some Meta characters. + (aset keyboard-translate-table (+ 128 ?\_) (+ 128 ?\^?)) + (aset keyboard-translate-table (+ 128 ?\^?) (+ 128 ?\_)) + +* (process-kill-without-query PROCESS) + +This marks the process so that, when you kill Emacs, +you will not on its account be queried about active subprocesses. + +Changes in Emacs 1.11 + +* The commands C-c and C-z have been interchanged, + for greater compatibility with normal Unix usage. + C-z now runs suspend-emacs and C-c runs exit-recursive-edit. + +* The value returned by file-name-directory now ends + with a slash. (file-name-directory "foo/bar") => "foo/". + This avoids confusing results when dealing with files + in the root directory. + + The value of the per-buffer variable default-directory + is also supposed to have a final slash now. + +* There are now variables to control the switches passed to + `ls' by the C-x C-d command (list-directory). + list-directory-brief-switches is a string, initially "-CF", + used for brief listings, and list-directory-verbose-switches + is a string, initially "-l", used for verbose ones. + +* For Ann Arbor Ambassador terminals, the termcap "ti" string + is now used to initialize the screen geometry on entry to Emacs, + and the "te" string is used to set it back on exit. + If the termcap entry does not define the "ti" or "te" string, + Emacs does what it used to do. + +Changes in Emacs 1.10 + +* GNU Emacs has been made almost 1/3 smaller. + It now dumps out as only 530kbytes on Vax 4.2bsd. + +* The term "checkpoint" has been replaced by "auto save" + throughout the function names, variable names and documentation + of GNU Emacs. + +* The function load now tries appending ".elc" and ".el" + to the specified filename BEFORE it tries the filename + without change. + +* rmail now makes the mode line display the total number + of messages and the current message number. + The "f" command now means forward a message to another user. + The command to search through all messages for a string is now "F". + The "u" command now means to move back to the previous + message and undelete it. To undelete the selected message, use Meta-u. + +* The hyphen character is now equivalent to a Space while + in completing minibuffers. Both mean to complete an additional word. + +* The Lisp function error now takes args like format + which are used to construct the error message. + +* Redisplay will refuse to start its display at the end of the buffer. + It will pick a new place to display from, rather than use that. + +* The value returned by garbage-collect has been changed. + Its first element is no longer a number but a cons, + whose car is the number of cons cells now in use, + and whose cdr is the number of cons cells that have been + made but are now free. + The second element is similar but describes symbols rather than cons cells. + The third element is similar but describes markers. + +* The variable buffer-name has been eliminated. + The function buffer-name still exists. This is to prevent + user programs from changing buffer names without going + through the rename-buffer function. + +Changes in Emacs 1.9 + +* When a fill prefix is in effect, paragraphs are started + or separated by lines that do not start with the fill prefix. + Also, a line which consists of the fill prefix followed by + white space separates paragraphs. + +* C-x C-v runs the new function find-alternate-file. + It finds the specified file, switches to that buffer, + and kills the previous current buffer. (It requires + confirmation if that buffer had changes.) This is + most useful after you find the wrong file due to a typo. + +* Exiting the minibuffer moves the cursor to column 0, + to show you that it has really been exited. + +* Meta-g (fill-region) now fills each paragraph in the + region individually. To fill the region as if it were + a single paragraph (for when the paragraph-delimiting mechanism + does the wrong thing), use fill-region-as-paragraph. + +* Tab in text mode now runs the function tab-to-tab-stop. + A new mode called indented-text-mode is like text-mode + except that in it Tab runs the function indent-relative, + which indents the line under the previous line. + If auto fill is enabled while in indented-text-mode, + the new lines that it makes are indented. + +* Functions kill-rectangle and yank-rectangle. + kill-rectangle deletes the rectangle specified by dot and mark + (or by two arguments) and saves it in the variable killed-rectangle. + yank-rectangle inserts the rectangle in that variable. + + Tab characters in a rectangle being saved are replaced + by spaces in such a way that their appearance will + not be changed if the rectangle is later reinserted + at a different column position. + +* `+' in a regular expression now means + to repeat the previous expression one or more times. + `?' means to repeat it zero or one time. + They are in all regards like `*' except for the + number of repetitions they match. + + \< in a regular expression now matches the null string + when it is at the beginning of a word; \> matches + the null string at the end of a word. + +* C-x p narrows the buffer so that only the current page + is visible. + +* C-x ) with argument repeats the kbd macro just + defined that many times, counting the definition + as one repetition. + +* C-x ( with argument begins defining a kbd macro + starting with the last one defined. It executes that + previous kbd macro initially, just as if you began + by typing it over again. + +* C-x q command queries the user during kbd macro execution. + With prefix argument, enters recursive edit, + reading keyboard commands even within a kbd macro. + You can give different commands each time the macro executes. + Without prefix argument, reads a character. Your options are: + Space -- execute the rest of the macro. + Delete -- skip the rest of the macro; start next repetition. + C-d -- skip rest of the macro and don't repeat it any more. + C-r -- enter a recursive edit, then on exit ask again for a character + C-l -- redisplay screen and ask again." + +* write-kbd-macro and append-kbd-macro are used to save + a kbd macro definition in a file (as Lisp code to + redefine the macro when the file is loaded). + These commands differ in that write-kbd-macro + discards the previous contents of the file. + If given a prefix argument, both commands + record the keys which invoke the macro as well as the + macro's definition. + +* The variable global-minor-modes is used to display + strings in the mode line of all buffers. It should be + a list of elements thaht are conses whose cdrs are strings + to be displayed. This complements the variable + minor-modes, which has the same effect but has a separate + value in each buffer. + +* C-x = describes horizontal scrolling in effect, if any. + +* Return now auto-fills the line it is ending, in auto fill mode. + Space with zero as argument auto-fills the line before it + just like Space without an argument. + +Changes in Emacs 1.8 + +This release mostly fixes bugs. There are a few new features: + +* apropos now sorts the symbols before displaying them. + Also, it returns a list of the symbols found. + + apropos now accepts a second arg PRED which should be a function + of one argument; if PRED is non-nil, each symbol is tested + with PRED and only symbols for which PRED returns non-nil + appear in the output or the returned list. + + If the third argument to apropos is non-nil, apropos does not + display anything; it merely returns the list of symbols found. + + C-h a now runs the new function command-apropos rather than + apropos, and shows only symbols with definitions as commands. + +* M-x shell sends the command + if (-f ~/.emacs_NAME)source ~/.emacs_NAME + invisibly to the shell when it starts. Here NAME + is replaced by the name of shell used, + as it came from your ESHELL or SHELL environment variable + but with directory name, if any, removed. + +* M-, now runs the command tags-loop-continue, which is used + to resume a terminated tags-search or tags-query-replace. + +Changes in Emacs 1.7 + +It's Beat CCA Week. + +* The initial buffer is now called "*scratch*" instead of "scratch", + so that all buffer names used automatically by Emacs now have *'s. + +* Undo information is now stored separately for each buffer. + The Undo command (C-x u) always applies to the current + buffer only. + + C-_ is now a synonym for C-x u. + + (buffer-flush-undo BUFFER) causes undo information not to + be kept for BUFFER, and frees the space that would have + been used to hold it. In any case, no undo information is + kept for buffers whose names start with spaces. (These + buffers also do not appear in the C-x C-b display.) + +* Rectangle operations are now implemented. + C-x r stores the rectangle described by dot and mark + into a register; it reads the register name from the keyboard. + C-x g, the command to insert the contents of a register, + can be used to reinsert the rectangle elsewhere. + + Other rectangle commands include + open-rectangle: + insert a blank rectangle in the position and size + described by dot and mark, at its corners; + the existing text is pushed to the right. + clear-rectangle: + replace the rectangle described by dot ane mark + with blanks. The previous text is deleted. + delete-rectangle: + delete the text of the specified rectangle, + moving the text beyond it on each line leftward. + +* Side-by-side windows are allowed. Use C-x 5 to split the + current window into two windows side by side. + C-x } makes the selected window ARG columns wider at the + expense of the windows at its sides. C-x { makes the selected + window ARG columns narrower. An argument to C-x 5 specifies + how many columns to give to the leftmost of the two windows made. + + C-x 2 now accepts a numeric argument to specify the number of + lines to give to the uppermost of the two windows it makes. + +* Horizontal scrolling of the lines in a window is now implemented. + C-x < (scroll-left) scrolls all displayed lines left, + with the numeric argument (default 1) saying how far to scroll. + When the window is scrolled left, some amount of the beginning + of each nonempty line is replaced by an "$". + C-x > scrolls right. If a window has no text hidden at the left + margin, it cannot be scrolled any farther right than that. + When nonzero leftwards scrolling is in effect in a window. + lines are automatically truncated at the window's right margin + regardless of the value of the variable truncate-lines in the + buffer being displayed. + +* C-x C-d now uses the default output format of `ls', + which gives just file names in multiple columns. + C-u C-x C-d passes the -l switch to `ls'. + +* C-t at the end of a line now exchanges the two preceding characters. + + All the transpose commands now interpret zero as an argument + to mean to transpose the textual unit after or around dot + with the one after or around the mark. + +* M-! executes a shell command in an inferior shell + and displays the output from it. With a prefix argument, + it inserts the output in the current buffer after dot + and sets the mark after the output. The shell command + gets /dev/null as its standard input. + + M-| is like M-! but passes the contents of the region + as input to the shell command. A prefix argument makes + the output from the command replace the contents of the region. + +* The mode line will now say "Def" after the major mode + while a keyboard macro is being defined. + +* The variable fill-prefix is now used by Meta-q. + Meta-q removes the fill prefix from lines that start with it + before filling, and inserts the fill prefix on each line + after filling. + + The command C-x . sets the fill prefix equal to the text + on the current line before dot. + +* The new command Meta-j (indent-new-comment-line), + is like Linefeed (indent-new-line) except when dot is inside a comment; + in that case, Meta-j inserts a comment starter on the new line, + indented under the comment starter above. It also inserts + a comment terminator at the end of the line above, + if the language being edited calls for one. + +* Rmail should work correctly now, and has some C-h m documentation. + +Changes in Emacs 1.6 + +* save-buffers-kill-emacs is now on C-x C-c + while C-x C-z does suspend-emacs. This is to make + C-x C-c like the normal Unix meaning of C-c + and C-x C-z linke the normal Unix meaning of C-z. + +* M-ESC (eval-expression) is now a disabled command by default. + This prevents users who type ESC ESC accidentally from + getting confusing results. Put + (put 'eval-expression 'disabled nil) + in your ~/.emacs file to enable the command. + +* Self-inserting text is grouped into bunches for undoing. + Each C-x u command undoes up to 20 consecutive self-inserting + characters. + +* Help f now uses as a default the function being called + in the innermost Lisp expression that dot is in. + This makes it more convenient to use while writing + Lisp code to run in Emacs. + (If the text around dot does not appear to be a call + to a Lisp function, there is no default.) + + Likewise, Help v uses the symbol around or before dot + as a default, if that is a variable name. + +* Commands that read filenames now insert the default + directory in the minibuffer, to become part of your input. + This allows you to see what the default is. + You may type a filename which goes at the end of the + default directory, or you may edit the default directory + as you like to create the input you want to give. + You may also type an absolute pathname (starting with /) + or refer to a home directory (input starting with ~) + after the default; the presence of // or /~ causes + everything up through the slash that precedes your + type-in to be ignored. + + Returning the default directory without change, + including the terminating slash, requests the use + of the default file name (usually the visited file's name). + + Set the variable insert-default-directory to nil + to turn off this feature. + +* M-x shell now uses the environment variable ESHELL, + if it exists, as the file name of the shell to run. + If there is no ESHELL variable, the SHELL variable is used. + This is because some shells do not work properly as inferiors + of Emacs (or anything like Emacs). + +* A new variable minor-modes now exists, with a separate value + in each buffer. Its value should be an alist of elements + (MODE-FUNCTION-SYMBOL . PRETTY-NAME-STRING), one for each + minor mode that is turned on in the buffer. The pretty + name strings are displayed in the mode line after the name of the + major mode (with spaces between them). The mode function + symbols should be symbols whose function definitions will + turn on the minor mode if given 1 as an argument; they are present + so that Help m can find their documentation strings. + +* The format of tag table files has been changed. + The new format enables Emacs to find tags much faster. + + A new program, etags, exists to make the kind of + tag table that Emacs wants. etags is invoked just + like ctags; in fact, if you give it any switches, + it does exactly what ctags would do. Give it the + empty switch ("-") to make it act like ctags with no switches. + + etags names the tag table file "TAGS" rather than "tags", + so that these tag tables and the standard Unix ones + can coexist. + + The tags library can no longer use standard ctags-style + tag tables files. + +* The file of Lisp code Emacs reads on startup is now + called ~/.emacs rather than ~/.emacs_pro. + +* copy-file now gives the copied file the same mode bits + as the original file. + +* Output from a process inserted into the process's buffer + no longer sets the buffer's mark. Instead it sets a + marker associated with the process to point to the end + of the inserted text. You can access this marker with + (process-mark PROCESS) + and then either examine its position with marker-position + or set its position with set-marker. + +* completing-read takes a new optional fifth argument which, + if non-nil, should be a string of text to insert into + the minibuffer before reading user commands. + +* The Lisp function elt now exists: + (elt ARRAY N) is like (aref ARRAY N), + (elt LIST N) is like (nth N LIST). + +* rplaca is now a synonym for setcar, and rplacd for setcdr. + eql is now a synonym for eq; it turns out that the Common Lisp + distinction between eq and eql is insignificant in Emacs. + numberp is a new synonym for integerp. + +* auto-save has been renamed to auto-save-mode. + +* Auto save file names for buffers are now created by the + function make-auto-save-file-name. This is so you can + redefine that function to change the way auto save file names + are chosen. + +* expand-file-name no longer discards a final slash. + (expand-file-name "foo" "/lose") => "/lose/foo" + (expand-file-name "foo/" "/lose") => "/lose/foo/" + + Also, expand-file-name no longer substitutes $ constructs. + A new function substitute-in-file-name does this. Reading + a file name with read-file-name or the `f' or`F' option + of interactive calling uses substitute-in-file-name + on the file name that was read and returns the result. + + All I/O primitives including insert-file-contents and + delete-file call expand-file-name on the file name supplied. + This change makes them considerably faster in the usual case. + +* Interactive calling spec strings allow the new code letter 'D' + which means to read a directory name. It is like 'f' except + that the default if the user makes no change in the minibuffer + is to return the current default directory rather than the + current visited file name. + +Changes in Emacs 1.5 + +* suspend-emacs now accepts an optional argument + which is a string to be stuffed as terminal input + to be read by Emacs's superior shell after Emacs exits. + + A library called ledit exists which uses this feature + to transmit text to a Lisp job running as a sibling of + Emacs. + +* If find-file is given the name of a directory, + it automatically invokes dired on that directory + rather than reading in the binary data that make up + the actual contents of the directory according to Unix. + +* Saving an Emacs buffer now preserves the file modes + of any previously existing file with the same name. + This works using new Lisp functions file-modes and + set-file-modes, which can be used to read or set the mode + bits of any file. + +* The Lisp function cond now exists, with its traditional meaning. + +* defvar and defconst now permit the documentation string + to be omitted. defvar also permits the initial value + to be omitted; then it acts only as a comment. + +Changes in Emacs 1.4 + +* Auto-filling now normally indents the new line it creates + by calling indent-according-to-mode. This function, meanwhile, + has in Fundamental and Text modes the effect of making the line + have an indentation of the value of left-margin, a per-buffer variable. + + Tab no longer precisely does indent-according-to-mode; + it does that in all modes that supply their own indentation routine, + but in Fundamental, Text and allied modes it inserts a tab character. + +* The command M-x grep now invokes grep (on arguments + supplied by the user) and reads the output from grep + asynchronously into a buffer. The command C-x ` can + be used to move to the lines that grep has found. + This is an adaptation of the mechanism used for + running compilations and finding the loci of error messages. + + You can now use C-x ` even while grep or compilation + is proceeding; as more matches or error messages arrive, + C-x ` will parse them and be able to find them. + +* M-x mail now provides a command to send the message + and "exit"--that is, return to the previously selected + buffer. It is C-z C-z. + +* Tab in C mode now tries harder to adapt to all indentation styles. + If the line being indented is a statement that is not the first + one in the containing compound-statement, it is aligned under + the beginning of the first statement. + +* The functions screen-width and screen-height return the + total width and height of the screen as it is now being used. + set-screen-width and set-screen-height tell Emacs how big + to assume the screen is; they each take one argument, + an integer. + +* The Lisp function 'function' now exists. function is the + same as quote, except that it serves as a signal to the + Lisp compiler that the argument should be compiled as + a function. Example: + (mapcar (function (lambda (x) (+ x 5))) list) + +* The function set-key has been renamed to global-set-key. + undefine-key and local-undefine-key has been renamed to + global-unset-key and local-unset-key. + +* Emacs now collects input from asynchronous subprocesses + while waiting in the functions sleep-for and sit-for. + +* Shell mode's Newline command attempts to distinguish subshell + prompts from user input when issued in the middle of the buffer. + It no longer reexecutes from dot to the end of the line; + it reeexecutes the entire line minus any prompt. + The prompt is recognized by searching for the value of + shell-prompt-pattern, starting from the beginning of the line. + Anything thus skipped is not reexecuted. + +Changes in Emacs 1.3 + +* An undo facility exists now. Type C-x u to undo a batch of + changes (usually one command's changes, but some commands + such as query-replace divide their changes into multiple + batches. You can repeat C-x u to undo further. As long + as no commands other than C-x u intervene, each one undoes + another batch. A numeric argument to C-x u acts as a repeat + count. + + If you keep on undoing, eventually you may be told that + you have used up all the recorded undo information. + Some actions, such as reading in files, discard all + undo information. + + The undo information is not currently stored separately + for each buffer, so it is mainly good if you do something + totally spastic. [This has since been fixed.] + +* A learn-by-doing tutorial introduction to Emacs now exists. + Type C-h t to enter it. + +* An Info documentation browser exists. Do M-x info to enter it. + It contains a tutorial introduction so that no more documentation + is needed here. As of now, the only documentation in it + is that of Info itself. + +* Help k and Help c are now different. Help c prints just the + name of the function which the specified key invokes. Help k + prints the documentation of the function as well. + +* A document of the differences between GNU Emacs and Twenex Emacs + now exists. It is called DIFF, in the same directory as this file. + +* C mode can now indent comments better, including multi-line ones. + Meta-Control-q now reindents comment lines within the expression + being aligned. + +* Insertion of a close-parenthesis now shows the matching open-parenthesis + even if it is off screen, by printing the text following it on its line + in the minibuffer. + +* A file can now contain a list of local variable values + to be in effect when the file is edited. See the file DIFF + in the same directory as this file for full details. + +* A function nth is defined. It means the same thing as in Common Lisp. + +* The function install-command has been renamed to set-key. + It now takes the key sequence as the first argument + and the definition for it as the second argument. + Likewise, local-install-command has been renamed to local-set-key. + +Changes in Emacs 1.2 + +* A Lisp single-stepping and debugging facility exists. + To cause the debugger to be entered when an error + occurs, set the variable debug-on-error non-nil. + + To cause the debugger to be entered whenever function foo + is called, do (debug-on-entry 'foo). To cancel this, + do (cancel-debug-on-entry 'foo). debug-on-entry does + not work for primitives (written in C), only functions + written in Lisp. Most standard Emacs commands are in Lisp. + + When the debugger is entered, the selected window shows + a buffer called " *Backtrace" which displays a series + of stack frames, most recently entered first. For each + frame, the function name called is shown, usually followed + by the argument values unless arguments are still being + calculated. At the beginning of the buffer is a description + of why the debugger was entered: function entry, function exit, + error, or simply that the user called the function `debug'. + + To exit the debugger and return to top level, type `q'. + + In the debugger, you can evaluate Lisp expressions by + typing `e'. This is equivalent to `M-ESC'. + + When the debugger is entered due to an error, that is + all you can do. When it is entered due to function entry + (such as, requested by debug-on-entry), you have two + options: + Continue execution and reenter debugger after the + completion of the function being entered. Type `c'. + Continue execution but enter the debugger before + the next subexpression. Type `d'. + + You will see that some stack frames are marked with *. + This means the debugger will be entered when those + frames exit. You will see the value being returned + in the first line of the backtrace buffer. Your options: + Continue execution, and return that value. Type `c'. + Continue execution, and return a specified value. Type `r'. + + You can mark a frame to enter the debugger on exit + with the `b' command, or clear such a mark with `u'. + +* Lisp macros now exist. + For example, you can write + (defmacro cadr (arg) (list 'car (list 'cdr arg))) + and then the expression + (cadr foo) + will expand into + (car (cdr foo)) + +Changes in Emacs 1.1 + +* The initial buffer is now called "scratch" and is in a + new major mode, Lisp Interaction mode. This mode is + intended for typing Lisp expressions, evaluating them, + and having the values printed into the buffer. + + Type Linefeed after a Lisp expression, to evaluate the + expression and have its value printed into the buffer, + advancing dot. + + The other commands of Lisp mode are available. + +* The C-x C-e command for evaluating the Lisp expression + before dot has been changed to print the value in the + minibuffer line rather than insert it in the buffer. + A numeric argument causes the printed value to appear + in the buffer instead. + +* In Lisp mode, the command M-C-x evaluates the defun + containing or following dot. The value is printed in + the minibuffer. + +* The value of a Lisp expression evaluated using M-ESC + is now printed in the minibuffer. + +* M-q now runs fill-paragraph, independent of major mode. + +* C-h m now prints documentation on the current buffer's + major mode. What it prints is the documentation of the + major mode name as a function. All major modes have been + equipped with documentation that describes all commands + peculiar to the major mode, for this purpose. + +* You can display a Unix manual entry with + the M-x manual-entry command. + +* You can run a shell, displaying its output in a buffer, + with the M-x shell command. The Return key sends input + to the subshell. Output is printed inserted automatically + in the buffer. Commands C-c, C-d, C-u, C-w and C-z are redefined + for controlling the subshell and its subjobs. + "cd", "pushd" and "popd" commands are recognized as you + enter them, so that the default directory of the Emacs buffer + always remains the same as that of the subshell. + +* C-x $ (that's a real dollar sign) controls line-hiding based + on indentation. With a numeric arg N > 0, it causes all lines + indented by N or more columns to become invisible. + They are, effectively, tacked onto the preceding line, where + they are represented by " ..." on the screen. + (The end of the preceding visible line corresponds to a + screen cursor position before the "...". Anywhere in the + invisible lines that follow appears on the screen as a cursor + position after the "...".) + Currently, all editing commands treat invisible lines just + like visible ones, except for C-n and C-p, which have special + code to count visible lines only. + C-x $ with no argument turns off this mode, which in any case + is remembered separately for each buffer. + +* Outline mode is another form of selective display. + It is a major mode invoked with M-x outline-mode. + It is intended for editing files that are structured as + outlines, with heading lines (lines that begin with one + or more asterisks) and text lines (all other lines). + The number of asterisks in a heading line are its level; + the subheadings of a heading line are all following heading + lines at higher levels, until but not including the next + heading line at the same or a lower level, regardless + of intervening text lines. + + In outline mode, you have commands to hide (remove from display) + or show the text or subheadings under each heading line + independently. Hidden text or subheadings are invisibly + attached to the end of the preceding heading line, so that + if you kill the hading line and yank it back elsewhere + all the invisible lines accompany it. + + All editing commands treat hidden outline-mode lines + as part of the preceding visible line. + +* C-x C-z runs save-buffers-kill-emacs + offers to save each file buffer, then exits. + +* C-c's function is now called suspend-emacs. + +* The command C-x m runs mail, which switches to a buffer *mail* + and lets you compose a message to send. C-x 4 m runs mail in + another window. Type C-z C-s in the mail buffer to send the + message according to what you have entered in the buffer. + + You must separate the headers from the message text with + an empty line. + +* You can now dired partial directories (specified with names + containing *'s, etc, all processed by the shell). Also, you + can dired more than one directory; dired names the buffer + according to the filespec or directory name. Reinvoking + dired on a directory already direded just switches back to + the same directory used last time; do M-x revert if you want + to read in the current contents of the directory. + + C-x d runs dired, and C-x 4 d runs dired in another window. + + C-x C-d (list-directory) also allows partial directories now. + +Lisp programming changes + +* t as an output stream now means "print to the minibuffer". + If there is already text in the minibuffer printed via t + as an output stream, the new text is appended to the old + (or is truncated and lost at the margin). If the minibuffer + contains text put there for some other reason, it is cleared + first. + + t is now the top-level value of standard-output. + + t as an input stream now means "read via the minibuffer". + The minibuffer is used to read a line of input, with editing, + and this line is then parsed. Any excess not used by `read' + is ignored; each `read' from t reads fresh input. + t is now the top-level value of standard-input. + +* A marker may be used as an input stream or an output stream. + The effect is to grab input from where the marker points, + advancing it over the characters read, or to insert output + at the marker and advance it. + +* Output from an asynchronous subprocess is now inserted at + the end of the associated buffer, not at the buffer's dot, + and the buffer's mark is set to the end of the inserted output + each time output is inserted. + +* (pos-visible-in-window-p POS WINDOW) + returns t if position POS in WINDOW's buffer is in the range + that is being displayed in WINDOW; nil if it is scrolled + vertically out of visibility. + + If display in WINDOW is not currently up to date, this function + calculates carefully whether POS would appear if display were + done immediately based on the current (window-start WINDOW). + + POS defaults to (dot), and WINDOW to (selected-window). + +* Variable buffer-alist replaced by function (buffer-list). + The actual alist of buffers used internally by Emacs is now + no longer accessible, to prevent the user from crashing Emacs + by modifying it. The function buffer-list returns a list + of all existing buffers. Modifying this list cannot hurt anything + as a new list is constructed by each call to buffer-list. + +* load now takes an optional third argument NOMSG which, if non-nil, + prevents load from printing a message when it starts and when + it is done. + +* byte-recompile-directory is a new function which finds all + the .elc files in a directory, and regenerates each one which + is older than the corresponding .el (Lisp source) file. + +---------------------------------------------------------------------- +Copyright information: + +Copyright (C) 1985 Richard M. Stallman + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +Local variables: +mode: text +end: diff --git a/etc/RCP b/etc/RCP new file mode 100644 index 0000000..12ba257 --- /dev/null +++ b/etc/RCP @@ -0,0 +1,34 @@ + +From: shane@mit-ajax (K. Shane Hartman) +I have created a mechanism for automatically updating your Gnu Emacs +sources from the sources maintained on mit-prep. To take advantage of this +mechanism you must have a connection to the internet and do the following: + +Obtain the modified version of rcp from mit-prep. This version is upward +compatible with standard rcp. The relevant files are: +mit-prep:/u2/emacs/rcp.binary (compiled for vax 4.2) +mit-prep:/u2/emacs/rcp.1c +mit-prep:/u2/emacs/RCP.README +You can use ftp to obtain the files or rcp (the old version will work for +this, just do 'rcp mit-prep.rcp:/u2/emacs/rcp.binary rcp.binary' ... + +If you have a source license, /u2/emacs/rcp.diff may be useful: it is +a diff of ucb rcp and the modified rcp. + +Replace your current copy of rcp with rcp.binary (it must suid to root), +but keep the old copy around just in case (e.g. rename to rcp.ucb) and +install the man page. + +Now connect to your toplevel emacs directory (which contains src, etc, dbx, +lisp, and info) and do: + +rcp -ruvp "mit-prep.rcp:/u2/emacs/dist/*" . + +The new options: v - verbose, u - update, and p - preserve write dates. +The rcp 'account' supports only the rcp command. + +Once you have synchronized with the write dates for the files on prep, the +above command is sufficient to update all and only those files that have +changed on prep with respect to your sources. For this scheme to work, you +must maintain the sources on your own machine and be aware that if you +change a source on your machine, then rcp can be fooled. diff --git a/etc/README b/etc/README new file mode 100644 index 0000000..8722b82 --- /dev/null +++ b/etc/README @@ -0,0 +1,8 @@ + +This directory contains some text files of documentation for GNU Emacs +or of interest to Emacs users, some programs used by or with Emacs, +and the file of on-line documentation for Emacs. + +`termcap.dat' is for VMS. It is a copy of the `/etc/termcap' file +used on Unix. + diff --git a/etc/SERVICE b/etc/SERVICE new file mode 100644 index 0000000..0d1a4b2 --- /dev/null +++ b/etc/SERVICE @@ -0,0 +1,963 @@ +GNU Service Directory + +This is a list of people who have asked to be listed as offering +support services for GNU software, including GNU Emacs, for a fee +or in some cases at no charge. + +The information comes from the people who asked to be listed; +we do not include any information we know to be false, but we +cannot check out any of the information; we are transmitting it to +you as it was given to us and do not promise it is correct. +Also, this is not an endorsement of the people listed here. +We have no opinions and usually no information about the abilities of +any specific person. We provide this list to enable you to contact +service providers and decide for yourself whether to hire one. + +Before FSF will list your name in the GNU Service Directory, we ask +that you agree informally to the following terms: + +1. You will not restrict (except by copyleft) the use or distribution +of any software, documentation, or other information you supply anyone +in the course of modifying, extending, or supporting GNU software. +This includes any information specifically designed to ameliorate the +use of GNU software. + +2. You will not take advantage of contact made through the Service +Directory to advertise an unrelated business (e.g., sales of +non-GNU-related proprietary information). You may spontaneously +mention your availability for general consulting, but you should not +promote a specific unrelated business unless the client asks. + +** Please keep this file alphabetical ** + + +Giuseppe Attardi +Dipartimento di Informatica +Corso Italia 40 +I-56100 Pisa, ITALY ++39 (50) 510111 +Emacs: installation aid, question answering + +Revised: 3/24/89 + +Andrea Baldi + + ...!sun!delphi!abaldi + +DELPHI S.p.A. +Via della Vetraia 11 +I-55049 Viareggio, Italy +Tel: +39 (584) 395225 +Gnuemacs: installation and upgrading aid, answering, customization, + gnuemacs-X11 relationship. +Gcc: installation and upgrading aid. + +Rates: Free + +Entered: 3/1/89 + +Ian G Batten + <...!uunet!mcvax!ukc!fulcrum!igb> +One, Ditton Grove, Home: +44 21 476 3782 +Birmingham, Work: +44 21 771 2001 x5759 +B31 4RY, +England. + +Emacs: I will assist in porting, customising, extending, teaching and +trouble-shooting Emacs. I've recently been teaching it at new-user +level and am happy to do so for other people. + +Rates: 200 pounds/day, or less for non-profits. + +I had a large hand in the Sun "Emacstool" facility, and have been +involved in maintaining Emacs on Unix and VMS for three years now. +Prior to that I wrote a lot of extensions for Multics' Emacs. + +Revised: 3/1/89 + +Bard Bloom +NE43-301, 545 Technology Square, +Cambridge, Mass, 02139 +(617) 253-6097 + +Emacs: Installation, customization, answering questions, troubleshooting, + writing large programs and major modes. + +Experience: I have maintained GNU Emacs on the Theory Group computers + at MIT for several years, and done a good deal of GNU Emacs lisp + programming, including several major modes, and two database + interfaces. (I have written some 15,000 lines of GNU Emacs code.) + I am currently a Ph.D. student in Computer Science at MIT. + +Rates: $50/hr. + +Revised: 2/26/89 + +C2V +38, rue Mauconseil +75001 Paris +France +Renaud Dumeur +Jean-Daniel Fekete +Jean-Michel Casaubon +(1) 42 47 19 28 +Fax: (1) 40 22 06 10 +Emacs: questions answered, installation, teaching (all levels), elisp + and C extensions and customization, porting, troubleshooting +gcc: installation, extensions, porting +gdb: installation, debugging, porting +X11R3: installation, debugging, internationalization + +Experience: yes (ask for details) + +Rates: 500ff/hr, negotiable. + +Entered: 2/21/89 + +Stuart Cracraft +UUCP: +3021-B Harbor Blvd. +Costa Mesa, Ca. 92626 +(714) 458-7282 x510 weekdays +(714) 751-8744 other times +Emacs: questions answered, teaching, customization, troubleshooting, + but not porting. + +GNU Chess (developer): questions answered, porting, etc. + +Rates: $40/hr short term, $30/hr long term. + +EXPERIENCE: software researcher, systems programmer, Unix analyst + formerly with Stanford Research Institute, now + with Computer Consoles, Inc. +DEGREE: B.A. Behavioral Sciences, National University + +Entered: 5/17/86 + +Dario Dariol +DELPHI SpA +via della Vetraia 11 +I-55049 Viareggio +Italy ++39 (584) 395161 + +Rates and range of services not received. + +Entered: 3/25/86 + +Bradley N. Davis + +3242 South 540 West +Bountiful, UT 84010 +(801) 581-4375, (801) 292-4362 +Will work on most GNU software. +Services offered: Installation, porting, customizing, troubleshooting. +Fee: $20 to $50 / hour depending on job + +Entered 9/29/87 + +Alexander Dupuy + +280 Riverside Drive #10G +New York, NY 10025 +(212) 678-0130 +(212) 854-4290 (work) + +Gnu Compiler utilities: GNU Make, Bison, GAS, GCC, G++, libg++, etc.: + + Installation, porting, support for VAX, Sun-[234], Sun386i, some others + +Rates: $75/hr commercial orgs., free for worthy nonprofit orgs. + + I am currently a research programmer at the Columbia C.S. Dept., and + maintain and support the GNU compiler tools on 4 different machine + architectures. I can provide current, working versions of the compiler + tools for the VAX and all Sun architectures. + +Entered: 6/1/89 + +Dynamyx Coporation. +P.O. Box 1481 +King of Prussia, PA 19406 +(215) 265-6833 + +Services: Porting of all GNU software, Installation, Customization, and + Troubleshooting. (Unix, VMS, etc.) + +Rates: $50-$100/hr + +Experience: 5 years Unix application and systems programming. + 5 years compiler front-ends, interpreters, and + compiler-construction tools. + 3 years VMS applications. + X, C, and Ada experience. + +Entered: 2/21/89 + +Bruce Eckel +UUCP: {uw-beaver, sun, allegra, sb6, lbl-csam}!fluke!morgan +c/o John Fluke Mfg. Co., P.O. Box C9090 M/S 266D +Everett, WA 98206 (206) 356-6258 +Emacs: Training, Programming custom LISP functions. + +Rates: $25/hr. Credentials: BS Applied Physics, MS Computer Engineering. + +Entered: 1/23/86 + +Stephen Gildea +42 Carleton St +Cambridge MA 02142 ++1 617 253 7866 +Emacs: question answering, library writing, etc. + +Rates: $60/hr. + +Entered: 11/04/86 + +Ron Guilmette +UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg +Work: MCC - Experimental (parallel) Systems Kit Project + 3500 West Balcones Center Drive, Austin, TX 78759 + (512) 338-3740 +Home: 11008 Jollyville Road, #222 + Austin, TX 78759 + (512) 343-9042 +Categories: GCC, G++, Bison, GAS, LD, LD++ + +Entered: 2/21/89 + +Mike Haertel +St. Olaf College +Northfield, MN 55057 + +Experience: Unix Systems programmer at St. Olaf for several years. +Spent summer of 1988 at FSF writing and modifying various programs. + +Rates: $35/hr. + +Entered: 12 Aug 88 + +Paul Hudson <..!mcvax!ukc!acorn!moncam!paul> + +40 Dovehouse Close, +Ely, +Cambs, +CB7 4BY, +England. +(0353) 663381 ++44 (353) 663381 + +Installation of all GNU software. Support & changes to gcc, g++. Emacs +extensions. + +Degree in mathematics from Cambridge (UK!). + +Experience: I've written complete compilers & code +generators and a PostScript interpreter, and various graphics +programs. + +Rates: 25 pounds per hour, less for installation or non-profits. + +Entered: 2/21/89 + +Scott D. Kalter + +UCLA +Computer Science Department +3436 Boelter Hall +Los Angeles, CA 90024 + +Emacs: training for general use and customization + user support + e-lisp and C customization/extension + installation + troubleshooting + +Rates: $40/hr + +Qualifications: + BS Math/CS 1985: Carnegie Mellon University + MS CS 1988: UCLA + Modified Emacs in C and e-lisp for local extensions at several + sites. Taught Emacs use and customization in universities and + industry. Extensive troubleshooting and user support experience. + +Entered: 7 Dec 1988 + +Scott J. Kramer +2995 Woodside Road, Suite 400 +Woodside CA 94062 +(415) 961-0684 +Emacs: Tutoring, installations/upgrades, Lisp customizations, + general troubleshooting/support. Prefer that work I do + becomes part of the official Free Software Foundation + distribution. + +Rate: Task- and time-dependent; non-monetary offers considered. + +Entered: 11/05/86 + +Fen Labalme +Metaview Corp. +40 Carl St. #4 +San Francisco CA 94117 +(415) 731-1174 + +EMACS: Anything including teaching beginners / advanced users +UNIX: BSD 4.2 is what I have used most and best understand +I GROK: Mailers, network stuff, acronyms like RPC, NFS & IPC +X11.3: By the time you see this, I may understand X Windows +RATES: Free phone consultation; $100/hour plus; "Talk to me!" + Non-profits get lower rates or free; Barter considered +ETHICS: I require that (most) all software I create be available + for re-distribution as per the guidelines set by the + Free Software Foundation's General Public License. + +Revised: 3/13/89 + +Daniel LaLiberte + + +University of Illinois, Urbana-Champaign +Department of Computer Science +1304 W Springfield +Urbana, IL 61801 +217-333-2518 + +Emacs: Installation, some porting, troubleshooting. + Will do elisp extensions. + +Experience: I have extensive elisp programming experience. + I edited the GNU Emacs Lisp Reference Manual. + I've maintained Emacs for the UIUC CS Department + for three years. + +Rates: $30/hr + +Entered: 2/21/89 + +Dave Lawrence +76 1/2 13th St +Troy NY 12180 +(518) 273-5385 + +Services offered: GNU Emacs installation, lisp programming and + teaching for BSD and SYSV systems, particularly SUN. Programming + for GNUS newsreader and other outside processes are my specialty. + Installation of GNU C. + +Rates: free to non-profit organizations. + $30-40 hour for projects less than 8 hours projects. + $20 hour for longer projects. + Course fees negotiable with level of subject being taught. + Short queries answered free of charge. + +Qualifications: I'm "just a student", but don't let it disuade you. I + live in the GNU Emacs environment at least 6 hours of the average + day. While still learning the C code, I am proficient with the lisp + and can help customize as desired. + +Entered: 2/21/89 + +Jacob Levy +Dept of Computer Science +Weizmann Institute +Rehovot 76100 Israel +(+972)-8-482856 + +Services - + +Electronic, snail-mail and phone help with installation of GNU Emacs. +Will hand out on request source and local mods for GNU Emacs, as they +become available. Willing to help to maintain compatibility with +other/previous versions of Emacs, such as Gosling, CCA and MicroEmacs. +Preferable contact - through elec- tronic mail via BITNET. + +Rates - + +Free. Will only help as much as possible, not conflicting +with my main occupation in life, that of obtaining a Ph.D. + +Niall Mansfield +Vedelitz Systems +65 Oak Tree Avenue +Cambridge CB4 1AZ +England + +Emacs: installation, troubleshooting, customisation, extension +Rates: DM 57,00 per hour for less than a day, longer periods cheaper + +Entered: 3/17/89 + +Joachim Carlo Santos Martillo +1667 Cambridge St. #1 +Cambridge, MA 02138 +(617) 864-2312, (617) 470-2853, (617) 253-1300 + +Services offered: + +Terminal Capability Hacking (including mouses) for GnuEmacs, + +Teaching GnuEmacs (including Lisp), + +Custom Libraries, and + +Porting + +Fee: ~$40/hr. depending upon assignment. + +Resume available upon request. + +Entered: 2/22/86 + +Roland McGrath +(415) 652-3116 +692 60th Street, +Oakland, CA 94609 + +Installation and maintenance of all GNU software on Unix or VMS; +porting of GNU make, the GNU C library, or other small utilities (not +Emacs or the compiler). I can work part-time only. I am a student +doing volunteer programming for the Foundation. I am co-author and +present maintainer of GNU make, and author of the (as yet unreleased) +GNU C library. + +Entered: 2/21/89 + +Lee McLoughlin +Department of Computing, Imperial College, +180 Queens Gate, London. SW7 2BZ +01-589-5111 X 5028 + +EXPERIENCE: +I am responsible for putting GNU Emacs up under 4.1 BSD and for the +ports to the HLH Orion (and Orion 1/05) and the WhiteChapel MG-1. I +also developed and support the UK-UUCP and UK news distribution. +Ported X 10 to both the WhiteChapel MG-1 and HLH Orion. Ported X 11 +to the HLH Orion 1/05. I have been an invited speaker at several +recent UKUUG meetings. Helped, on the software side, in the setting +up of UKnet. Run a large Public Domain software archive. + +I am also an experienced Unix systems programmer. I've ported Unix to +a new machine (including porting PCC). Considerable compilers, +communications, mail and graphics experience. Hope to have enough +time in 89 to get all the UK-UUCP goodies into a gnu-uucp and to work +on porting gcc to the Clipper. + +SERVICES: +Porting gnuemacs and X. Installation and troubleshooting of any Gnu +and X software. + +RATES: +200-300 pounds a day, negotiable. General hand-holding free. + +NOTE: +Software archive contains all the current Gnu and X software. This is +available via Janet (the UK academic network), via uucp and I can be +talked into writing a tape, sun cartridge or exabyte. + +Revised: 2/26/89 + +Eric P. Meyer + +UUCP: {apple,uunet}!oracle!emeyer +Oracle Corp. +20 Davis Dr. +Belmont, CA 94002 +Work Phone: (415) 598 0000 +Home Phone: (415) 324 0944 + +I am very familliar in installing GNU Emacs, GNU GCC, GNU G++, libg++, +flex, bison, gawk, GNU grep, bin_utils... on UNIX and VMS systems. Also, +can deal with GNU X-related problems like Purdue Speedups for X servers +on SUNs. + +Rates: Free for Non-Profit Assoc. + $70/hr for companies. + +Entered: 2/21/89 + +Karl A. Nyberg +Grebyn Corporation +P. O. Box 497 {decuac,haven}!grebyn!karl +Vienna, VA 22183-0497 +703-281-2194 + +Emacs: installation aid, questions & answers, handholding, etc. + +Rates: negotiable. + +Can make TK50 cartridges for VAX/Ultrix. Timesharing also available for +those wishing to do development. + +Revised: 2/24/89 + +Optimal Solutions, Inc. +P.O. Box 45818 +Seattle, WA 98145 +(206) 682-1773 +Dennis Gentry +Tom May +Todd Cromwell + +Emacs: questions answered, teaching, customization, +troubleshooting, porting. Can install, port, and support VMS +Gnu Emacs, VMS gcc, Unix gcc and g++, and X Windows. + +Rates: $40-60/hr, 20 minute free initial consultation. +Non-profit/Educational discounts. + +Experience: Compiler, editor, and OS hacking, bit-twiddling, and +consulting at: the University of Washington, the Fred Hutchinson +Cancer Research Center, the National Science Foundation's Center +for Process Analytical Chemistry, Global Technology +International, others. + +Degrees: Honors B.S. Comp Sci, University of Washington; Summa +Cum Laude B.S. E.E., University of Washington. + +Revised: 2/26/89 + +The Pharos Group, Inc +Box 3546 +Las Cruces, NM 88003-3546 +(505) 525-2600 + +The pharos group offers consulting on the installation and +customization of gnu software, including gnu emacs, gnu cc and c++ and +the unix replacement utilities, on machines running unix. We have +members who are experienced in system administration, graphics, image +processing and networking. + +All modifications and extensions that we make to gnu software are +available freely. + +The best contacts for the pharos group are: + Ted Dunning (ted@pharos.com) + or + Jeff Harris (jeff@pharos.com) + +Entered: 2/21/89 + +Eric Raible +Nasa Ames Researh Center +Moffet Field, Ca +(415) 694-4320 + +Gnu emacs c and lisp programming; porting. General +unix/graphics/emacs hacking, especially on Silicon Graphics +workstations. + +Rates: free -> $30/hr depending on problem and how busy I am. + +Degree: MIT CS BS 1983. + +Entered 18 Dec 1987 + +Hedley K.J. Rainnie +UUCP: {uunet|ihnp4|allegra|harvard}!cmcl2!alaya!hedley + +545 West End Ave Apt 11E +NY NY 10024 +(212)-877-0181 (Home) or (212)-807-0303 (Work). +Emacs: + +Rates: $12/hr. + + I am able to help in all aspects of GNU emacs, even porting. + My credentials are: + + MS in Computer Science from NYU. BS same same. + I have used many versions of Emacs since 1980. + I ask for $12hr. + +Entered: 1/23/86 + +Adam J. Richter <...!ucbvax!monet!adamj> +2600 Ridge Road +Berkeley, CA 94709 (415)549-6356 + +Difficult X-windows ports. Freeware preferred. Also looking for +someone to sponsor server improvements, including reorganization and +optimizations for the GNU C Compiler's extensions. Experienced. + +Entered: 3/13/89 + +Bruce Robertson + +Hundred Acre Software +7305 Gemstone Drive +Reno, NV 89511 +(702) 852-3100 + +Rates: $60/hr long term, $40/hr short term + Non-profits are lower still, and negotiable + +Services: Anything to do with GNU software. My specialties include +porting Emacs, GCC and GDB to new environments. I also provide general +consulting services, in areas ranging from embedded systems to MS-DOS +applications. + +Experience: Many different areas. Unix internals (all flavors), +SCSI (target and initiator), embedded systems, X11, TCP/IP, compilers, +device driver tuning, hardware debugging. I'm particularly well +versed in all those niggling differences between System V and BSD. + +Revised: 5/2/89 + +Paul Rubin +UUCP: mit-eddie!mit-prep!phr +545 Technology Square room 703 +Cambridge, MA 02139 + +Emacs: installation, porting, customizing, macro writing, etc. I often + have a supply of manuals on hand (normal Foundation single copy prices). +Other GNU stuff: ask. +Rates: $45/hr, time permitting. + +I wrote the GNU C preprocessor, most of the Awk interpreter, and +various other utilities. I also co-produced (with Bob Chassell) the +printed copies of the Emacs manual that the Foundation sells. I +sometimes maintain Emacs on a gaggle of Vaxen at Berkeley. + +Entered: 11/13/86, updated 4/5/87 + +Isaac J. Salzman +The RAND Corporation - ISD/1 +1700 Main St. PO Box 2138 +Santa Monica, CA 90406-2138 ++1 213-393-0411 x6421 + +(UNIX ONLY!) +Emacs: Installation, customization, windows systems support (X10, X11, + SunView, NeWS), almost anything else. +GCC/G++: Installation, support. +X11: Installation, customization, support, some training, etc. All + available window managers, Andrew, InterViews. +Other: Consulting on - most GNUware, BSD UNIX IPC programming, most anything + that's BSD UNIX related. +Experience: 3.5+ years BSD UNIX systems programming (VAXen, Sun's) including + support of GNU Emacs. About 1.5+ years supporting X11, X10, gcc, + g++. Resume on request. +Rates: Negotiable on a per job basis. Probably $40/hr as a ballpark average. + +Entered: 2/21/89 + +Douglas C. Schmidt + +Department of Information and Computer Science +University of California, Irvine +Irvine, CA 92717 + +office: (714) 856-4043 +email: schmidt@ics.uci.edu + +GCC and G++: Installation and porting, question answering, customizing, etc. + +Experience: Wrote the GNU GPERF perfect hashing program, available from + the libg++ distribution , wrote the perfect hash functions that + recognize reserved words for G++ and GCC, contributed *many* bug + reports for GCC and G++ and also contributed bug fixes for + G++. In addition, I am actively building and maintaining a G++ + and GCC regression test suite (available on request). + +Rate: Negotiable + +Entered: 2/26/89 + +Randal L. Schwartz / Stonehenge Consulting Services / +1 503 777 0095 +Located in Beaverton, Oregon, USA (The Silicon RainForest...) +Electronic address variable (for now) ... call for the current one. +(I read and post to comp.emacs and gnu.emacs on USENET...) + +GNU Emacs: questions about general use, teaching, customization, + documentation, troubleshooting, porting, cute hacks (:-). + +Other GNU software: cross-trained on UN*X... proceed with caution... + +Experience: 17 years software development (one year with GNU Emacs), + 11 years technical communication (concurrent :-). + Also a C hacker and UN*X Guru... + +Rates: Free for short projects. Long projects may require money if + the project consumes significant billable time. + +Entered: 2/21/89 + +John Sechrest (hplabs!hp-pcd!orstcs!sechrest) +30606 Petersen Road +Corvallis, Oregon 97333 +(H) (503) 929-6278 +(W) (503) 754-3273 + +Emacs; User Support ; Tutorials/Training; System Consulting + +Rates: $50/hr, negotiable. + +I am willing to help people install and use both Gnu and Emacs. +I am particulary interested in installing Gnu on the National +ICM- 3216. + +As a consultant my normal fees are $50/hour. This is mostly +a guideline that varies on a case by case basis. + +I worked at Hewlett-Packard for four years. 2 years working +on the HP 41C extended I/O Rom. 2 years working on systems +support. For the last year and a half I have worked as the +Lab Coordinator for Oregon State University Computer Science +coordinating the use and maintenance of several machines. +I am most familiar with 4.2BSD on the vax 11/750 and +HP-UX on the HP series 200. + +Entered: 1/31/86 + +Steven C. Simmons +9353 Hidden Lake Circle +Dexter, MI. 48130 +313-426-8981 home +313-769-4086 office +Internet: scs@lokkur.dexter.mi.us +UUCP: ...!sharkey!lokkur!scs + +Gnu software: bison, flex, gcc, etc. Experience porting to BSD4.3 + Vaxes, Suns, Gould, some System V hosts. No MS-DOS. + +Rates: If all you need is a piece of source will gladly supply it + gratis if local call, at cost for long distance or tape (bring me a + blank). Can make std tar magtape or Sun cartridges. Advice is + free to a point. Compiling, porting, customizing: $65.00/hr plus + phone charges for offsite work, onsite rates negotiable. + +Professional Data: Currently administrator of a large UNIX shop in + Ann Arbor, MI. Maintain and support a variety of PD and + freely redistributable software on a variety of hosts. + +Entered: 5 June 1989 + +Lynn R. Slater +4433 Inyo Ct +Fremont Ca 94528. (415) 796-4149 +Emacs: Ada, X11, Lisp, interfaces to subordinate shell processes. + Prefer that work I do becomes part of the official Free + Software Foundation distribution. + +Rate: Free for good cause, otherwise task- and time-dependent. + +Entered: 2/21/89 + +Randall D. Smith +30 Newbern Street, Apartment 3 +Jamaica Plain, MA 02130, USA ++1 (617) 983-0276 + +Will work on most GNU software. +Installation, handholding, trouble shooting, extensions, teaching, +Gcc, Gdb, and GNU-emacs ports. + +Rates: Upward from 50.00/hour depending on my expertise in the area of the +job. GDB consulting at $100.00/hour. + +Experience: 4 years of intensive experience with Unix and C including +system hacking and modification. Experience in porting GNU-emacs (to +SGI Iris 4D) and Gcc (to use Sun fpa chip). Experience working +full-time for the GNU project on other GNU programs (current). Have +been in charge of the maintenance and extension of GDB for six months. +Resume available on request. + +Entered: 02/21/89 + +Richard M. Stallman +UUCP: {mit-eddie,ucbvax,uunet,harvard,uw-beaver}!prep.ai.mit.edu!rms +545 Tech Sq, rm 703 +Cambridge, MA 02139 +Emacs: anything whatever +Rates: $5/min or $200/hr. + +Is anyone interested in courses in using or extending GNU Emacs? + +Original inventor of Emacs and main author of GNU Emacs. + +Entered: 1/24/86 + +Jonathan Stone (uunet!vuwcomp!jonathan) + +Experience: + GNU Emacs:5 years on both Unix and VMS, in academic + and commercial environments: porting, user handholding, elisp programming, + termcap hacking, troubleshooting, VMS debugging. +GCC: 18 month gcc installation,use,bugfixing, porting + (gcc/gdb/almost gas port to Pyramid CPU; bootstrapped 1.22 on + vms, but not as nicely as Kashtan.) + +Fee: $NZ 130/hr + expenses; negotiable. + +Entered: 4 July 1989 + +Earl Stutes +223 Drakes Bay Ave. +Los Gatos, CA 95032 ++1 (408) 356 6841 + +Rate $3.00/min. or $90.00/hr. + +Installation and debug of all GNU software. +GNU emacs installation / troubleshooting. +emacs lisp programming. +20 years of programming experience. Working with UNIX for the +last 10 years. + +Entered: 31 May 1989 + +Bob Sutterfield + +work: home: +Ohio State University CIS Dept +2036 Neil Avenue 3542 Norwood Street +Columbus, Ohio 43210-1277 Columbus, Ohio 43224-3424 +(614)292-7348 (614)267-7611 + +Rates: $50/hr (negotiable) plus travel expenses + +Services: Installation, troubleshooting, and mild customization of + most GNU production and beta-test products; tutorials, + training, and handholding; general UNIX system and network + consulting. + +Entered: 2/21/89 + +Kayvan Sylvan + +Transact Software, Inc. +2672 Bayshore Parkway, Suite 700 +Mountain View, CA 94043 +Work: (415) 961-6112 +Home: (408) 733-2650 + +I will help you port, install and customize GNU Emacs, GCC, G++, bison, +and other GNU tools on almost any architecture and operating system. +Questions answered. GNU C and lisp hacking available. + +Rates: $30-$60/hour sliding scale. This is basically a flexible guideline. + +Experience: Many different Unix'es (2.9BSD to 4.3BSD, as well as AT&T System V +and Xenix) on many different machines. Systems programming and administration +on almost all these brands of Unix. Machines I've worked on include various +PDP's, VAXen, SUN workstations, Altos 386, Plexus P60, among others. +I can port anything to anything (within reason). + +Entered: 2/21/89 + +James W. Thompson +jthomp@sun.com +17601 Preson Road, #274 +Dallas, Tx. 75252 USA ++1 (214) 250-2131 + +EMACS/GDB: installation, porting, troubleshooting, hand holding. +Emacs elisp & C extensions and customization. + +EXPERIENCE: Have hacked many (10+) different architectures in C, lisp, +& Fortran. Thurough understanding of BSD networking/NFS/RPC. +Responsible for Convex port of GNU emacs, gdb, gcc. 8 years system +'mothering' experiance. Resume available on request. + +Rates: 30.00/hour + travel expenses. Free for non-profits. + +Revised: 3/6/89 + +Michael D. Tiemann + +Box #629 Crothers Memorial Hall +Stanford University +Stanford CA 94305 + +GNU C++: anything whatever +GNU CC: anything concerning ports I have worked on +Rates: negotiable + +Do you want to get people signed up to use C++ and/or GNU? + +Author of GNU C++. Author of several ports of GNU CC and GDB. + +Entered: 2/21/89 + +Leonard H. Tower Jr. +36 Porter Street +Somerville, MA 02143, USA ++1 (617) 623-7739 + +Will work on most GNU software. +Installation, handholding, trouble shooting, extensions, teaching. + +Rates: 40.00/hour + travel expenses. Negotiable for non-profits. + +Experience: Have hacked on over a dozen architectures in many languages. Have +system mothered several varieties of Unixes. Assisted rms with the front end +of gcc and it's back-end support. Resume available on request. + +Entered: 07/19/88 + +Jason Venner + +545 Pierce St. #2306 +Albany CA 94706 1046 +USA +415-525 2989 + +The only gnu software I do not work on are the compilers and the debuggers. +I have extensive experience with emacs (lisp and C) and C++ (via g++). +I have some experience with X, primarily V11R3 at the C level. +I have minimal experience with VMS. + +Rates: $100/hour for jobs < 8 hours (1 day), $70/hour for jobs +< 5 days, $60 for long term jobs, for all rate schedules expenses extra +Revised: 2/26/89 + +Scott Weikart (hplabs!cdp!scott) +EMACS: user handholding, elisp programming and troubleshooting, porting +1944c University +East Palo Alto, CA 94303 +(415) 322-9069 +I used ITS EMACS for 5 years and Gosling EMACS for 2 years +I've written thousands of lines of TECO and thousands of lines of mlisp +I've ported many programs to SysIII/SysV Unix +Sliding scale rates, barter possible, lower rates for non-profits + +Entered: 1/30/86 + +Chris Welty +RPI Computer Science Dept +Troy, NY 12180 +518-276-2816 + +Services: questions, installation, etc for all GNU programs, +especially emacs customization. Maintainer of the NYSERNet GNU src +distribution site, containing all GNU programs. Primarily knowledge of +Berkeley UNIX systems, especially Sun, but some limited expertise for +other systems. + +Rates: Free to NYSERNet members, others by arrangement (generally not +money but `Stingray' type barter...:) + +EMail correspondance preferred. + +Entered: 2/27/89 + +Pace Willisson +Blitz Product Development Corporation +6 Hudson Street +Somerville, MA 02143, USA +(617) 628-1593 + +Will work on any GNU software. + +Rates: $70.00/hour + +Experience: BS in Computer Science from MIT. 9 years working with C, Unix and +Lisp Machines including compilation systems, networks, device drivers, demand +paging systems, and boot programs. Ported GDB to 80386. Designed COFF +encapsulation scheme to run GNU linker output on System 5 kernels. Author +of Unix "ispell". + +Entered: 12/20/88 + diff --git a/etc/SUN-SUPPORT b/etc/SUN-SUPPORT new file mode 100644 index 0000000..7e578e0 --- /dev/null +++ b/etc/SUN-SUPPORT @@ -0,0 +1,210 @@ +NOTE: the Free Software Foundation agreed to put this file, and the +programs it describes, into the Emacs distribution ONLY on the +condition that we would not lift a finger to maintain them! We are +willing to *pass along* support for Sun windows, but we are not +willing to let it distract us from what we are trying to do. If you +have complaints or suggestions about Sun windows support, send them to +peck@sun.com, who is the maintainer. + + +The interface between GNU Emacs and Sun windows consists of the program +etc/emacstool, the Lisp programs lisp/sun-*.el and lisp/term/sun.el, +and the C source file src/sunfns.c. It is documented with a man page, +etc/emacstool.1. + +To enable use of these files and programs, define the configuration +switch HAVE_SUN_WINDOWS in src/config.h before compiling Emacs. +The definition of HAVE_SUN_WINDOWS must precede the #include m-sun3.h +or #include m-sun4.h. +If you must change PURESIZE, do so after the #include m-sun3.h + +This software is based on SunView for Sun UNIX 4.2 Release 3.2, +and will not work "as is" on previous releases, eg 3.0 or 3.1. + +Using Emacstool with GNU Emacs: + + The GNU Emacs files lisp/term/sun.el, lisp/sun-mouse.el, +lisp/sun-fns.el, and src/sunfns.c provide emacs support for the +Emacstool and function keys. If your terminal type is SUN (that is, +if your environment variable TERM is set to SUN), then Emacs will +automatically load the file lisp/term/sun.el. This, in turn, will +ensure that sun-mouse.el is autoloaded when any mouse events are +detected. It is suggested that sun-mouse and sun-fns be +included in your site-init.el file, so that they will always be loaded +when running on a Sun workstation. [Increase PURESIZE to 154000]. + + Support for the Sun function keys requires disconnecting the standard +Emacs command Meta-[. Therefore, the function keys are supported only +if you do (setq sun-esc-bracket t) in your .emacs file. + + The file src/sunfns.c defines several useful functions for emacs on +the Sun. Among these are procedures to pop-up SunView menus, put and +get from the SunView selection [STUFF] buffer, and a procedure for +changing the cursor icon. If you want to define cursor icons, try +using the functions in lisp/sun-cursors.el. + + The file lisp/sun-mouse.el includes a mass of software for defining +bindings for mouse events. Any function can be called or any form +evaluated as a result of a mouse event. If you want a pop-up menu, +your function can call sun-menu-evaluate. This will bring up a +SunView walking menu of your choice. + + Use the macro (defmenu menu-name &rest menu-items) to define menu +objects. Each menu item is a cons of ("string" . VALUE), VALUE is +evaluated when the string item is picked. If VALUE is a menu, then a +pullright item is created. + + This version also includes support for copying to and from the +sun-windows "stuff" selection. The keyboard bindings defined in +lisp/sun-fns.el let you move the current region to the "STUFF" +selection and vice versa. Just set point with the left button, set +mark with the middle button, (the region is automatically copied to +"STUFF") then switch to a shelltool, and "Stuff" will work. Going the +other way, the main right button menu contains a "Stuff Selection" +command that works just like in shelltool. [The Get and Put function +keys are also assigned to these functions, so you don't need the mouse +or even emacstool to make this work.] + + Until someone write code to read the textsw "Selection Shelf", it is +not possible to copy directly from a textsw to emacs, you must go through +the textsw "STUFF" selection. + + The Scroll-bar region is not a SunView scrollbar. It really should +be called the "Right-Margin" region. The scroll bar region is basically +the rightmost five columns (see documentation on variable scrollbar-width). +Mouse hits in this region can have special bindings, currently those binding +effect scrolling of the window, and so are refered to as the "Scroll-bar" +region. + + For information on what mouse bindings are in effect, use the command +M-x Describe-mouse-bindings, or the quick pop-up menu item "Mouse-Help". + + +GNU Emacs EXAMPLES: + See definitions in lisp/sun-fns.el for examples. + + You can redefine the cursor that is displayed in the emacs window. +On initialization, it is set to a right arrow. See lisp/sun-cursors.el +for additional cursors, how to define them, how to edit them. + +BUGS: + It takes a few milliseconds to create a menu before it pops up. +Someone who understands the GNU Garbage Collector might see if it +is possible for defmenu to create a SunView menu struct that does +not get destroyed by Garbage Collection. + + An outline of the files used to support Sun Windows and the mouse. + +etc/SUN-SUPPORT. + This document. + +etc/emacstool.1: + Added: an nroff'able man page for emacstool. + +etc/emacstool.c: + Encodes all the function keys internally, and passes non-window +system arguments to emacs. + +etc/emacs.icon: + The "Kitchen Sink" GNU Emacs icon. + +src/sunfns.c: + This contains the auxilary functions that allow elisp code to interact +with the sunwindows, selection, and menu functions. + +lisp/sun-mouse.el: + Defines the lisp function which is called when a mouse hit is found +in the input queue. This handler decodes the mouse hit via a keymap-like +structure sensitive to a particular window and where in the window the +hit occured (text-region, right-margin, mode-line). Three variables +are bound (*mouse-window* *mouse-x* *mouse-y*) and the selected function +is called. + See documentation on "define-mouse" or look at lisp/sun-fns.el +to see how this is done. + Defines two functions to pass between region and sun-selection + Defines functions for interfacing with the Menu. +During menu evaluation, the variables *menu-window* *menu-x* *menu-y* are bound. + +lisp/sun-fns.el + The definition of the default menu and mouse function bindings. + +lisp/sun-cursors.el + Defines a number of alternate cursors, and an editor for them. + The editor is also a demonstration of mouse/menu utilization. + +lisp/term/sun.el + Sets up the keymap to make the sun function keys do useful things. +Also includes the setup/initialization code for running under emacstool, +which makes "\C-Z" just close the emacstool window (-WI emacs.icon). + + Jeff Peck, Sun Microsystems, Inc + + +Subject: Making multi-line scrolling really work: + +In your .defaults file, include the line: +/Tty/Retained "Yes" +That way, the terminal emulator can do text moves using bitblt, +instead of repaint. + +If that's not enough for you, then tell unix and emacs that +the sun terminal supports multi-line and multi-character insert/delete. +Add this patch to your /etc/termcap file: + +*** /etc/termcap.~1~ Mon Sep 15 12:34:23 1986 +--- /etc/termcap Mon Feb 9 17:34:08 1987 +*************** +*** 32,39 **** +--- 32,40 ---- + Mu|sun|Sun Microsystems Workstation console:\ + :am:bs:km:mi:ms:pt:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:rs=\E[s:\ + :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\ ++ :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\ + :up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\ + :k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\ + :k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z: + M-|sun-nic|sune|Sun Microsystems Workstation console without insert character:\ + + +If you don't have the program "patch", just add the line: + :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\ + +casetek@crvax.sri.com says: + +Those of you using GNU Emacs on Sun workstations under +3.2 may be interested in reducing memory utilization in +the emacstool via the Sun toolmerge facility. The technique +is described in the Release 3.2 Manual starting on page +71. The following is a summary of how it would apply +to merging emacstool into the basetools. + +1) Change the main procedure declaration in emacstool.c to: + + #ifdef SUN_TOOLMERGE + emacstool_main (argc, argv); + #else + main (argc, argv) + #endif + + This will allow creation of either standard or toolmerge + versions. + +2) Copy emacstool.o into directory /usr/src/sun/suntool. +3) make CFLAGS="-g -DSUN_TOOLMERGE" emacstool.o +4) Add the following line to basetools.h + + "emacstool",emacstool_main, + +5) Add the following line to toolmerge.c. + + extern emacstool_main(); + +6) make basetools MOREOBJS="emacstool.o" +7) make install_bins + +To invoke the toolmerged version, you must exit suntools and +re-start it. Make sure that /usr/bin occurs before the directory +in which you installed the standard (non-toolmerged) version. + + diff --git a/etc/SUNBUG b/etc/SUNBUG new file mode 100644 index 0000000..da44eba --- /dev/null +++ b/etc/SUNBUG @@ -0,0 +1,41 @@ +From: coho!daveg (Dave Gagne) +Subject: Re: Problems with building emacs on SunOS 4.0 (EXPORT) +Summary: SunOS 4.0_Export "cc -Bstatic" don't work. +Organization: UBC Dept. of Electrical Engineering, Vancouver, Canada + +> Has anyone else seen similar problems? + +Yes indeed. Anyone who does not live in the jolly US of A. + + What you are encountering is a screw-up in SunOS 4.0_Export. This +problem only occurs in the "EXPORT" version of SunOS 4.0: ie the +software which Sun ships outside of the USA. The problem has something +to do with Sun not wanting to ship their DES chips outside of the good +'ole USA. What we poor foreigners get instead is some buggered up +software. + + What all this means is that "cc -Bstatic ..." WILL NOT WORK ON SUNOS +4.0 EXPORT without a little help from "ar". The static C-library is +/lib/libc.a, and this is where the problem occurs. There are a bunch of +.o files in there relating to DES stuff (des_crypt.o, des_soft.o, _crypt.o, +etc). All of them will case cc -Bstatic to die as you found with the +errors: + +> _edata: ld: user attempt to redefine loader-defined symbol +> _end: user attempt to redefine loader-defined symbol +> _etext: /lib/libc.a(des_crypt.o): multiply defined + + In order to make cc -Bstatic useful, you must remove all the +brain-damaged .o files from /lib/libc.a. To do this use + + ar d /lib/libc.a des_crypt.o des_soft.o _crypt.o .... + +(Make a backup of /lib/libc.a first, you may decide you need the "real" +thing someday). Note that there are a bunch of these files, I can't +remember all of them. You will find them quick enough by trying to +compile ANY C program, even one which does NOTHING. + + After you have done this, Emacs should compile OK. I was able to get +both the "normal" text version and the X-windows (X11R2) version to +compile OK. It seems to me that the Suntools version may not have worked, +but I may just be halucinating. diff --git a/etc/TERMS b/etc/TERMS new file mode 100644 index 0000000..a432563 --- /dev/null +++ b/etc/TERMS @@ -0,0 +1,222 @@ +This file describes what you must or might want to do to termcap entries +to make terminals work properly and efficiently with Emacs. Information +on likely problems with specific types of terminals appears at the end +of the file. + +*** What you want in a terminal *** + +Vital +1. Easy to compute suitable padding for. +2. Never ever sends ^S/^Q unless you type them, at least in one mode. + +Nice for speed +1. Supports insert/delete of multiple lines in one command. +2. Same for multiple characters, though doing them one by +one is usually fast enough except on emulators running on +machines with bitmap screens. + +Nice for usability +1. Considerably more than 24 lines. +2. Meta key (shift-like key that controls the 0200 bit +in every character you type). + +*** New termcap strings *** + +Emacs supports certain termcap strings that are not described in the +4.2 manual but appear to be standard in system V. The one exception +is `cS', which I invented. + +`AL' insert several lines. Takes one parameter, the number of + lines to be inserted. You specify how to send this parameter + using a %-construct, just like the cursor positions in the `cm' + string. + +`DL' delete several lines. One parameter. + +`IC' insert several characters. One parameter. + +`DC' delete several characters. One parameter. + +`rp' repeat a character. Takes two parameters, the character + to be repeated and the number of times to repeat it. + Most likely you will use `%.' for sending the character + to be repeated. Emacs interprets a padding spec with a * + as giving the amount of padding per repetition. + + WARNING: Many terminals have a command to repeat the + *last character output* N times. This means that the character + will appear N+1 times in a row when the command argument is N. + However, the `rp' string's parameter is the total number of + times wanted, not one less. Therefore, such repeat commands + may be used in an `rp' string only if you use Emacs's special + termcap operator `%a-c\001' to subtract 1 from the repeat count + before substituting it into the string. It is probably safe + to use this even though the Unix termcap does not accept it + because programs other than Emacs probably won't look for `rp' + anyway. + +`cs' set scroll region. Takes two parameters, the vertical + positions of the first line to include in the scroll region + and the last line to include in the scroll region. + Both parameters are origin-zero. The effect of this + should be to cause a following insert-line or delete-line + not to move lines below the bottom of the scroll region. + + This is not the same convention that Emacs version 16 used. + That is because I was led astray by unclear documentation + of the meaning of %i in termcap strings. Since the termcap + documentation for `cs' is also unclear, I had to deduce the + correct parameter conventions from what would make the VT-100's + `cs' string work properly. From an incorrect assumption about + %i, I reached an incorrect conclusion about `cs', but the result + worked correctly on the VT100 and ANSII terminals. In Emacs + version 17, both `cs' and %i work correctly. + + The version 16 convention was to pass, for the second parameter, + the line number of the first line beyond the end of the + scroll region. + +`cS' set scroll region. Differs from `cs' in taking parameters + differently. There are four parameters: + 1. Total number of lines on the screen. + 2. Number of lines above desired scroll region. + 3. Number of lines below (outside of) desired scroll region. + 4. Total number of lines on the screen, like #1. + This is because an Ambassador needs the parameters like this. + +`cr', `do', `le' + Emacs will not attempt to use ^M, ^J or ^H for cursor motion + unless these capabilities are present and say to use those + characters. + +`km' Says the terminal has a Meta key. + +Defining these strings is important for getting maximum performance +from your terminal. + +Make sure that the `ti' string sets all modes needed for editing +in Emacs. For example, if your terminal has a mode that controls +wrap at the end of the line, you must decide whether to specify +the `am' flag in the termcap entry; whichever you decide, the `ti' +string should contain commands to set the mode that way. +(Emacs also sends the `vs' string after the `ti' string. +You can put the mode-setting commands in either one of them.) + +*** Specific Terminal Types *** + +Watch out for termcap entries for Ann Arbor Ambassadors that +give too little padding for clear-screen. 7.2 msec per line is right. +These are the strings whose padding you probably should change: + :al=1*\E[L:dl=1*\E[M:cd=7.2*\E[J:cl=7.2*\E[H\E[J: +I have sometimes seen `\E[2J' at the front of the `ti' string; +this is a clear-screen, very slow, and it can cause you to get +Control-s sent by the terminal at startup. I recommend removing +the `\E[2J' from the `ti' string. +The `ti' or `vs' strings also usually need stuff added to them, such as + \E[>33;52;54h\E[>30;37;38;39l +You might want to add the following to the `te' or `ve' strings: + \E[>52l\E[>37h +The following additional capabilities will improve performance: + :AL=1*\E[%dL:DL=1*\E[%dM:IC=4\E[%d@:DC=4\E[%dP:rp=1*%.\E[%a-c\001%db: +If you find that the Meta key does not work, make sure that + :km: +is present in the termcap entry. + +Watch out for termcap entries for VT100's that fail to specify +the `sf' string, or that omit the padding needed for the `sf' and `sr' +strings (2msec per line affected). What you need is + :sf=2*^J:sr=2*\EM:cs=\E[%i%d;%dr: + +The Concept-100 and Concept-108 have many modes that `ti' strings +often fail to initialize. If you have problems on one of these +terminals, that is probably the place to fix them. These terminals +can support an `rp' string. + +Watch out on HP terminals for problems with standout disappearing on +part of the mode line. These problems are due to the absence of +:sg#0: which some HP terminals need. + +The vi55 is said to require `ip=2'. + +The Sun console should have these capabilities for good performance. + :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP: + +The vt220 needs to be set to vt220 mode, 7 bit, space parity +in order to work fully with TERM=vt220. + +If you are using a LAT terminal concentrator, you need to issue these +commands to turn off flow control: + + set port flow control disable + define port flow control disable + +On a PC, with terminal type AT386 or AT386-M, rumor has it that the +terminfo file that comes with the system has the `xt' capability, but +should not have it. + +You can get a copy of the terminfo "source" for at386 using the +command: `infocmp at386 >at386.tic'. Edit the file at386.tic and remove +the "xt" flag. Then compile the new entry with: `tic at386.tic'. + +Here is what watserv1!maytag!focsys!larry recommends for these terminals: + +# This copy of the terminfo description has been fixed. +# The suggestions came from a number of usenet postings. +# +# Intel AT/386 for color card with monochrome display +# +AT386-M|at386-m|386AT-M|386at-m|at/386 console, + am, bw, eo, xon, + cols#80, lines#25, + acsc=``a1fxgqh0jYk?lZm@nEooppqDrrsstCu4vAwBx3yyzz{{||}}~~, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, + clear=\E[2J\E[H, + cr=\r, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, + cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, + cup=\E[%i%p1%02d;%p2%02dH, cuu=\E[%p1%dA, cuu1=\E[A, + dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[1M, + ech=\E[%p1%dX,ed=\E[J, el=\E[K, el1=\E[1K\E[X, flash=^G, home=\E[H, + hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ich1=\E[1@, il=\E[%p1%dL, il1=\E[1L, + ind=\E[S, indn=\E[%p1%dS, invis=\E[9m, + is2=\E[0;10;38m, kbs=\b, kcbt=^], kclr=\E[2J, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kdch1=\E[P, kend=\E[Y, kf1=\EOP, kf10=\EOY, kf11=\EOZ, + kf12=\EOA, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, + kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, + kich1=\E[@, knp=\E[U, kpp=\E[V, krmir=\E0, rev=\E[7m, ri=\E[T, + rin=\E[%p1%dT, rmacs=\E[10m, rmso=\E[m, rmul=\E[m, + sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p9%t;12%;%?%p7%t;9%;m, + sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m, + +# +# AT&T 386 color console +# +AT386|at386|386AT|386at|at/386 console, + colors#8, ncv#3, pairs#64, + is2=\E[0;10;39m, + op=\E[0m, + setb=\E[%?%p1%{0}%=%t40m + %e%p1%{1}%=%t44m + %e%p1%{2}%=%t42m + %e%p1%{3}%=%t46m + %e%p1%{4}%=%t41m + %e%p1%{5}%=%t45m + %e%p1%{6}%=%t43m + %e%p1%{7}%=%t47m%;, + setf=\E[%?%p1%{0}%=%t30m + %e%p1%{1}%=%t34m + %e%p1%{2}%=%t32m + %e%p1%{3}%=%t36m + %e%p1%{4}%=%t31m + %e%p1%{5}%=%t35m + %e%p1%{6}%=%t33m + %e%p1%{6}%=%t33m + %e%p1%{7}%=%t37m%;, + use=at386-m, +# +# Color console version that supports underline but maps blue +# foreground color to cyan. +# +AT386-UL|at386-ul|386AT-UL|386at-ul|at/386 console, + is2=\E[0;10;38m, + use=at386, diff --git a/etc/TO-DO b/etc/TO-DO new file mode 100644 index 0000000..cc5b398 --- /dev/null +++ b/etc/TO-DO @@ -0,0 +1,26 @@ +Things useful to do for GNU Emacs: + +* Primitive for random access insertion of part of a file. + +* Making I/O streams for files, so that read and prin1 can + be used on files directly. The I/O stream itself would + serve as a function to read or write one character. + +* If a file you can't write is in a directory you can write, + make sure it works to modify and save this file. + +* Make dired's commands handle correctly the case where + ls has listed several subdirectories' contents. + It needs to be able to tell which directory each file + is really in, by searching backward for the line + which identifies the start of a directory. + +* Add more dired commands, such as sorting (use the + sort utility through call-process-region). + +* Make display.c record inverse-video-ness on + a character by character basis. Then make non-full-screen-width + mode lines inverse video, and display the marked location in + inverse video. + +* VMS code to list a file directory. Make dired work. diff --git a/etc/TUTORIAL b/etc/TUTORIAL new file mode 100644 index 0000000..9a4cf61 --- /dev/null +++ b/etc/TUTORIAL @@ -0,0 +1,804 @@ +Copyright (c) 1985 Free Software Foundation, Inc; See end for conditions. + +You are looking at the Emacs tutorial. + +Emacs commands generally involve the CONTROL key (sometimes labelled +CTRL or CTL) or the META key (sometimes labelled EDIT). Rather than +write out META or CONTROL each time we want you to prefix a character, +we'll use the following abbreviations: + + C- means hold the CONTROL key while typing the character + Thus, C-f would be: hold the CONTROL key and type f. + M- means hold the META or EDIT key down while typing . + If there is no META or EDIT key, type , release it, + then type the character . "" stands for the + key labelled "ALT" or "ESC". + +Important note: to end the Emacs session, type C-x C-c. (Two characters.) +The characters ">>" at the left margin indicate directions for you to +try using a command. For instance: +<> +>> Now type C-v (View next screen) to move to the next screen. + (go ahead, do it by depressing the control key and v together). + From now on, you'll be expected to do this whenever you finish + reading the screen. + +Note that there is an overlap when going from screen to screen; this +provides some continuity when moving through the file. + +The first thing that you need to know is how to move around from +place to place in the file. You already know how to move forward a +screen, with C-v. To move backwards a screen, type M-v (depress the +META key and type v, or type v if you don't have a META or EDIT +key). + +>> Try typing M-v and then C-v to move back and forth a few times. + + +SUMMARY +------- + +The following commands are useful for viewing screenfuls: + + C-v Move forward one screenful + M-v Move backward one screenful + C-l Clear screen and redisplay everything + putting the text near the cursor at the center. + (That's control-L, not control-1. + There is no such character as control-1.) + +>> Find the cursor and remember what text is near it. + Then type a C-l. + Find the cursor again and see what text is near it now. + + +BASIC CURSOR CONTROL +-------------------- + +Getting from screenful to screenful is useful, but how do you +reposition yourself within a given screen to a specific place? +There are several ways you can do this. One way (not the best, but +the most basic) is to use the commands previous, backward, forward +and next. As you can imagine these commands (which are given to +Emacs as C-p, C-b, C-f, and C-n respectively) move the cursor from +where it currently is to a new place in the given direction. Here, +in a more graphical form are the commands: + + Previous line, C-p + : + : + Backward, C-b .... Current cursor position .... Forward, C-f + : + : + Next line, C-n + +>> Move the cursor to the line in the middle of that diagram + and type C-l to see the whole diagram centered in the screen. + +You'll probably find it easy to think of these by letter. P for +previous, N for next, B for backward and F for forward. These are +the basic cursor positioning commands and you'll be using them ALL +the time so it would be of great benefit if you learn them now. + +>> Do a few C-n's to bring the cursor down to this line. + +>> Move into the line with C-f's and then up with C-p's. + See what C-p does when the cursor is in the middle of the line. + +Lines are separated by Newline characters. For most applications +there should normally be a Newline character at the end of the text, +as well, but it is up to you to make sure of this. A file can +validly exist without a Newline at the end. + +>> Try to C-b at the beginning of a line. Do a few more C-b's. + Then do C-f's back to the end of the line and beyond. + +When you go off the top or bottom of the screen, the text beyond +the edge is shifted onto the screen so that your instructions can +be carried out while keeping the cursor on the screen. + +>> Try to move the cursor off the bottom of the screen with C-n and + see what happens. + +If moving by characters is too slow, you can move by words. M-f +(Meta-f) moves forward a word and M-b moves back a word. + +>> Type a few M-f's and M-b's. Intersperse them with C-f's and C-b's. + +Notice the parallel between C-f and C-b on the one hand, and M-f and +M-b on the other hand. Very often Meta characters are used for +operations related to English text whereas Control characters operate +on the basic textual units that are independent of what you are +editing (characters, lines, etc). There is a similar parallel between +lines and sentences: C-a and C-e move to the beginning or end of a +line, and M-a and M-e move to the beginning or end of a sentence. + +>> Try a couple of C-a's, and then a couple of C-e's. + Try a couple of M-a's, and then a couple of M-e's. + +See how repeated C-a's do nothing, but repeated M-a's keep moving +farther. Do you think that this is right? + +Two other simple cursor motion commands are M-< (Meta Less-than), +which moves to the beginning of the file, and M-> (Meta Greater-than), +which moves to the end of the file. You probably don't need to try +them, since finding this spot again will be boring. On most terminals +the "<" is above the comma and you must use the shift key to type it. +On these terminals you must use the shift key to type M-< also; +without the shift key, you would be typing M-comma. + +The location of the cursor in the text is also called "point". To +paraphrase, the cursor shows on the screen where point is located in +the text. + +Here is a summary of simple moving operations including the word and +sentence moving commands: + + C-f Move forward a character + C-b Move backward a character + + M-f Move forward a word + M-b Move backward a word + + C-n Move to next line + C-p Move to previous line + + C-a Move to beginning of line + C-e Move to end of line + + M-a Move back to beginning of sentence + M-e Move forward to end of sentence + + M-< Go to beginning of file + M-> Go to end of file + +>> Try all of these commands now a few times for practice. + Since the last two will take you away from this screen, + you can come back here with M-v's and C-v's. These are + the most often used commands. + +Like all other commands in Emacs, these commands can be given +arguments which cause them to be executed repeatedly. The way you +give a command a repeat count is by typing C-u and then the digits +before you type the command. If you have a META or EDIT key, you can +omit the C-u if you hold down the META or EDIT key while you type the +digits. This is easier, but we recommend the C-u method because it +works on any terminal. + +For instance, C-u 8 C-f moves forward eight characters. + +>> Try giving a suitable argument to C-n or C-p to come as close + as you can to this line in one jump. + +The only apparent exception to this is the screen moving commands, +C-v and M-v. When given an argument, they scroll the screen up or +down by that many lines, rather than screenfuls. This proves to be +much more useful. + +>> Try typing C-u 8 C-v now. + +Did it scroll the screen up by 8 lines? If you would like to +scroll it down you can give an argument to M-v. + + +WHEN EMACS IS HUNG +----------------- + +If Emacs gets into an infinite (or simply very long) computation which +you don't want to finish, you can stop it safely by typing C-g. +You can also use C-g to discard a numeric argument or the beginning of +a command that you don't want to finish. + +>> Type C-u 100 to make a numeric arg of 100, then type C-g. + Now type C-f. How many characters does it move? + If you have typed an by mistake, you can get rid of it + with a C-g. + +If you type , you get a new window appearing on +the screen, telling you that M-ESC is a "disabled command" +and asking whether you really want to execute it. The command +M-ESC is marked as disabled because you probably don't want to +use it until you know more about Emacs, and we expect it would +confuse you if it were allowed to go ahead and run. If you really +want to try the M-ESC command, you could type a Space in answer +to the question and M-ESC would go ahead. Normally, if you do +not want to execute M-ESC, you would type "n" to answer the question. + +>> Type , then type n. + + +WINDOWS +------- + +Emacs can have several windows, each displaying its own text. +At this stage it is better not to go into the techniques of +using multiple windows. But you do need to know how to get +rid of extra windows that may appear to display help or +output from certain commands. It is simple: + + C-x 1 One window (i.e., kill all other windows). + +That is Control-x followed by the digit 1. +C-x 1 makes the window which the cursor is in become +the full screen, by getting rid of any other windows. + +>> Move the cursor to this line and type C-u 0 C-l. +>> Type Control-h k Control-f. + See how this window shrinks, while a new one appears + to display documentation on the Control-f command. + +>> Type C-x 1 and see the documentation listing window disappear. + + +INSERTING AND DELETING +---------------------- + +If you want to insert text, just type it. Characters which you can +see, such as A, 7, *, etc. are taken by Emacs as text and inserted +immediately. Type (the carriage-return key) to insert a +Newline character. + +You can delete the last character you typed by typing . + is a key on the keyboard, which might be labelled "Delete" +instead of "Rubout" on some terminals. More generally, +deletes the character immediately before the current cursor position. + +>> Do this now, type a few characters and then delete them + by typing a few times. Don't worry about this file + being changed; you won't affect the master tutorial. This is just + a copy of it. + +>> Now start typing text until you reach the right margin, and keep + typing. When a line of text gets too big for one line on the + screen, the line of text is "continued" onto a second screen line. + The backslash at the right margin indicates a line which has + been continued. +>> Use s to delete the text until the line fits on one screen + line again. The continuation line goes away. + +>> Move the cursor to the beginning of a line and type . This + deletes the newline before the line and merges the line onto + the previous line. The resulting line may be too long to fit, in + which case it has a continuation line. +>> Type to reinsert the Newline you deleted. + +Remember that most Emacs commands can be given a repeat count; +this includes characters which insert themselves. + +>> Try that now -- type C-u 8 * and see what happens. + +You've now learned the most basic way of typing something in +Emacs and correcting errors. You can delete by words or lines +as well. Here is a summary of the delete operations: + + delete the character just before the cursor + C-d delete the next character after the cursor + + M- kill the word immediately before the cursor + M-d kill the next word after the cursor + + C-k kill from the cursor position to end of line + M-k kill to the end of the current sentence + +Notice that and C-d vs M- and M-d extend the parallel +started by C-f and M-f (well, isn't really a control +character, but let's not worry about that). C-k and M-k are like C-e +and M-e, sort of, in that lines are opposite sentences. + +Now suppose you kill something, and then you decide that you want to +get it back? Well, whenever you kill something bigger than a +character, Emacs saves it for you. To yank it back, use C-y. You +can kill text in one place, move elsewhere, and then do C-y; this is +a good way to move text around. Note that the difference +between "Killing" and "Deleting" something is that "Killed" things +can be yanked back, and "Deleted" things cannot. Generally, the +commands that can destroy a lot of text save it, while the ones that +attack only one character, or nothing but blank lines and spaces, do +not save. + +For instance, type C-n a couple times to postion the cursor +at some line on this screen. + +>> Do this now, move the cursor and kill that line with C-k. + +Note that a single C-k kills the contents of the line, and a second +C-k kills the line itself, and make all the other lines move up. If +you give C-k a repeat count, it kills that many lines AND their +contents. + +The text that has just disappeared is saved so that you can +retrieve it. To retrieve the last killed text and put it where +the cursor currently is, type C-y. + +>> Try it; type C-y to yank the text back. + +Think of C-y as if you were yanking something back that someone +took away from you. Notice that if you do several C-k's in a row +the text that is killed is all saved together so that one C-y will +yank all of the lines. + +>> Do this now, type C-k several times. + +Now to retrieve that killed text: + +>> Type C-y. Then move the cursor down a few lines and type C-y + again. You now see how to copy some text. + +What do you do if you have some text you want to yank back, and then +you kill something else? C-y would yank the more recent kill. But +the previous text is not lost. You can get back to it using the M-y +command. After you have done C-y to get the most recent kill, typing +M-Y replaces that yanked text with the previous kill. Typing M-y +again and again brings in earlier and earlier kills. When you +have reached the text you are looking for, you can just go away and +leave it there. If you M-y enough times, you come back to the +starting point (the most recent kill). + +>> Kill a line, move around, kill another line. + Then do C-y to get back the second killed line. + Then do M-y and it will be replaced by the first killed line. + Do more M-y's and see what you get. Keep doing them until + the second kill line comes back, and then a few more. + If you like, you can try giving M-y positive and negative + arguments. + + +UNDO +---- + +Any time you make a change to the text and wish you had not done so, +you can undo the change (return the text to its previous state) +with the undo command, C-x u. Normally, C-x u undoes one command's +worth of changes; if you repeat the C-x u several times in a row, +each time undoes one more command. There are two exceptions: +commands that made no change (just moved the cursor) do not count, +and self-inserting characters are often lumped together in groups +of up to 20. This is to reduce the number of C-x u's you have to type. + +>> Kill this line with C-k, then type C-x u and it should reappear. + +C-_ is another command for undoing; it is just the same as C-x u +but easier to type several times in a row. The problem with C-_ is +that on some keyboards it is not obvious how to type it. That is +why C-x u is provided as well. On some DEC terminals, you can type +C-_ by typing / while holding down CTRL. Illogical, but what can +you expect from DEC? + +Giving a numeric argument to C-_ or C-x u is equivalent to repeating +it as many times as the argument says. + + +FILES +----- + +In order to make the text you edit permanent, you must put it in a +file. Otherwise, it will go away when your invocation of Emacs goes +away. You put your editing in a file by "finding" the file. What +finding means is that you see the contents of the file in your Emacs; +and, loosely speaking, what you are editing is the file itself. +However, the changes still don't become permanent until you "save" the +file. This is so you can have control to avoid leaving a half-changed +file around when you don't want to. Even then, Emacs leaves the +original file under a changed name in case your changes turn out +to be a mistake. + +If you look near the bottom of the screen you will see a line that +begins and ends with dashes, and contains the string "Emacs: TUTORIAL". +Your copy of the Emacs tutorial is called "TUTORIAL". Whatever +file you find, that file's name will appear in that precise +spot. + +The commands for finding and saving files are unlike the other +commands you have learned in that they consist of two characters. +They both start with the character Control-x. There is a whole series +of commands that start with Control-x; many of them have to do with +files, buffers, and related things, and all of them consist of +Control-x followed by some other character. + +Another thing about the command for finding a file is that you have +to say what file name you want. We say the command "reads an argument +from the terminal" (in this case, the argument is the name of the +file). After you type the command + + C-x C-f Find a file + +Emacs asks you to type the file name. It echoes on the bottom +line of the screen. You are using the minibuffer now! this is +what the minibuffer is for. When you type to end the +file name, the minibuffer is no longer needed, so it disappears. + +>> Type C-x C-f, then type C-g. This cancels the minibuffer, + and also cancels the C-x C-f command that was using the + minibuffer. So you do not find any file. + +In a little while the file contents appear on the screen. You can +edit the contents. When you wish to make the changes permanent, +issue the command + + C-x C-s Save the file + +The contents of Emacs are written into the file. The first time you +do this, the original file is renamed to a new name so that it +is not lost. The new name is made by appending "~" to the end +of the original file's name. + +When saving is finished, Emacs prints the name of the file written. +You should save fairly often, so that you will not lose very much +work if the system should crash. + +>> Type C-x C-s, saving your copy of the tutorial. + This should print "Wrote .../TUTORIAL" at the bottom of the screen. + On VMS it will print "Wrote ...[...]TUTORIAL." + +To make a new file, just find it "as if" it already existed. Then +start typing in the text. When you ask to "save" the file, Emacs +will really create the file with the text that you have inserted. +From then on, you can consider yourself to be editing an already +existing file. + + +BUFFERS +------- + +If you find a second file with C-x C-f, the first file remains +inside Emacs. You can switch back to it by finding it again with +C-x C-f. This way you can get quite a number of files inside Emacs. + +The object inside Emacs which holds the text read from one file +is called a "buffer." Finding a file makes a new buffer inside Emacs. +To see a list of the buffers that exist in Emacs, type + + C-x C-b List buffers + +>> Try C-x C-b now. + +See how each buffer has a name, and it may also have a file name +for the file whose contents it holds. Some buffers do not correspond +to files. For example, the buffer named "*Buffer List*" does +not have any file. It is the buffer which contains the buffer +list that was made by C-x C-b. ANY text you see in an Emacs window +has to be in some buffer. + +>> Type C-x 1 to get rid of the buffer list. + +If you make changes to the text of one file, then find another file, +this does not save the first file. Its changes remain inside Emacs, +in that file's buffer. The creation or editing of the second file's +buffer has no effect on the first file's buffer. This is very useful, +but it also means that you need a convenient way to save the first +file's buffer. It would be a nuisance to have to switch back to +it with C-x C-f in order to save it with C-x C-s. So we have + + C-x s Save some buffers + +C-x s goes through the list of all the buffers you have +and finds the ones that contain files you have changed. +For each such buffer, C-x s asks you whether to save it. + + +EXTENDING THE COMMAND SET +------------------------- + +There are many, many more Emacs commands than could possibly be put +on all the control and meta characters. Emacs gets around this with +the X (eXtend) command. This comes in two flavors: + + C-x Character eXtend. Followed by one character. + M-x Named command eXtend. Followed by a long name. + +These are commands that are generally useful but used less than the +commands you have already learned about. You have already seen two +of them: the file commands C-x C-f to Find and C-x C-s to Save. +Another example is the command to tell Emacs that you'd like to stop +editing and get rid of Emacs. The command to do this is C-x C-c. +(Don't worry; it offers to save each changed file before it kills the +Emacs.) + +C-z is the usual way to exit Emacs, because it is always better not to +kill the Emacs if you are going to do any more editing. On systems +which allow it, C-z exits from Emacs to the shell but does not destroy +the Emacs; if you use the C shell, you can resume Emacs with the `fg' +command (or, more generally, with `%emacs', which works even if your +most recent job was some other). On systems where suspending is not +possible, C-z creates a subshell running under Emacs to give you the +chance to run other programs and return to Emacs afterward, but it +does not truly "exit" from Emacs. In this case, the shell command +`exit' is the usual way to get back to Emacs from the subshell. + +You would use C-x C-c if you were about to log out. You would +also use it to exit an Emacs invoked under mail handling programs +and other random utilities, since they may not believe you have +really finished using the Emacs if it continues to exist. + +There are many C-x commands. The ones you know are: + + C-x C-f Find file. + C-x C-s Save file. + C-x C-b List buffers. + C-x C-c Quit Emacs. + C-x u Undo. + +Named eXtended commands are commands which are used even less +frequently, or commands which are used only in certain modes. These +commands are usually called "functions". An example is the function +replace-string, which globally replaces one string with another. When +you type M-x, Emacs prompts you at the bottom of the screen with +M-x and you should type the name of the function you wish to call; in +this case, "replace-string". Just type "repl s" and Emacs will +complete the name. End the command name with . +Then type the two "arguments"--the string to be replaced, and the string +to replace it with--each one ended with a Return. + +>> Move the cursor to the blank line two lines below this one. + Then type M-x repl schangedaltered. + + Notice how this line has changed: you've replaced + the word c-h-a-n-g-e-d with "altered" wherever it occured + after the cursor. + + +MODE LINE +--------- + +If Emacs sees that you are typing commands slowly it shows them to you +at the bottom of the screen in an area called the "echo area." The echo +area contains the bottom line of the screen. The line immediately above +it is called the MODE LINE. The mode line says something like + +--**--Emacs: TUTORIAL (Fundamental)----58%------------- + +This is a very useful "information" line. + +You already know what the filename means--it is the file you have +found. What the --NN%-- means is that NN percent of the file is +above the top of the screen. If the top of the file is on the screen, +it will say --TOP-- instead of --00%--. If the bottom of the file is +on the screen, it will say --BOT--. If you are looking at a file so +small it all fits on the screen, it says --ALL--. + +The stars near the front mean that you have made changes to the text. +Right after you visit or save a file, there are no stars, just dashes. + +The part of the mode line inside the parentheses is to tell you what +modes you are in. The default mode is Fundamental which is what you +are in now. It is an example of a "major mode". There are several +major modes in Emacs for editing different languages and text, such as +Lisp mode, Text mode, etc. At any time one and only one major mode is +active, and its name can always be found in the mode line just where +"Fundamental" is now. Each major mode makes a few commands behave +differently. For example, there are commands for creating comments in +a program, and since each programming language has a different idea of +what a comment should look like, each major mode has to insert +comments differently. Each major mode is the name of an extended +command, which is how you get into the mode. For example, +M-X fundamental-mode is how to get into Fundamental mode. + +If you are going to be editing English text, such as this file, you +should probably use Text Mode. +>> Type M-x text-mode. + +Don't worry, none of the commands you have learned changes Emacs in +any great way. But you can now observe that periods are no longer +part of words when you do M-f or M-b! Major modes are usually like +that: commands don't change into completely unrelated things, but they +work a little bit differently. + +To get documentation on your current major mode, type C-h m. + +>> Use C-u C-v once or more to bring this line near the top of screen. +>> Type C-h m, to see how Text mode differs from Fundamental mode. +>> Type C-x 1 to remove the documentation from the screen. + +Major modes are called major because there are also minor modes. +They are called minor because they aren't alternatives to the major +modes, just minor modifications of them. Each minor mode can be +turned on or off by itself, regardless of what major mode you are in, +and regardless of the other minor modes. So you can use no minor +modes, or one minor mode, or any combination of several minor modes. + +One minor mode which is very useful, especially for editing English +text, is Auto Fill mode. When this mode is on, Emacs breaks the line +in between words automatically whenever the line gets too long. You +can turn this mode on by doing M-x auto-fill-mode. When the +mode is on, you can turn it off by doing M-x auto-fill-mode. +If the mode is off, this function turns it on, and if the mode is on, +this function turns it off. This is called "toggling". + +>> Type M-x auto-fill-mode now. Then insert a line of "asdf " + over again until you see it divide into two lines. You must put in + spaces between them because Auto Fill breaks lines only at spaces. + +The margin is usually set at 70 characters, but you can change it +with the C-x f command. You should give the margin setting you want +as a numeric argument. + +>> Type C-x f with an argument of 20. (C-u 2 0 C-x f). + Then type in some text and see Emacs fill lines of 20 + characters with it. Then set the margin back to 70 using + C-x f again. + +If you makes changes in the middle of a paragraph, Auto Fill mode +does not re-fill it for you. +To re-fill the paragraph, type M-q (Meta-q) with the cursor inside +that paragraph. + +>> Move the cursor into the previous paragraph and type M-q. + +SEARCHING +--------- + +Emacs can do searches for strings (these are groups of contiguous +characters or words) either forward through the file or backward +through it. To search for the string means that you are trying to +locate it somewhere in the file and have Emacs show you where the +occurrences of the string exist. This type of search is somewhat +different from what you may be familiar with. It is a search that is +performed as you type in the thing to search for. The command to +initiate a search is C-s for forward search, and C-r for reverse +search. BUT WAIT! Don't do them now. When you type C-s you'll +notice that the string "I-search" appears as a prompt in the echo +area. This tells you that Emacs is in what is called an incremental +search waiting for you to type the thing that you want to search for. + terminates a search. + +>> Now type C-s to start a search. SLOWLY, one letter at a time, + type the word 'cursor', pausing after you type each + character to notice what happens to the cursor. +>> Type C-s to find the next occurrence of "cursor". +>> Now type four times and see how the cursor moves. +>> Type to terminate the search. + +Did you see what happened? Emacs, in an incremental search, tries to +go to the occurrence of the string that you've typed out so far. To go +to the next occurrence of 'cursor' just type C-s again. If no such +occurrence exists Emacs beeps and tells you that it is a failing +search. C-g would also terminate the search. + +If you are in the middle of an incremental search and type , +you'll notice that the last character in the search string is erased +and the search backs up to the last place of the search. For +instance, suppose you currently have typed 'cu' and you see that your +cursor is at the first occurrence of 'cu'. If you now type , +the 'u' on the search line is erased and you'll be repositioned in the +text to the occurrence of 'c' where the search took you before you +typed the 'u'. This provides a useful means for backing up while you +are searching. + +If you are in the middle of a search and happen to type a control +character (other than a C-s or C-r, which tell Emacs to search for the +next occurrence of the string), the search is terminated. + +The C-s starts a search that looks for any occurrence of the search +string AFTER the current cursor position. But what if you want to +search for something earlier in the text? To do this, type C-r for +Reverse search. Everything that applies to C-s applies to C-r except +that the direction of the search is reversed. + + +RECURSIVE EDITING LEVELS +------------------------ + +Sometimes you will get into what is called a "recursive editing +level". This is indicated by square brackets in the mode line, +surrounding the parentheses around the major mode name. For +example, you might see [(Fundamental)] instead of (Fundamental). + +To get out of the recursive editing level, type + M-x top-level. + +>> Try that now; it should display "Back to top level" + at the bottom of the screen. + +In fact, you were ALREADY at top level (not inside a recursive editing +level) if you have obeyed instructions. M-x top-level does not care; +it gets out of any number of recursive editing levels, perhaps zero, +to get back to top level. + +You can't use C-g to get out of a recursive editing level because C-g +is used for discarding numeric arguments and partially typed commands +WITHIN the recursive editing level. + + +GETTING MORE HELP +----------------- + +In this tutorial we have tried to supply just enough information to +get you started using Emacs. There is so much available in Emacs that +it would be impossible to explain it all here. However, you may want +to learn more about Emacs since it has numerous desirable features +that you don't know about yet. Emacs has a great deal of internal +documentation. All of these commands can be accessed through +the character Control-h, which we call "the Help character" +because of the function it serves. + +To use the HELP features, type the C-h character, and then a +character saying what kind of help you want. If you are REALLY lost, +type C-h ? and Emacs will tell you what kinds of help it can give. +If you have typed C-h and decide you don't want any help, just +type C-G to cancel it. + +The most basic HELP feature is C-h c. Type C-h, a c, and a +command character or sequence, and Emacs displays a very brief +description of the command. + +>> Type C-h c Control-p. + The message should be something like + + C-p runs the command previous-line + +This tells you the "name of the function". That is important in +writing Lisp code to extend Emacs; it also is enough to remind +you of what the command does if you have seen it before but did +not remember. + +Multi-character commands such as C-x C-s and (if you have no META or +EDIT key) v are also allowed after C-h c. + +To get more information on the command, use C-h k instead of C-h c. + +>> Type C-h k Control-p. + +This displays the documentation of the function, as well as its name, +in an Emacs window. When you are finished reading the output, type +C-x 1 to get rid of the help text. You do not have to do this right +away. You can do some editing based on the help text before you type +C-x 1. + +Here are some other useful C-h options: + + C-h f Describe a function. You type in the name of the + function. + +>> Try typing C-h f previous-line. + This prints all the information Emacs has about the + function which implements the C-P command. + + C-h a Command Apropos. Type in a keyword and Emacs will list + all the commands whose names contain that keyword. + These commands can all be invoked with Meta-x. + For some commands, Command Apropos will also list a one + or two character sequence which has the same effect. + +>> Type C-h a file. You will see a list of all M-x commands +with "file" in their names. You will also see commands +like C-x C-f and C-x C-w, listed beside the command names +find-file and write-file. + + +CONCLUSION +---------- + +Remember, to exit Emacs permanently use C-x C-c. To exit to a shell +temporarily, so that you can come back in, use C-z. + +This tutorial is meant to be understandable to all new users, so if +you found something unclear, don't sit and blame yourself - complain! + + +COPYING +------- + +This tutorial descends from a long line of Emacs tutorials +starting with the one written by Stuart Cracraft for the original Emacs. + +This version of the tutorial, like GNU Emacs, is copyrighted, and +comes with permission to distribute copies on certain conditions: + +Copyright (c) 1985 Free Software Foundation + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and permission notice are preserved, + and that the distributor grants the recipient permission + for further redistribution as permitted by this notice. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last altered them. + +The conditions for copying Emacs itself are slightly different +but in the same spirit. Please read the file COPYING and then +do give copies of GNU Emacs to your friends. +Help stamp out software obstructionism ("ownership") by using, +writing, and sharing free software! diff --git a/etc/XDOC b/etc/XDOC new file mode 100644 index 0000000..a8a3632 --- /dev/null +++ b/etc/XDOC @@ -0,0 +1,461 @@ +BABYL OPTIONS: +Version: 5 +Labels: +Note: This is the header of an rmail file. +Note: If you are seeing it in rmail, +Note: it means the file has no messages in it. + +1,, +Received: from ATHENA (ATHENA.MIT.EDU) by prep; Thu, 19 Dec 85 23:09:34 est +Received: from PARIS (PARIS.MIT.EDU) by ATHENA (4.12/4.7) + id AA02786; Thu, 19 Dec 85 23:07:35 est +From: martillo@ATHENA.MIT.EDU (Yakim Martillo) +Received: by PARIS (5.15/4.7) + id AA24170; Thu, 19 Dec 85 23:07:36 EST +Date: Thu, 19 Dec 85 23:07:36 EST +Message-Id: <8512200407.AA24170@PARIS> +To: rms@prep +Cc: lbm +Subject: Gnu Emacs + X documentation + +*** EOOH *** +From: martillo@ATHENA.MIT.EDU (Yakim Martillo) +Date: Thu, 19 Dec 85 23:07:36 EST +To: rms@prep +Cc: lbm +Subject: Gnu Emacs + X documentation + + +This is the start of my X documentation. + +I have not finished the last five sections yet. Please give me some +suggestions. + +Joachim + + +Special Terminal Interfaces + +Some terminals provide special capabilities which can be more +effectively used via specially written C functions rather than normal +termcap processing. To ease the use of these capabilities and aid the +integration of these C functions, special terminal hooks are provided. + +The hooks are all externed in the source header file termhooks.h. +To determine the arguments, the interested user who wishes to develop +a special terminal interface should consult term.c. +For proper functioning of the user defined C termhook functions, the +user should make certain that the terminal characteristics as externed +in termchar.h are properly set. + +Examples of how to use the termhooks can be found in xterm.c which +contains the Gnu Emacs to X interface. + +Gnu Emacs to X Interface + +The termhooks feature has enough power that termhooks need not be +restricted merely to the employment of special terminal capabilities. +Termhooks can be used to interface Gnu Emacs to special graphics +devices or window systems. Gnu Emacs interfaces with not a great deal +of difficulty to the MIT/Project Athena X Window system. With not too +much effort, a competent hacker should be able to interface Gnu Emacs +to the Sun, Apollo, or Blit Window systems. + +What is X? + +X is a network transparent window system developed at MIT by Bob +Scheiffler, Jim Gettys, Tony della Fera, Ron Newman and others. X is +a descendent of the Stanford V kernal system and Gosling's rectangle +management system. X has a standard protocol for communication with +an X server which talks to the high resolution graphics device driver. +The X developers have supplied a library libX.a which provides library +routines to handle typical graphics/window system commands. X is +network transparent in that a process running on a machine which wants +to make use of a high resolution graphics device will establish a +network connection to the X server which talks to the driver for that +device. The process will be a client of the X server. Since LAN's +typically can move data at megabit rates, running a window system in +this fashion has many advantages. For more information about X, +hackers are directed to "Xlib - C Language X Interface Version (?)" +written by Jim Gettys (DEC/MIT) and Ron Newman (MIT). + +New Functionality of Gnu Emacs + X + +Gnu Emacs running as a client of X provides very rapid line insertion +and deletion because bit blit commands are sent to the server and the +driver simply tells the device to move the pixels on the screen +directly. In fact, Gnu Emacs running under the xterm terminal +emulator can also cause bit blts to take place but bit blits via the +terminal emulator are rather slow because of escape sequence parsing +overhead in the terminal emulator and because of context switching +overhead as the bits take a merry trip through the pty interfaces and +drivers. + +Gnu Emacs runs in its own X window and therefore no information is +lost from the xterm session from which the user invoked Gnu Emacs. +Gnu Emacs should probably be run in background from the parent X +session because then the user may continue to do more work in the +parent xterm session. As Gnu Emacs should be run in background, the +lisp form + (put 'suspend-emacs 'disabled t) +is passed to the Gnu Emacs lisp interpreter when Gnu Emacs is invoked +from an xterm terminal emulator. Should the user accidently type the +key sequence for suspend-emacs (initially C-z or C-XC-z), he will be +queried whether he truly wishes to suspend emacs. Unless the user is +confident he should reply n (= no). + +If the user has an X window manager running, the user can resize the +Gnu Emacs window using the usual mouse sequences which have been +grabbed by the window manager. Gnu Emacs then automatically resizes +itself and updates the display. + +By using the mouse window manager commands, the user can cause +formerly obscured sections of the Gnu Emacs window to be uncovered. +These sections have to be repainted. Since Gnu Emacs creates the Gnu +Emacs window by its lonesome, Gnu Emacs must repaint these sections of +the window all by itself. If Gnu Emacs is chugging away on some +global regexp replacement, Gnu Emacs may take its time in repainting +the display. (Similar repainting may take place on bit blits.) + +With the Gnu Emacs to X interface the mouse becomes even more +powerful. Some mouse events (basically the ones not grabbed by the +window manager) are passed to Gnu Emacs. Gnu Emacs is informed of the +reception of such events because it receives the key sequence C-cC-m. +Therefore a user who wishes to use the Gnu Emacs to X interface should +not rebind this key sequence to any function. + +This key sequence is bound to the lisp function x-mouse-mode which +goes and checks the special X Mouse Queue for mouse events. Each +control/shift/meta-mouse button sequence is associated with a defined +constant in the lisp file x-mouse.el. The constants are defined as +follows: + + (defconst x-button-right (char-to-string 0)) + (defconst x-button-middle (char-to-string 1)) + (defconst x-button-left (char-to-string 2)) + + (defconst x-button-s-right (char-to-string 16)) + (defconst x-button-s-middle (char-to-string 17)) + (defconst x-button-s-left (char-to-string 18)) + + (defconst x-button-m-right (char-to-string 32)) + (defconst x-button-m-middle (char-to-string 33)) + (defconst x-button-m-left (char-to-string 34)) + + (defconst x-button-c-right (char-to-string 64)) + (defconst x-button-c-middle (char-to-string 65)) + (defconst x-button-c-left (char-to-string 66)) + + (defconst x-button-m-s-right (char-to-string 48)) + (defconst x-button-m-s-middle (char-to-string 49)) + (defconst x-button-m-s-left (char-to-string 50)) + + (defconst x-button-c-s-right (char-to-string 80)) + (defconst x-button-c-s-middle (char-to-string 81)) + (defconst x-button-c-s-left (char-to-string 82)) + + (defconst x-button-c-m-right (char-to-string 96)) + (defconst x-button-c-m-middle (char-to-string 97)) + (defconst x-button-c-m-left (char-to-string 98)) + + (defconst x-button-c-m-s-right (char-to-string 112)) + (defconst x-button-c-m-s-middle (char-to-string 113)) + (defconst x-button-c-m-s-left (char-to-string 114)). + +To understand why these constants are so defined, the user should +check out the (C) definition of the lisp function x-mouse-mode in the +src file xfns.c. (I, Joachim Martillo not RMS, do not claim +this code handles mouse events in the best way possible, and all +involved with maintaining the Gnu Emacs to X interface would be open +to suggestions for improvement.) + +Anyway, using these defined constants, the user may bind his own +defined functions to mouse sequences using the define-key command as +below: + + (define-key mouse-map x-button-right 'x-mouse-select). + +Mouse functions are defined like any of the other lisp functions in +Gnu Emacs. + +Here, exempli gratia, is the lisp definition of x-mouse-select: + + (defun x-mouse-select (arg) + "Select Emacs window the mouse is on." + (let ((start-w (selected-window)) + (done nil) + (w (selected-window)) + (rel-coordinate nil)) + (while (and (not done) + (null (setq rel-coordinate + (coordinates-in-window-p arg w)))) + (setq w (next-window w)) + (if (eq w start-w) + (setq done t))) + (select-window w) + rel-coordinate)). + +When the mouse sequence is received, x-mouse-mode checks out the mouse +queue, sees the defined constant associated with that button event, +looks up that defined constants binding in the mouse-map and then +invokes this lisp function with arg which is a list of the x and y +coordinates of the mouse when the mouse event under question took +place. The lisp symbol arg is bound to (x-coordinate y-coordinate). + +The supplied mouse-functions and bindings are: + + x-cut-and-wipe-text + Function: Kill text between point and mouse; also copy to + window system cut buffer. + Binding: C-Middle Button. + + x-cut-text + Function: Copy text between point and mouse position into + window system cut buffer. + Binding: S-Middle Button (i.e. Shift-Middle Button). + + x-mouse-keep-one-window + Function: Select Emacs window mouse is on, then kill all other Emacs + windows. + Binding: C-S-Right Button. + + x-mouse-select + Function: Select Emacs window the mouse is on. + Binding: Right Button. + + x-mouse-select-and-split + Function: Select Emacs window mouse is on, then split it vertically + in half. + Binding: C-Right Button. + + x-mouse-set-mark + Function: Select Emacs window mouse is on, and set mark at mouse + position. + Binding: Left Button. + x-mouse-set-point + Function: Select Emacs window mouse is on, and move point to mouse + position. + Binding: Middle Button. + + x-paste-text + Function: Move point to mouse position and insert window system cut + buffer contents. + Binding: S-Right Button. + +These functions are invoked simply by positioning the mouse and then +pressing the correct key/button combination. + +The cut and paste functions deserve special remark. The X server +maintains special buffers where data may be salted away. One client +may salt data away in a cut buffer. Then another client could request +this data. In emacs, data is salted away, by setting the point (you +could use the mouse to set the point) then moving the mouse to the end +(or beginning) of the text to be salted away and pressing shift +middle. If the text should be wiped out of the buffer as well as +salted away, C-Middle Button should be used instead of S-Middle +Button. To get the text back into this emacs or another emacs, move +the mouse to where the text should be inserted and invoke x-paste-text +via S-Right Button. The text can be pasted into any client of the +current X server from the current cut buffer using that client's paste +command. For xterm the paste command is also S-Right Button. + +Other Gnu Emacs Lisp Functions + +Command Line Arguments + +.emacs File + +x-switches + +.Xdefaults + + +1,, +Summary-line: 19-Dec lbm@ATHENA.MIT.EDU #GNU Emacs under X Writeup for Manual +Received: from ATHENA (ATHENA.MIT.EDU) by prep; Thu, 19 Dec 85 15:57:34 est +Received: from JASON (JASON.MIT.EDU) by ATHENA (4.12/4.7) + id AA12646; Thu, 19 Dec 85 15:55:53 est +Received: by JASON (5.15/4.7) + id AA20416; Thu, 19 Dec 85 15:55:40 EST +Message-Id: <8512192055.AA20416@JASON> +To: rms@prep +Cc: tower@prep +Subject: GNU Emacs under X Writeup for Manual +Date: 19 Dec 85 15:55:33 EST (Thu) +From: Linda B. Merims + +*** EOOH *** +To: rms@prep +Cc: tower@prep +Subject: GNU Emacs under X Writeup for Manual +Date: 19 Dec 85 15:55:33 EST (Thu) +From: Linda B. Merims + + +Here's something you can put in the V17 manual to describe GNU Emacs under +X. I've added a couple of notes to you about things that didn't work +when I tried them. It has no formatting commands in it. I +don't know if we followed your naming conventions. It is important +for us to distinguish between "gnuemacs" and "emacs" for the next +six months while we convert our 2000+ users over from CCA, so I mention +that at MIT's Project Athena, things are a little different for +a short while. + +I didn't put in anything about X-specific variables. I don't know +anything about them. I'm also a bit colloquial in places, to make +my point better with novices (who, for example, understand "cursor" better +than "point".) I also didn't document the -d display command option. +Nor are there any credits to, for example, Joachim Martillo. Up to you. + +Hope this does you good. + + Linda Merims + + +---------------------------------------------------------------- +GNU Emacs on X Window System Displays + + +GNU Emacs works with the X window system. It starts +by "popping up" a new window on the screen. This can be a bit +disconcerting if you're not used to it. If you're on one of these +terminals, the easiest way to start up GNU Emacs is to type the same command +you would before, but to follow it with a &, as in: + +emacs paper.mss & + +The "&" runs GNU Emacs in the "background," freeing your original +window for other uses. (There are X-specific options to the Gnuemacs +commands that will be listed later.) + +NOTE: GNU Emacs may be invoked by +different names at different sites. It is sometimes known +as xemacs. At MIT's Project Athena where GNU Emacs was first +adapted to X, the correct command is: gnuemacs until summer +1986, when it will become just: emacs. + +Soon, you will see a small black box in the upper left hand corner of your +screen that reads, "emacs: 10 x 10". (This number represents +columns x rows.) You'll also see a small outline of a window with +a cross in the upper left hand corner of it. This is where the upper +left hand corner of your window will be. You can move this cross with +the mouse to any spot on the screen. You can then do one of three +things: + +make an 80 column by 24 row emacs window -- click the left mouse button + +make an 80 column by 65 row emacs window -- click the right mouse button + (the length will actually be however many lines long your screen + can hold. 80 by 66 is about the size of an 8 1/2 x 11 piece of paper.) + +make any size emacs window you want -- hold down the middle mouse button + and move the mouse to create a window of any size. As you move the + mouse, the numbers in the upper left hand corner of the screen and + the rubber-band outline will expand or contract. Just release the + button when the window is the size you want. + +Unless you make the window in any area that does not overlap any other +windows, you may have problems when you want to get back to a window +obscured by the GNU Emacs window. You need to know how to use the X +window manager, xwm, to move and shuffle these windows around. For +more information on the window manager, you can type man xwm, on +any Berkeley 4.3 Unix system with this user-contributed (/usr/new) +utility available. + +Note that you cannot suspend (C-Z) a GNU emacs X window. + + + +GNU Emacs and the X Mouse + +When using GNU Emacs on an X terminal, you can take advantage of the +convenient, quick commands for moving point, setting the mark, and +cutting and pasting text. You issue these commands by pressing +the mouse's buttons alone or in concert with the SHIFT, CTRL, or +SHIFT-CTRL keys as follows: + +left set mark ('x-mouse-set-mark) (RMS, this blinked cursor but didn't + actually set anything...lbm) + +middle move the cursor (point) to where the mouse is. This is + like moving the cursor with C-F or C-N or the arrow keys, + only immediate. ('x-mouse-set-point) + +right move to the window where the mouse is. Point is in the same + place as it was the last time you were in the window. + ('x-mouse-select) + + +SHIFT-left + undefined + +SHIFT-middle + take the text between point and mark and put it into the + X cut buffer. The text does NOT disappear from the screen. + It does NOT go into the emacs kill right. Used for copying + text. Recall text with SHIFT-right below. ('x-cut-text) + +SHIFT-right + paste text from the X cut buffer to before point. ('x-paste-text) + + +CTRL-left + undefined + +CTRL-middle + take the text between point and mark and put it into the + X cut buffer, AND the emacs kill ring. Text is deleted + from the screen. Used for moving text. Recall text with + SHIFT-right above, or any emacs kill ring command. + ('x-cut-and-wipe-text) + +CTRL-right + divide current window in two. ('x-mouse-select-and-split) + + +CTRL-SHIFT-middle + return to one-window mode, keeping the window the mouse is + in. ('x-mouse-keep-one-window)(RMS, this didn't always work...lbm) + + + +Emacs Command X Window Options + +These command options have meaning to the X window system: + +-r use reverse video (white characters on black background) + +-i use GNU emacs's bitmap icon (a kitchen sink) if the emacs + window is iconized instead of the xwm window manager default. + +-font fontname + use fontname instead of the default vtsingle + +-b borderwidth + make the window border borderwidth pixels wide. Default is 1. + +-w windowsize + instead of relying on the mouse buttons to determine size and + placement of the GNU emacs window, make it this size. Size + is specified as: + + =[WIDTH][xHEIGHT][{+-}XOFF[{+-}YOFF]] + + The []'s denote optional stuff, the {}'s surround + alternatives. WIDTH and HEIGHT are in number of + characters, XOFF and YOFF are in pixels. X and YOFF are + the xy offsets from the upper left corner origin for the + upper left corner of the window. + + +GNU Emacs will check in the .Xdefaults file for default values for +these variables. (RMS, we're not sure what program name it's +going to be looking for...lbm) + + +GNU Emacs under X Variables + +I don't know what these are. Sorry. + + + \ No newline at end of file diff --git a/etc/XENIX b/etc/XENIX new file mode 100644 index 0000000..f466354 --- /dev/null +++ b/etc/XENIX @@ -0,0 +1,116 @@ +Return-Path: +Date: 5 Aug 88 18:46:22 GMT +From: jetson!john@uunet.uu.net (John Owens) +Organization: SMART HOUSE Limited Partnership +Subject: Meta key support in SCO Xenix! +Sender: info-gnu-emacs-request@prep.ai.mit.edu +To: info-gnu-emacs@prep.ai.mit.edu + +Here is a substitute for /usr/lib/keyboard/keys in SCO Xenix that +allows use of the meta key in GNU Emacs. Pressing ALT with any key +causes the code returned to have the 80hex bit set. In conjunction +with this, I added lisp/term/ansi.el with the single line + +(setq meta-flag t) + +Here's the keys file. Make sure MAPKEY=YES is in your +/etc/default/boot. (This also allows you to enter graphics characters +from the keyboard.) Enjoy! + +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state + 0 nop nop nop nop nop nop nop nop O + 1 esc esc nop nop 0x9b 0x9b nop nop O + 2 '1' '!' nop nop 0xb1 0xa1 nop nop O + 3 '2' '@' nul nul 0xb2 0xc0 0x80 0x80 O + 4 '3' '#' nop nop 0xb3 0xa3 nop nop O + 5 '4' '$' nop nop 0xb4 0xa4 nop nop O + 6 '5' '%' nop nop 0xb5 0xa5 nop nop O + 7 '6' '^' rs rs 0xb6 0xde 0x9e 0x9e O + 8 '7' '&' nop nop 0xb7 0xa6 nop nop O + 9 '8' '*' nop nop 0xb8 0xaa nop nop O + 10 '9' '(' nop nop 0xb9 0xa8 nop nop O + 11 '0' ')' nop nop 0xb0 0xa9 nop nop O + 12 '-' '_' ns ns 0xad 0xdf 0x9f 0x9f O + 13 '=' '+' nop nop 0xbd 0xab nop nop O + 14 bs bs del del 0x88 0x88 0xff 0xff O + 15 ht btab nop nop 0x89 btab nop nop O + 16 'q' 'Q' dc1 dc1 0xf1 0xd1 0x91 0x91 C + 17 'w' 'W' etb etb 0xf7 0xd7 0x97 0x97 C + 18 'e' 'E' enq enq 0xe5 0xc5 0x85 0x85 C + 19 'r' 'R' dc2 dc2 0xf2 0xd2 0x92 0x92 C + 20 't' 'T' dc4 dc4 0xf4 0xd4 0x94 0x94 C + 21 'y' 'Y' em em 0xf9 0xd9 0x99 0x99 C + 22 'u' 'U' nak nak 0xf5 0xd5 0x95 0x95 C + 23 'i' 'I' ht ht 0xe9 0xc9 0x89 0x89 C + 24 'o' 'O' si si 0xef 0xcf 0x8f 0x8f C + 25 'p' 'P' dle dle 0xf0 0xd0 0x90 0x90 C + 26 '[' '{' esc esc 0xdb 0xfb 0x9b 0x9b O + 27 ']' '}' gs gs 0xdd 0xfd 0x9d 0x9d O + 28 cr cr nl nl 0x8d 0x8d 0x8a 0x8a O + 29 ctrl ctrl ctrl ctrl ctrl ctrl ctrl ctrl O + 30 'a' 'A' soh soh 0xe1 0xc1 0x81 0x81 C + 31 's' 'S' dc3 dc3 0xf3 0xd3 0x93 0x93 C + 32 'd' 'D' eot eot 0xe4 0xc4 0x84 0x84 C + 33 'f' 'F' ack ack 0xe6 0xc6 0x86 0x86 C + 34 'g' 'G' bel bel 0xe7 0xc7 0x87 0x87 C + 35 'h' 'H' bs bs 0xe8 0xc8 0x88 0x88 C + 36 'j' 'J' nl nl 0xea 0xca 0x8a 0x8a C + 37 'k' 'K' vt vt 0xeb 0xcb 0x8b 0x8b C + 38 'l' 'L' np np 0xec 0xcc 0x8c 0x8c C + 39 ';' ':' nop nop 0xbb 0xba nop nop O + 40 '\'' '"' nop nop 0xa7 0xa2 nop nop O + 41 '`' '~' nop nop 0xe0 0xfe nop nop O + 42 lshift lshift lshift lshift lshift lshift lshift lshift O + 43 '\\' '|' fs fs 0xdc 0xfc 0x9c 0x9c O + 44 'z' 'Z' sub sub 0xfa 0xda 0x9a 0x9a C + 45 'x' 'X' can can 0xf8 0xd8 0x98 0x98 C + 46 'c' 'C' etx etx 0xe3 0xc3 0x83 0x83 C + 47 'v' 'V' syn syn 0xf6 0xd6 0x96 0x96 C + 48 'b' 'B' stx stx 0xe2 0xc2 0x82 0x82 C + 49 'n' 'N' so so 0xee 0xce 0x8e 0x8e C + 50 'm' 'M' cr cr 0xed 0xcd 0x8d 0x8d C + 51 ',' '<' nop nop 0xac 0xbc nop nop O + 52 '.' '>' nop nop 0xae 0xbe nop nop O + 53 '/' '?' nop nop 0xaf 0xbf nop nop O + 54 rshift rshift rshift rshift rshift rshift rshift rshift O + 55 '*' '*' nscr nscr 0xaa 0xaa nscr nscr O + 56 alt alt alt alt alt alt alt alt O + 57 ' ' ' ' ' ' ' ' 0xa0 0xa0 0xa0 0xa0 O + 58 clock clock clock clock clock clock clock clock O + 59 fkey1 fkey13 fkey25 fkey37 scr1 scr11 scr1 scr11 O + 60 fkey2 fkey14 fkey26 fkey38 scr2 scr12 scr2 scr12 O + 61 fkey3 fkey15 fkey27 fkey39 scr3 scr13 scr3 scr13 O + 62 fkey4 fkey16 fkey28 fkey40 scr4 scr14 scr4 scr14 O + 63 fkey5 fkey17 fkey29 fkey41 scr5 scr15 scr5 scr15 O + 64 fkey6 fkey18 fkey30 fkey42 scr6 scr16 scr6 scr16 O + 65 fkey7 fkey19 fkey31 fkey43 scr7 scr7 scr7 scr7 O + 66 fkey8 fkey20 fkey32 fkey44 scr8 scr8 scr8 scr8 O + 67 fkey9 fkey21 fkey33 fkey45 scr9 scr9 scr9 scr9 O + 68 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 69 nlock nlock dc3 dc3 nlock nlock 0x93 0x93 O + 70 slock slock del del slock slock 0xff 0xff O + 71 fkey49 '7' '7' '7' 0xb7 0xb7 0xb7 0xb7 N + 72 fkey50 '8' '8' '8' 0xb8 0xb8 0xb8 0xb8 N + 73 fkey51 '9' '9' '9' 0xb9 0xb9 0xb9 0xb9 N + 74 fkey52 '-' '-' '-' 0xad 0xad 0xad 0xad N + 75 fkey53 '4' '4' '4' 0xb4 0xb4 0xb4 0xb4 N + 76 fkey54 '5' '5' '5' 0xb5 0xb5 0xb5 0xb5 N + 77 fkey55 '6' '6' '6' 0xb6 0xb6 0xb6 0xb6 N + 78 fkey56 '+' '+' '+' 0xab 0xab 0xab 0xab N + 79 fkey57 '1' '1' '1' 0xb1 0xb1 0xb1 0xb1 N + 80 fkey58 '2' '2' '2' 0xb2 0xb2 0xb2 0xb2 N + 81 fkey59 '3' '3' '3' 0xb3 0xb3 0xb3 0xb3 N + 82 fkey60 '0' '0' '0' 0xb0 0xb0 0xb0 0xb0 N + 83 del '.' del del 0xff 0xff 0xff 0xff N + 84 nop nop nop nop nop nop nop nop O + 85 nop nop nop nop nop nop nop nop O + 86 nop nop nop nop nop nop nop nop O + 87 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 88 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O +-- +John Owens john@jetson.UPMA.MD.US +SMART HOUSE L.P. uunet!jetson!john (old uucp) ++1 301 249 6000 john%jetson.uucp@uunet.uu.net (old internet) + diff --git a/etc/Xkeymap.txt b/etc/Xkeymap.txt new file mode 100644 index 0000000..07ecf6e --- /dev/null +++ b/etc/Xkeymap.txt @@ -0,0 +1,98 @@ +# -*-Mode: Fundamental-*- +# X keymap file for rlk with some emacsified bindings +# This file contains the default keyboard mapping. The first column contains a X keyboard code; the other +# 16 columns contain the mapping of the keycode to a character string, with various combinations +# of the SHIFT, LOCK, META, and CONTROL keys down. See the man page for "keycomp" for more information. +# +# Keycode constants for non-typewriter keys are found in . +# +# It is easiest to edit this file with an EMACS window running across the entire width of the display, with +# tab stop set to 4. +# +# E1=Find, E2=Insert Here, E3=Remove, E4=Select, E5=Prev Screen, E6=Next Screen +# uns L S SL M ML MS MSL C CL CS CSL CM CML CMS CMSL +0212 0023, 0023, 0023, 0023, 0223, 0223, 0223, 0223, 0022, 0022, 0022, 0022, 0222, 0222, 0222, 0222, /* E1 */ +0213 U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, /* E2 */ +0214 0004, 0004, 0177, 0177, 0304, 0304, 0377, 0377, 0004, 0004, 0177, 0177, 0204, 0204, 0377, 0377 /* E3 */ +0215 U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, /* E4 */ +0216 0326, 0326, 0326, 0326, 0326, 0326, 0326, 0326, "\255\226" "\255\226" "\255\226" "\255\226" "\255\226" "\255\226" "\255\226" "\255\226" /* E5 */ +0217 0026, 0026, 0026, 0026, 0026, 0026, 0026, 0026, 0226, 0226, 0226, 0226, 0226, 0226, 0226, 0226, /* E6 */ +0247 0002, 0002, 0002, 0002, 0302, 0302, 0302, 0302, 0202, 0202, 0202, 0202, 0202, 0202, 0202, 0202, /* Left arrow */ +0250 0006, 0006, 0006, 0006, 0306, 0306, 0306, 0306, 0206, 0206, 0206, 0206, 0206, 0206, 0206, 0206, /* Right arrow */ +0251 0016, 0016, 0016, 0016, 0316, 0316, 0316, 0316, 0216, 0216, 0216, 0216, 0216, 0216, 0216, 0216, /* Down arrow */ +0252 0020, 0020, 0020, 0020, 0320, 0320, 0320, 0320, 0220, 0220, 0220, 0220, 0220, 0220, 0220, 0220, /* Up arrow */ +0222 0260, '0', 0260, '0', 0260, '0', 0260, '0', 0260, '0', 0260, '0', 0260, '0', 0260, '0', /* KP 0 */ +0224 0256, '.', 0256, '.', 0256, '.', 0256, '.', 0256, '.', 0256, '.', 0256, '.', 0256, '.', /* KP . */ +0225 '\n', '\n', '\n', '\n', 0312, 0312, 0312, 0312, 0212, 0212, 0212, 0212, 0212, 0212, 0212, 0212, /* KP Enter */ +0226 0261, '1', 0261, '1', 0261, '1', 0261, '1', 0261, '1', 0261, '1', 0261, '1', 0261, '1', /* KP 1 */ +0227 0262, '2', 0262, '2', 0262, '2', 0262, '2', 0262, '2', 0262, '2', 0262, '2', 0262, '2', /* KP 2 */ +0230 0263, '3', 0263, '3', 0263, '3', 0263, '3', 0263, '3', 0263, '3', 0263, '3', 0263, '3', /* KP 3 */ +0231 0264, '4', 0264, '4', 0264, '4', 0264, '4', 0264, '4', 0264, '4', 0264, '4', 0264, '4', /* KP 4 */ +0232 0265, '5', 0265, '5', 0265, '5', 0265, '5', 0265, '5', 0265, '5', 0265, '5', 0265, '5', /* KP 5 */ +0233 0266, '6', 0266, '6', 0266, '6', 0266, '6', 0266, '6', 0266, '6', 0266, '6', 0266, '6', /* KP 6 */ +0234 0254, ',', 0254, ',', 0254, ',', 0254, ',', 0254, ',', 0254, ',', 0254, ',', 0254, ',', /* KP , */ +0235 0267, '7', 0267, '7', 0267, '7', 0267, '7', 0267, '7', 0267, '7', 0267, '7', 0267, '7', /* KP 7 */ +0236 0270, '8', 0270, '8', 0270, '8', 0270, '8', 0270, '8', 0270, '8', 0270, '8', 0270, '8', /* KP 8 */ +0237 0271, '9', 0271, '9', 0271, '9', 0271, '9', 0271, '9', 0271, '9', 0271, '9', 0271, '9', /* KP 9 */ +0240 0255, '-', 0255, '-', 0255, '-', 0255, '-', 0255, '-', 0255, '-', 0255, '-', 0255, '-', /* KP - */ +0174 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, 0010, /* F15/Help */ +0175 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, 0037, /* F16/(Un)Do */ +0161 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, 0033, /* F11/ESC */ +0162 '\b', '\b', '\b', '\b', '\b', '\b', U, U, '\b', '\b', U, U, U, U, U, U, /* F12/BS */ +0163 '\n', '\n', '\n', '\n', '\n', '\n', U, U, '\n', '\n', U, U, U, U, U, U, /* F13/LF */ +0274 0177, 0177, 0177, 0177, 0377, 0377, 0377, 0377, 0030, 0030, 0177, 0177, 0377, 0377, 0377, 0377, /* back */ +0275 '\r', '\r', '\r', '\r', 0215, 0215, 0215, 0215, '\r', '\r', U, U, U, U, U, U, /* Return */ +0276 '\t', '\t', '\t', '\t', 0211, 0211, 0211, 0211, "\021\t" "\021\t" "\021\t" "\021\t" "\021\t" "\021\t" "\021\t" "\021\t" /* Tab */ +0277 '`', '`', '~', '~', 0340, 0340, 0376, 0376, 0036, 0036, 0036, 0036, U, U, U, U, /* ` */ +0300 '1', '1', '!', '!', 0261, 0261, 0241, 0241, '1', '1', '!', '!', U, U, U, U, /* 1 */ +0301 'q', 'Q', 'Q', 'Q', 0361, 0361, 0321, 0321, 0021, 0021, 0021, 0021, 0221, 0221, 0221, 0221, /* q */ +0302 'a', 'A', 'A', 'A', 0341, 0341, 0301, 0301, 0001, 0001, 0001, 0001, 0201, 0201, 0201, 0201, /* a */ +0303 'z', 'Z', 'Z', 'Z', 0372, 0372, 0332, 0332, 0032, 0032, 0032, 0032, 0232, 0232, 0232, 0232, /* z */ +0305 '2', '2', '@', '@', 0262, 0262, 0300, 0300, 0000, 0000, 0000, 0000, 0262, 0262, 0200, 0200, /* 2 */ +0306 'w', 'W', 'W', 'W', 0367, 0367, 0327, 0327, 0027, 0027, 0027, 0027, 0227, 0227, 0227, 0227, /* w */ +0307 's', 'S', 'S', 'S', 0363, 0363, 0323, 0323, 0023, 0023, 0023, 0023, 0223, 0223, 0223, 0223, /* s */ +0310 'x', 'X', 'X', 'X', 0370, 0370, 0330, 0330, 0030, 0030, 0030, 0030, 0230, 0230, 0230, 0230, /* x */ +0311 '<', '<', '>', '>', 0274, 0274, 0276, 0276, U, U, U, U, U, U, U, U, /* < */ +0313 '3', '3', '#', '#', 0263, 0263, 0243, 0243, 0033, 0033, '#', '#', U, U, U, U, /* 3 */ +0314 'e', 'E', 'E', 'E', 0345, 0345, 0305, 0305, 0005, 0005, 0005, 0005, 0205, 0205, 0205, 0205, /* e */ +0315 'd', 'D', 'D', 'D', 0344, 0344, 0304, 0304, 0004, 0004, 0004, 0004, 0204, 0204, 0204, 0204, /* d */ +0316 'c', 'C', 'C', 'C', 0343, 0343, 0303, 0303, 0003, 0003, 0003, 0003, 0203, 0203, 0203, 0203, /* c */ +0320 '4', '4', '$', '$', 0264, 0264, 0244, 0244, 0034, 0034, '$', '$', U, U, U, U, /* 4 */ +0321 'r', 'R', 'R', 'R', 0362, 0362, 0322, 0322, 0022, 0022, 0022, 0022, 0222, 0222, 0222, 0222, /* r */ +0322 'f', 'F', 'F', 'F', 0346, 0346, 0306, 0306, 0006, 0006, 0006, 0006, 0206, 0206, 0206, 0206, /* f */ +0323 'v', 'V', 'V', 'V', 0366, 0366, 0326, 0326, 0026, 0026, 0026, 0026, 0226, 0226, 0226, 0226, /* v */ +0324 ' ', ' ', ' ', ' ', 0240, 0240, 0240, 0240, 0000, 0000, 0000, 0000, 0200, 0200, 0200, 0200, /* space */ +0326 '5', '5', '%', '%', 0265, 0265, 0245, 0245, 0035, 0035, '%', '%', U, U, U, U, /* 5 */ +0327 't', 'T', 'T', 'T', 0364, 0364, 0324, 0324, 0024, 0024, 0024, 0024, 0224, 0224, 0224, 0224, /* t */ +0330 'g', 'G', 'G', 'G', 0347, 0347, 0307, 0307, 0007, 0007, 0007, 0007, 0207, 0207, 0207, 0207, /* g */ +0331 'b', 'B', 'B', 'B', 0342, 0342, 0302, 0302, 0002, 0002, 0002, 0002, 0202, 0202, 0202, 0202, /* b */ +0333 '6', '6', '^', '^', 0266, 0266, 0336, 0336, 0036, 0036, 0036, 0036, U, U, U, U, /* 6 */ +0334 'y', 'Y', 'Y', 'Y', 0371, 0371, 0331, 0331, 0031, 0031, 0031, 0031, 0231, 0231, 0231, 0231, /* y */ +0335 'h', 'H', 'H', 'H', 0350, 0350, 0310, 0310, 0010, 0010, 0010, 0010, 0210, 0210, 0210, 0210, /* h */ +0336 'n', 'N', 'N', 'N', 0356, 0356, 0316, 0316, 0016, 0016, 0016, 0016, 0216, 0216, 0216, 0216, /* n */ +0340 '7', '7', '&', '&', 0267, 0267, 0246, 0246, 0037, 0037, '&', '&', U, U, U, U, /* 7 */ +0341 'u', 'U', 'U', 'U', 0365, 0365, 0325, 0325, 0025, 0025, 0025, 0025, 0225, 0225, 0225, 0225, /* u */ +0342 'j', 'J', 'J', 'J', 0352, 0352, 0312, 0312, 0012, 0012, 0012, 0012, 0212, 0212, 0212, 0212, /* j */ +0343 'm', 'M', 'M', 'M', 0355, 0355, 0315, 0315, 0015, 0015, 0015, 0015, 0215, 0215, 0215, 0215, /* m */ +0345 '8', '8', '*', '*', 0270, 0270, 0252, 0252, 0177, 0177, '*', '*', U, U, U, U, /* 8 */ +0346 'i', 'I', 'I', 'I', 0351, 0351, 0311, 0311, 0011, 0011, 0011, 0011, 0211, 0211, 0211, 0211, /* i */ +0347 'k', 'K', 'K', 'K', 0353, 0353, 0313, 0313, 0013, 0013, 0013, 0013, 0213, 0213, 0213, 0213, /* k */ +0350 ',', ',', '<', '<', 0254, 0254, 0274, 0274, U, U, U, U, U, U, U, U, /* , */ +0352 '9', '9', '(', '(', 0271, 0271, 0250, 0250, '9', '9', '(', '(', U, U, U, U, /* 9 */ +0353 'o', 'O', 'O', 'O', 0357, 0357, 0317, 0317, 0017, 0017, 0017, 0017, 0217, 0217, 0217, 0217, /* o */ +0354 'l', 'L', 'L', 'L', 0354, 0354, 0314, 0314, 0014, 0014, 0014, 0014, 0214, 0214, 0214, 0214, /* l */ +0355 '.', '.', '>', '>', 0256, 0256, 0276, 0276, U, U, U, U, U, U, U, U, /* . */ +0357 '0', '0', ')', ')', 0260, 0260, 0251, 0251, '0', '0', ')', ')', U, U, U, U, /* 0 */ +0360 'p', 'P', 'P', 'P', 0360, 0360, 0320, 0320, 0020, 0020, 0020, 0020, 0220, 0220, 0220, 0220, /* p */ +0362 ';', ';', ':', ':', 0273, 0273, 0272, 0272, U, U, U, U, U, U, U, U, /* ; */ +0363 '/', '/', '?', '?', 0257, 0257, 0277, 0277, 0037, 0037, 0037, 0037, 0237, 0237, 0237, 0237, /* / */ +0365 '=', '=', '+', '+', 0275, 0275, 0253, 0253, U, U, U, U, U, U, U, U, /* = */ +0366 ']', ']', '}', '}', 0335, 0335, 0376, 0376, 0035, 0035, 0035, 0035, 0335, 0335, 0335, 0335, /* ] */ +0367 '\\', '\\', '|', '|', 0334, 0334, 0374, 0374, 0034, 0034, 0034, 0034, 0334, 0334, 0334, 0334, /* \ */ +0371 '-', '-', '_', '_', 0255, 0255, 0337, 0337, 0037, 0037, 0037, 0037, 0337, 0337, 0337, 0337, /* - */ +0372 '[', '[', '{', '{', 0333, 0333, 0373, 0373, 0033, 0033, 0033, 0033, 0333, 0333, 0333, 0333, /* [ */ +0373 '\'', '\'', '"', '"', 0247, 0247, 0242, 0242, U, U, U, U, U, U, U, U, /* ' */ +# +# local variables: +# tab-width: 4 +# End: diff --git a/etc/celibacy.1 b/etc/celibacy.1 new file mode 100644 index 0000000..5a3fdd5 --- /dev/null +++ b/etc/celibacy.1 @@ -0,0 +1,12 @@ +CELIBACY(1) UNIX Programmer's Manual CELIBACY(1) + + + +NAME + celibacy - don't have sex + +SYNOPSIS + celibacy + +DESCRIPTION + Does nothing worth mentioning. diff --git a/etc/complink.com b/etc/complink.com new file mode 100644 index 0000000..1d7ea74 --- /dev/null +++ b/etc/complink.com @@ -0,0 +1,41 @@ +$ ! Compile and link those programs in [etc] that are usable on VMS. +$ +$ old = f$environment("default") +$ set default emacs_library:[etc] +$ if f$search("test-distrib.c") .nes. "" then goto version44 +$ +$ cc test_distrib.c +$ link test_distrib.obj,vmslink.opt/opt +$ run test_distrib.exe +$ cc /debug make_docfile.c +$ link make_docfile.obj,vmslink.opt/opt +$ cc /debug digest_doc.c +$ link digest_doc.obj,vmslink.opt/opt +$ cc /debug sorted_doc.c +$ cc /debug qsort.c +$ link sorted_doc.obj,qsort.obj,vmslink.opt/opt +$ cc /debug etags_vmslib.c +$ cc /debug etags.c +$ link etags.obj,etags_vmslib.obj,vmslink.opt/opt +$ goto finish +$ +$version44: +$ cc test-distrib.c +$ link test-distrib.obj,vmslink.opt/opt +$ run test-distrib.exe +$ cc /debug make-docfile.c +$ link make-docfile.obj,vmslink.opt/opt +$ cc /debug digest-doc.c +$ link digest-doc.obj,vmslink.opt/opt +$ cc /debug sorted-doc.c +$ cc /debug qsort.c +$ link sorted-doc.obj,qsort.obj,vmslink.opt/opt +$ cc /debug etags-vmslib.c +$ cc /debug etags.c +$ link etags.obj,etags-vmslib.obj,vmslink.opt/opt +$ +$finish: +$ cc /debug yow.c +$ link yow.obj,vmslink.opt/opt +$ +$ set default 'old' diff --git a/etc/cvtmail.c b/etc/cvtmail.c new file mode 100644 index 0000000..5a58924 --- /dev/null +++ b/etc/cvtmail.c @@ -0,0 +1,147 @@ +/* Copyright (C) 1985 Free Software Foundation +This file is part of GNU Emacs. + +GNU Emacs is distributed in the hope that it will be useful, +but without any warranty. No author or distributor +accepts responsibility to anyone for the consequences of using it +or for whether it serves any particular purpose or works at all, +unless he says so in writing. + +Everyone is granted permission to copy, modify and redistribute +GNU Emacs, but only under the conditions described in the +document "GNU Emacs copying permission notice". An exact copy +of the document is supposed to have been given to you along with +GNU Emacs so that you can know how you may redistribute it all. +It should be in a file named COPYING. Among other things, the +copyright notice and this notice must be preserved on all copies. */ + +/* cvtmail: + * Program to convert oldstyle goslings emacs mail directories into + * gnu-rmail format. Program expects a directory called Messages to + * exist in your home directory, containing individual mail messages in + * separate files in the standard gosling emacs mail reader format. + * + * Program takes one argument: an output file. THis file will contain + * all the messages in Messages directory, in berkeley mail format. + * If no output file is mentioned, messages are put in ~/OMAIL. + * + * In order to get rmail to read the messages, the resulting file must + * be mv'ed to ~/mbox, and then have rmail invoked on them. + * + * Author: Larry Kolodney, 1985 + + * RMS, 2 Sept 85: Removed fix maximums on file name sizes. + */ + + +#include + + +main (argc, argv) + int argc; + char *argv[]; +{ + char *hd; + char *md; + char *mdd; + char *mfile; + char *cf; + int cflen; + FILE *mddf; + FILE *mfilef; + FILE *cff; + char pre[10], post[100]; + char name[14]; + int c; + + hd = (char *) getenv ("HOME"); + + md = (char *) xmalloc (strlen (hd) + 10); + strcpy (md, hd); + strcat (md, "/Messages"); + + mdd = (char *) xmalloc (strlen (md) + 11); + strcpy (mdd, md); + strcat (mdd, "/Directory"); + + cflen = 100; + cf = (char *) xmalloc (cflen); + + mddf = fopen (mdd, "r"); + if (argc > 1) + mfilef = fopen (argv[1], "w"); + else + { + mfile = (char *) xmalloc (strlen (hd) + 7); + strcpy (mfile, hd); + strcat (mfile, "/OMAIL"); + mfilef = fopen (mfile, "w"); + } + skip_to_lf (mddf); + while (fscanf (mddf, "%4c%14[0123456789]", pre, name) != EOF) + { + if (cflen < strlen (md) + strlen (name) + 2) + { + cflen = strlen (md) + strlen (name) + 2; + cf = (char *) xrealloc (cf, cflen); + } + strcpy (cf, md); + strcat (cf,"/"); + strcat (cf, name); + cff = fopen (cf, "r"); + while ((c = getc(cff)) != EOF) + putc (c, mfilef); + putc ('\n', mfilef); + skip_to_lf (mddf); + fclose (cff); + } + fclose (mddf); + fclose (mfilef); + return 0; +} + +skip_to_lf (stream) + FILE *stream; +{ + register int c; + while ((c = getc(stream)) != '\n') + ; +} + +int +xmalloc (size) + int size; +{ + int result = malloc (size); + if (!result) + fatal ("virtual memory exhausted", 0); + return result; +} + +int +xrealloc (ptr, size) + char *ptr; + int size; +{ + int result = realloc (ptr, size); + if (!result) + fatal ("virtual memory exhausted"); + return result; +} + +/* Print error message and exit. */ + +fatal (s1, s2) + char *s1, *s2; +{ + error (s1, s2); + exit (1); +} + +error (s1, s2) + char *s1, *s2; +{ + printf ("cvtmail: "); + printf (s1, s2); + printf ("\n"); +} diff --git a/etc/digest-doc.c b/etc/digest-doc.c new file mode 100644 index 0000000..d7764c0 --- /dev/null +++ b/etc/digest-doc.c @@ -0,0 +1,47 @@ +/* Give this program DOCSTR.mm.nn as standard input + and it outputs to standard output + a file of nroff output containing the doc strings. + + See also sorted-doc.c, which produces similar output + but in texinfo format and sorted by function/variable name. */ + +#include +main () +{ + register int ch; + register int notfirst = 0; + + printf (".TL\n"); + printf ("Command Summary for GNU Emacs\n"); + printf (".AU\nRichard M. Stallman\n"); + while ((ch = getchar ()) != EOF) + { + if (ch == '\037') + { + if (notfirst) + printf ("\n.DE"); + else + notfirst = 1; + + printf ("\n.SH\n"); + + ch = getchar (); + printf (ch == 'F' ? "Function " : "Variable "); + + while ((ch = getchar ()) != '\n') /* Changed this line */ + { + if (ch != EOF) + putchar (ch); + else + { + ungetc (ch, stdin); + break; + } + } + printf ("\n.DS L\n"); + } + else + putchar (ch); + } + return 0; +} diff --git a/etc/echo.msg b/etc/echo.msg new file mode 100644 index 0000000..459a1b2 --- /dev/null +++ b/etc/echo.msg @@ -0,0 +1,207 @@ +Path: mit-amt!mit-eddie!think!harvard!seismo!gatech!akgua!whuxlm!whuxl!houxm!ihnp4!stolaf!umn-cs!herndon +From: herndon@umn-cs.UUCP +Newsgroups: net.sources +Subject: GNU Echo, Release 1 +Message-ID: <1600001@umn-cs.UUCP> +Date: 28 Oct 85 18:23:00 GMT + + +/* Written 12:22 pm Oct 28, 1985 by umn-cs!herndon in umn-cs:net.jokes */ +/* ---------- "GNU Echo, Release 1" ---------- */ + + + + +GNUecho(1) UNIX Programmer's Manual GNUecho(1) + + + +NAME + echo - echo arguments + +SYNOPSIS + echo [ options ] ... + +DESCRIPTION + _^HE_^Hc_^Hh_^Ho writes its arguments separated by blanks and terminated + by a newline on the standard output. Options to filter and + redirect the output are as follows: + + -2 generate rhyming couplets from keywords + + -3 generate Haiku verse from keywords + + -5 generate limerick from keywords + + -a convert ASCII to ASCII + + -A disambiguate sentence structure + + -b generate bureaucratese equivalent (see -x) + + -B issue equivalent C code with bugs fixed + + -c simplify/calculate arithmetic expression(s) + + -C remove copyright notice(s) + + -d define new echo switch map + + -D delete all ownership information from system files + + -e evaluate lisp expression(s) + + -E convert ASCII to Navajo + + -f read input from file + + -F transliterate to french + + -g generate pseudo-revolutionary marxist catch-phrases + + -G prepend GNU manifesto + + -h halt system (reboot suppressed on Suns, Apollos, and + VAXen, not supported on NOS-2) + + -i emulate IBM OS/VU (recursive universes not supported) + + -I emulate IBM VTOS 3.7.6 (chronosynclastic infundibulae + supported with restrictions documented in IBM VTOS + + + +Printed 10/28/85 18 January 1983 1 + + + + + + +GNUecho(1) UNIX Programmer's Manual GNUecho(1) + + + + Reference Manual rev 3.2.6) + + -J generate junk mail + + -j justify text (see -b option) + + -k output "echo" software tools + + -K delete privileged accounts + + -l generate legalese equivalent + + -L load echo modules + + -M generate mail + + -N send output to all reachable networks (usable with -J, + -K, -h options) + + -n do not add newline to the output + + -o generate obscene text + + -O clean up dirty language + + -p decrypt and print /etc/passwd + + -P port echo to all reachable networks + + -P1 oolcay itay + + -q query standard input for arguments + + -r read alternate ".echo" file on start up + + -R change root password to "RMS" + + -s suspend operating system during output (Sun and VAX BSD + 4.2 only) + + -S translate to swahili + + -T emulate TCP/IP handler + + -t issue troff output + + -u issue unix philosophy essay + + -v generate reverberating echo + + -V print debugging information + + + + +Printed 10/28/85 18 January 1983 2 + + + + + + +GNUecho(1) UNIX Programmer's Manual GNUecho(1) + + + + -x decrypt DES format messages (NSA secret algorithm CX + 3.8, not distributed outside continental US) + + _^HE_^Hc_^Hh_^Ho is useful for producing diagnostics in shell programs + and for writing constant data on pipes. To send diagnostics + to the standard error file, do `echo ... 1>&2'. + +AUTHOR + Richard M. Stallman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Printed 10/28/85 18 January 1983 3 + diff --git a/etc/emacs.1 b/etc/emacs.1 new file mode 100644 index 0000000..246d70c --- /dev/null +++ b/etc/emacs.1 @@ -0,0 +1,530 @@ +.TH EMACS 1 "1987 September 1" +.UC 4 +.SH NAME +emacs \- GNU project Emacs +.SH SYNOPSIS +.B emacs +[file ...] +.br +.SH DESCRIPTION +.I GNU Emacs +is a new version of +.I Emacs, +written by the author of the original (PDP-10) +.I Emacs, +Richard Stallman. +Its user functionality encompasses +everything other +.I Emacs +editors do, and it is easily extensible since its +editing commands are written in Lisp. +.PP +.I Emacs +has an extensive interactive help facility, +but the facility assumes that you know how to manipulate +.I Emacs +windows and buffers. +CTRL-h (backspace +or CTRL-h) enters the Help facility. Help Tutorial (CTRL-h t) +requests an interactive tutorial which can teach beginners the fundamentals +of +.I Emacs +in a few minutes. +Help Apropos (CTRL-h a) helps you +find a command given its functionality, Help Character (CTRL-h c) +describes a given character's effect, and Help Function (CTRL-h f) +describes a given Lisp function specified by name. +.PP +.I Emacs's +Undo can undo several steps of modification to your buffers, so it is +easy to recover from editing mistakes. +.PP +.I GNU Emacs's +many special packages handle mail reading (RMail) and sending (Mail), +outline editing (Outline), compiling (Compile), running subshells +within +.I Emacs +windows (Shell), running a Lisp read-eval-print loop +(Lisp-Interaction-Mode), and automated psychotherapy (Doctor). +.PP +There is an extensive reference manual, but +users of other Emacses +should have little trouble adapting even +without a copy. Users new to +.I Emacs +will be able +to use basic features fairly rapidly by studying the tutorial and +using the self-documentation features. +.PP +.SM Emacs Options +.PP +The following options are of general interest: +.TP 8 +.B file +Edit +.I file. +.TP +.B \+number +Go to the line specified by +.I number +(do not insert a space between the "+" sign and +the number). +.TP +.B \-d displayname +Create the +.I Emacs +window on the display specified by +.I displayname. +This must be the first argument listed in the command line. +.TP +.B \-q +Do not load an init file. +.TP +.B \-u user +Load +.I user's +init file. +.TP +.B \-t file +Use specified +.I file +as the terminal instead of using stdin/stdout. +This must be the first argument specified in the command line. +.PP +The following options are lisp-oriented +(these options are processed in the order encountered): +.TP 8 +.B \-f function +Execute the lisp function +.I function. +.TP +.B \-l file +Load the lisp code in the file +.I file. +.PP +The following options are useful when running +.I Emacs +as a batch editor: +.TP 8 +.B \-batch commandfile +Edit in batch mode using the commands found in +.I commandfile. +The editor will send messages to stdout. +This option must be the first in the argument list. +.TP +.B \-kill +Exit +.I Emacs +while in batch mode. +.PP +.I +.SM Using Emacs with X +.PP +.I Emacs +has been tailored to work well with the X window system. +To enable this feature, you must define the macro +.B HAVE_X_WINDOWS +in the file +.I src/config.h +before compiling +.I Emacs. +If you run +.I Emacs +from under X windows, it will create its own X window to +display in. You will probably want to start the editor +as a background process +so that you can continue using your original window. +To use the optional X Menu features, define also the +macro +.B HAVE_X_MENU. +This macro is separate from +.B HAVE_X_WINDOWS +because the Menu facility of X does not work on all +the systems that support X. +.I Emacs +can be started with the following X switches: +.TP 8 +.B \-r +Display the +.I Emacs +window in inverse video. +.TP +.B \-i +Use the "kitchen sink" bitmap icon when iconifying the +.I Emacs +window. +.TP +.B \-font font +Set the +.I Emacs +window's font to that specified by +.I font. +You will find the various +.I X +fonts in the +.I \/usr\/new\/lib\/X\/font +directory. +Note that +.I Emacs +will only accept fixed width fonts. +These include the +.I 6x10.onx, 6x13.onx, 6x13p.onx, 8x13.onx, +and +.I 9x15.onx +fonts. +The other fixed width fonts are specified by the +.I fx +character sequence that comes before the +.I .onx +extension. + +When you specify a font, +do not include the +.I .onx +extension. +Be sure to put a space between the +.I \-font +switch and the font specification argument. +.TP +.B \-b pixels +Set the +.I Emacs +window's border width to the number of pixels specified by +.I pixels. +.TP +.B \-ib pixels +Set the window's internal border width to the number of pixels specified +by +.I pixels. +Defaults to one pixel of padding on each side of the window. +.PP +.TP 8 +.B \-w =[WIDTH][xHEIGHT][{+-}XOFF[{+-}YOFF]] +Set the +.I Emacs +window's width, height, and position on the screen. +The []'s denote optional arguments, the {}'s surround alternatives. +WIDTH and HEIGHT are in number of characters, XOFF and YOFF are in +pixels. WIDTH defaults to 80, HEIGHT to 24, XOFF and YOFF to 1. If you don't +give XOFF and/or YOFF, then you must use the mouse to create the window. +If you give XOFF and/or YOFF, then a WIDTHxHEIGHT window will +automatically be creating without intervention. XOFF and YOFF specify deltas +from a corner of the screen to the corresponding corner of the window, as +follows: +.br + +.br +\+XOFF+YOFF upper left to upper left +.br +\-XOFF+YOFF upper right to upper right +.br +\+XOFF-YOFF lower left to lower left +.br +\-XOFF-YOFF lower right to lower right +.PP +.TP 8 +.B \-fg color +On color displays, sets the color of the text. +.TP +.B \-bg color +On color displays, +sets the color of the window's background. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B \-bd color +On color displays, +sets the color of the window's border.See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B \-cr color +On color displays, +sets the color of the window's text cursor. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B \-ms color +On color displays, +sets the color of the window's mouse cursor. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B \-d displayname +Create the +.I Emacs +window on the display specified by +.I displayname. +Must be the first option specified in the command line. +.B \-nw +Tells +.I Emacs +not to use its special interface to X. If you use this +switch when invoking +.I Emacs +from an +.I xterm +window, display is done in the +.I xterm +window. +This must be the first option specified in the command line. +.PP +You can set +.I X +default values for your +.I Emacs +windows in your +.I \.Xdefaults +file. +Use the following format: +.IP +emacs.keyword:value +.PP +where +.I value +specifies the default value of +.I keyword. +.I Emacs +lets you set default values for the following keywords: +.TP 8 +.B BodyFont +Sets the window's text font. +.TP +.B ReverseVideo +If +.I ReverseVideo's +value is set to +.I on, +the window will be displayed in inverse video. +.TP +.B BitMapIcon +If +.I BitMapIcon's +value is set to +.I on, +the window will iconify into the "kitchen sink." +.TP +.B BorderWidth +Sets the window's border width in pixels. +.TP +.B Foreground +For color displays, +sets the window's text color. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B Background +For color displays, +sets the window's background color. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B Border +For color displays, +sets the color of the window's border. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B Cursor +For color displays, +sets the color of the window's text cursor. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.TP +.B Mouse +For color displays, +sets the color of the window's mouse cursor. +See the file +.I \/usr\/lib\/rgb.txt +for a list of valid +.I color +names. +.PP +If you try to set color values while using a black and white display, +the window's characteristics will default as follows: +the foreground color will be set to black, +the background color will be set to white, +the border color will be set to grey, +and the text and mouse cursors will be set to black. +.SH +.I +.SM Using the Mouse +.PP +The following lists the key bindings for the mouse cursor when used in +an +.I Emacs +window. + +.na +.nf + +MOUSE BUTTON FUNCTION +left set mark +middle set cursor +right select (Emacs) window +SHIFT-middle put text into X cut buffer (cut text) +SHIFT-right paste text +CTRL-middle cut text and kill it +CTRL-right select this window, then split it into + two windows +CTRL-SHIFT-left X buffer menu--hold the buttons and keys + down, wait for menu to appear, select + buffer, and release. Move mouse out of + menu and release to cancel. +CTRL-SHIFT-middle X help menu--pop up index card menu for + Emacs help. +CTRL-SHIFT-right Select window with mouse, and delete all + other windows. Same as typing + CTRL-x 1. +.fi +.ad +.SH +.I +.SH MANUALS +You can order printed copies of the GNU Emacs Manual for $15.00/copy +postpaid from the Free Software Foundation, which develops GNU software +(contact them for quantity prices on the manual). Their address is: +.nf + Free Software Foundation + 675 Mass Ave. + Cambridge, MA 02139 +.fi +Your local Emacs maintainer might also have copies available. As +with all software and publications from FSF, everyone is permitted to +make and distribute copies of the Emacs manual. The TeX source to the +manual is also included in the Emacs source distribution. +.PP +.SH FILES +/usr/local/emacs/src - C source files and object files + +/usr/local/emacs/lisp - Lisp source files and compiled files +that define most editing commands. Some are preloaded; +others are autoloaded from this directory when used. + +/usr/local/emacs/man - sources for the Emacs reference manual. + +/usr/local/emacs/etc - various programs that are used with +GNU Emacs, and some files of information. + +/usr/local/emacs/etc/DOC.* - contains the documentation +strings for the Lisp primitives and preloaded Lisp functions +of GNU Emacs. They are stored here to reduce the size of +Emacs proper. + +/usr/local/emacs/etc/DIFF discusses GNU Emacs vs. Twenex Emacs; +.br +/usr/local/emacs/etc/CCADIFF discusses GNU Emacs vs. CCA Emacs; +.br +/usr/local/emacs/etc/GOSDIFF discusses GNU Emacs vs. Gosling Emacs. +.br +/usr/local/emacs/etc/SERVICE lists people offering various services +to assist users of GNU Emacs, including education, troubleshooting, +porting and customization. +.br +These files also have information useful to anyone wishing to write +programs in the Emacs Lisp extension language, which has not yet been fully +documented. + +/usr/local/emacs/info - files for the Info documentation browser +(a subsystem of Emacs) to refer to. Currently not much of Unix +is documented here, but the complete text of the Emacs reference +manual is included in a convenient tree structured form. + +/usr/local/emacs/lock - holds lock files that are made for all +files being modified in Emacs, to prevent simultaneous modification +of one file by two users. + +/usr/local/emacs/cpp - the GNU cpp, needed for building Emacs on +certain versions of Unix where the standard cpp cannot handle long +names for macros. + +/usr/local/emacs/shortnames - facilities for translating long names to +short names in C code, needed for building Emacs on certain versions +of Unix where the C compiler cannot handle long names for functions +or variables. +.PP +.SH BUGS +There is a mailing list, bug-gnu-emacs@prep.ai.mit.edu on the internet +(ucbvax!prep.ai.mit.edu!bug-gnu-emacs on UUCPnet), for reporting Emacs +bugs and fixes. But before reporting something as a bug, please try +to be sure that it really is a bug, not a misunderstanding or a +deliberate feature. We ask you to read the section ``Reporting Emacs +Bugs'' near the end of the reference manual (or Info system) for hints +on how and when to report bugs. Also, include the version number of +the Emacs you are running in \fIevery\fR bug report that you send in. + +Do not expect a personal answer to a bug report. The purpose of reporting +bugs is to get them fixed for everyone in the next release, if possible. +For personal assistance, look in the SERVICE file (see above) for +a list of people who offer it. + +Please do not send anything but bug reports to this mailing list. +Send requests to be added to mailing lists to the special list +info-gnu-emacs-request@prep.ai.mit.edu (or the corresponding UUCP +address). For more information about Emacs mailing lists, see the +file /usr/local/emacs/etc/MAILINGLISTS. Bugs tend actually to be +fixed if they can be isolated, so it is in your interest to report +them in such a way that they can be easily reproduced. +.PP +Bugs that I know about are: shell will not work with programs +running in Raw mode on some Unix versions. +.SH UNRESTRICTIONS +.PP +.I Emacs +is free; anyone may redistribute copies of +.I Emacs +to +anyone under the terms stated in the +.I Emacs +General Public License, +a copy of which accompanies each copy of +.I Emacs +and which also +appears in the reference manual. +.PP +Copies of +.I Emacs +may sometimes be received packaged with distributions of Unix systems, +but it is never included in the scope of any license covering those +systems. Such inclusion violates the terms on which distribution +is permitted. In fact, the primary purpose of the General Public +License is to prohibit anyone from attaching any other restrictions +to redistribution of +.I Emacs. +.PP +Richard Stallman encourages you to improve and extend +.I Emacs, +and urges that +you contribute your extensions to the GNU library. Eventually GNU +(Gnu's Not Unix) will be a complete replacement for Berkeley +Unix. +Everyone will be able to use the GNU system for free. +.SH AUTHORS +.PP +.I Emacs +was written by Richard Stallman and the Free Software Foundation. +Joachim Martillo and Robert Krawitz added the X features. + diff --git a/etc/emacs.icon b/etc/emacs.icon new file mode 100644 index 0000000..2c348c8 --- /dev/null +++ b/etc/emacs.icon @@ -0,0 +1,34 @@ +/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16 + */ + 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001, + 0x8000,0x0000,0x007E,0x1C01,0x8000,0x0000,0x0006,0x1C01, + 0x8000,0x0000,0x007F,0xFC01,0x8000,0x0000,0x0080,0x1C01, + 0x8000,0x0000,0x013F,0xFC01,0x8000,0x0000,0x0140,0x1C01, + 0x8000,0x0000,0x03E0,0x1C01,0x8000,0x0000,0x0000,0x1C01, + 0x8000,0x0000,0x0000,0x1C01,0x8000,0x0000,0x0000,0x1C01, + 0x8000,0x0000,0x0000,0x1C01,0x8000,0x0000,0x0210,0x1C01, + 0x8000,0x0000,0x0330,0x1C01,0x8000,0x0000,0x00C0,0x1C01, + 0x8003,0xFFFF,0xFFFF,0xFE01,0x8005,0xFFFF,0xFFFF,0xFE01, + 0x8004,0xFFFF,0xFFFF,0xFC01,0x8004,0x787F,0xFFFF,0xF801, + 0x8004,0x77FF,0xFFFF,0xF801,0x8000,0x77E3,0x6FFF,0xF801, + 0x8000,0x762D,0x6FFF,0xF801,0x8004,0x77AD,0x6FFF,0xF801, + 0x800C,0x77AD,0x6FFF,0xF801,0x8004,0x786D,0x8FFF,0xF801, + 0x8000,0x7FFF,0xFFFF,0xF801,0x8000,0x7FFF,0xFFFF,0xF801, + 0x8000,0x7E0F,0xFFFF,0xF801,0x8008,0x7EFF,0xFFFF,0xF801, + 0x800C,0x7EF9,0x31CE,0x3801,0x8004,0x7E1A,0xADB5,0xF801, + 0x8000,0x7EFA,0xADBE,0x7801,0x8000,0x7EFB,0xADB7,0xB801, + 0x8000,0x7E0B,0xB2CC,0x7801,0x8000,0x7FFF,0xFFFF,0xF801, + 0x8004,0x3FFF,0xFFFF,0xF001,0x8004,0x1FFF,0xFFFF,0xE001, + 0x800C,0x0003,0x6000,0x0001,0x8000,0x0001,0x43C0,0x0001, + 0x8000,0x0001,0x4420,0x0001,0x8000,0x0001,0x4990,0x0001, + 0x8000,0x0001,0x4A50,0x0001,0x8004,0x0001,0x3250,0x0001, + 0x8004,0x0000,0x8450,0x0001,0x800A,0x0000,0x7850,0x0001, + 0x8000,0x0000,0x0050,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 diff --git a/etc/emacs.names b/etc/emacs.names new file mode 100644 index 0000000..bae4996 --- /dev/null +++ b/etc/emacs.names @@ -0,0 +1,442 @@ +From: harvard!topaz!BLUE!BRAIL@mit-eddie +Date: 9 Sep 85 17:25:27 EDT +Subject: EMACS -- What does it mean? +To: mit-prep!info-gnu-emacs@TOPAZ.RUTGERS.EDU + + EMACS may stand for "Editing MACroS," but some friends of mine +suggested some more creative definitions. Here they are. Anyone have +any additions? + +-------- + +Even a +Master of +Arts +Comes +Simpler + +Emacs +Manuals +Are +Cryptic and +Surreal + +Energetic +Merchants +Always +Cultivate +Sales + +Each +Manual's +Audience is +Completely +Stupified + +Emacs +Means +A +Crappy +Screen + +Eventually +Munches +All +Computer +Storage + +Even +My +Aunt +Crashes the +System + +Eradication of +Memory +Accomplished with +Complete +Simplicity + +Elsewhere +Maybe +Alternative +Civilizations +Survive + +Egregious +Managers +Actively +Court +Stallman + +Esoteric +Malleability +Always +Considered +Silly + +Emacs +Manuals +Always +Cause +Senility + +Easily +Maintained with the +Assistance of +Chemical +Solutions + +EMACS +MACRO +ACTED +CREDO +SODOM + +Edwardian +Manifestation of +All +Colonial +Sins + +Generally +Not +Used + +Except by +Middle +Aged +Computer +Scientists + +Extended +Macros +Are +Considered +Superfluous + +Every +Mode +Accelerates +Creation of +Software + +Elsewhere +Maybe +All +Commands are +Simple + +Emacs +May +Allow +Customised +Screwups + +Excellent +Manuals +Are +Clearly +Suppressed + +Emetic +Macros +Assault +Core and +Segmentation + +Embarrassed +Manual-Writer +Accused of +Communist +Subversion + +Extensibilty and +Modifiability +Aggravate +Confirmed +Simpletons + +Emacs +May +Annihilate +Command +Structures + +Easily +Mangles, +Aborts, +Crashes and +Stupifies + +Extraneous +Macros +And +Commands +Stink + +Exceptionally +Mediocre +Algorithm for +Computer +Scientists + +EMACS +Makes no +Allowances +Considering its +Stiff price + +Equine +Mammals +Are +Considerably +Smaller + +Embarrasingly +Mundane +Advertising +Cuts +Sales + +Every +Moron +Assumes +CCA is +Superior + +Exceptionally +Mediocre +Autocratic +Control +System + +EMACS +May +Alienate +Clients and +Supporters + +Excavating +Mayan +Architecture +Comes +Simpler + +Erasing +Minds +Allows +Complete +Submission + +Every +Male +Adolescent +Craves +Sex + +Elephantine +Memory +Absolutely +Considered +Sine que non + +Emacs +Makers +Are +Crazy +Sickos + +Eenie-Meenie-Miney-Mo- +Macros +Are +Completely +Slow + +Experience the +Mildest +Ad +Campaign ever +Seen + +Emacs +Makefiles +Annihilate +C- +Shells + +Eradication of +Memory +Accomplished with +Complete +Simplicity + +Emetic +Macros +Assault +Core and +Segmentation + +Epileptic +MLisp +Aggravates +Compiler +Seizures + +Eleven thousand +Monkeys +Asynchronously +Crank out these +Slogans +------- + +From: ihnss!warren@mit-eddie (Warren Montgomery) +Newsgroups: net.emacs +Subject: Re: EMACS -- What does it mean? +Date: Tue, 10-Sep-85 09:14:24 EDT +Organization: AT&T Bell Labs, Naperville, IL +Apparently-To: emacs-netnews-distribution@mit-prep + +Someone at a luncheon suggested it meant: + +Evenings, +Mornings, +And a +Couple of +Saturdays + +(In reference to the odd hours that went into the creation of my +implementation). + +-- + + Warren Montgomery + ihnss!warren + IH ((312)-979) x2494 + +Date: Wed, 18 Sep 85 10:11:04 edt +From: inmet!tower@inmet.inmet (Leonard H. Tower Jr.) +Subject: Re: EMACS -- What does it mean? +To: tower@MIT-PREP.ARPA + +Received: by inmet.uucp (4.12/inmet) id AA02199; Wed, 18 Sep 85 09:10:17 edt +Date: Wed, 18 Sep 85 09:10:17 edt +Message-Id: <8509181310.AA02199@inmet.uucp> +Uucp-Paths: {bellcore,ima,ihnp4}!inmet!tower +Arpa-Path: ima!inmet!tower@CCA-UNIX.ARPA +Organization: Intermetrics, Inc., Cambridge, MA, USA +Home: 36 Porter Street, Somerville, MA 02143, USA +1 (617) 623-7739 +/* Written 6:48 pm Sep 14, 1985 by gml@ssc-vax in inmet:net.emacs */ +/* ---------- "Re: EMACS -- What does it mean?" ---------- */ +Pleeeeeeeze!!! Nice try on the meaning of EMACS. I believe the +correct acronym is: + +Emacs +Makes +All +Computing +Simple + +Thank you, and Good Night +/* End of text from inmet:net.emacs */ + +From: ho95e!wcs@mit-eddie (Bill.Stewart.4K435.x0705) +Newsgroups: net.emacs +Subject: Re: EMACS -- What does it mean? +Date: Thu, 26-Sep-85 21:43:54 EDT +Organization: AT&T Bell Labs, Holmdel NJ +Apparently-To: emacs-netnews-distribution@mit-prep + +> > very interesting, but what does GNU stand for ? +> GNU = Gnu's Not UNIX. There is also MINCE, for Mince Is Not a Complete Emacs. +> More recursive acronyms, anyone? +Many people have also seen FINE Is Not Emacs, but the one that has +character is THief Isn't Even Fine. +-- +## Bill Stewart, AT&T Bell Labs, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs + +Path: mit-eddie!think!harvard!bbnccv!bbncca!linus!decvax!mcnc!ncsu!uvacs!edison!ta2 +From: edison!ta2@mit-eddie (tom allebrandi) +Newsgroups: net.emacs +Subject: Re: Re: EMACS -- What does it mean? +Date: Sun, 29-Sep-85 18:11:55 EDT +Organization: General Electric's Mountain Resort +Apparently-To: emacs-netnews-distribution@mit-prep + +> GNU = Gnu's Not UNIX. There is also MINCE, for Mince Is Not a Complete Emacs. +> +> More recursive acronyms, anyone? +> + +For the DEC-system-10/20: FINE - Fine Is Not Emacs..... + +-- +............... +tom allebrandi 2, general electric aco, charlottesville, va +{decvax,duke}!mcnc!ncsu!uvacs!edison!ta2 +box 8106, charlottesville, va, 22906 +(804) 978-5566 +............... + +Date: Wed, 16 Oct 85 01:38:12 edt +From: inmet!tower (Leonard H. Tower Jr.) +Subject: more names +To: tower@MIT-PREP.ARPA + +Received: by inmet.uucp (4.12/inmet) id AA12997; Tue, 15 Oct 85 22:31:39 edt +Date: Tue, 15 Oct 85 22:31:39 edt +Message-Id: <8510160231.AA12997@inmet.uucp> +Uucp-Paths: {bellcore,ima,ihnp4}!inmet!tower +Arpa-Path: ima!inmet!tower@CCA-UNIX.ARPA +Organization: Intermetrics, Inc., Cambridge, MA, USA +Home: 36 Porter Street, Somerville, MA 02143, USA +1 (617) 623-7739 +/* Written 12:20 pm Oct 14, 1985 by rs@mirror.UUCP in inmet:net.emacs */ + + +SINE: Sine Is Not Emacs + (MIT Architecture Machine Group) + +EINE: Eine is Not Emacs + (MIT Lisp Machine) + +ZWEI: Zwei Was Eine Initially + ("rev2" of EINE) + +-- +Rich $alz {mit-eddie, ihnp4!inmet, wjh12, cca, datacube} !mirror!rs +Mirror Systems 2067 Massachusetts Ave. +617-661-0777 Cambridge, MA, 02140 +/* End of text from inmet:net.emacs */ + +Path: mit-eddie!genrad!panda!talcott!harvard!seismo!gatech!ulysses!pajb +From: ulysses!pajb@mit-eddie (Paul Bennett) +Newsgroups: net.emacs +Subject: Here we go again ... +Date: Sat, 19-Oct-85 17:26:49 EDT +Organization: AT&T Bell Laboratories, Murray Hill +Apparently-To: emacs-netnews-distribution@mit-prep + + +> EINE: Eine is Not Emacs +> (MIT Lisp Machine) +> +> ZWEI: Zwei Was Eine Initially +> ("rev2" of EINE) + +DREI: DREI - Really Emacs Inside + (Exists only in my head) + +Paul. + +UUCP: {decvax,allegra,vax135,ucbvax}!ulysses!circe!pajb +DDD: (201) 582 7346 +USPS: AT&T Bell Labs, Room 5E-103, Murray Hill, NJ 07974 + +.. I don't care WHO you are, you're not walking on the water while I'M fishing.-- +Paul. + +UUCP: {decvax,allegra,vax135,ucbvax}!ulysses!circe!pajb +DDD: (201) 582 7346 +USPS: AT&T Bell Labs, Room 5E-103, Murray Hill, NJ 07974 + +.. I don't care WHO you are, you're not walking on the water while I'M fishing. diff --git a/etc/emacsclient.c b/etc/emacsclient.c new file mode 100644 index 0000000..70e4308 --- /dev/null +++ b/etc/emacsclient.c @@ -0,0 +1,257 @@ +/* Client process that communicates with GNU Emacs acting as server. + Copyright (C) 1986, 1987 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is distributed in the hope that it will be useful, +but without any warranty. No author or distributor +accepts responsibility to anyone for the consequences of using it +or for whether it serves any particular purpose or works at all, +unless he says so in writing. + +Everyone is granted permission to copy, modify and redistribute +GNU Emacs, but only under the conditions described in the +document "GNU Emacs copying permission notice". An exact copy +of the document is supposed to have been given to you along with +GNU Emacs so that you can know how you may redistribute it all. +It should be in a file named COPYING. Among other things, the +copyright notice and this notice must be preserved on all copies. */ + + +#define NO_SHORTNAMES +#include "../src/config.h" +#undef read +#undef write +#undef open +#ifdef close +#undef close +#endif + + +#if !defined(BSD) && !defined(HAVE_SYSVIPC) +#include + +main (argc, argv) + int argc; + char **argv; +{ + fprintf (stderr, "%s: Sorry, the Emacs server is supported only\n", + argv[0]); + fprintf (stderr, "on systems with Berkeley sockets or System V IPC.\n"); + exit (1); +} + +#else /* BSD or HAVE_SYSVIPC */ + +#if defined(BSD) && ! defined (HAVE_SYSVIPC) +/* BSD code is very different from SYSV IPC code */ + +#include +#include +#include +#include +#include + +extern int sys_nerr; +extern char *sys_errlist[]; + +main (argc, argv) + int argc; + char **argv; +{ + int s, i; + FILE *out; + struct sockaddr_un server; + char *homedir, *cwd, *str; + char string[BUFSIZ]; + + char *getenv (), *getwd (); + + if (argc < 2) + { + fprintf (stderr, "Usage: %s filename\n", argv[0]); + exit (1); + } + + /* + * Open up an AF_UNIX socket in this person's home directory + */ + + if ((s = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) + { + fprintf (stderr, "%s: ", argv[0]); + perror ("socket"); + exit (1); + } + server.sun_family = AF_UNIX; + if ((homedir = getenv ("HOME")) == NULL) + { + fprintf (stderr, "%s: No home directory\n", argv[0]); + exit (1); + } + strcpy (server.sun_path, homedir); + strcat (server.sun_path, "/.emacs_server"); + if (connect (s, &server, strlen (server.sun_path) + 2) < 0) + { + fprintf (stderr, "%s: ", argv[0]); + perror ("connect"); + exit (1); + } + if ((out = fdopen (s, "r+")) == NULL) + { + fprintf (stderr, "%s: ", argv[0]); + perror ("fdopen"); + exit (1); + } + + cwd = getwd (string); + if (cwd == 0) + { + /* getwd puts message in STRING if it fails. */ + fprintf (stderr, "%s: %s (%s)\n", argv[0], string, + (errno < sys_nerr) ? sys_errlist[errno] : "unknown error"); + exit (1); + } + + for (i = 1; i < argc; i++) + { + if (*argv[i] == '+') + { + char *p = argv[i] + 1; + while (*p >= '0' && *p <= '9') p++; + if (*p != 0) + fprintf (out, "%s/", cwd); + } + else if (*argv[i] != '/') + fprintf (out, "%s/", cwd); + fprintf (out, "%s ", argv[i]); + } + fprintf (out, "\n"); + fflush (out); + + printf ("Waiting for Emacs..."); + fflush (stdout); + + rewind (out); /* re-read the output */ + str = fgets (string, BUFSIZ, out); + + /* Now, wait for an answer and print any messages. */ + + while (str = fgets (string, BUFSIZ, out)) + printf ("%s", str); + + exit (0); +} + +#else /* This is the SYSV IPC section */ + +#include +#include +#include +#include + +main (argc, argv) + int argc; + char **argv; +{ + int s; + key_t key; + struct msgbuf * msgp = + (struct msgbuf *) malloc (sizeof *msgp + BUFSIZ); + struct msqid_ds * msg_st; + char *homedir, buf[BUFSIZ]; + char gwdirb[BUFSIZ]; + char *cwd; + char *temp; + char *getwd (), *getcwd (), *getenv (); + + if (argc < 2) + { + fprintf (stderr, "Usage: %s filename\n", argv[0]); + exit (1); + } + + /* + * Create a message queue using ~/.emacs_server as the path for ftok + */ + if ((homedir = getenv ("HOME")) == NULL) + { + fprintf (stderr, "%s: No home directory\n", argv[0]); + exit (1); + } + strcpy (buf, homedir); + strcat (buf, "/.emacs_server"); + creat (buf, 0600); + key = ftok (buf, 1); /* unlikely to be anyone else using it */ + s = msgget (key, 0600); + if (s == -1) + { + fprintf (stderr, "%s: ", argv[0]); + perror ("msgget"); + exit (1); + } + + /* Determine working dir, so we can prefix it to all the arguments. */ +#ifdef BSD + temp = getwd (gwdirb); +#else + temp = getcwd (gwdirb, sizeof gwdirb); +#endif + + cwd = gwdirb; + if (temp != 0) + { + /* On some systems, cwd can look like `@machine/...'; + ignore everything before the first slash in such a case. */ + while (*cwd && *cwd != '/') + cwd++; + strcat (cwd, "/"); + } + else + { + fprintf (stderr, cwd); + exit (1); + } + + msgp->mtext[0] = 0; + argc--; argv++; + while (argc) + { + if (*argv[0] == '+') + { + char *p = argv[0] + 1; + while (*p >= '0' && *p <= '9') p++; + if (*p != 0) + strcat (msgp->mtext, cwd); + } + else if (*argv[0] != '/') + strcat (msgp->mtext, cwd); + + strcat (msgp->mtext, argv[0]); + strcat (msgp->mtext, " "); + argv++; argc--; + } + strcat (msgp->mtext, "\n"); + msgp->mtype = 1; + if (msgsnd (s, msgp, strlen (msgp->mtext)+1, 1, 0) < 0) + { + fprintf (stderr, "%s: ", argv[0]); + perror ("msgsnd"); + exit (1); + } + /* + * Now, wait for an answer + */ + printf ("Waiting for Emacs..."); + fflush (stdout); + + msgrcv (s, msgp, BUFSIZ, getpid (), 0); /* wait for anything back */ + strcpy (buf, msgp->mtext); + + printf ("\n%s\n", buf); + exit (0); +} + +#endif /* HAVE_SYSVIPC */ + +#endif /* BSD or HAVE_SYSVIPC */ diff --git a/etc/emacstool.1 b/etc/emacstool.1 new file mode 100644 index 0000000..8cd8165 --- /dev/null +++ b/etc/emacstool.1 @@ -0,0 +1,134 @@ +.TH EMACSTOOL 1 +.SH NAME +.I emacstool +\- run emacs under Sun windows with function-key and mouse support. +.SH SYNOPSIS +.I emacstool +[{window_args} {-rc run_command_path} args ... ] +.SH TYPICAL USAGE +In ~/.suntools or ~/.rootmenu include a line like this: +.br +"Emacstool" emacstool -WI emacs.icon -f emacstool-init +.SH DESCRIPTION +.B Emacstool +creates a SunView frame and a tty subwindow within which mouse events +and function keys are translated to ASCII sequences which Emacs can +parse. The translated input events are sent to the process running in +the tty subwindow, which is typically GNU Emacs. Emacstool thereby +allows GNU Emacs users to make full use of the mouse and function keys. +GNU Emacs can be loaded with functions to interpret the mouse and +function-key events to make a truely fine screen oriented editor for +the Sun Workstation. +.PP +(Note that GNU Emacs has a special interface to the X window system as +well. The X window system has many technical advantages, it is an +industry standard, and it is also free software. The Free Software +Foundation urges you to try X windows, and distributes a free copy of +X on Emacs distribution tapes.) +.PP +Function keys are translated to a sequence of the form +`^X*[a-o][lrt]'. The last character is `l', `r', or `t' corresponding +to whether the key is among the Left, Right, or Top function keys. +The third character indicates which button of the group +was pressed. Thus, the function key in the lower right corner will +transmit the sequence `^X*or'. In addition, the [lrt] is affected by +the Control, Meta, and Shift keys. Unshifted Control keys will be +non-alphabetic: C-l is [,], C-r is [2], C-t is [4]. +.PP +Mouse buttons are encoded as `^X^@([124] x y)\\n'. ^X^@ is the +standard GNU Emacs mouse event prefix, it is followed by a list +indicating the button pressed and the character row and column of the +point in the window where the mouse cursor is, and followed by a +newline character. In GNU Emacs, the ^X^@ dispatches to a +mouse event handler which then reads the following list. +.SH OPTIONS +.B Emacstool +supports all the standard window arguments, including font and icon +specifiers. +.PP +By default, Emacstool runs the program +.I emacs +in the created subwindow. +The value of the environment variable +.I EMACSTOOL +can be used to override this if your version of +.B Emacs +is not accessible on your search path by the name +.I Emacs. +In addition, the run command can be set by the +.I pathname +following the last occurence of the +.I \-rc +flag. +This is convenient for using Emacstool to run on remote machines. +.PP +All other command line arguments not used by the window system are passed +as arguments to the program that runs in the Emacstool window. +.PP +For example: +.PP +local% (emacstool -rc rlogin remote -8 &)& +.PP +will create an Emacstool window logged in to a machine named +.I remote. +If Emacs is run from this window, +Emacstool will encode mouse and function keys, and send them to rlogin. +If Emacs is run from this shell on the remote machine, it will see +the mouse and function keys properly. +However, since the remote host does not have access to the screen, +the cursor cannot be changed, menus will not appear, and the selection +buffer (STUFF) is limited. +.SH Using With GNU Emacs: +The GNU Emacs files +lisp/term/sun.el, +lisp/sun-mouse.el, +lisp/sun-fns.el, +and +src/sunfns.c +provide emacs support for the Emacstool and function keys. +Emacstool will automatically set the TERM environment variable to be "sun" +and unset the environment variable TERMCAP. That is, these variables will +not be inherited from the shell that starts Emacstool. +Since the terminal type is +.I SUN +(that is, the environment variable TERM is set to +.I SUN), +Emacs will automatically load the file lisp/term/sun. +This, in turn, will ensure that sun-mouse.el is autoloaded when any mouse +events are detected. It is suggested that +.I sun-mouse +and +.I sun-fns +be loaded in your site-init.el file, so that they will always be loaded +when running on a Sun workstation. +.PP +In addition, Emacstool sets the environment variable IN_EMACSTOOL = "t". +Lisp code in your ~/.emacs can use (getenv "IN_EMACSTOOL") +to determine whether to do Emacstool specific initalization. +Sun.el uses this to automatically call emacstool-init (getenv "IN_EMACSTOOL") +is defined. +.PP +The file src/sunfns.c defines several useful functions for emacs on +the Sun. Among these are procedures to pop-up SunView +.I menus, +put and get from the SunView +.I STUFF +buffer, and a procedure for changing the cursor +.I icon. +If you want to define or edit cursor icons, +there is a rudimentary mouse driven icon editor in the file +lisp/sun-cursors.el. Try invoking (sc:edit-cursor) +.SH BUGS +It takes a few milliseconds to create a menu before it pops up. +.SH ENVIRONMENT VARIABLES +EMACSTOOL +IN_EMACSTOOL +TERM +TERMCAP +.SH FILES +.DT +emacs +.SH "SEE ALSO" +emacs(1) + .../etc/SUN-SUPPORT + .../lisp/term/sun.el diff --git a/etc/emacstool.c b/etc/emacstool.c new file mode 100644 index 0000000..a74c6b5 --- /dev/null +++ b/etc/emacstool.c @@ -0,0 +1,340 @@ +/* + * + * Copyright (C) 1986 Free Software Foundation, Inc. + * + * This file is part of GNU Emacs. + * + * GNU Emacs is distributed in the hope that it will be useful, + * but without any warranty. No author or distributor + * accepts responsibility to anyone for the consequences of using it + * or for whether it serves any particular purpose or works at all, + * unless he says so in writing. + * + * Everyone is granted permission to copy, modify and redistribute + * GNU Emacs, but only under the conditions described in the + * document "GNU Emacs copying permission notice". An exact copy + * of the document is supposed to have been given to you along with + * GNU Emacs so that you can know how you may redistribute it all. + * It should be in a file named COPYING. Among other things, the + * copyright notice and this notice must be preserved on all copies. + * + * + * For Emacs in SunView/Sun-Windows: (supported by Sun Unix v3.2) + * Insert a notifier filter-function to convert all useful input + * to "key" sequences that emacs can understand. See: Emacstool(1). + * + * Author: Jeff Peck, Sun Microsystems, Inc. + * + * Original Idea: Ian Batten + * Updated 15-Mar-88, Jeff Peck: set IN_EMACSTOOL, TERM, TERMCAP + * + */ + +#include +#include +#include +#include + +#define BUFFER_SIZE 128 /* Size of all the buffers */ + +/* define WANT_CAPS_LOCK to make f-key T1 (aka F1) behave as CapsLock */ +#define WANT_CAPS_LOCK +#ifdef WANT_CAPS_LOCK +int caps_lock; /* toggle indicater for f-key T1 caps lock */ +static char *Caps = "[CAPS] "; /* Caps Lock prefix string */ +#define CAPS_LEN 7 /* strlen (Caps) */ +#endif + +static char *mouse_prefix = "\030\000"; /* C-x C-@ */ +static int m_prefix_length = 2; /* mouse_prefix length */ + +static char *key_prefix = "\030*"; /* C-x * */ +static int k_prefix_length = 2; /* key_prefix length */ + +static char *emacs_name = "emacs"; /* default run command */ +static char buffer[BUFFER_SIZE]; /* send to ttysw_input */ +static char *title = "Emacstool - "; /* initial title */ + +Frame frame; /* Base frame for system */ +Tty ttysw; /* Where emacs is */ +int font_width, font_height; /* For translating pixels to chars */ + +int console_fd = 0; /* for debugging: setenv DEBUGEMACSTOOL */ +FILE *console; /* for debugging: setenv DEBUGEMACSTOOL */ + +Icon frame_icon; +/* make an icon_image for the default frame_icon */ +static short default_image[258] = +{ +#include +}; +mpr_static(icon_image, 64, 64, 1, default_image); + + +/* + * Assign a value to a set of keys + */ +int +button_value (event) + Event *event; +{ + int retval = 0; + /* + * Code up the current situation: + * + * 1 = MS_LEFT; + * 2 = MS_MIDDLE; + * 4 = MS_RIGHT; + * 8 = SHIFT; + * 16 = CONTROL; + * 32 = META; + * 64 = DOUBLE; + * 128 = UP; + */ + + if (MS_LEFT == (event_id (event))) retval = 1; + if (MS_MIDDLE == (event_id (event))) retval = 2; + if (MS_RIGHT == (event_id (event))) retval = 4; + + if (event_shift_is_down (event)) retval += 8; + if (event_ctrl_is_down (event)) retval += 16; + if (event_meta_is_down (event)) retval += 32; + if (event_is_up (event)) retval += 128; + return retval; +} + +/* + * Variables to store the time of the previous mouse event that was + * sent to emacs. + * + * The theory is that to time double clicks while ignoreing UP buttons, + * we must keep track of the accumulated time. + * + * If someone writes a SUN-SET-INPUT-MASK for emacstool, + * That could be used to selectively disable UP events, + * and then this cruft wouldn't be necessary. + */ +static long prev_event_sec = 0; +static long prev_event_usec = 0; + +/* + * Give the time difference in milliseconds, where one second + * is considered infinite. + */ +int +time_delta (now_sec, now_usec, prev_sec, prev_usec) + long now_sec, now_usec, prev_sec, prev_usec; +{ + long sec_delta = now_sec - prev_sec; + long usec_delta = now_usec - prev_usec; + + if (usec_delta < 0) { /* "borrow" a second */ + usec_delta += 1000000; + --sec_delta; + } + + if (sec_delta >= 10) + return (9999); /* Infinity */ + else + return ((sec_delta * 1000) + (usec_delta / 1000)); +} + + +/* + * Filter function to translate selected input events for emacs + * Mouse button events become ^X^@(button x-col y-line time-delta) . + * Function keys: ESC-*{c}{lrt} l,r,t for Left, Right, Top; + * {c} encodes the keynumber as a character [a-o] + */ +static Notify_value +input_event_filter_function (window, event, arg, type) + Window window; + Event *event; + Notify_arg arg; + Notify_event_type type; +{ + struct timeval time_stamp; + + if (console_fd) fprintf(console, "Event: %d\n", event_id(event)); + + /* UP L1 is the STOP key */ + if (event_id(event) == WIN_STOP) { + ttysw_input(ttysw, "\007\007\007\007\007\007\007", 7); + return NOTIFY_IGNORED; + } + + /* UP L5 & L7 is Expose & Open, let them pass to sunview */ + if (event_id(event) == KEY_LEFT(5) || event_id(event) == KEY_LEFT(7)) + if(event_is_up (event)) + return notify_next_event_func (window, event, arg, type); + else return NOTIFY_IGNORED; + + if (event_is_button (event)) { /* do Mouse Button events */ +/* Commented out so that we send mouse up events too. + if (event_is_up (event)) + return notify_next_event_func (window, event, arg, type); +*/ + time_stamp = event_time (event); + ttysw_input (ttysw, mouse_prefix, m_prefix_length); + sprintf (buffer, "(%d %d %d %d)\015", + button_value (event), + event_x (event) / font_width, + event_y (event) / font_height, + time_delta (time_stamp.tv_sec, time_stamp.tv_usec, + prev_event_sec, prev_event_usec) + ); + ttysw_input (ttysw, buffer, strlen(buffer)); + prev_event_sec = time_stamp.tv_sec; + prev_event_usec = time_stamp.tv_usec; + return NOTIFY_IGNORED; + } + + { /* Do the function key events */ + int d; + char c = (char) 0; + if ((event_is_key_left (event)) ? + ((d = event_id(event) - KEY_LEFT(1) + 'a'), c='l') : + ((event_is_key_right (event)) ? + ((d = event_id(event) - KEY_RIGHT(1) + 'a'), c='r') : + ((event_is_key_top (event)) ? + ((d = event_id(event) - KEY_TOP(1) + 'a'), c='t') : 0))) + { + if (event_is_up(event)) return NOTIFY_IGNORED; + if (event_shift_is_down (event)) c = c - 32; + /* this will give a non-{lrt} for unshifted keys */ + if (event_ctrl_is_down (event)) c = c - 64; + if (event_meta_is_down (event)) c = c + 128; +#ifdef WANT_CAPS_LOCK +/* set a toggle and relabel window so T1 can act like caps-lock */ + if (event_id(event) == KEY_TOP(1)) + { + /* make a frame label with and without CAPS */ + strcpy (buffer, Caps); + title = &buffer[CAPS_LEN]; + strncpy (title, (char *)window_get (frame, FRAME_LABEL), + BUFFER_SIZE - CAPS_LEN); + buffer[BUFFER_SIZE] = (char) 0; + if (strncmp (title, Caps, CAPS_LEN) == 0) + title += CAPS_LEN; /* already Caps */ + caps_lock = (caps_lock ? 0 : CAPS_LEN); + window_set(frame, FRAME_LABEL, (title -= caps_lock), 0); + return NOTIFY_IGNORED; + } +#endif + ttysw_input (ttysw, key_prefix, k_prefix_length); + sprintf (buffer, "%c%c", d, c); + ttysw_input(ttysw, buffer, strlen(buffer)); + + return NOTIFY_IGNORED; + } + } + if ((event_is_ascii(event) || event_is_meta(event)) + && event_is_up(event)) return NOTIFY_IGNORED; +#ifdef WANT_CAPS_LOCK +/* shift alpha chars to upper case if toggle is set */ + if ((caps_lock) && event_is_ascii(event) + && (event_id(event) >= 'a') && (event_id(event) <= 'z')) + event_set_id(event, (event_id(event) - 32)); +/* crufty, but it works for now. is there an UPCASE(event)? */ +#endif + return notify_next_event_func (window, event, arg, type); +} + +main (argc, argv) + int argc; + char **argv; +{ + int error_code; /* Error codes */ + + if(getenv("DEBUGEMACSTOOL")) + console = fdopen (console_fd = open("/dev/console",O_WRONLY), "w"); + + /* do this first, so arglist can override it */ + frame_icon = icon_create (ICON_LABEL, "Emacstool", + ICON_IMAGE, &icon_image, + 0); + + putenv("IN_EMACSTOOL=t"); /* notify subprocess that it is in emacstool */ + + if (putenv("TERM=sun") != 0) /* TTYSW will be a TERM=sun window */ + {fprintf (stderr, "%s: Could not set TERM=sun, using `%s'\n", + argv[0], (char *)getenv("TERM")) ;}; + /* + * If TERMCAP starts with a slash, it is the pathname of the + * termcap file, not an entry extracted from it, so KEEP it! + * Otherwise, it may not relate to the new TERM, so Nuke-It. + * If there is no TERMCAP environment variable, don't make one. + */ + { + char *termcap ; /* Current TERMCAP value */ + termcap = (char *)getenv("TERMCAP") ; + if (termcap && (*termcap != '/')) + { + if (putenv("TERMCAP=") != 0) + {fprintf (stderr, "%s: Could not clear TERMCAP\n", argv[0]) ;} ; + } ; + } ; + + /* find command to run as subprocess in window */ + if (!(argv[0] = (char *)getenv("EMACSTOOL"))) /* Set emacs command name */ + argv[0] = emacs_name; + for (argc = 1; argv[argc]; argc++) /* Use last one on line */ + if(!(strcmp ("-rc", argv[argc]))) /* Override if -rc given */ + { + int i = argc; + argv[argc--]=0; /* kill the -rc argument */ + if (argv[i+1]) { /* move to agrv[0] and squeeze the rest */ + argv[0]=argv[i+1]; + for (; argv[i+2]; (argv[i]=argv[i+2],argv[++i]=0)); + } + } + + strcpy (buffer, title); + strncat (buffer, argv[0], /* append run command name */ + (BUFFER_SIZE - (strlen (buffer)) - (strlen (argv[0]))) - 1); + + /* Build a frame to run in */ + frame = window_create ((Window)NULL, FRAME, + FRAME_LABEL, buffer, + FRAME_ICON, frame_icon, + FRAME_ARGC_PTR_ARGV, &argc, argv, + 0); + + /* Create a tty with emacs in it */ + ttysw = window_create (frame, TTY, + TTY_QUIT_ON_CHILD_DEATH, TRUE, + TTY_BOLDSTYLE, 8, + TTY_ARGV, argv, + 0); + + window_set(ttysw, + WIN_CONSUME_PICK_EVENTS, + WIN_STOP, + WIN_MOUSE_BUTTONS, WIN_UP_EVENTS, + /* LOC_WINENTER, LOC_WINEXIT, LOC_MOVE, */ + 0, + + WIN_CONSUME_KBD_EVENTS, + WIN_STOP, + WIN_ASCII_EVENTS, + WIN_LEFT_KEYS, WIN_TOP_KEYS, WIN_RIGHT_KEYS, + /* WIN_UP_ASCII_EVENTS, */ + 0, + + 0); + + font_height = (int)window_get (ttysw, WIN_ROW_HEIGHT); + font_width = (int)window_get (ttysw, WIN_COLUMN_WIDTH); + + /* Interpose my event function */ + error_code = (int) notify_interpose_event_func + (ttysw, input_event_filter_function, NOTIFY_SAFE); + + if (error_code != 0) /* Barf */ + { + fprintf (stderr, "notify_interpose_event_func got %d.\n", error_code); + exit (1); + } + + window_main_loop (frame); /* And away we go */ +} diff --git a/etc/env.c b/etc/env.c new file mode 100644 index 0000000..0e067b5 --- /dev/null +++ b/etc/env.c @@ -0,0 +1,406 @@ +/* env.c - manipulate environment and execute a program + in that environment + Mly 861126 + + Copyright (C) 1986 Free Software Foundation, Inc. + + NO WARRANTY + + BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY +NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, +RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS" +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY +AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. +STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY +WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR +OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR +DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR +A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS +PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. + + GENERAL PUBLIC LICENSE TO COPY + + 1. You may copy and distribute verbatim copies of this source file +as you receive it, in any medium, provided that you conspicuously +and appropriately publish on each copy a valid copyright notice +"Copyright (C) 1986 Free Software Foundation, Inc.", and include +following the copyright notice a verbatim copy of the above disclaimer +of warranty and of this License. + + 2. You may modify your copy or copies of this source file or +any portion of it, and copy and distribute such modifications under +the terms of Paragraph 1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating + that you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, + that in whole or in part contains or is a derivative of this + program or any part thereof, to be licensed at no charge to all + third parties on terms identical to those contained in this + License Agreement (except that you may choose to grant more extensive + warranty protection to some or all third parties, at your option). + + c) You may charge a distribution fee for the physical act of + transferring a copy, and you may at your option offer warranty + protection in exchange for a fee. + +Mere aggregation of another unrelated program with this program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other program under the scope of these terms. + + 3. You may copy and distribute this program (or a portion or derivative +of it, under Paragraph 2) in object code or executable form under the terms +of Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal + shipping charge) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +For an executable file, complete source code means all the source code for +all modules it contains; but, as a special exception, it need not include +source code for modules which are standard libraries that accompany the +operating system on which the executable file runs. + + 4. You may not copy, sublicense, distribute or transfer this program +except as expressly provided under this License Agreement. Any attempt +otherwise to copy, sublicense, distribute or transfer this program is void and +your rights to use the program under this License agreement shall be +automatically terminated. However, parties who have received computer +software programs from you with this License Agreement will not have +their licenses terminated so long as such parties remain in full compliance. + + 5. If you wish to incorporate parts of this program into other free +programs whose distribution conditions are different, write to the Free +Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet +worked out a simple rule that can be stated here, but we will often permit +this. We will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software. + + In other words, you are welcome to use, share and improve this program. + You are forbidden to forbid anyone else to use, share and improve + what you give them. Help stamp out software-hoarding! */ + +/* + + If first argument is "-", then a new environment is constructed + from scratch; otherwise the environment is inherited from the parent + process, except as modified by other options. + + So, "env - foo" will invoke the "foo" program in a null environment, + whereas "env foo" would invoke "foo" in the same environment as that + passed to "env" itself. + + Subsequent arguments are interpreted as follows: + + * "variable=value" (ie an arg containing a "=" character) + means to set the specified environment variable to that value. + `value' may be of zero length ("variable="). Note that setting + a variable to a zero-length value is different from unsetting it. + + * "-u variable" or "-unset variable" + means to unset that variable + If that variable isn't set, does nothing. + + * "-s variable value" or "-set variable value" + same as "variable=value" + + * "-" or "--" + are used to indicate that the following argument is the program + to invoke. This is only necessary when the program's name + begins with "-" or contains a "=" + + * anything else + The first remaining argument specifies a program to invoke + (it is searched for according to the specification of the PATH + environment variable) and any arguments following that are + passed as arguments to that program + + If no program-name is specified following the environment + specifications the the resulting environment is printed + (The is like specifying a program-name of "printenv") + + Examples: + If the environment passed to "env" is + { USER=rms EDITOR=emacs PATH=.:/gnubin:/hacks } + + * "env DISPLAY=gnu:0 nemacs" + calls "nemacs" in the envionment + { EDITOR=emacs USER=rms DISPLAY=gnu } + + * "env - USER=foo /hacks/hack bar baz" + will call the "hack" program on arguments "bar" and "baz" + in an environment in which the only variable is "USER" + Note that the "-" option will clear out the PATH variable, + so one should be careful to specify in which directory + to find the program to call + + * "env -u EDITOR USER=foo PATH=/energy -- e=mc2 bar baz" + The program "/energy/e=mc2" is called with environment + { USER=foo PATH=/energy } + +*/ + +#ifdef EMACS +#define NO_SHORTNAMES +#include "../src/config.h" +#endif /* EMACS */ + +#include + +extern int execvp (); +extern char *index (); + +char *xmalloc (), *xrealloc (); +char *concat (); + +extern char **environ; + +char **nenv; +int nenv_size; + +char *progname; +void setenv (); +void fatal (); + +main (argc, argv, envp) + register int argc; + register char **argv; + char **envp; +{ + register char *tem; + + progname = argv[0]; + argc--; + argv++; + + nenv_size = 100; + nenv = (char **) xmalloc (nenv_size * sizeof (char *)); + *nenv = (char *) 0; + + /* "-" flag means to not inherit parent's environment */ + if (argc && !strcmp (*argv, "-")) + { + argc--; + argv++; + } + else + /* Else pass on existing env vars. */ + for (; *envp; envp++) + { + tem = index (*envp, '='); + if (tem) + { + *tem = '\000'; + setenv (*envp, tem + 1); + } + } + + while (argc > 0) + { + tem = index (*argv, '='); + if (tem) + /* If arg contains a "=" it specifies to set a variable */ + { + *tem = '\000'; + setenv (*argv, tem + 1); + argc--; argv++; + continue; + } + + if (**argv != '-') + /* Remaining args are program name and args to pass it */ + break; + + if (argc < 2) + fatal ("No argument following \"%s\" switch", *argv); + if (!strcmp (*argv, "-u") || + !strcmp (*argv, "-unset")) + /* Unset a variable */ + { + argc--; argv++; + setenv (*argv, 0); + argc--; argv++; + } + else if (!strcmp (*argv, "-s") || + !strcmp (*argv, "-set")) + /* Set a variable */ + { + argc--; argv++; + tem = *argv; + if (argc < 2) + fatal ("No value specified for variable \"%s\"", + tem); + argc--; argv++; + setenv (tem, *argv); + argc--; argv++; + } + else if (!strcmp (*argv, "-") || !strcmp (*argv, "--")) + { + argc--; argv++; + break; + } + else + { + fatal ("unknown switch \"%s\"", *argv); + } + } + + /* If no program specified print the environment and exit */ + if (argc <= 0) + { + while (*nenv) + printf ("%s\n", *nenv++); + exit (0); + } + else + { + extern int errno, sys_nerr; + extern char *sys_errlist[]; + + environ = nenv; + (void) execvp (*argv, argv); + + fprintf (stderr, "%s: Cannot execute \"%s\"", + progname, *argv); + if (errno < sys_nerr) + fprintf (stderr, ": %s\n" , sys_errlist[errno]); + else + putc ('\n', stderr); + exit (errno != 0 ? errno : 1); + } +} + +void +setenv (var, val) + register char *var, *val; +{ + register char **e; + int len = strlen (var); + + { + register char *tem = index (var, '='); + if (tem) + fatal ("Environment variable names may not contain \"=\": %s", + var); + else if (*var == '\000') + fatal ("Zero-length environment variable name specified."); + } + + for (e = nenv; *e; e++) + if (!strncmp (var, *e, len) && + (*e)[len] == '=') + { + if (val) + goto set; + else + do { *e = *(e + 1); } while (*e++); + return; + } + + if (!val) + return; /* Nothing to unset */ + + len = e - nenv; + if (len + 1 >= nenv_size) + { + nenv_size += 100; + nenv = (char **) xrealloc (nenv, nenv_size * sizeof (char *)); + e = nenv + len; + } + + set: + val = concat (var, "=", val); + if (*e) + free (*e); + else + *(e + 1) = (char *) 0; + *e = val; + return; +} + +void +fatal (msg, arg1, arg2) + char *msg, *arg1, *arg2; +{ + fprintf (stderr, "%s: ", progname); + fprintf (stderr, msg, arg1, arg2); + putc ('\n', stderr); + exit (1); +} + + +extern char *malloc (), *realloc (); + +void +memory_fatal () +{ + fatal ("Out of memory"); +} + +char * +xmalloc (size) + int size; +{ + register char *value; + value = (char *) malloc (size); + if (!value) memory_fatal (); + return (value); +} + +char * +xrealloc (ptr, size) + char *ptr; + int size; +{ + register char *value; + value = (char *) realloc (ptr, size); + if (!value) memory_fatal (); + return (value); +} + +/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */ + +char * +concat (s1, s2, s3) + char *s1, *s2, *s3; +{ + int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); + char *result = (char *) xmalloc (len1 + len2 + len3 + 1); + + strcpy (result, s1); + strcpy (result + len1, s2); + strcpy (result + len1 + len2, s3); + *(result + len1 + len2 + len3) = 0; + + return result; +} + + +/* + * Local variables: + * compile-command: "cc -g -o env env.c" + * end: + */ diff --git a/etc/etags-vmslib.c b/etc/etags-vmslib.c new file mode 100644 index 0000000..0aa5bf6 --- /dev/null +++ b/etc/etags-vmslib.c @@ -0,0 +1,187 @@ +/* File name wild card expansion for VMS. + This file is part of the etags program. + Copyright (C) 1987 Free Software Foundation, Inc. 3 Feb 1987 + +This program is distributed in the hope that it will be useful, +but without any warranty. No author or distributor +accepts responsibility to anyone for the consequences of using it +or for whether it serves any particular purpose or works at all, +unless he says so in writing. + + Permission is granted to anyone to distribute verbatim copies + of this program's source code as received, in any medium, provided that + the copyright notice, the nonwarraty notice above + and this permission notice are preserved, + and that the distributor grants the recipient all rights + for further redistribution as permitted by this notice, + and informs him of these rights. + + Permission is granted to distribute modified versions of this + program's source code, or of portions of it, under the above + conditions, plus the conditions that all changed files carry + prominent notices stating who last changed them and that the + derived material, including anything packaged together with it and + conceptually functioning as a modification of it rather than an + application of it, is in its entirety subject to a permission + notice identical to this one. + + Permission is granted to distribute this program (verbatim or + as modified) in compiled or executable form, provided verbatim + redistribution is permitted as stated above for source code, and + A. it is accompanied by the corresponding machine-readable + source code, under the above conditions, or + B. it is accompanied by a written offer, with no time limit, + to distribute the corresponding machine-readable source code, + under the above conditions, to any one, in return for reimbursement + of the cost of distribution. Verbatim redistribution of the + written offer must be permitted. Or, + C. it is distributed by someone who received only the + compiled or executable form, and is accompanied by a copy of the + written offer of source code which he received along with it. + + Permission is granted to distribute this program (verbatim or as modified) + in executable form as part of a larger system provided that the source + code for this program, including any modifications used, + is also distributed or offered as stated in the preceding paragraph. + +In other words, you are welcome to use, share and improve this program. +You are forbidden to forbid anyone else to use, share and improve +what you give them. Help stamp out software-hoarding! */ + +#include +typedef char tbool; + +/* This is a BUG! ANY arbitrary limit is a BUG! + Won't someone please fix this? */ +#define MAX_FILE_SPEC_LEN 255 +typedef struct { + short curlen; + char body[MAX_FILE_SPEC_LEN + 1]; +} vspec; +#define EOS '\0' +#define NO 0 +#define YES 1 +#define NULL 0 + +/* v1.01 nmm 19-Aug-85 gfnames - return in successive calls the + name of each file specified by all the remaining args in the command-line + expanding wild cards and + stepping over arguments when they have been processed completely +*/ +char* +gfnames(pac, pav, p_error) + int *pac; + char **pav[]; + tbool *p_error; +{ + static vspec filename = {MAX_FILE_SPEC_LEN, "\0"}; + short fn_exp(); + + while (1) + if (*pac == 0) + { + *p_error = NO; + return(NULL); + } + else switch(fn_exp(&filename, **pav)) + { + case 1: + *p_error = NO; + return(filename.body); + break; + case 0: + --*pac; + ++*pav; + break; + default: + *p_error = YES; + return(filename.body); + break; + } + +} + +/* v1.05 nmm 26-Jun-86 fn_exp - expand specification of list of file names + returning in each successive call the next filename matching the input + spec. The function expects that each in_spec passed + to it will be processed to completion; in particular, up to and + including the call following that in which the last matching name + is returned, the function ignores the value of in_spec, and will + only start processing a new spec with the following call. + If an error occurs, on return out_spec contains the value + of in_spec when the error occurred. + + With each successive filename returned in out_spec, the + function's return value is one. When there are no more matching + names the function returns zero. If on the first call no file + matches in_spec, or there is any other error, -1 is returned. +*/ + +#include +#include +#define OUTSIZE MAX_FILE_SPEC_LEN +short +fn_exp(out, in) + vspec *out; + char *in; +{ + static long context = 0; + static struct dsc$descriptor_s o; + static struct dsc$descriptor_s i; + static tbool pass1 = YES; + long status; + short retval; + + if (pass1) + { + pass1 = NO; + o.dsc$a_pointer = out; + o.dsc$w_length = (short)OUTSIZE; + i.dsc$a_pointer = in; + i.dsc$w_length = (short)strlen(in); + i.dsc$b_dtype = DSC$K_DTYPE_T; + i.dsc$b_class = DSC$K_CLASS_S; + o.dsc$b_dtype = DSC$K_DTYPE_VT; + o.dsc$b_class = DSC$K_CLASS_VS; + } + if ( (status = lib$find_file(&i, &o, &context, 0, 0)) == RMS$_NORMAL) + { + out->body[out->curlen] = EOS; + return(1); + } + else if (status == RMS$_NMF) + retval = 0; + else + { + strcpy(out->body, in); + retval = -1; + } + lib$find_file_end(&context); + pass1 = YES; + return(retval); +} + +#ifndef OLD /* Newer versions of VMS do provide `system'. */ +system(cmd) + char *cmd; +{ + fprintf(stderr, "system() function not implemented under VMS\n"); +} +#endif + +#define VERSION_DELIM ';' +char *massage_name(s) + char *s; +{ + char *start = s; + + for ( ; *s; s++) + if (*s == VERSION_DELIM) + { + *s = EOS; + break; + } + else + *s = tolower(*s); + return(start); +} diff --git a/etc/etags.c b/etc/etags.c new file mode 100644 index 0000000..285a4b3 --- /dev/null +++ b/etc/etags.c @@ -0,0 +1,1692 @@ +/* Tags file maker to go with GNUmacs + Copyright (C) 1984, 1987, 1988 Free Software Foundation, Inc. and Ken Arnold + + NO WARRANTY + + BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY +NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, +RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS" +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY +AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. +STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY +WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR +OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR +DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR +A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS +PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. + + GENERAL PUBLIC LICENSE TO COPY + + 1. You may copy and distribute verbatim copies of this source file +as you receive it, in any medium, provided that you conspicuously +and appropriately publish on each copy a valid copyright notice +"Copyright (C) 1986 Free Software Foundation"; and include +following the copyright notice a verbatim copy of the above disclaimer +of warranty and of this License. + + 2. You may modify your copy or copies of this source file or +any portion of it, and copy and distribute such modifications under +the terms of Paragraph 1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating + that you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, + that in whole or in part contains or is a derivative of this + program or any part thereof, to be licensed at no charge to all + third parties on terms identical to those contained in this + License Agreement (except that you may choose to grant more extensive + warranty protection to some or all third parties, at your option). + + c) You may charge a distribution fee for the physical act of + transferring a copy, and you may at your option offer warranty + protection in exchange for a fee. + +Mere aggregation of another unrelated program with this program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other program under the scope of these terms. + + 3. You may copy and distribute this program (or a portion or derivative +of it, under Paragraph 2) in object code or executable form under the terms +of Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal + shipping charge) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +For an executable file, complete source code means all the source code for +all modules it contains; but, as a special exception, it need not include +source code for modules which are standard libraries that accompany the +operating system on which the executable file runs. + + 4. You may not copy, sublicense, distribute or transfer this program +except as expressly provided under this License Agreement. Any attempt +otherwise to copy, sublicense, distribute or transfer this program is void and +your rights to use the program under this License agreement shall be +automatically terminated. However, parties who have received computer +software programs from you with this License Agreement will not have +their licenses terminated so long as such parties remain in full compliance. + +In other words, you are welcome to use, share and improve this program. +You are forbidden to forbid anyone else to use, share and improve +what you give them. Help stamp out software-hoarding! */ + +#include +#include + +/* Define the symbol ETAGS to make the program "etags", + which makes emacs-style tag tables by default. + Define CTAGS to make the program "ctags" compatible with the usual one. + Define neither one to get behavior that depends + on the name with which the program is invoked + (but we don't normally compile it that way). */ + +/* On VMS, CTAGS is not useful, so always do ETAGS. */ +#ifdef VMS +#ifndef ETAGS +#define ETAGS +#endif +#endif + +/* Exit codes for success and failure. */ + +#ifdef VMS +#define GOOD (1) +#define BAD (0) +#else +#define GOOD (0) +#define BAD (1) +#endif + +#define reg register +#define logical char + +#define TRUE (1) +#define FALSE (0) + +#define iswhite(arg) (_wht[arg]) /* T if char is white */ +#define begtoken(arg) (_btk[arg]) /* T if char can start token */ +#define intoken(arg) (_itk[arg]) /* T if char can be in token */ +#define endtoken(arg) (_etk[arg]) /* T if char ends tokens */ +#define isgood(arg) (_gd[arg]) /* T if char can be after ')' */ + +#define max(I1,I2) (I1 > I2 ? I1 : I2) + +/* cause token checking for typedef, struct, union, enum to distinguish + keywords from identifier-prefixes (e.g. struct vs struct_tag). */ +#define istoken(s, tok, len) (!strncmp(s,tok,len) && endtoken(*((s)+(len)))) + +struct nd_st { /* sorting structure */ + char *name; /* function or type name */ + char *file; /* file name */ + logical f; /* use pattern or line no */ + int lno; /* line number tag is on */ + long cno; /* character number line starts on */ + char *pat; /* search pattern */ + logical been_warned; /* set if noticed dup */ + struct nd_st *left,*right; /* left and right sons */ +}; + +long ftell(); +typedef struct nd_st NODE; + +int number; /* tokens found so far on line starting with # (including #) */ +logical gotone, /* found a func already on line */ + /* boolean "func" (see init) */ + _wht[0177],_etk[0177],_itk[0177],_btk[0177],_gd[0177]; + + /* typedefs are recognized using a simple finite automata, + * tydef is its state variable. + */ +typedef enum {none, begin, tag_ok, middle, end } TYST; + +TYST tydef = none; + +char searchar = '/'; /* use /.../ searches */ + +int lineno; /* line number of current line */ +long charno; /* current character number */ +long linecharno; /* character number of start of line */ + +char *curfile, /* current input file name */ + *outfile= 0, /* output file */ + *white = " \f\t\n", /* white chars */ + *endtk = " \t\n\"'#()[]{}=-+%*/&|^~!<>;,.:?", + /* token ending chars */ + *begtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$", + /* token starting chars */ + *intk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789", + /* valid in-token chars */ + *notgd = ",;"; /* non-valid after-function chars */ + +int file_num = 0; /* current file number */ +int aflag = 0; /* -a: append to tags */ +int tflag = 0; /* -t: create tags for typedefs */ +int uflag = 0; /* -u: update tags */ +int wflag = 0; /* -w: suppress warnings */ +int vflag = 0; /* -v: create vgrind style index output */ +int xflag = 0; /* -x: create cxref style output */ +int eflag = 0; /* -e: emacs style output */ + +/* Name this program was invoked with. */ +char *progname; + +FILE *inf, /* ioptr for current input file */ + *outf; /* ioptr for tags file */ + +NODE *head; /* the head of the sorted binary tree */ + +char *savestr(); +char *savenstr (); +char *rindex(); +char *index(); +char *concat (); +void initbuffer (); +long readline (); + +/* A `struct linebuffer' is a structure which holds a line of text. + `readline' reads a line from a stream into a linebuffer + and works regardless of the length of the line. */ + +struct linebuffer + { + long size; + char *buffer; + }; + +struct linebuffer lb, lb1; + +#if 0 /* VMS now provides the `system' function. */ +#ifdef VMS + +#include + +void +system (buf) + char *buf; +{ + struct dsc$descriptor_s command = + { + strlen(buf), DSC$K_DTYPE_T, DSC$K_CLASS_S, buf + }; + + LIB$SPAWN(&command); +} +#endif /* VMS */ +#endif /* 0 */ + +main(ac,av) + int ac; + char *av[]; +{ + char cmd[100]; + int i; + int fflag = 0; + char *this_file; +#ifdef VMS + char got_err; + + extern char *gfnames(); + extern char *massage_name(); +#endif + + progname = av[0]; + +#ifdef ETAGS + eflag = 1; +#else +#ifdef CTAGS + eflag = 0; +#else + { + char *subname = rindex (progname, '/'); + if (subname++ == NULL) + subname = progname; + eflag = ! strcmp(subname, "ctags"); + } +#endif +#endif + + while (ac > 1 && av[1][0] == '-') + { + for (i=1; av[1][i]; i++) + { + switch(av[1][i]) + { +#ifndef VMS /* These options are useful only with ctags, + and VMS can't input them, so just omit them. */ + case 'B': + searchar='?'; + eflag = 0; + break; + case 'F': + searchar='/'; + eflag = 0; + break; +#endif + case 'a': + aflag++; + break; + case 'e': + eflag++; + break; + case 'f': + if (fflag > 0) + { + fprintf(stderr, + "%s: -f flag may only be given once\n", progname); + goto usage; + } + fflag++, ac--; av++; + if (ac <= 1 || av[1][0] == '\0') + { + fprintf(stderr, + "%s: -f flag must be followed by a filename\n", + progname); + goto usage; + } + outfile = av[1]; + goto end_loop; + case 't': + tflag++; + break; +#ifndef VMS + case 'u': + uflag++; + eflag = 0; + break; +#endif + case 'w': + wflag++; + break; + case 'v': + vflag++; + xflag++; + eflag = 0; + break; + case 'x': + xflag++; + eflag = 0; + break; + default: + goto usage; + } + } + end_loop: ; + ac--; av++; + } + + if (ac <= 1) + { + usage: +#ifdef VMS + fprintf (stderr, "Usage: %s [-aetwvx] [-f outfile] file ...\n", progname); +#else + fprintf (stderr, "Usage: %s [-BFaetuwvx] [-f outfile] file ...\n", progname); +#endif + exit(BAD); + } + + if (outfile == 0) + { + outfile = eflag ? "TAGS" : "tags"; + } + + init(); /* set up boolean "functions" */ + + initbuffer (&lb); + initbuffer (&lb1); + /* + * loop through files finding functions + */ + if (eflag) + { + outf = fopen (outfile, aflag ? "a" : "w"); + if (!outf) + { + fprintf (stderr, "%s: ", progname); + perror (outfile); + exit (BAD); + } + } + + file_num = 1; +#ifdef VMS + for (ac--, av++; + (this_file = gfnames (&ac, &av, &got_err)) != NULL; file_num++) + { + if (got_err) + { + error("Can't find file %s\n", this_file); + ac--, av++; + } + else + { + this_file = massage_name (this_file); +#else + for (; file_num < ac; file_num++) + { + this_file = av[file_num]; + if (1) + { +#endif + find_entries (this_file); + if (eflag) + { + fprintf (outf, "\f\n%s,%d\n", + this_file, total_size_of_entries (head)); + put_entries (head); + free_tree (head); + head = NULL; + } + } + } + + if (eflag) + { + fclose (outf); + exit (GOOD); + } + + if (xflag) + { + put_entries(head); + exit(GOOD); + } + if (uflag) + { + for (i=1; i%s;rm OTAGS", + outfile, av[i], outfile); + system(cmd); + } + aflag++; + } + outf = fopen(outfile, aflag ? "a" : "w"); + if (outf == NULL) + { + fprintf (stderr, "%s: ", outfile); + perror(outfile); + exit(BAD); + } + put_entries(head); + fclose(outf); +#ifndef VMS + if (uflag) + { + sprintf(cmd, "sort %s -o %s", outfile, outfile); + system(cmd); + } +#endif + exit(GOOD); +} + +/* + * This routine sets up the boolean psuedo-functions which work + * by seting boolean flags dependent upon the corresponding character + * Every char which is NOT in that string is not a white char. Therefore, + * all of the array "_wht" is set to FALSE, and then the elements + * subscripted by the chars in "white" are set to TRUE. Thus "_wht" + * of a char is TRUE if it is the string "white", else FALSE. + */ +init() +{ + + reg char *sp; + reg int i; + + for (i = 0; i < 0177; i++) + { + _wht[i] = _etk[i] = _itk[i] = _btk[i] = FALSE; + _gd[i] = TRUE; + } + for (sp = white; *sp; sp++) + _wht[*sp] = TRUE; + for (sp = endtk; *sp; sp++) + _etk[*sp] = TRUE; + for (sp = intk; *sp; sp++) + _itk[*sp] = TRUE; + for (sp = begtk; *sp; sp++) + _btk[*sp] = TRUE; + for (sp = notgd; *sp; sp++) + _gd[*sp] = FALSE; + _wht[0] = _wht['\n']; + _etk[0] = _etk['\n']; + _btk[0] = _btk['\n']; + _itk[0] = _itk['\n']; + _gd[0] = _gd['\n']; +} + +/* + * This routine opens the specified file and calls the function + * which finds the function and type definitions. + */ +find_entries (file) + char *file; +{ + char *cp; + + if ((inf=fopen(file,"r")) == NULL) + { + fprintf (stderr, "%s: ", progname); + perror(file); + return; + } + curfile = savestr(file); + cp = rindex(file, '.'); + /* .tex, .aux or .bbl implies LaTeX source code */ + if (cp && (!strcmp (cp + 1, "tex") || !strcmp (cp + 1, "aux") + || !strcmp (cp + 1, "bbl"))) + { + TEX_funcs(inf); + fclose(inf); + return; + } + /* .l or .el or .lisp (or .cl or .clisp or ...) implies lisp source code */ + if (cp && (!strcmp (cp + 1, "l") || + !strcmp (cp + 1, "el") || + !strcmp (cp + 1, "lsp") || + !strcmp (cp + 1, "lisp") || + !strcmp (cp + 1, "cl") || + !strcmp (cp + 1, "clisp"))) + { + L_funcs(inf); + fclose(inf); + return; + } + /* .scm or .sm or .scheme implies scheme source code */ + if (cp && (!strcmp (cp + 1, "sm") + || !strcmp (cp + 1, "scm") + || !strcmp (cp + 1, "scheme") + || !strcmp (cp + 1, "t") + || !strcmp (cp + 1, "sch") + || !strcmp (cp + 1, "SM") + || !strcmp (cp + 1, "SCM") + /* The `SCM' or `scm' prefix with a version number */ + || (cp[-1] == 'm' && cp[-2] == 'c' && cp[-3] == 's') + || (cp[-1] == 'M' && cp[-2] == 'C' && cp[-3] == 'S'))) + { + Scheme_funcs(inf); + fclose(inf); + return; + } + /* if not a .c or .h or .y file, try fortran */ + if (cp && (cp[1] != 'c' && cp[1] != 'h' && cp[1] != 'y') + && cp[2] == '\0') + { + if (PF_funcs(inf) != 0) + { + fclose(inf); + return; + } + rewind(inf); /* no fortran tags found, try C */ + } + C_entries(); + fclose(inf); +} + +/* Record a tag on the current line. + name is the tag name, + f is nonzero to use a pattern, zero to use line number instead. */ + +pfnote (name, f, linestart, linelen, lno, cno) + char *name; + logical f; /* f == TRUE when function */ + char *linestart; + int linelen; + int lno; + long cno; +{ + register char *fp; + register NODE *np; + char *altname; + char tem[51]; + + if ((np = (NODE *) malloc (sizeof (NODE))) == NULL) + { + fprintf(stderr, "%s: too many entries to sort\n", progname); + put_entries(head); + free_tree(head); + head = NULL; + np = (NODE *) xmalloc(sizeof (NODE)); + } + /* Change name "main" to M. */ + if (!eflag && !xflag && !strcmp(name, "main")) + { + fp = rindex(curfile, '/'); + if (fp == 0) + fp = curfile; + else + fp++; + altname = concat ("M", fp, ""); + fp = rindex(altname, '.'); + if (fp && fp[2] == 0) + *fp = 0; + name = altname; + } + np->name = savestr(name); + np->file = curfile; + np->f = f; + np->lno = lno; + np->cno = cno; + np->left = np->right = 0; + if (eflag) + { + linestart[linelen] = 0; + } + else if (xflag == 0) + { + sprintf (tem, strlen (linestart) < 50 ? "%s$" : "%.50s", linestart); + linestart = tem; + } + np->pat = savestr (linestart); + if (head == NULL) + head = np; + else + add_node(np, head); +} + +free_tree(node) + NODE *node; +{ + while (node) + { + free_tree(node->right); + free(node); + node = node->left; + } +} + +add_node(node, cur_node) + NODE *node,*cur_node; +{ + register int dif; + + dif = strcmp(node->name, cur_node->name); + + /* If this tag name matches an existing one, then + unless -e was given, do not add the node, but maybe print a warning */ + if (!eflag && !dif) + { + if (node->file == cur_node->file) + { + if (!wflag) + { + fprintf(stderr,"%s: Duplicate entry in file %s, line %d: %s\n", + progname, node->file,lineno,node->name); + fprintf(stderr,"Second entry ignored\n"); + } + return; + } + if (!cur_node->been_warned) + if (!wflag) + fprintf(stderr,"%s: Duplicate entry in files %s and %s: %s (Warning only)\n", + progname, node->file, cur_node->file, node->name); + cur_node->been_warned = TRUE; + return; + } + + /* Actually add the node */ + if (dif < 0) + { + if (cur_node->left != NULL) + add_node(node,cur_node->left); + else + cur_node->left = node; + return; + } + if (cur_node->right != NULL) + add_node(node,cur_node->right); + else + cur_node->right = node; +} + +put_entries(node) + reg NODE *node; +{ + reg char *sp; + + if (node == NULL) + return; + + /* Output subentries that precede this one */ + put_entries (node->left); + + /* Output this entry */ + + if (eflag) + { + fprintf (outf, "%s%c%d,%d\n", + node->pat, 0177, node->lno, node->cno); + } + else if (!xflag) + { + fprintf (outf, "%s\t%s\t", + node->name, node->file); + + if (node->f) + { /* a function */ + putc (searchar, outf); + putc ('^', outf); + + for (sp = node->pat; *sp; sp++) + { + if (*sp == '\\' || *sp == searchar) + putc ('\\', outf); + putc (*sp, outf); + } + putc (searchar, outf); + } + else + { /* a typedef; text pattern inadequate */ + fprintf (outf, "%d", node->lno); + } + putc ('\n', outf); + } + else if (vflag) + fprintf (stdout, "%s %s %d\n", + node->name, node->file, (node->lno+63)/64); + else + fprintf (stdout, "%-16s%4d %-16s %s\n", + node->name, node->lno, node->file, node->pat); + + /* Output subentries that follow this one */ + put_entries (node->right); +} + +/* Return total number of characters that put_entries will output for + the nodes in the subtree of the specified node. + Works only if eflag is set, but called only in that case. */ + +total_size_of_entries(node) + reg NODE *node; +{ + reg int total = 0; + reg long num; + + if (node == NULL) + return 0; + + /* Count subentries that precede this one */ + total = total_size_of_entries (node->left); + + /* Count subentries that follow this one */ + total += total_size_of_entries (node->right); + + /* Count this entry */ + + total += strlen (node->pat) + 3; + + num = node->lno; + while (num) + { + total++; + num /= 10; + } + + num = node->cno; + if (!num) total++; + while (num) + { + total++; + num /= 10; + } + return total; +} + +/* + * This routine finds functions and typedefs in C syntax and adds them + * to the list. + */ +#ifdef VMS +long vmslinecharno; +#define VMS_SET_LINECHARNO (vmslinecharno = ftell(inf)) +#else +#define VMS_SET_LINECHARNO +#endif + +#define CNL_SAVE_NUMBER \ +{ \ + VMS_SET_LINECHARNO; \ + linecharno = charno; lineno++; \ + charno += 1 + readline (&lb, inf); \ + lp = lb.buffer; \ +} + +#define CNL \ +{ \ + CNL_SAVE_NUMBER; \ + number = 0; \ +} + +C_entries () +{ + register int c; + register char *token, *tp, *lp; + logical incomm, inquote, inchar, midtoken; + int level; + char tok[BUFSIZ]; + + lineno = 0; + charno = 0; + lp = lb.buffer; + *lp = 0; + + number = 0; + gotone = midtoken = inquote = inchar = incomm = FALSE; + level = 0; + + while (!feof (inf)) + { + c = *lp++; + if (c == 0) + { + CNL; + gotone = FALSE; + } + if (c == '\\') + { + c = *lp++; + if (c == 0) + CNL_SAVE_NUMBER; + c = ' '; + } + else if (incomm) + { + if (c == '*') + { + while ((c = *lp++) == '*') + continue; + if (c == 0) + CNL; + if (c == '/') + incomm = FALSE; + } + } + else if (inquote) + { + /* + * Too dumb to know about \" not being magic, but + * they usually occur in pairs anyway. + */ + if (c == '"') + inquote = FALSE; + continue; + } + else if (inchar) + { + if (c == '\'') + inchar = FALSE; + continue; + } + else switch (c) + { + case '"': + inquote = TRUE; + continue; + case '\'': + inchar = TRUE; + continue; + case '/': + if (*lp == '*') + { + lp++; + incomm = TRUE; + } + continue; + case '#': + if (lp == lb.buffer + 1) + number = 1; + continue; + case '{': + if (tydef == tag_ok) + { + tydef=middle; + } + level++; + continue; + case '}': + if (lp == lb.buffer + 1) + level = 0; /* reset */ + else + level--; + if (!level && tydef==middle) + { + tydef=end; + } + continue; + } + if (!level && !inquote && !incomm && gotone == FALSE) + { + if (midtoken) + { + if (endtoken(c)) + { + int f; + char *buf = lb.buffer; + int endpos = lp - lb.buffer; + char *lp1 = lp; + int line = lineno; + long linestart = linecharno; +#ifdef VMS + long vmslinestart = vmslinecharno; +#endif + int tem = consider_token (&lp1, token, &f, level); + lp = lp1; + if (tem) + { + if (linestart != linecharno) + { +#ifdef VMS + getline (vmslinestart); +#else + getline (linestart); +#endif + strncpy (tok, token + (lb1.buffer - buf), + tp-token+1); + tok[tp-token+1] = 0; + pfnote(tok, f, lb1.buffer, endpos, line, linestart); + } + else + { + strncpy (tok, token, tp-token+1); + tok[tp-token+1] = 0; + pfnote(tok, f, lb.buffer, endpos, line, linestart); + } + gotone = f; /* function */ + } + midtoken = FALSE; + token = lp - 1; + } + else if (intoken(c)) + tp++; + } + else if (begtoken(c)) + { + token = tp = lp - 1; + midtoken = TRUE; + } + } + if (c == ';' && tydef==end) /* clean with typedefs */ + tydef=none; + } +} + +/* + * This routine checks to see if the current token is + * at the start of a function, or corresponds to a typedef + * It updates the input line * so that the '(' will be + * in it when it returns. + */ +consider_token (lpp, token, f, level) + char **lpp, *token; + int *f, level; +{ + reg char *lp = *lpp; + reg char c; + static logical next_token_is_func; + logical firsttok; /* T if have seen first token in ()'s */ + int bad, win; + + *f = 1; /* a function */ + c = lp[-1]; + bad = FALSE; + if (!number) + { /* space is not allowed in macro defs */ + while (iswhite(c)) + { + c = *lp++; + if (c == 0) + { + if (feof (inf)) + break; + CNL; + } + } + /* the following tries to make it so that a #define a b(c) */ + /* doesn't count as a define of b. */ + } + else + { + number++; + if (number >= 4 || (number==2 && strncmp (token, "define", 6))) + { + gotone = TRUE; + badone: + bad = TRUE; + goto ret; + } + } + /* check for the typedef cases */ + if (tflag && istoken(token, "typedef", 7)) + { + tydef=begin; + goto badone; + } + if (tydef==begin && (istoken(token, "struct", 6) || + istoken(token, "union", 5) || istoken(token, "enum", 4))) + { + tydef=tag_ok; + goto badone; + } + if (tydef==tag_ok) + { + tydef=middle; + goto badone; + } + if (tydef==begin) /* e.g. typedef ->int<- */ + { + tydef=end; + goto badone; + } + if (tydef==middle && level == 0) /* e.g. typedef struct tag ->struct_t<- */ + { + tydef=end; + } + if (tydef==end) + { + *f = 0; + win = 1; + goto ret; + } + /* Detect GNUmacs's function-defining macros. */ + if (!number && !strncmp (token, "DEF", 3)) + + { + next_token_is_func = 1; + goto badone; + } + if (next_token_is_func) + { + next_token_is_func = 0; + win = 1; + goto ret; + } + if (c != '(') + goto badone; + firsttok = FALSE; + while ((c = *lp++) != ')') + { + if (c == 0) + { + if (feof (inf)) + break; + CNL; + } + /* + * This line used to confuse ctags: + * int (*oldhup)(); + * This fixes it. A nonwhite char before the first + * token, other than a / (in case of a comment in there) + * makes this not a declaration. + */ + if (begtoken(c) || c=='/') firsttok++; + else if (!iswhite(c) && !firsttok) goto badone; + } + while (iswhite (c = *lp++)) + { + if (c == 0) + { + if (feof (inf)) + break; + CNL; + } + } + win = isgood (c); +ret: + *lpp = lp - 1; + return !bad && win; +} + +getline (atchar) + long atchar; +{ + long saveftell = ftell (inf); + + fseek (inf, atchar, 0); + readline (&lb1, inf); + fseek (inf, saveftell, 0); +} + +/* Fortran parsing */ + +char *dbp; +int pfcnt; + +PF_funcs(fi) + FILE *fi; +{ + lineno = 0; + charno = 0; + pfcnt = 0; + + while (!feof (fi)) + { + lineno++; + linecharno = charno; + charno += readline (&lb, fi) + 1; + dbp = lb.buffer; + if (*dbp == '%') dbp++ ; /* Ratfor escape to fortran */ + while (isspace(*dbp)) + dbp++; + if (*dbp == 0) + continue; + switch (*dbp |' ') + { + case 'i': + if (tail("integer")) + takeprec(); + break; + case 'r': + if (tail("real")) + takeprec(); + break; + case 'l': + if (tail("logical")) + takeprec(); + break; + case 'c': + if (tail("complex") || tail("character")) + takeprec(); + break; + case 'd': + if (tail("double")) + { + while (isspace(*dbp)) + dbp++; + if (*dbp == 0) + continue; + if (tail("precision")) + break; + continue; + } + break; + } + while (isspace(*dbp)) + dbp++; + if (*dbp == 0) + continue; + switch (*dbp|' ') + { + case 'f': + if (tail("function")) + getit(); + continue; + case 's': + if (tail("subroutine")) + getit(); + continue; + case 'p': + if (tail("program")) + { + getit(); + continue; + } + if (tail("procedure")) + getit(); + continue; + } + } + return (pfcnt); +} + +tail(cp) + char *cp; +{ + register int len = 0; + + while (*cp && (*cp&~' ') == ((*(dbp+len))&~' ')) + cp++, len++; + if (*cp == 0) + { + dbp += len; + return (1); + } + return (0); +} + +takeprec() +{ + while (isspace(*dbp)) + dbp++; + if (*dbp != '*') + return; + dbp++; + while (isspace(*dbp)) + dbp++; + if (!isdigit(*dbp)) + { + --dbp; /* force failure */ + return; + } + do + dbp++; + while (isdigit(*dbp)); +} + +getit() +{ + register char *cp; + char c; + char nambuf[BUFSIZ]; + + while (isspace(*dbp)) + dbp++; + if (*dbp == 0 || !isalpha(*dbp)) + return; + for (cp = dbp+1; *cp && (isalpha(*cp) || isdigit(*cp)); cp++) + continue; + c = cp[0]; + cp[0] = 0; + strcpy(nambuf, dbp); + cp[0] = c; + pfnote(nambuf, TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + pfcnt++; +} + +/* + * lisp tag functions + * just look for (def or (DEF + */ + +L_funcs (fi) + FILE *fi; +{ + lineno = 0; + charno = 0; + pfcnt = 0; + + while (!feof (fi)) + { + lineno++; + linecharno = charno; + charno += readline (&lb, fi) + 1; + dbp = lb.buffer; + if (dbp[0] == '(' && + (dbp[1] == 'D' || dbp[1] == 'd') && + (dbp[2] == 'E' || dbp[2] == 'e') && + (dbp[3] == 'F' || dbp[3] == 'f')) + { + while (!isspace(*dbp)) dbp++; + while (isspace(*dbp)) dbp++; + L_getit(); + } + } +} + +L_getit() +{ + register char *cp; + char c; + char nambuf[BUFSIZ]; + + if (*dbp == 0) return; + for (cp = dbp+1; *cp && *cp != '(' && *cp != ' '; cp++) + continue; + c = cp[0]; + cp[0] = 0; + strcpy(nambuf, dbp); + cp[0] = c; + pfnote(nambuf, TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + pfcnt++; +} + +/* + * Scheme tag functions + * look for (def... xyzzy + * look for (def... (xyzzy + * look for (def ... ((...(xyzzy .... + * look for (set! xyzzy + */ + +static get_scheme (); +Scheme_funcs (fi) + FILE *fi; +{ + lineno = 0; + charno = 0; + pfcnt = 0; + + while (!feof (fi)) + { + lineno++; + linecharno = charno; + charno += readline (&lb, fi) + 1; + dbp = lb.buffer; + if (dbp[0] == '(' && + (dbp[1] == 'D' || dbp[1] == 'd') && + (dbp[2] == 'E' || dbp[2] == 'e') && + (dbp[3] == 'F' || dbp[3] == 'f')) + { + while (!isspace(*dbp)) dbp++; + /* Skip over open parens and white space */ + while (*dbp && (isspace(*dbp) || *dbp == '(')) dbp++; + get_scheme (); + } + if (dbp[0] == '(' && + (dbp[1] == 'S' || dbp[1] == 's') && + (dbp[2] == 'E' || dbp[2] == 'e') && + (dbp[3] == 'T' || dbp[3] == 't') && + (dbp[4] == '!' || dbp[4] == '!') && + (isspace(dbp[5]))) + { + while (!isspace(*dbp)) dbp++; + /* Skip over white space */ + while (isspace(*dbp)) dbp++; + get_scheme (); + } + } +} + +static +get_scheme() +{ + register char *cp; + char c; + char nambuf[BUFSIZ]; + + if (*dbp == 0) return; + /* Go till you get to white space or a syntactic break */ + for (cp = dbp+1; *cp && *cp != '(' && *cp != ')' && !isspace(*cp); cp++) + continue; + /* Null terminate the string there. */ + c = cp[0]; + cp[0] = 0; + /* Copy the string */ + strcpy(nambuf, dbp); + /* Unterminate the string */ + cp[0] = c; + /* Announce the change */ + pfnote(nambuf, TRUE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + pfcnt++; +} + +/* Find tags in TeX and LaTeX input files. */ + +/* TEX_toktab is a table of TeX control sequences that define tags. + Each TEX_tabent records one such control sequence. */ + +struct TEX_tabent +{ + char *name; + int len; +}; + +struct TEX_tabent *TEX_toktab = NULL; /* Table with tag tokens */ + +/* Default set of control sequences to put into TEX_toktab. + The value of environment var TEXTAGS is prepended to this. */ + +static char *TEX_defenv = + ":chapter:section:subsection:subsubsection:eqno:label:ref:cite:bibitem:typeout"; + +struct TEX_tabent *TEX_decode_env (); + +static char TEX_esc = '\\'; +static char TEX_opgrp = '{'; +static char TEX_clgrp = '}'; + +/* + * TeX/LaTeX scanning loop. + */ + +TEX_funcs (fi) + FILE *fi; +{ + char *lasthit; + + lineno = 0; + charno = 0; + pfcnt = 0; + + /* Select either \ or ! as escape character. */ + TEX_mode (fi); + + /* Initialize token table once from environment. */ + if (!TEX_toktab) + TEX_toktab = TEX_decode_env ("TEXTAGS", TEX_defenv); + + while (!feof (fi)) + { + lineno++; + linecharno = charno; + charno += readline (&lb, fi) + 1; + dbp = lb.buffer; + lasthit = dbp; + + while (!feof (fi)) + { /* Scan each line in file */ + lineno++; + linecharno = charno; + charno += readline (&lb, fi) + 1; + dbp = lb.buffer; + lasthit = dbp; + while (dbp = index (dbp, TEX_esc)) /* Look at each escape in line */ + { + register int i; + + if (! *(++dbp)) + break; + linecharno += dbp - lasthit; + lasthit = dbp; + i = TEX_Token (lasthit); + if (0 <= i) + { + TEX_getit (lasthit, TEX_toktab[i].len); + break; /* We only save a line once */ + } + } + } + } +} + +#define TEX_LESC '\\' +#define TEX_SESC '!' + +/* Figure out whether TeX's escapechar is '\\' or '!' and set grouping */ +/* chars accordingly. */ + +TEX_mode (f) + FILE *f; +{ + int c; + + while ((c = getc (f)) != EOF) + if (c == TEX_LESC || c == TEX_SESC) + break; + + if (c == TEX_LESC) + { + TEX_esc = TEX_LESC; + TEX_opgrp = '{'; + TEX_clgrp = '}'; + } + else + { + TEX_esc = TEX_SESC; + TEX_opgrp = '<'; + TEX_clgrp = '>'; + } + rewind (f); +} + +/* Read environment and prepend it to the default string. */ +/* Build token table. */ + +struct TEX_tabent * +TEX_decode_env (evarname, defenv) + char *evarname; + char *defenv; +{ + register char *env, *p; + extern char *savenstr (), *index (); + + struct TEX_tabent *tab; + int size, i; + + /* Append deafult string to environment. */ + env = (char *) getenv (evarname); + if (!env) + env = defenv; + else + env = concat (env, defenv, ""); + + /* Allocate a token table */ + for (size = 1, p=env; p;) + if ((p = index (p, ':')) && *(++p)) + size++; + tab = (struct TEX_tabent *) xmalloc (size * sizeof (struct TEX_tabent)); + + /* Unpack environment string into token table. Be careful about */ + /* zero-length strings (leading ':', "::" and trailing ':') */ + for (i = 0; *env;) + { + p = index (env, ':'); + if (!p) /* End of environment string. */ + p = env + strlen (env); + if (p - env > 0) + { /* Only non-zero strings. */ + tab[i].name = savenstr (env, p - env); + tab[i].len = strlen (tab[i].name); + i++; + } + if (*p) + env = p + 1; + else + { + tab[i].name = NULL; /* Mark end of table. */ + tab[i].len = 0; + break; + } + } + return tab; +} + +/* Record a tag defined by a TeX command of length LEN and starting at NAME. + The name being defined actually starts at (NAME + LEN + 1). + But we seem to include the TeX command in the tag name. */ + +TEX_getit (name, len) + char *name; + int len; +{ + char *p = name + len; + char nambuf[BUFSIZ]; + + if (*name == 0) return; + + /* Let tag name extend to next group close (or end of line) */ + while (*p && *p != TEX_clgrp) + p++; + strncpy (nambuf, name, p - name); + nambuf[p - name] = 0; + + pfnote (nambuf, TRUE, lb.buffer, strlen (lb.buffer), lineno, linecharno); + pfcnt++; +} + +/* If the text at CP matches one of the tag-defining TeX command names, + return the index of that command in TEX_toktab. + Otherwise return -1. */ + +/* Keep the capital `T' in `Token' for dumb truncating compilers + (this distinguishes it from `TEX_toktab' */ +TEX_Token (cp) + char *cp; +{ + int i; + + for (i = 0; TEX_toktab[i].len > 0; i++) + if (strncmp (TEX_toktab[i].name, cp, TEX_toktab[i].len) == 0) + return i; + return -1; +} + +/* Initialize a linebuffer for use */ + +void +initbuffer (linebuffer) + struct linebuffer *linebuffer; +{ + linebuffer->size = 200; + linebuffer->buffer = (char *) xmalloc (200); +} + +/* Read a line of text from `stream' into `linebuffer'. + Return the length of the line. */ + +long +readline (linebuffer, stream) + struct linebuffer *linebuffer; + register FILE *stream; +{ + char *buffer = linebuffer->buffer; + register char *p = linebuffer->buffer; + register char *pend; + + pend = p + linebuffer->size; + + while (1) + { + int c = getc (stream); + if (p == pend) + { + linebuffer->size *= 2; + buffer = (char *) xrealloc (buffer, linebuffer->size); + p += buffer - linebuffer->buffer; + pend = buffer + linebuffer->size; + linebuffer->buffer = buffer; + } + if (c < 0 || c == '\n') + { + *p = 0; + break; + } + *p++ = c; + } + + return p - buffer; +} + +char * +savestr(cp) + char *cp; +{ + return savenstr (cp, strlen (cp)); +} + +char * +savenstr(cp, len) + char *cp; + int len; +{ + register char *dp; + + dp = (char *) xmalloc (len + 1); + strncpy (dp, cp, len); + dp[len] = '\0'; + return dp; +} + +/* + * Return the ptr in sp at which the character c last + * appears; NULL if not found + * + * Identical to v7 rindex, included for portability. + */ + +char * +rindex(sp, c) + register char *sp, c; +{ + register char *r; + + r = NULL; + do + { + if (*sp == c) + r = sp; + } while (*sp++); + return(r); +} + +/* + * Return the ptr in sp at which the character c first + * appears; NULL if not found + * + * Identical to v7 index, included for portability. + */ + +char * +index(sp, c) + register char *sp, c; +{ + do + { + if (*sp == c) + return (sp); + } while (*sp++); + return (NULL); +} + +/* Print error message and exit. */ + +fatal (s1, s2) + char *s1, *s2; +{ + error (s1, s2); + exit (BAD); +} + +/* Print error message. `s1' is printf control string, `s2' is arg for it. */ + +error (s1, s2) + char *s1, *s2; +{ + fprintf (stderr, "%s: ", progname); + fprintf (stderr, s1, s2); + fprintf (stderr, "\n"); +} + +/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */ + +char * +concat (s1, s2, s3) + char *s1, *s2, *s3; +{ + int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); + char *result = (char *) xmalloc (len1 + len2 + len3 + 1); + + strcpy (result, s1); + strcpy (result + len1, s2); + strcpy (result + len1 + len2, s3); + *(result + len1 + len2 + len3) = 0; + + return result; +} + +/* Like malloc but get fatal error if memory is exhausted. */ + +int +xmalloc (size) + int size; +{ + int result = malloc (size); + if (!result) + fatal ("virtual memory exhausted", 0); + return result; +} + +int +xrealloc (ptr, size) + char *ptr; + int size; +{ + int result = realloc (ptr, size); + if (!result) + fatal ("virtual memory exhausted"); + return result; +} diff --git a/etc/etags.vms b/etc/etags.vms new file mode 100644 index 0000000..3237a47 --- /dev/null +++ b/etc/etags.vms @@ -0,0 +1,15 @@ +VMS-ed version of etags +----------------------- + +1. The changes made allow the program to compile correctly, + to give error messages more meaningful to VMS, to allow '$' + in identifier tokens in C programs, and to expand wild-cards in the + input filespecs. + +2. To minimize the differences from the original version, + the VMS filename expansion converts filenames to lower + case, and strips version numbers. This does indeed mean + that some input specs (containing version wildcards) will + cause curious effects, it is reasonably consistent with + Emacs, which ignores file versions. + diff --git a/etc/fakemail.c b/etc/fakemail.c new file mode 100644 index 0000000..ee0e7db --- /dev/null +++ b/etc/fakemail.c @@ -0,0 +1,610 @@ +/* sendmail-like interface to /bin/mail for system V, + Copyright (C) 1985 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY. No author or distributor +accepts responsibility to anyone for the consequences of using it +or for whether it serves any particular purpose or works at all, +unless he says so in writing. Refer to the GNU Emacs General Public +License for full details. + +Everyone is granted permission to copy, modify and redistribute +GNU Emacs, but only under the conditions described in the +GNU Emacs General Public License. A copy of this license is +supposed to have been given to you along with GNU Emacs so you +can know your rights and responsibilities. It should be in a +file named COPYING. Among other things, the copyright notice +and this notice must be preserved on all copies. */ + + +#define NO_SHORTNAMES +#include "../src/config.h" + +#if defined (BSD) && !defined (BSD4_1) +/* This program isnot used in BSD, so just avoid loader complaints. */ +main () +{ +} +#else /* not BSD 4.2 (or newer) */ +/* This conditional contains all the rest of the file. */ + +/* These are defined in config in some versions. */ + +#ifdef static +#undef static +#endif + +#ifdef read +#undef read +#undef write +#undef open +#undef close +#endif + +#include +#include +#include +#include +#include + +/* Type definitions */ + +#define boolean int +#define true 1 +#define false 0 + +/* Various lists */ + +struct line_record +{ + char *string; + struct line_record *continuation; +}; +typedef struct line_record *line_list; + +struct header_record +{ + line_list text; + struct header_record *next; + struct header_record *previous; +}; +typedef struct header_record *header; + +struct stream_record +{ + FILE *handle; + int (*action)(); + struct stream_record *rest_streams; +}; +typedef struct stream_record *stream_list; + +/* A `struct linebuffer' is a structure which holds a line of text. + * `readline' reads a line from a stream into a linebuffer + * and works regardless of the length of the line. + */ + +struct linebuffer +{ + long size; + char *buffer; +}; + +struct linebuffer lb; + +#define new_list() \ + ((line_list) xmalloc (sizeof (struct line_record))) +#define new_header() \ + ((header) xmalloc (sizeof (struct header_record))) +#define new_stream() \ + ((stream_list) xmalloc (sizeof (struct stream_record))) +#define alloc_string(nchars) \ + ((char *) xmalloc ((nchars) + 1)) + +/* Global declarations */ + +#define BUFLEN 1024 +#define KEYWORD_SIZE 256 +#define FROM_PREFIX "From" +#define MY_NAME "fakemail" +#define NIL ((line_list) NULL) +#define INITIAL_LINE_SIZE 200 + +#ifndef MAIL_PROGRAM_NAME +#define MAIL_PROGRAM_NAME "/bin/mail" +#endif + +static char *my_name; +static char *the_date; +static char *the_user; +static line_list file_preface; +static stream_list the_streams; +static boolean no_problems = true; + +extern FILE *popen (); +extern int fclose (), pclose (); +extern char *malloc (), *realloc (); + +#ifdef CURRENT_USER +extern struct passwd *getpwuid (); +extern unsigned short geteuid (); +static struct passwd *my_entry; +#define cuserid(s) \ +(my_entry = getpwuid (((int) geteuid ())), \ + my_entry->pw_name) +#endif + +/* Utilities */ + +/* Print error message. `s1' is printf control string, `s2' is arg for it. */ + +static void +error (s1, s2) + char *s1, *s2; +{ + printf ("%s: ", my_name); + printf (s1, s2); + printf ("\n"); + no_problems = false; +} + +/* Print error message and exit. */ + +static void +fatal (s1, s2) + char *s1, *s2; +{ + error (s1, s2); + exit (1); +} + +/* Like malloc but get fatal error if memory is exhausted. */ + +static char * +xmalloc (size) + int size; +{ + char *result = malloc (((unsigned) size)); + if (result == ((char *) NULL)) + fatal ("virtual memory exhausted", 0); + return result; +} + +static char * +xrealloc (ptr, size) + char *ptr; + int size; +{ + char *result = realloc (ptr, ((unsigned) size)); + if (result == ((char *) NULL)) + fatal ("virtual memory exhausted"); + return result; +} + +/* Initialize a linebuffer for use */ + +void +init_linebuffer (linebuffer) + struct linebuffer *linebuffer; +{ + linebuffer->size = INITIAL_LINE_SIZE; + linebuffer->buffer = ((char *) xmalloc (INITIAL_LINE_SIZE)); +} + +/* Read a line of text from `stream' into `linebuffer'. + * Return the length of the line. + */ + +long +readline (linebuffer, stream) + struct linebuffer *linebuffer; + FILE *stream; +{ + char *buffer = linebuffer->buffer; + char *p = linebuffer->buffer; + char *end = p + linebuffer->size; + + while (true) + { + int c = getc (stream); + if (p == end) + { + linebuffer->size *= 2; + buffer = ((char *) xrealloc (buffer, linebuffer->size)); + p += buffer - linebuffer->buffer; + end += buffer - linebuffer->buffer; + linebuffer->buffer = buffer; + } + if (c < 0 || c == '\n') + { + *p = 0; + break; + } + *p++ = c; + } + + return p - buffer; +} + +char * +get_keyword (field, rest) + register char *field; + char **rest; +{ + static char keyword[KEYWORD_SIZE]; + register char *ptr; + register char c; + + ptr = &keyword[0]; + c = *field++; + if ((isspace (c)) || (c == ':')) + return ((char *) NULL); + *ptr++ = ((islower (c)) ? (toupper (c)) : c); + while (((c = *field++) != ':') && (!(isspace (c)))) + *ptr++ = ((islower (c)) ? (toupper (c)) : c); + *ptr++ = '\0'; + while (isspace (c)) c = *field++; + if (c != ':') return ((char *) NULL); + *rest = field; + return &keyword[0]; +} + +boolean +has_keyword (field) + char *field; +{ + char *ignored; + return (get_keyword (field, &ignored) != ((char *) NULL)); +} + +char * +add_field (the_list, field, where) + line_list the_list; + register char *field, *where; +{ + register char c; + while (true) + { + *where++ = ' '; + while ((c = *field++) != '\0') + *where++ = ((c == ',') ? ' ' : c); + if (the_list == NIL) break; + field = the_list->string; + the_list = the_list->continuation; + } + return where; +} + +line_list +make_file_preface () +{ + char *the_string, *temp; + long idiotic_interface; + long prefix_length; + long user_length; + long date_length; + line_list result; + + prefix_length = strlen (FROM_PREFIX); + time (&idiotic_interface); + the_date = ctime (&idiotic_interface); + /* the_date has an unwanted newline at the end */ + date_length = strlen (the_date) - 1; + the_date[date_length] = '\0'; + temp = cuserid ((char *) NULL); + user_length = strlen (temp); + the_user = alloc_string (user_length + 1); + strcpy (the_user, temp); + the_string = alloc_string (3 + prefix_length + + user_length + + date_length); + temp = the_string; + strcpy (temp, FROM_PREFIX); + temp = &temp[prefix_length]; + *temp++ = ' '; + strcpy (temp, the_user); + temp = &temp[user_length]; + *temp++ = ' '; + strcpy (temp, the_date); + result = new_list (); + result->string = the_string; + result->continuation = ((line_list) NULL); + return result; +} + +void +write_line_list (the_list, the_stream) + register line_list the_list; + FILE *the_stream; +{ + for ( ; + the_list != ((line_list) NULL) ; + the_list = the_list->continuation) + { + fputs (the_list->string, the_stream); + putc ('\n', the_stream); + } + return; +} + +int +close_the_streams () +{ + register stream_list rem; + for (rem = the_streams; + rem != ((stream_list) NULL); + rem = rem->rest_streams) + no_problems = (no_problems && + ((*rem->action) (rem->handle) == 0)); + the_streams = ((stream_list) NULL); + return (no_problems ? 0 : 1); +} + +void +add_a_stream (the_stream, closing_action) + FILE *the_stream; + int (*closing_action)(); +{ + stream_list old = the_streams; + the_streams = new_stream (); + the_streams->handle = the_stream; + the_streams->action = closing_action; + the_streams->rest_streams = old; + return; +} + +int +my_fclose (the_file) + FILE *the_file; +{ + putc ('\n', the_file); + fflush (the_file); + return fclose (the_file); +} + +boolean +open_a_file (name) + char *name; +{ + FILE *the_stream = fopen (name, "a"); + if (the_stream != ((FILE *) NULL)) + { + add_a_stream (the_stream, my_fclose); + if (the_user == ((char *) NULL)) + file_preface = make_file_preface (); + write_line_list (file_preface, the_stream); + return true; + } + return false; +} + +void +put_string (s) + char *s; +{ + register stream_list rem; + for (rem = the_streams; + rem != ((stream_list) NULL); + rem = rem->rest_streams) + fputs (s, rem->handle); + return; +} + +void +put_line (s) + char *s; +{ + register stream_list rem; + for (rem = the_streams; + rem != ((stream_list) NULL); + rem = rem->rest_streams) + { + fputs (s, rem->handle); + putc ('\n', rem->handle); + } + return; +} + +#define mail_error error + +void +setup_files (the_list, field) + register line_list the_list; + register char *field; +{ + register char *start; + register char c; + while (true) + { + while (((c = *field) != '\0') && + ((c == ' ') || + (c == '\t') || + (c == ','))) + field += 1; + if (c != '\0') + { + start = field; + while (((c = *field) != '\0') && + (c != ' ') && + (c != '\t') && + (c != ',')) + field += 1; + *field = '\0'; + if (!open_a_file (start)) + mail_error ("Could not open file %s", start); + *field = c; + if (c != '\0') continue; + } + if (the_list == ((line_list) NULL)) return; + field = the_list->string; + the_list = the_list->continuation; + } +} + +int +args_size (the_header) + header the_header; +{ + register header old = the_header; + register line_list rem; + register int size = 0; + do + { + char *field; + register char *keyword = get_keyword (the_header->text->string, &field); + if ((strcmp (keyword, "TO") == 0) || + (strcmp (keyword, "CC") == 0) || + (strcmp (keyword, "BCC") == 0)) + { + size += 1 + strlen (field); + for (rem = the_header->text->continuation; + rem != NIL; + rem = rem->continuation) + size += 1 + strlen (rem->string); + } + the_header = the_header->next; + } while (the_header != old); + return size; +} + +parse_header (the_header, where) + header the_header; + register char *where; +{ + register header old = the_header; + do + { + char *field; + register char *keyword = get_keyword (the_header->text->string, &field); + if (strcmp (keyword, "TO") == 0) + where = add_field (the_header->text->continuation, field, where); + else if (strcmp (keyword, "CC") == 0) + where = add_field (the_header->text->continuation, field, where); + else if (strcmp (keyword, "BCC") == 0) + { + where = add_field (the_header->text->continuation, field, where); + the_header->previous->next = the_header->next; + the_header->next->previous = the_header->previous; + } + else if (strcmp (keyword, "FCC") == 0) + setup_files (the_header->text->continuation, field); + the_header = the_header->next; + } while (the_header != old); + *where = '\0'; + return; +} + +header +read_header () +{ + register header the_header = ((header) NULL); + register line_list *next_line = ((line_list *) NULL); + + init_linebuffer (&lb); + + do + { + long length; + register char *line; + + readline (&lb, stdin); + line = lb.buffer; + length = strlen (line); + if (length == 0) break; + + if (has_keyword (line)) + { + register header old = the_header; + the_header = new_header (); + if (old == ((header) NULL)) + { + the_header->next = the_header; + the_header->previous = the_header; + } + else + { + the_header->previous = old; + the_header->next = old->next; + old->next = the_header; + } + next_line = &(the_header->text); + } + + if (next_line == ((line_list *) NULL)) + { + /* Not a valid header */ + exit (1); + } + *next_line = new_list (); + (*next_line)->string = alloc_string (length); + strcpy (((*next_line)->string), line); + next_line = &((*next_line)->continuation); + *next_line = NIL; + + } while (true); + + return the_header->next; +} + +void +write_header (the_header) + header the_header; +{ + register header old = the_header; + do + { + register line_list the_list; + for (the_list = the_header->text; + the_list != NIL; + the_list = the_list->continuation) + put_line (the_list->string); + the_header = the_header->next; + } while (the_header != old); + put_line (""); + return; +} + +void +main (argc, argv) + int argc; + char **argv; +{ + char *command_line; + header the_header; + long name_length = strlen (MAIL_PROGRAM_NAME); + char buf[BUFLEN + 1]; + register int size; + FILE *the_pipe; + + my_name = MY_NAME; + the_streams = ((stream_list) NULL); + the_date = ((char *) NULL); + the_user = ((char *) NULL); + + the_header = read_header (); + command_line = alloc_string (name_length + args_size (the_header)); + strcpy (command_line, MAIL_PROGRAM_NAME); + parse_header (the_header, &command_line[name_length]); + + the_pipe = popen (command_line, "w"); + if (the_pipe == ((FILE *) NULL)) + fatal ("cannot open pipe to real mailer"); + + add_a_stream (the_pipe, pclose); + + write_header (the_header); + + /* Dump the message itself */ + + while (!feof (stdin)) + { + size = fread (buf, 1, BUFLEN, stdin); + buf[size] = '\0'; + put_string (buf); + } + + exit (close_the_streams ()); +} + +#endif /* not BSD 4.2 (or newer) */ diff --git a/etc/ledit.l b/etc/ledit.l new file mode 100644 index 0000000..2038036 --- /dev/null +++ b/etc/ledit.l @@ -0,0 +1,150 @@ +;;; -*- Mode: lisp -*- + +; load in the c functions + +(removeaddress '_signal) +(removeaddress '_switch_to_proc) +(removeaddress '_set_proc_str) + +(cfasl "/src/mdc/ledit/leditcfns.o" '_switch_to_proc 'emacs) + +(getaddress '_set_proc_str 'set_proc_str) + +(declare (special *ledit-infile* ; emacs->lisp tempfile + *ledit-outfile* ; lisp->emacs tempfile + *ledit-ppfile* ; pp->emacs tempfile + *ledit-lisztfile* ; compiler input + *ledit-objfile* ; compiler output + *ledit-initialized*) ; flag + ) + +(setq *ledit-initialized* nil) + +;;; INIT-LEDIT + +(defun init-ledit () + (let ((user (getenv '|USER|))) ;USER must be uppercase + (setq + *ledit-outfile* (concat "/tmp/" user ".l2") ; lisp -> emacs + *ledit-infile* (concat "/tmp/" user ".l1") ; emacs -> lisp + *ledit-ppfile* (concat "/tmp/" user ".l3") ; pp output to emacs. + *ledit-lisztfile* (concat "/tmp/" user ".l4") + *ledit-objfile* (concat "/tmp/" user ".o") + *ledit-initialized* t))) + +;;; LEDIT +; if 1 arg, arg is taken as a tag name to pass to emacs. +; if 2 args, second arg is a keyword. If 2nd arg is pp, +; pp is applied to first arg, and result is sent to emacs +; to put in a buffer called LEDIT (which is first erased.) + +(defun ledit fexpr (args) + (apply #'ledit* args)) + +;;; LEDIT* + +(defun ledit* n + (if (not *ledit-initialized*) (init-ledit)) + (ledit-output (listify n)) + (syscall 10. *ledit-infile*) ; syscall 10 is "delete" + (syscall 10. *ledit-lisztfile*) + (emacs) + (ledit-input) + (syscall 10. *ledit-outfile*) + (syscall 10. *ledit-ppfile*) + t) + +;;; LEDIT-OUTPUT +;;; Egad, what a mess! Doesn't work for XEMACS yet. +;;; Here's an example from Moclisp: +;;; -> (defun bar (nothing) (bar nothing)) +;;; bar +;;; -> (ledit bar) +;;; should produce... +;;; (progn) (progn tag (setq tag "bar") (&goto-tag)) +;;; and +;;; -> (ledit bar pp) +;;; should stuff this to emacs... +;;; (progn) (switch-to-buffer "LEDIT") (erase-buffer) +;;; (insert-file "/tmp/walter.l3") (lisp-mode) +;;; and this... +;;; (def bar +;;; (lambda (x) +;;; (bar nothing))) +;;; into *LEDIT* + +(defun ledit-output (args) + (if args + (let ((ofile (outfile *ledit-outfile*))) + (format ofile "(progn)") ; this is necessary. + + (cond ((null (cdr args)) ; no keyword -> arg is a tag. + (format ofile "(progn tag (setq tag \"~A\"~ + (&goto-tag))" + (car args))) + ((eq (cadr args) 'pp) ; pp-> pp first arg to emacs + (apply 'pp `((|F| ,*ledit-ppfile*) ,(car args))) + (format ofile "(switch-to-buffer \"LEDIT\")~ + (erase-buffer)") + (format ofile "(insert-file \"~A\")" + *ledit-ppfile*) + (format ofile "(lisp-mode)")) + + (t (format t "~&~A -- unknown option~%" (cdr args)))) + (close ofile)))) + +;;; LISZT* +;;; Need this guy to do compile-input. +;;; Liszt returns 0 if all was well. +;;; Note that in ordinary use the user will have to get used to looking +;;; at "%Warning: ... Compiler declared *foo* special" messages, since +;;; you don't usually want to hunt around in your file, zap in the the +;;; declarations, then go back to what you were doing. +;;; Fortunately this doesn't cause the compiler to bomb. +;;; Some sleepless night I will think of a way to get around this. + +(defun liszt* (&rest args) + (apply #'liszt args)) + +;;; LEDIT-INPUT +;;; Although there are two cases here, in practice +;;; it is never the case that there is both input to be +;;; interpreted and input to be compiled. + +(defun ledit-input () + (if (probef *ledit-lisztfile*) + (cond ((getd #'liszt) + (format t ";Compiling LEDIT:") + (and (zerop (liszt* *ledit-lisztfile* '-o *ledit-objfile*)) + (load *ledit-objfile*))) + (t (format t ";Can't compile LEDIT: No liszt.~%;Reading instead:") + (let ((ifile (infile *ledit-lisztfile*))) + (ledit-load ifile) + (close ifile))))) + + (if (probef *ledit-infile*) + (let ((ifile (infile *ledit-infile*))) + (format t ";Reading from LEDIT:~%") + (ledit-load ifile) + (close ifile)))) + +;;; LEDIT-LOAD +;;; A generally useful form of load + +(defun ledit-load (ifile) + (let ((eof-form (list 'eof-form))) + (do ((form (read ifile eof-form) (read ifile eof-form))) + ((eq form eof-form)) + (format t "; ~A~%" (eval form))))) + +(setsyntax #/ 'macro 'ledit) ; make ^E = (ledit) + +;; more robust version of the c function set_proc_str. Does argument checking. +;; set_proc_str sets the string that is stuffed to the tty after franz pauses +;; and the csh wakes up. It is usually "%emacs" or "%vemacs" or "%?emacs" +(defun set-proc-str (arg) + (if (stringp arg) + (set_proc_str arg) + (if (symbolp arg) + (set_proc_str (get-pname arg)) + (error arg " is illegal argument to set-proc-str")))) diff --git a/etc/leditcfns.c b/etc/leditcfns.c new file mode 100644 index 0000000..b8a7a6b --- /dev/null +++ b/etc/leditcfns.c @@ -0,0 +1,18 @@ +#include +#include +#define STRLEN 100 +static char str[STRLEN+1] = "%?emacs"; /* extra char for the null */ + +switch_to_proc(){ + char *ptr = str; + while (*ptr) ioctl(0, TIOCSTI, ptr++); + ioctl(0, TIOCSTI, "\n"); + kill(getpid(), SIGTSTP); + } + +set_proc_str(ptr) char *ptr; { + if (strlen(ptr) <= STRLEN) + strcpy(str, ptr); + else + printf("string too long for set-proc-str: %s\n", ptr); + } diff --git a/etc/loadst.c b/etc/loadst.c new file mode 100644 index 0000000..a0de307 --- /dev/null +++ b/etc/loadst.c @@ -0,0 +1,344 @@ +/* + * loadst -- print current time and load statistics. + * -- James Gosling @ CMU, May 1981 + * loadst [ -n ] [ interval ] + */ + +#define NO_SHORTNAMES /* Do not want config to try to include remap.h */ +#include "../src/config.h" +#include +#include + +/* Define two macros KERNEL_FILE (file to find kernel symtab in) + and LDAV_SYMBOL (symbol name to look for), based on system type. + Also define NLIST_STRUCT if the type `nlist' is a structure we + can get from nlist.h; otherwise must use a.out.h and initialize + with strcpy. Note that config.h may define NLIST_STRUCT + for more modern USG systems. */ + + +#ifdef LOAD_AVE_TYPE +#ifndef NLIST_STRUCT +#include +#else /* NLIST_STRUCT */ +#include +#endif /* NLIST_STRUCT */ +#endif /* LOAD_AVE_TYPE */ + +/* All this serves to #include and clean up the consequences. */ +#ifdef BSD +/* It appears param.h defines BSD and BSD4_3 in 4.3 + and is not considerate enough to avoid bombing out + if they are already defined. */ +#undef BSD +#ifdef BSD4_3 +#undef BSD4_3 +#define XBSD4_3 /* XBSD4_3 says BSD4_3 is supposed to be defined. */ +#endif +#include +/* Now if BSD or BSD4_3 was defined and is no longer, + define it again. */ +#ifndef BSD +#define BSD +#endif +#ifdef XBSD4_3 +#ifndef BSD4_3 +#define BSD4_3 +#endif +#endif /* XBSD4_3 */ +#endif /* BSD */ + +#ifdef USG +#include +#include +#else /* not USG */ +#include +#ifdef LOAD_AVE_TYPE +#ifndef RTU +#ifndef UMAX +#ifdef DKSTAT_HEADER_FILE +#include +#else +#include +#endif /* not DKSTAT_HEADER_FILE */ +#endif /* UMAX */ +#endif /* not RTU */ +#endif /* LOAD_AVE_TYPE */ +#endif /* USG */ + +#include + +#ifdef BSD +#include +#endif /* BSD */ + +#ifdef UMAX +/* + * UMAX 4.2, which runs on the Encore Multimax multiprocessor, does not + * have a /dev/kmem. Information about the workings of the running kernel + * can be gathered with inq_stats system calls. + */ +#include +#include +#include +#include +#include +#endif /* UMAX */ + +/* We don't want Emacs's macro definitions for these USG primitives. */ + +#undef open +#undef read +#undef close + +struct tm *localtime (); + +#ifndef DKXFER_SYMBOL +#define DKXFER_SYMBOL "_dk_xfer" +#endif +#ifndef CPTIME_SYMBOL +#define CPTIME_SYMBOL "_cp_time" +#endif + +#ifdef LOAD_AVE_TYPE +#ifndef NLIST_STRUCT +struct nlist nl[2]; +#else /* NLIST_STRUCT */ +struct nlist nl[] = + { + {{ LDAV_SYMBOL }}, +#if defined (CPUSTATES) && defined (DK_NDRIVE) +#define X_CPTIME 1 + {{ CPTIME_SYMBOL }}, +#define X_DKXFER 2 + {{ DKXFER_SYMBOL }}, +#endif /* have CPUSTATES and DK_NDRIVE */ + {{ 0 }}, + }; +#endif /* NLIST_STRUCT */ +#endif /* LOAD_AVE_TYPE */ + +#if defined (CPUSTATES) && defined (DK_NDRIVE) + +struct +{ + long time[CPUSTATES]; + long xfer[DK_NDRIVE]; +} s, s1; + +double etime; + +#endif /* have CPUSTATES and DK_NDRIVE */ + +int nflag; /* -n flag -- no newline */ +int uflag; /* -u flag -- user current user ID rather + than login user ID */ +int repetition; /* repetition interval */ + +#ifdef LOAD_AVE_TYPE +LOAD_AVE_TYPE load_average (); +#endif /* LOAD_AVE_TYPE */ + +main (argc, argv) + char **argv; +{ + register int kmem, i; + char *mail; + char *user_name; + struct stat st; +#ifdef LOAD_AVE_TYPE + LOAD_AVE_TYPE load; +#endif /* LOAD_AVE_TYPE */ + + kmem = open ("/dev/kmem", 0); + +#ifdef LOAD_AVE_TYPE +#ifndef NLIST_STRUCT + strcpy (nl[0].n_name, LDAV_SYMBOL); + strcpy (nl[1].n_name, ""); +#endif /* not NLIST_STRUCT */ + +#ifdef NeXT +#define KERNEL_FILE "/vmunix" + nlist (KERNEL_FILE, nl); +#undef KERNEL_FILE +#else NeXT + nlist (KERNEL_FILE, nl); +#endif NeXT +#endif /* LOAD_AVE_TYPE */ + + while (--argc > 0) + { + argv++; + if (strcmp (*argv, "-n") == 0) + nflag++; + else if (strcmp (*argv, "-u") == 0) + uflag++; + else + if ((repetition = atoi (*argv)) <= 0) + { + fprintf (stderr, "Bogus argument: %s\n", *argv); + exit (1); + } + } + + user_name = uflag ? ((struct passwd *) getpwuid (getuid ())) -> pw_name +#ifdef USG + : (char *) getenv ("LOGNAME"); +#else + : (char *) getenv ("USER"); +#endif + + mail = (char *) getenv ("MAIL"); + + if (mail == 0) + { + mail = (char *) malloc (strlen (user_name) + 30); + +#if defined (USG) && ! defined (XENIX) + sprintf (mail, "/usr/mail/%s", user_name); +#else /* Xenix, or not USG */ + sprintf (mail, "/usr/spool/mail/%s", user_name); +#endif /* Xenix, or not USG */ + } + + if (stat (mail, &st) >= 0 + && (st.st_mode & S_IFMT) == S_IFDIR) + { + strcat (mail, "/"); + strcat (mail, user_name); + } + + while (1) + { + register struct tm *nowt; + long now; + + time (&now); + nowt = localtime (&now); + + printf ("%d:%02d%s ", + ((nowt->tm_hour + 11) % 12) + 1, + nowt->tm_min, + nowt->tm_hour >= 12 ? "pm" : "am"); + +#ifdef LOAD_AVE_TYPE + load = load_average (kmem); + if (load != (LOAD_AVE_TYPE) -1) + printf("%.2f", LOAD_AVE_CVT (load) / 100.0); +#endif /* LOAD_AVE_TYPE */ + + printf ("%s", + ((stat (mail, &st) >= 0 && st.st_size > 0) + ? " Mail" + : "")); + +#if defined (CPUSTATES) && defined (DK_NDRIVE) + if (kmem >= 0) + { + lseek (kmem, (long) nl[X_CPTIME].n_value, 0); + read (kmem, s.time, sizeof s.time); + lseek (kmem, (long) nl[X_DKXFER].n_value, 0); + read (kmem, s.xfer, sizeof s.xfer); + etime = 0; + for (i = 0; i < DK_NDRIVE; i++) + { + register t = s.xfer[i]; + s.xfer[i] -= s1.xfer[i]; + s1.xfer[i] = t; + } + for (i = 0; i < CPUSTATES; i++) + { + register t = s.time[i]; + s.time[i] -= s1.time[i]; + s1.time[i] = t; + etime += s.time[i]; + } + if (etime == 0.) + etime = 1.; + etime /= 60.; + + { register max = s.xfer[0]; + for (i = 1; i < DK_NDRIVE; i++) + if (s.xfer[i] > max) + max = s.xfer[i]; + printf ("[%d]", (int) (max / etime + 0.5)); + } + } +#endif /* have CPUSTATES and DK_NDRIVE */ + if (!nflag) + putchar ('\n'); + fflush (stdout); + if (repetition <= 0) + break; + sleep (repetition); + +#ifdef BSD + /* We are about to loop back and write another unit of output. */ + /* If previous output has not yet been read by Emacs, flush it + so the pty output buffer never gets full and Emacs + can always get the latest update right away. */ + /* ??? Someone should write a USG version of this code! */ + { + int zero = 0; + + ioctl (fileno (stdout), TIOCFLUSH, &zero); + } +#endif + } +} + +#ifdef LOAD_AVE_TYPE + +LOAD_AVE_TYPE +load_average (kmem) + int kmem; +{ +#ifdef UMAX + + int i, j; + double sum; + struct proc_summary proc_sum_data; + struct stat_descr proc_info; + + proc_info.sd_next = NULL; + proc_info.sd_subsys = SUBSYS_PROC; + proc_info.sd_type = PROCTYPE_SUMMARY; + proc_info.sd_addr = (char *) &proc_sum_data; + proc_info.sd_size = sizeof (struct proc_summary); + proc_info.sd_sizeused = 0; + + if (inq_stats (1, &proc_info) != 0 ) + { + perror ("sysline proc summary inq_stats"); + exit (1); + } + /* + * Generate current load average. + */ + sum = 0; + for (i = proc_sum_data.ps_nrunidx, j = 0; j < 12; j++) + { + sum += proc_sum_data.ps_nrun[i]; + if (--i < 0) + i = 179; + } + return sum / 12; + +#else /* not UMAX */ + + if (kmem >= 0) + { + LOAD_AVE_TYPE avenrun[3]; + avenrun[0] = 0; + lseek (kmem, (long) nl[0].n_value, 0); + read (kmem, avenrun, sizeof (avenrun)); + return avenrun[0]; + } + else + return (LOAD_AVE_TYPE) -1; + +#endif /* UMAX */ +} + +#endif /* LOAD_AVE_TYPE */ diff --git a/etc/make-docfile.c b/etc/make-docfile.c new file mode 100644 index 0000000..11afa15 --- /dev/null +++ b/etc/make-docfile.c @@ -0,0 +1,525 @@ +/* Generate doc-string file for GNU Emacs from source files. + Copyright (C) 1985, 1986 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is distributed in the hope that it will be useful, +but without any warranty. No author or distributor +accepts responsibility to anyone for the consequences of using it +or for whether it serves any particular purpose or works at all, +unless he says so in writing. + +Everyone is granted permission to copy, modify and redistribute +GNU Emacs, but only under the conditions described in the +document "GNU Emacs copying permission notice". An exact copy +of the document is supposed to have been given to you along with +GNU Emacs so that you can know how you may redistribute it all. +It should be in a file named COPYING. Among other things, the +copyright notice and this notice must be preserved on all copies. */ + +/* The arguments given to this program are all the C and Lisp source files + of GNU Emacs. .elc and .el and .c files are allowed. + A .o file can also be specified; the .c file it was made from is used. + This helps the makefile pass the correct list of files. + + The results, which go to standard output or to a file + specified with -a or -o (-a to append, -o to start from nothing), + are entries containing function or variable names and their documentation. + Each entry starts with a ^_ character. + Then comes F for a function or V for a variable. + Then comes the function or variable name, terminated with a newline. + Then comes the documentation for that function or variable. + */ + +#include + +FILE *outfile; + +main (argc, argv) + int argc; + char **argv; +{ + int i; + int err_count = 0; + + outfile = stdout; + + /* If first two args are -o FILE, output to FILE. */ + i = 1; + if (argc > i + 1 && !strcmp (argv[i], "-o")) + { + outfile = fopen (argv[i + 1], "w"); + i += 2; + } + if (argc > i + 1 && !strcmp (argv[i], "-a")) + { + outfile = fopen (argv[i + 1], "a"); + i += 2; + } + + for (; i < argc; i++) + err_count += scan_file (argv[i]); /* err_count seems to be {mis,un}used */ +#ifndef VMS + exit (err_count); /* see below - shane */ +#endif VMS +} + +/* Read file FILENAME and output its doc strings to stdout. */ +/* Return 1 if file is not found, 0 if it is found. */ + +scan_file (filename) + char *filename; +{ + int len = strlen (filename); + if (!strcmp (filename + len - 4, ".elc")) + return scan_lisp_file (filename); + else if (!strcmp (filename + len - 3, ".el")) + return scan_lisp_file (filename); + else + return scan_c_file (filename); +} + +char buf[128]; + +/* Skip a C string from INFILE, + and return the character that follows the closing ". + If printflag is positive, output string contents to stdout. + If it is negative, store contents in buf. + Convert escape sequences \n and \t to newline and tab; + discard \ followed by newline. */ + +read_c_string (infile, printflag) + FILE *infile; + int printflag; +{ + register int c; + char *p = buf; + + c = getc (infile); + while (c != EOF) + { + while (c != '"' && c != EOF) + { + if (c == '\\') + { + c = getc (infile); + if (c == '\n') + { + c = getc (infile); + continue; + } + if (c == 'n') + c = '\n'; + if (c == 't') + c = '\t'; + } + if (printflag > 0) + putc (c, outfile); + else if (printflag < 0) + *p++ = c; + c = getc (infile); + } + c = getc (infile); + if (c != '"') + break; + if (printflag > 0) + putc (c, outfile); + else if (printflag < 0) + *p++ = c; + c = getc (infile); + } + + if (printflag < 0) + *p = 0; + + return c; +} + +/* Read through a c file. If a .o file is named, + the corresponding .c file is read instead. + Looks for DEFUN constructs such as are defined in ../src/lisp.h. + Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */ + +scan_c_file (filename) + char *filename; +{ + FILE *infile; + register int c; + register int commas; + register int defunflag; + register int defvarflag; + + if (filename[strlen (filename) - 1] == 'o') + filename[strlen (filename) - 1] = 'c'; + + infile = fopen (filename, "r"); + + /* No error if non-ex input file */ + if (infile == NULL) + { + perror (filename); + return 0; + } + + c = '\n'; + while (!feof (infile)) + { + if (c != '\n') + { + c = getc (infile); + continue; + } + c = getc (infile); + if (c == ' ') + { + while (c == ' ') + c = getc (infile); + if (c != 'D') + continue; + c = getc (infile); + if (c != 'E') + continue; + c = getc (infile); + if (c != 'F') + continue; + c = getc (infile); + if (c != 'V') + continue; + defvarflag = 1; + defunflag = 0; + c = getc (infile); + } + else if (c == 'D') + { + c = getc (infile); + if (c != 'E') + continue; + c = getc (infile); + if (c != 'F') + continue; + c = getc (infile); + defunflag = c == 'U'; + defvarflag = 0; + } + else continue; + + while (c != '(') + { + if (c < 0) + return 0; + c = getc (infile); + } + + c = getc (infile); + if (c != '"') + continue; + c = read_c_string (infile, -1); + + if (defunflag) + commas = 5; + else if (defvarflag) + commas = 1; + else /* For DEFSIMPLE and DEFPRED */ + commas = 2; + + while (commas) + { + if (c == ',') commas --; + if (c < 0) + return 0; + c = getc (infile); + } + while (c == ' ' || c == '\n' || c == '\t') + c = getc (infile); + if (c == '"') + c = read_c_string (infile, 0); + while (c != ',') + c = getc (infile); + c = getc (infile); + while (c == ' ' || c == '\n' || c == '\t') + c = getc (infile); + + if (c == '"') + { + putc (037, outfile); + putc (defvarflag ? 'V' : 'F', outfile); + fprintf (outfile, "%s\n", buf); + read_c_string (infile, 1); + } + } + fclose (infile); + return 0; +} + +/* Read a file of Lisp code, compiled or interpreted. + Looks for + (defun NAME ARGS DOCSTRING ...) + (autoload 'NAME FILE DOCSTRING ...) + (defvar NAME VALUE DOCSTRING) + (defconst NAME VALUE DOCSTRING) + starting in column zero. + ARGS, FILE or VALUE is ignored. We do not know how to parse Lisp code + so we use a kludge to skip them: + In a function definition, the form of ARGS of FILE is known, and we + can skip it. + In a variable definition, we use a formatting convention: + the DOCSTRING, if present, must be followed by a closeparen and a newline, + and no newline must appear between the defvar or defconst and the docstring, + The only source file that must follow this convention is loaddefs.el; + aside from that, it is always the .elc file that we look at, and + they are no problem because byte-compiler output follows this convention. + The NAME and DOCSTRING are output. + NAME is preceded by `F' for a function or `V' for a variable. + An entry is output only if DOCSTRING has \ newline just after the opening " + */ + +scan_lisp_file (filename) + char *filename; +{ + FILE *infile; + register int c; + register int commas; + register char *p; + int defvarflag; + + infile = fopen (filename, "r"); + if (infile == NULL) + { + perror (filename); + return 0; /* No error */ + } + + c = '\n'; + while (!feof (infile)) + { + if (c != '\n') + { + c = getc (infile); + continue; + } + c = getc (infile); + if (c != '(') + continue; + c = getc (infile); + if (c == 'a') + { + c = getc (infile); + if (c != 'u') + continue; + c = getc (infile); + if (c != 't') + continue; + c = getc (infile); + if (c != 'o') + continue; + c = getc (infile); + if (c != 'l') + continue; + c = getc (infile); + if (c != 'o') + continue; + c = getc (infile); + if (c != 'a') + continue; + c = getc (infile); + if (c != 'd') + continue; + + c = getc (infile); + while (c == ' ') + c = getc (infile); + + if (c == '\'') + { + c = getc (infile); + } + else + { + if (c != '(') + continue; + c = getc (infile); + if (c != 'q') + continue; + c = getc (infile); + if (c != 'u') + continue; + c = getc (infile); + if (c != 'o') + continue; + c = getc (infile); + if (c != 't') + continue; + c = getc (infile); + if (c != 'e') + continue; + c = getc (infile); + if (c != ' ') + continue; + while (c == ' ') + c = getc (infile); + } + + p = buf; + while (c != ' ' && c != ')') + { + if (c == EOF) + return 1; + if (c == '\\') + c = getc (infile); + *p++ = c; + c = getc (infile); + } + *p = 0; + + while (c != '"') + { + if (c == EOF) + return 1; + c = getc (infile); + } + c = read_c_string (infile, 0); + } + else if (c == 'd') + { + c = getc (infile); + if (c != 'e') + continue; + c = getc (infile); + if (c != 'f') + continue; + c = getc (infile); + if (c == 'u') + { + c = getc (infile); + if (c != 'n') + continue; + defvarflag = 0; + } + else if (c == 'v') + { + c = getc (infile); + if (c != 'a') + continue; + c = getc (infile); + if (c != 'r') + continue; + defvarflag = 1; + } + else if (c == 'c') + { + c = getc (infile); + if (c != 'o') + continue; + c = getc (infile); + if (c != 'n') + continue; + c = getc (infile); + if (c != 's') + continue; + c = getc (infile); + if (c != 't') + continue; + defvarflag = 1; + } + else + continue; + + /* Now we have seen "defun" or "defvar" or "defconst". */ + + while (c != ' ' && c != '\n' && c != '\t') + c = getc (infile); + + while (c == ' ' || c == '\n' || c == '\t') + c = getc (infile); + + /* Read and store name of function or variable being defined + Discard backslashes that are for quoting. */ + p = buf; + while (c != ' ' && c != '\n' && c != '\t') + { + if (c == '\\') + c = getc (infile); + *p++ = c; + c = getc (infile); + } + *p = 0; + + while (c == ' ' || c == '\n' || c == '\t') + c = getc (infile); + + if (! defvarflag) + { + /* A function: */ + /* Skip the arguments: either "nil" or a list in parens */ + if (c == 'n') + { + while (c != ' ' && c != '\n' && c != '\t') + c = getc (infile); + } + else + { + while (c != '(') + c = getc (infile); + while (c != ')') + c = getc (infile); + } + c = getc (infile); + } + else + { + /* A variable: */ + + /* Skip until the first newline; remember + the two previous characters. */ + char c1 = 0, c2 = 0; + + while (c != '\n' && c >= 0) + { + c2 = c1; + c1 = c; + c = getc (infile); + } + + /* If two previous characters were " and \, + this is a doc string. Otherwise, there is none. */ + if (c2 == '"' && c1 == '\\') + { + putc (037, outfile); + putc ('V', outfile); + fprintf (outfile, "%s\n", buf); + read_c_string (infile, 1); + } + continue; + } + } + else + continue; + + /* Here for a function definition. + We have skipped the file name or arguments + and arrived at where the doc string is, + if there is a doc string. */ + + /* Skip whitespace */ + + while (c == ' ' || c == '\n' || c == '\t') + c = getc (infile); + + /* " followed by \ and newline means a doc string we should gobble */ + if (c != '"') + continue; + c = getc (infile); + if (c != '\\') + continue; + c = getc (infile); + if (c != '\n') + continue; + + putc (037, outfile); + putc ('F', outfile); + fprintf (outfile, "%s\n", buf); + read_c_string (infile, 1); + } + fclose (infile); + return 0; +} diff --git a/etc/makedoc.com b/etc/makedoc.com new file mode 100644 index 0000000..c08dae9 --- /dev/null +++ b/etc/makedoc.com @@ -0,0 +1,48 @@ +$ ! VMS command file to create or update the file `DOC.' which contains +$ ! documentation strings for the functions and variables preloaded in Emacs. +$ ! This command file should be run when you build Emacs for the first time and +$ ! again if any documentation strings change in the source files listed here. +$ +$ old = f$environment("default") +$ set default emacs_library:[etc] +$ on error then goto done +$ if f$search("emacs_library:[etc]make-docfile.exe") .nes. "" then goto version44 +$ doit := $emacs_library:[etc]make_docfile +$ rest = "[lisp]lisp_mode.elc [lisp]text_mode.elc [lisp]c_mode.elc [lisp]buff_menu.elc [lisp]vms_patch.elc" +$ goto doit +$version44: +$ doit := $emacs_library:[etc]make-docfile +$ rest = "[lisp]lisp-mode.elc [lisp]text-mode.elc [lisp]c-mode.elc [lisp]buff-menu.elc [lisp]vms-patch.elc" +$ +$doit: +$ set default emacs_library:[000000] +$ doit -o [etc]DOC +$ doit := 'doit' -a [etc]DOC +$ doit [src]dispnew.c [src]scroll.c +$ doit [src]xdisp.c [src]window.c [src]term.c [src]cm.c +$ doit [src]emacs.c [src]keyboard.c [src]macros.c +$ doit [src]keymap.c [src]sysdep.c [src]buffer.c +$ doit [src]filelock.c [src]insdel.c [src]marker.c +$ doit [src]minibuf.c [src]fileio.c [src]dired.c +$ doit [src]filemode.c [src]cmds.c [src]casefiddle.c +$ doit [src]indent.c [src]search.c [src]regex.c +$ doit [src]undo.c [src]alloc.c [src]data.c [src]doc.c +$ doit [src]editfns.c [src]callint.c [src]eval.c +$ doit [src]fns.c [src]print.c [src]lread.c [src]abbrev.c +$ doit [src]syntax.c [src]mocklisp.c +$ doit [src]bytecode.c [src]process.c [src]callproc.c [src]doprnt.c +$ doit [src]vmsfns.c +$ +$ doit [lisp]simple.elc [lisp]help.elc +$ doit [lisp]files.elc [lisp]window.elc +$ doit [lisp]indent.elc [lisp]loaddefs.el +$ doit [lisp]paths.el [lisp]startup.elc +$ doit [lisp]lisp.elc [lisp]page.elc +$ doit [lisp]register.elc [lisp]paragraphs.elc +$ doit [lisp]fill.elc [lisp]isearch.elc +$ doit [lisp]replace.elc [lisp]abbrev.elc +$ doit [lisp]subr.elc [lisp]vmsproc.elc +$ doit 'rest' +$ +$done: +$ set default 'old' diff --git a/etc/movemail.c b/etc/movemail.c new file mode 100644 index 0000000..20b2d72 --- /dev/null +++ b/etc/movemail.c @@ -0,0 +1,648 @@ +/* movemail foo bar -- move file foo to file bar, + locking file foo the way /bin/mail respects. + Copyright (C) 1986 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is distributed in the hope that it will be useful, +but without any warranty. No author or distributor +accepts responsibility to anyone for the consequences of using it +or for whether it serves any particular purpose or works at all, +unless he says so in writing. + +Everyone is granted permission to copy, modify and redistribute +GNU Emacs, but only under the conditions described in the +document "GNU Emacs copying permission notice". An exact copy +of the document is supposed to have been given to you along with +GNU Emacs so that you can know how you may redistribute it all. +It should be in a file named COPYING. Among other things, the +copyright notice and this notice must be preserved on all copies. */ + +/* + * Modified January, 1986 by Michael R. Gretzinger (Project Athena) + * + * Added POP (Post Office Protocol) service. When compiled -DPOP + * movemail will accept input filename arguments of the form + * "po:username". This will cause movemail to open a connection to + * a pop server running on $MAILHOST (environment variable). Movemail + * must be setuid to root in order to work with POP. + * + * New module: popmail.c + * Modified routines: + * main - added code within #ifdef MAIL_USE_POP; added setuid(getuid()) + * after POP code. + * New routines in movemail.c: + * get_errmsg - return pointer to system error message + * + */ + +#include +#include +#include +#include +#define NO_SHORTNAMES /* Tell config not to load remap.h */ +#include "../src/config.h" + +#ifdef USG +#include +#include +#ifndef F_OK +#define F_OK 0 +#define X_OK 1 +#define W_OK 2 +#define R_OK 4 +#endif +#endif /* USG */ + +#ifdef XENIX +#include +#endif + +/* Cancel substitutions made by config.h for Emacs. */ +#undef open +#undef read +#undef write +#undef close + +char *concat (); +extern int errno; + +/* Nonzero means this is name of a lock file to delete on fatal error. */ +char *delete_lockname; + +main (argc, argv) + int argc; + char **argv; +{ + char *inname, *outname; + int indesc, outdesc; + char buf[1024]; + int nread; + +#ifndef MAIL_USE_FLOCK + struct stat st; + long now; + int tem; + char *lockname, *p; + char tempname[40]; + int desc; +#endif /* not MAIL_USE_FLOCK */ + + delete_lockname = 0; + + if (argc < 3) + fatal ("two arguments required"); + + inname = argv[1]; + outname = argv[2]; + + /* Check access to input and output file. */ + if (access (inname, R_OK | W_OK) != 0) + pfatal_with_name (inname); + if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0) + pfatal_with_name (outname); + + /* Also check that outname's directory is writeable to the real uid. */ + { + char *buf = (char *) malloc (strlen (outname) + 1); + char *p, q; + strcpy (buf, outname); + p = buf + strlen (buf); + while (p > buf && p[-1] != '/') + *--p = 0; + if (p == buf) + *p++ = '.'; + if (access (buf, W_OK) != 0) + pfatal_with_name (buf); + free (buf); + } + +#ifdef MAIL_USE_POP + if (!bcmp (inname, "po:", 3)) + { + int status; char *user; + + user = (char *) rindex (inname, ':') + 1; + status = popmail (user, outname); + exit (status); + } + + setuid (getuid()); +#endif /* MAIL_USE_POP */ + +#ifndef MAIL_USE_FLOCK + /* Use a lock file named /usr/spool/mail/$USER.lock: + If it exists, the mail file is locked. */ + lockname = concat (inname, ".lock", ""); + strcpy (tempname, inname); + p = tempname + strlen (tempname); + while (p != tempname && p[-1] != '/') + p--; + *p = 0; + strcpy (p, "EXXXXXX"); + mktemp (tempname); + (void) unlink (tempname); + + while (1) + { + /* Create the lock file, but not under the lock file name. */ + /* Give up if cannot do that. */ + desc = open (tempname, O_WRONLY | O_CREAT, 0666); + if (desc < 0) + pfatal_with_name (concat ("temporary file \"", tempname, "\"")); + close (desc); + + tem = link (tempname, lockname); + (void) unlink (tempname); + if (tem >= 0) + break; + sleep (1); + + /* If lock file is a minute old, unlock it. */ + if (stat (lockname, &st) >= 0) + { + now = time (0); + if (st.st_ctime < now - 60) + (void) unlink (lockname); + } + } + + delete_lockname = lockname; +#endif /* not MAIL_USE_FLOCK */ + +#ifdef MAIL_USE_FLOCK + indesc = open (inname, O_RDWR); +#else /* if not MAIL_USE_FLOCK */ + indesc = open (inname, O_RDONLY); +#endif /* not MAIL_USE_FLOCK */ + if (indesc < 0) + pfatal_with_name (inname); + +#if defined(BSD) || defined(XENIX) + /* In case movemail is setuid to root, make sure the user can + read the output file. */ + /* This is desirable for all systems + but I don't want to assume all have the umask system call */ + umask (umask (0) & 0333); +#endif /* BSD or Xenix */ + outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666); + if (outdesc < 0) + pfatal_with_name (outname); +#ifdef MAIL_USE_FLOCK +#ifdef XENIX + if (locking (indesc, LK_RLCK, 0L) < 0) pfatal_with_name (inname); +#else + flock (indesc, LOCK_EX); +#endif +#endif /* MAIL_USE_FLOCK */ + + while (1) + { + nread = read (indesc, buf, sizeof buf); + if (nread != write (outdesc, buf, nread)) + { + int saved_errno = errno; + (void) unlink (outname); + errno = saved_errno; + pfatal_with_name (outname); + } + if (nread < sizeof buf) + break; + } + +#ifdef BSD + fsync (outdesc); +#endif + + /* Check to make sure no errors before we zap the inbox. */ + if (close (outdesc) != 0) + { + int saved_errno = errno; + (void) unlink (outname); + errno = saved_errno; + pfatal_with_name (outname); + } + +#ifdef MAIL_USE_FLOCK +#if defined(STRIDE) || defined(XENIX) + /* Stride, xenix have file locking, but no ftruncate. This mess will do. */ + (void) close (open (inname, O_CREAT | O_TRUNC | O_RDWR, 0666)); +#else + (void) ftruncate (indesc, 0L); +#endif /* STRIDE or XENIX */ +#endif /* MAIL_USE_FLOCK */ + close (indesc); + +#ifndef MAIL_USE_FLOCK + /* Delete the input file; if we can't, at least get rid of its contents. */ + if (unlink (inname) < 0) + if (errno != ENOENT) + creat (inname, 0666); + (void) unlink (lockname); +#endif /* not MAIL_USE_FLOCK */ + exit (0); +} + +/* Print error message and exit. */ + +fatal (s1, s2) + char *s1, *s2; +{ + if (delete_lockname) + unlink (delete_lockname); + error (s1, s2); + exit (1); +} + +/* Print error message. `s1' is printf control string, `s2' is arg for it. */ + +error (s1, s2) + char *s1, *s2; +{ + printf ("movemail: "); + printf (s1, s2); + printf ("\n"); +} + +pfatal_with_name (name) + char *name; +{ + extern int errno, sys_nerr; + extern char *sys_errlist[]; + char *s; + + if (errno < sys_nerr) + s = concat ("", sys_errlist[errno], " for %s"); + else + s = "cannot open %s"; + fatal (s, name); +} + +/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */ + +char * +concat (s1, s2, s3) + char *s1, *s2, *s3; +{ + int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); + char *result = (char *) xmalloc (len1 + len2 + len3 + 1); + + strcpy (result, s1); + strcpy (result + len1, s2); + strcpy (result + len1 + len2, s3); + *(result + len1 + len2 + len3) = 0; + + return result; +} + +/* Like malloc but get fatal error if memory is exhausted. */ + +int +xmalloc (size) + int size; +{ + int result = malloc (size); + if (!result) + fatal ("virtual memory exhausted", 0); + return result; +} + +/* This is the guts of the interface to the Post Office Protocol. */ + +#ifdef MAIL_USE_POP + +#include +#include +#include +#include + +#ifdef USG +#include +/* Cancel substitutions made by config.h for Emacs. */ +#undef open +#undef read +#undef write +#undef close +#endif /* USG */ + +#define NOTOK (-1) +#define OK 0 +#define DONE 1 + +char *progname; +FILE *sfi; +FILE *sfo; +char Errmsg[80]; + +static int debug = 0; + +popmail(user, outfile) +char *user; +char *outfile; +{ + char *host; + int nmsgs, nbytes; + char response[128]; + register int i; + int mbfi; + FILE *mbf; + char *getenv(); + int mbx_write(); + char *get_errmsg(); + + host = getenv("MAILHOST"); + if (host == NULL) { + fatal("no MAILHOST defined"); + } + + if (pop_init(host) == NOTOK) { + error(Errmsg); + return(1); + } + + if (getline(response, sizeof response, sfi) != OK) { + error(response); + return(1); + } + + if (pop_command("USER %s", user) == NOTOK || + pop_command("RPOP %s", user) == NOTOK) { + error(Errmsg); + pop_command("QUIT"); + return(1); + } + + if (pop_stat(&nmsgs, &nbytes) == NOTOK) { + error(Errmsg); + pop_command("QUIT"); + return(1); + } + + if (!nmsgs) + { + pop_command("QUIT"); + return(0); + } + + mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666); + if (mbfi < 0) + { + pop_command("QUIT"); + error("Error in open: %s, %s", get_errmsg(), outfile); + return(1); + } + fchown(mbfi, getuid(), -1); + + if ((mbf = fdopen(mbfi, "w")) == NULL) + { + pop_command("QUIT"); + error("Error in fdopen: %s", get_errmsg()); + close(mbfi); + unlink(outfile); + return(1); + } + + for (i = 1; i <= nmsgs; i++) { + mbx_delimit_begin(mbf); + if (pop_retr(i, mbx_write, mbf) != OK) { + error(Errmsg); + pop_command("QUIT"); + close(mbfi); + return(1); + } + mbx_delimit_end(mbf); + fflush(mbf); + } + + for (i = 1; i <= nmsgs; i++) { + if (pop_command("DELE %d", i) == NOTOK) { + error(Errmsg); + pop_command("QUIT"); + close(mbfi); + return(1); + } + } + + pop_command("QUIT"); + close(mbfi); + return(0); +} + +pop_init(host) +char *host; +{ + register struct hostent *hp; + register struct servent *sp; + int lport = IPPORT_RESERVED - 1; + struct sockaddr_in sin; + register int s; + char *get_errmsg(); + + hp = gethostbyname(host); + if (hp == NULL) { + sprintf(Errmsg, "MAILHOST unknown: %s", host); + return(NOTOK); + } + + sp = getservbyname("pop", "tcp"); + if (sp == 0) { + strcpy(Errmsg, "tcp/pop: unknown service"); + return(NOTOK); + } + + sin.sin_family = hp->h_addrtype; + bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length); + sin.sin_port = sp->s_port; + s = rresvport(&lport); + if (s < 0) { + sprintf(Errmsg, "error creating socket: %s", get_errmsg()); + return(NOTOK); + } + + if (connect(s, (char *)&sin, sizeof sin) < 0) { + sprintf(Errmsg, "error during connect: %s", get_errmsg()); + close(s); + return(NOTOK); + } + + sfi = fdopen(s, "r"); + sfo = fdopen(s, "w"); + if (sfi == NULL || sfo == NULL) { + sprintf(Errmsg, "error in fdopen: %s", get_errmsg()); + close(s); + return(NOTOK); + } + + return(OK); +} + +pop_command(fmt, a, b, c, d) +char *fmt; +{ + char buf[128]; + char errmsg[64]; + + sprintf(buf, fmt, a, b, c, d); + + if (debug) fprintf(stderr, "---> %s\n", buf); + if (putline(buf, Errmsg, sfo) == NOTOK) return(NOTOK); + + if (getline(buf, sizeof buf, sfi) != OK) { + strcpy(Errmsg, buf); + return(NOTOK); + } + + if (debug) fprintf(stderr, "<--- %s\n", buf); + if (*buf != '+') { + strcpy(Errmsg, buf); + return(NOTOK); + } else { + return(OK); + } +} + + +pop_stat(nmsgs, nbytes) +int *nmsgs, *nbytes; +{ + char buf[128]; + + if (debug) fprintf(stderr, "---> STAT\n"); + if (putline("STAT", Errmsg, sfo) == NOTOK) return(NOTOK); + + if (getline(buf, sizeof buf, sfi) != OK) { + strcpy(Errmsg, buf); + return(NOTOK); + } + + if (debug) fprintf(stderr, "<--- %s\n", buf); + if (*buf != '+') { + strcpy(Errmsg, buf); + return(NOTOK); + } else { + sscanf(buf, "+OK %d %d", nmsgs, nbytes); + return(OK); + } +} + +pop_retr(msgno, action, arg) +int (*action)(); +{ + char buf[128]; + + sprintf(buf, "RETR %d", msgno); + if (debug) fprintf(stderr, "%s\n", buf); + if (putline(buf, Errmsg, sfo) == NOTOK) return(NOTOK); + + if (getline(buf, sizeof buf, sfi) != OK) { + strcpy(Errmsg, buf); + return(NOTOK); + } + + while (1) { + switch (multiline(buf, sizeof buf, sfi)) { + case OK: + (*action)(buf, arg); + break; + case DONE: + return (OK); + case NOTOK: + strcpy(Errmsg, buf); + return (NOTOK); + } + } +} + +getline(buf, n, f) +char *buf; +register int n; +FILE *f; +{ + register char *p; + int c; + + p = buf; + while (--n > 0 && (c = fgetc(f)) != EOF) + if ((*p++ = c) == '\n') break; + + if (ferror(f)) { + strcpy(buf, "error on connection"); + return (NOTOK); + } + + if (c == EOF && p == buf) { + strcpy(buf, "connection closed by foreign host"); + return (DONE); + } + + *p = NULL; + if (*--p == '\n') *p = NULL; + if (*--p == '\r') *p = NULL; + return(OK); +} + +multiline(buf, n, f) +char *buf; +register int n; +FILE *f; +{ + if (getline(buf, n, f) != OK) return (NOTOK); + if (*buf == '.') { + if (*(buf+1) == NULL) { + return (DONE); + } else { + strcpy(buf, buf+1); + } + } + return(OK); +} + +char * +get_errmsg() +{ + extern int errno, sys_nerr; + extern char *sys_errlist[]; + char *s; + + if (errno < sys_nerr) + s = sys_errlist[errno]; + else + s = "unknown error"; + return(s); +} + +putline(buf, err, f) +char *buf; +char *err; +FILE *f; +{ + fprintf(f, "%s\r\n", buf); + fflush(f); + if (ferror(f)) { + strcpy(err, "lost connection"); + return(NOTOK); + } + return(OK); +} + +mbx_write(line, mbf) +char *line; +FILE *mbf; +{ + fputs(line, mbf); + fputc(0x0a, mbf); +} + +mbx_delimit_begin(mbf) +FILE *mbf; +{ + fputs("\f\n0,unseen,,\n", mbf); +} + +mbx_delimit_end(mbf) +FILE *mbf; +{ + putc('\037', mbf); +} + +#endif /* MAIL_USE_POP */ diff --git a/etc/qsort.c b/etc/qsort.c new file mode 100644 index 0000000..23a5162 --- /dev/null +++ b/etc/qsort.c @@ -0,0 +1,226 @@ +/* + * qsort.c: + * Our own version of the system qsort routine which is faster by an average + * of 25%, with lows and highs of 10% and 50%. + * The THRESHold below is the insertion sort threshold, and has been adjusted + * for records of size 48 bytes. + * The MTHREShold is where we stop finding a better median. + */ + +#define THRESH 4 /* threshold for insertion */ + +#define MTHRESH 6 /* threshold for median */ + + + +static int qsz; /* size of each record */ +static int (*qcmp)(); /* the comparison routine */ + +static int thresh; /* THRESHold in chars */ +static int mthresh; /* MTHRESHold in chars */ + +/* + * qsort: + * First, set up some global parameters for qst to share. Then, quicksort + * with qst(), and then a cleanup insertion sort ourselves. Sound simple? + * It's not... + */ +qsort (base, n, size, compar) + char *base; + int n; + int size; + int (*compar)(); +{ + register char *i, *j, *lo, *hi, *min; + register int c; + char *max; + + if (n <= 1) return; + qsz = size; + qcmp = compar; + thresh = qsz*THRESH; + mthresh = qsz*MTHRESH; + max = base + n*qsz; + if (n >= THRESH) + { + qst (base, max); + hi = base + thresh; + } + else + { + hi = max; + } + /* + * First put smallest element, which must be in the first THRESH, in + * the first position as a sentinel. This is done just by searching + * the first THRESH elements (or the first n if n < THRESH), finding + * the min, and swapping it into the first position. + */ + for (j = lo = base; (lo += qsz) < hi; ) + { + if ((*qcmp) (j, lo) > 0) + j = lo; + } + if (j != base) + { /* swap j into place */ + for (i = base, hi = base + qsz; i < hi;) + { + c = *j; + *j++ = *i; + *i++ = c; + } + } + /* + * With our sentinel in place, we now run the following hyper-fast + * insertion sort. For each remaining element, min, from [1] to [n-1], + * set hi to the index of the element AFTER which this one goes. + * Then, do the standard insertion sort shift on a character at a time + * basis for each element in the frob. + */ + for (min = base; (hi = min += qsz) < max;) + { + while ( (*qcmp) (hi -= qsz, min) > 0); + if ((hi += qsz) != min) + { + for (lo = min + qsz; --lo >= min;) + { + c = *lo; + for (i = j = lo; (j -= qsz) >= hi; i = j) + *i = *j; + *i = c; + } + } + } +} + +/* + * qst: + * Do a quicksort + * First, find the median element, and put that one in the first place as the + * discriminator. (This "median" is just the median of the first, last and + * middle elements). (Using this median instead of the first element is a big + * win). Then, the usual partitioning/swapping, followed by moving the + * discriminator into the right place. Then, figure out the sizes of the two + * partions, do the smaller one recursively and the larger one via a repeat of + * this code. Stopping when there are less than THRESH elements in a partition + * and cleaning up with an insertion sort (in our caller) is a huge win. + * All data swaps are done in-line, which is space-losing but time-saving. + * (And there are only three places where this is done). + */ + +qst (base, max) + char *base, *max; +{ + register char *i, *j, *jj, *mid; + register int ii, c; + char *tmp; + int lo, hi; + + lo = max - base; /* number of elements as chars */ + do + { + /* + * At the top here, lo is the number of characters of elements in the + * current partition. (Which should be max - base). + * Find the median of the first, last, and middle element and make that the + * middle element. Set j to largest of first and middle. If max is larger + * than that guy, then it's that guy, else compare max with loser of first + * and take larger. Things are set up to prefer the middle, then the first + * in case of ties. + */ + mid = i = base + qsz * ((lo/qsz) >> 1); + if (lo >= mthresh) + { + j = ((*qcmp) ((jj = base), i) > 0 ? jj : i); + if ((*qcmp) (j, (tmp = max - qsz)) > 0) + { + j = (j == jj ? i : jj); /* switch to first loser */ + if ((*qcmp) (j, tmp) < 0) + j = tmp; + } + if (j != i) + { + ii = qsz; + do + { + c = *i; + *i++ = *j; + *j++ = c; + } + while( --ii ); + } + } + /* + * Semi-standard quicksort partitioning/swapping + */ + for (i = base, j = max - qsz; ;) + { + while (i < mid && (*qcmp) (i, mid) <= 0) + i += qsz; + while (j > mid) + { + if ((*qcmp) (mid, j) <= 0) + { + j -= qsz; + continue; + } + tmp = i + qsz; /* value of i after swap */ + if (i == mid) + { /* j <-> mid, new mid is j */ + mid = jj = j; + } + else + { /* i <-> j */ + jj = j; + j -= qsz; + } + goto swap; + } + if (i == mid) + { + break; + } + else + { /* i <-> mid, new mid is i */ + jj = mid; + tmp = mid = i; /* value of i after swap */ + j -= qsz; + } + swap: + ii = qsz; + do + { + c = *i; + *i++ = *jj; + *jj++ = c; + } + while (--ii); + i = tmp; + } + /* + * Look at sizes of the two partitions, do the smaller one first by + * recursion, then do the larger one by making sure lo is its size, + * base and max are update correctly, and branching back. + * But only repeat (recursively or by branching) if the partition is + * of at least size THRESH. + */ + i = (j = mid) + qsz; + if ((lo = j - base) <= (hi = max - i)) + { + if (lo >= thresh) + qst (base, j); + base = i; + lo = hi; + } + else + { + if (hi >= thresh) + qst (i, max); + max = j; + } + } + while (lo >= thresh); +} + + + diff --git a/etc/refcard.tex b/etc/refcard.tex new file mode 100644 index 0000000..a74e36f --- /dev/null +++ b/etc/refcard.tex @@ -0,0 +1,628 @@ +% Reference Card for GNU Emacs version 18 on Unix systems +%**start of header +\newcount\columnsperpage + +% This file can be printed with 1, 2, or 3 columns per page (see below). +% Specify how many you want here. Nothing else needs to be changed. + +\columnsperpage=1 + +% Copyright (c) 1987 Free Software Foundation, Inc. + +% This file is part of GNU Emacs. + +% This file is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY. No author or distributor +% accepts responsibility to anyone for the consequences of using it +% or for whether it serves any particular purpose or describes +% any piece of software unless they say so in writing. Refer to the +% GNU Emacs General Public License for full details. +% +% Permission is granted to copy, modify and redistribute this source +% file provided the copyright notice and permission notices are +% preserved on all copies. +% +% Permission is granted to process this file through TeX and print the +% results, provided the printed document carries copyright and +% permission notices identical to the ones below. + +% This file is intended to be processed by plain TeX (TeX82). +% +% The final reference card has six columns, three on each side. +% This file can be used to produce it in any of three ways: +% 1 column per page +% produces six separate pages, each of which needs to be reduced to 80%. +% This gives the best resolution. +% 2 columns per page +% produces three already-reduced pages. +% You will still need to cut and paste. +% 3 columns per page +% produces two pages which must be printed sideways to make a +% ready-to-use 8.5 x 11 inch reference card. +% For this you need a dvi device driver that can print sideways. +% Which mode to use is controlled by setting \columnsperpage above. +% +% Author: +% Stephen Gildea +% UUCP: mit-erl!gildea +% Internet: gildea@erl.mit.edu +% +% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik +% for their many good ideas. + +% If there were room, it would be nice to see sections on +% Abbrevs, Rectangles, and Dired. + +\def\versionnumber{1.9} +\def\year{1987} +\def\version{March \year\ v\versionnumber} + +\def\shortcopyrightnotice{\vskip 1ex plus 2 fill + \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. + Permissions on back. v\versionnumber}} + +\def\copyrightnotice{ +\vskip 1ex plus 2 fill\begingroup\small +\centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.} +\centerline{designed by Stephen Gildea, \version} +\centerline{for GNU Emacs version 18 on Unix systems} + +Permission is granted to make and distribute copies of +this card provided the copyright notice and this permission notice +are preserved on all copies. + +For copies of the GNU Emacs manual, write to the Free Software +Foundation, Inc., 675 Massachusetts Ave, Cambridge MA 02139. + +\endgroup} + +% make \bye not \outer so that the \def\bye in the \else clause below +% can be scanned without complaint. +\def\bye{\par\vfill\supereject\end} + +\newdimen\intercolumnskip +\newbox\columna +\newbox\columnb + +\def\ncolumns{\the\columnsperpage} + +\message{[\ncolumns\space + column\if 1\ncolumns\else s\fi\space per page]} + +\def\scaledmag#1{ scaled \magstep #1} + +% This multi-way format was designed by Stephen Gildea +% October 1986. +\if 1\ncolumns + \hsize 4in + \vsize 10in + \voffset -.7in + \font\titlefont=\fontname\tenbf \scaledmag3 + \font\headingfont=\fontname\tenbf \scaledmag2 + \font\smallfont=\fontname\sevenrm + \font\smallsy=\fontname\sevensy + + \footline{\hss\folio} + \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} +\else + \hsize 3.2in + \vsize 7.95in + \hoffset -.75in + \voffset -.745in + \font\titlefont=ambx10 \scaledmag2 + \font\headingfont=ambx10 \scaledmag1 + \font\smallfont=amr6 + \font\smallsy=amsy6 + \font\eightrm=amr8 + \font\eightbf=ambx8 + \font\eightit=amti8 + \font\eighttt=amtt8 + \font\eightsy=amsy8 + \textfont0=\eightrm + \textfont2=\eightsy + \def\rm{\eightrm} + \def\bf{\eightbf} + \def\it{\eightit} + \def\tt{\eighttt} + \normalbaselineskip=.8\normalbaselineskip + \normallineskip=.8\normallineskip + \normallineskiplimit=.8\normallineskiplimit + \normalbaselines\rm %make definitions take effect + + \if 2\ncolumns + \let\maxcolumn=b + \footline{\hss\rm\folio\hss} + \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} + \else \if 3\ncolumns + \let\maxcolumn=c + \nopagenumbers + \else + \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} + \errmessage{Illegal number of columns per page} + \fi\fi + + \intercolumnskip=.46in + \def\abc{a} + \output={% + % This next line is useful when designing the layout. + %\immediate\write16{Column \folio\abc\space starts with \firstmark} + \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} + \else\if a\abc + \global\setbox\columna\columnbox \global\def\abc{b} + %% in case we never use \columnb (two-column mode) + \global\setbox\columnb\hbox to -\intercolumnskip{} + \else + \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} + \def\multicolumnformat{\shipout\vbox{\makeheadline + \hbox{\box\columna\hskip\intercolumnskip + \box\columnb\hskip\intercolumnskip\columnbox} + \makefootline}\advancepageno} + \def\columnbox{\leftline{\pagebody}} + + \def\bye{\par\vfill\supereject + \if a\abc \else\null\vfill\eject\fi + \if a\abc \else\null\vfill\eject\fi + \end} +\fi + +% we won't be using math mode much, so redefine some of the characters +% we might want to talk about +\catcode`\^=12 +\catcode`\_=12 + +\chardef\\=`\\ +\chardef\{=`\{ +\chardef\}=`\} + +\hyphenation{mini-buf-fer} + +\parindent 0pt +\parskip 1ex plus .5ex minus .5ex + +\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} + +\outer\def\newcolumn{\vfill\eject} + +\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} + +\outer\def\section#1{\par\filbreak + \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% + \vskip 2ex plus 1ex minus 1.5ex} + +\newdimen\keyindent + +\def\beginindentedkeys{\keyindent=1em} +\def\endindentedkeys{\keyindent=0em} +\endindentedkeys + +\def\paralign{\vskip\parskip\halign} + +\def\<#1>{$\langle${\rm #1}$\rangle$} + +\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows + +\def\beginexample{\par\leavevmode\begingroup + \obeylines\obeyspaces\parskip0pt\tt} +{\obeyspaces\global\let =\ } +\def\endexample{\endgroup} + +\def\key#1#2{\leavevmode\hbox to \hsize{\vtop + {\hsize=.75\hsize\rightskip=1em + \hskip\keyindent\relax#1}\kbd{#2}\hfil}} + +\newbox\metaxbox +\setbox\metaxbox\hbox{\kbd{M-x }} +\newdimen\metaxwidth +\metaxwidth=\wd\metaxbox + +\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize + {\hskip\keyindent\relax#1\hfil}% + \hskip -\metaxwidth minus 1fil + \kbd{#2}\hfil}} + +\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad + &\kbd{#3}\quad\cr} + +%**end of header + + +\title{GNU Emacs Reference Card} + +\centerline{(for version 18)} + +\section{Starting Emacs} + +To enter Emacs, just type its name: \kbd{emacs} + +To read in a file to edit, see Files, below. + +\section{Leaving Emacs} + +\key{suspend Emacs (the usual way of leaving it)}{C-z} +\key{exit Emacs permanently}{C-x C-c} + +\section{Files} + +\key{{\bf read} a file into Emacs}{C-x C-f} +\key{{\bf save} a file back to disk}{C-x C-s} +\key{{\bf insert} contents of another file into this buffer}{C-x i} +\key{replace this file with the file you really want}{C-x C-v} +\key{write buffer to a specified file}{C-x C-w} +\key{run Dired, the directory editor}{C-x d} + +\section{Getting Help} + +The Help system is simple. Type \kbd{C-h} and follow the directions. +If you are a first-time user, type \kbd{C-h t} for a {\bf tutorial}. +(This card assumes you know the tutorial.) + +\key{get rid of Help window}{C-x 1} +\key{scroll Help window}{ESC C-v} + +\key{apropos: show commands matching a string}{C-h a} +\key{show the function a key runs}{C-h c} +\key{describe a function}{C-h f} +\key{get mode-specific information}{C-h m} + +\section{Error Recovery} + +\key{{\bf abort} partially typed or executing command}{C-g} +\metax{{\bf recover} a file lost by a system crash}{M-x recover-file} +\key{{\bf undo} an unwanted change}{C-x u {\rm or} C-_} +\metax{restore a buffer to its original contents}{M-x revert-buffer} +\key{redraw garbaged screen}{C-l} + +\section{Incremental Search} + +\key{search forward}{C-s} +\key{search backward}{C-r} +\key{regular expression search}{C-M-s} + +Use \kbd{C-s} or \kbd{C-r} again to repeat the search in either direction. + +\key{exit incremental search}{ESC} +\key{undo effect of last character}{DEL} +\key{abort current search}{C-g} + +If Emacs is still searching, \kbd{C-g} will cancel the +part of the search not done, otherwise it aborts the entire search. + +\shortcopyrightnotice + +\section{Motion} + +Cursor motion: + +\beginindentedkeys + +\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr +\threecol{{\bf entity to move over}}{{\bf backward}}{{\bf forward}} +\threecol{character}{C-b}{C-f} +\threecol{word}{M-b}{M-f} +\threecol{line}{C-p}{C-n} +\threecol{go to line beginning (or end)}{C-a}{C-e} +\threecol{sentence}{M-a}{M-e} +\threecol{paragraph}{M-[}{M-]} +\threecol{page}{C-x [}{C-x ]} +\threecol{sexp}{C-M-b}{C-M-f} +\threecol{function}{C-M-a}{C-M-e} +\threecol{go to buffer beginning (or end)}{M-<}{M->} +} +Screen motion: + +\key{scroll to next screen}{C-v} +\key{scroll to previous screen}{M-v} +\key{scroll left}{C-x <} +\key{scroll right}{C-x >} + +\endindentedkeys + +\section{Killing and Deleting} + +\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr +\threecol{{\bf entity to kill}}{{\bf backward}}{{\bf forward}} +\threecol{character (delete, not kill)}{DEL}{C-d} +\threecol{word}{M-DEL}{M-d} +\threecol{line (to end of)}{M-0 C-k}{C-k} +\threecol{sentence}{C-x DEL}{M-k} +\threecol{sexp}{M-- C-M-k}{C-M-k} +} + +\key{kill {\bf region}}{C-w} +\key{kill to next occurrence of {\it char}}{M-z {\it char}} + +\key{yank back last thing killed}{C-y} +\key{replace last yank with previous kill}{M-y} + +\section{Marking} + +\key{set mark here}{C-@ {\rm or} C-SPC} +\key{exchange point and mark}{C-x C-x} + +\key{set mark {\it arg\/} {\bf words} away}{M-@} +\key{mark {\bf paragraph}}{M-h} +\key{mark {\bf page}}{C-x C-p} +\key{mark {\bf sexp}}{C-M-@} +\key{mark {\bf function}}{C-M-h} +\key{mark entire {\bf buffer}}{C-x h} + +\section{Query Replace} + +\key{interactively replace a text string}{M-\%} +\metax{using regular expressions}{M-x query-replace-regexp} + +Valid responses in query-replace mode are + +\key{{\bf replace} this one, go on to next}{SPC} +\key{replace this one, don't move}{,} +\key{{\bf skip} to next without replacing}{DEL} +\key{replace all remaining matches}{!} +\key{{\bf back up} to the previous match}{^} +\key{{\bf exit} query-replace}{ESC} +\key{enter recursive edit (\kbd{C-M-c} to exit)}{C-r} + +\section{Multiple Windows} + +\key{delete all other windows}{C-x 1} +\key{delete this window}{C-x 0} +\key{split window in 2 vertically}{C-x 2} +\key{split window in 2 horizontally}{C-x 5} + +\key{scroll other window}{C-M-v} +\key{switch cursor to another window}{C-x o} + +\metax{shrink window shorter}{M-x shrink-window} +\key{grow window taller}{C-x ^} +\key{shrink window narrower}{C-x \{} +\key{grow window wider}{C-x \}} + +\key{select a buffer in other window}{C-x 4 b} +\key{find file in other window}{C-x 4 f} +\key{compose mail in other window}{C-x 4 m} +\key{run Dired in other window}{C-x 4 d} +\key{find tag in other window}{C-x 4 .} + +\section{Formatting} + +\key{indent current {\bf line} (mode-dependent)}{TAB} +\key{indent {\bf region} (mode-dependent)}{C-M-\\} +\key{indent {\bf sexp} (mode-dependent)}{C-M-q} +\key{indent region rigidly {\it arg\/} columns}{C-x TAB} + +\key{insert newline after point}{C-o} +\key{move rest of line vertically down}{C-M-o} +\key{delete blank lines around point}{C-x C-o} +\key{delete all whitespace around point}{M-\\} +\key{put exactly one space at point}{M-SPC} + +\key{fill {\bf paragraph}}{M-q} +\key{fill {\bf region}}{M-g} +\key{set fill column}{C-x f} +\key{set prefix each line starts with}{C-x .} + +\section{Case Change} + +\key{uppercase word}{M-u} +\key{lowercase word}{M-l} +\key{capitalize word}{M-c} + +\key{uppercase region}{C-x C-u} +\key{lowercase region}{C-x C-l} +\metax{capitalize region}{M-x capitalize-region} + +\section{The Minibuffer} + +The following keys are defined in the minibuffer. + +\key{complete as much as possible}{TAB} +\key{complete up to one word}{SPC} +\key{complete and execute}{RET} +\key{show possible completions}{?} +\key{abort command}{C-g} + +Type \kbd{C-x ESC} to edit and repeat the last command that used the +minibuffer. The following keys are then defined. + +\key{previous minibuffer command}{M-p} +\key{next minibuffer command}{M-n} + +\newcolumn +\title{GNU Emacs Reference Card} + +\section{Buffers} + +\key{select another buffer}{C-x b} +\key{list all buffers}{C-x C-b} +\key{kill a buffer}{C-x k} + +\section{Transposing} + +\key{transpose {\bf characters}}{C-t} +\key{transpose {\bf words}}{M-t} +\key{transpose {\bf lines}}{C-x C-t} +\key{transpose {\bf sexps}}{C-M-t} + +\section{Spelling Check} + +\key{check spelling of current word}{M-\$} +\metax{check spelling of all words in region}{M-x spell-region} +\metax{check spelling of entire buffer}{M-x spell-buffer} + +\section{Tags} + +\key{find tag}{M-.} +\key{find next occurrence of tag}{C-u M-.} +\metax{specify a new tags file}{M-x visit-tags-table} + +\metax{regexp search on all files in tags table}{M-x tags-search} +\metax{query replace on all the files}{M-x tags-query-replace} +\key{continue last tags search or query-replace}{M-,} + +\section{Shells} + +\key{execute a shell command}{M-!} +\key{run a shell command on the region}{M-|} +\key{filter region through a shell command}{C-u M-|} +\metax{start a shell in window \kbd{*shell*}}{M-x shell} + +\section{Rmail} + +\key{scroll forward}{SPC} +\key{scroll reverse}{DEL} +\key{beginning of message}{. {\rm (dot)}} +\key{{\bf next} non-deleted message}{n} +\key{{\bf previous} non-deleted message}{p} +\key{next message}{M-n} +\key{previous message}{M-p} +\key{{\bf delete} message}{d} +\key{delete message and back up}{C-d} +\key{undelete message}{u} +\key{{\bf reply} to message}{r} +\key{forward message to someone}{f} +\key{send mail}{m} +\key{{\bf get} newly arrived mail}{g} +\key{{\bf quit} Rmail}{q} +\key{output message to another Rmail file}{o} +\key{output message in Unix-mail style}{C-o} +\key{show summary of headers}{h} + +\section{Regular Expressions} + +The following have special meaning inside a regular expression. + +\key{any single character}{. {\rm(dot)}} +\key{zero or more repeats}{*} +\key{one or more repeats}{+} +\key{zero or one repeat}{?} +\key{any character in set}{[ {\rm$\ldots$} ]} +\key{any character not in set}{[^ {\rm$\ldots$} ]} +\key{beginning of line}{^} +\key{end of line}{\$} +\key{quote a special character {\it c\/}}{\\{\it c}} +\key{alternative (``or'')}{\\|} +\key{grouping}{\\( {\rm$\ldots$} \\)} +\key{{\it n\/}th group}{\\{\it n}} +\key{beginning of buffer}{\\`} +\key{end of buffer}{\\'} +\key{word break}{\\b} +\key{not beginning or end of word}{\\B} +\key{beginning of word}{\\<} +\key{end of word}{\\>} +\key{any word-syntax character}{\\w} +\key{any non-word-syntax character}{\\W} +\key{character with syntax {\it c}}{\\s{\it c}} +\key{character with syntax not {\it c}}{\\S{\it c}} + +\section{Registers} + +\key{copy region to register}{C-x x} +\key{insert register contents}{C-x g} + +\key{save point in register}{C-x /} +\key{move point to saved location}{C-x j} + +\section{Info} + +\key{enter the Info documentation reader}{C-h i} +\beginindentedkeys + +Moving within a node: + +\key{scroll forward}{SPC} +\key{scroll reverse}{DEL} +\key{beginning of node}{. {\rm (dot)}} + +Moving between nodes: + +\key{{\bf next} node}{n} +\key{{\bf previous} node}{p} +\key{move {\bf up}}{u} +\key{select menu item by name}{m} +\key{select {\it n\/}th menu item by number (1--5)}{{\it n}} +\key{follow cross reference (return with \kbd{l})}{f} +\key{return to last node you saw}{l} +\key{return to directory node}{d} +\key{go to any node by name}{g} + +Other: + +\key{run Info {\bf tutorial}}{h} +\key{list Info commands}{?} +\key{{\bf quit} Info}{q} +\key{search nodes for regexp}{s} + +\endindentedkeys + +\section{Keyboard Macros} + +\key{{\bf start} defining a keyboard macro}{C-x (} +\key{{\bf end} keyboard macro definition}{C-x )} +\key{{\bf execute} last-defined keyboard macro}{C-x e} +\key{append to last keyboard macro}{C-u C-x (} +\metax{name last keyboard macro}{M-x name-last-kbd-macro} +\metax{insert lisp definition in buffer}{M-x insert-kbd-macro} + +\section{Commands Dealing with Emacs Lisp} + +\key{eval {\bf sexp} before point}{C-x C-e} +\key{eval current {\bf defun}}{C-M-x} +\metax{eval {\bf region}}{M-x eval-region} +\metax{eval entire {\bf buffer}}{M-x eval-current-buffer} +\key{read and eval minibuffer}{M-ESC} +\key{re-execute last minibuffer command}{C-x ESC} +\metax{read and eval Emacs Lisp file}{M-x load-file} +\metax{load from standard system directory}{M-x load-library} + +\section{Simple Customization} + +% The intended audience here is the person who wants to make simple +% customizations and knows Lisp syntax. + +Here are some examples of binding global keys in Emacs Lisp. Note +that you cannot say \kbd{"\\M-\#"}; you must say \kbd{"\\e\#"}. + +\beginexample% +(global-set-key "\\C-cg" 'goto-line) +(global-set-key "\\e\\C-r" 'isearch-backward-regexp) +(global-set-key "\\e\#" 'query-replace-regexp) +\endexample + +An example of setting a variable in Emacs Lisp: + +\beginexample% +(setq backup-by-copying-when-linked t) +\endexample + +\section{Writing Commands} + +\beginexample% +(defun \ (\) + "\" + (interactive "\