From: Mark McConnell
Subject: James Gosling built Emacs
Date: 
Message-ID: <d3aed052.0406291427.4e9af675@posting.google.com>
It says it in print.

http://java.sun.com/developer/technicalArticles/Interviews/gosling0604_qa.html

...In his storied career, Gosling has built satellite data acquisition
systems, a multiprocessor version of UNIX, plus several compilers,
mail systems and window managers. He has also built a WYSIWYG text
editor, a constraint-based drawing editor and a text editor called
"Emacs" for UNIX systems.

In the article's feedback form, I sent them a polite comment about
Richard Stallman.

From: Pascal Bourguignon
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <873c4dhq4m.fsf@thalassa.informatimago.com>
···············@yahoo.com (Mark McConnell) writes:

> It says it in print.
> 
> http://java.sun.com/developer/technicalArticles/Interviews/gosling0604_qa.html
> 
> ...In his storied career, Gosling has built satellite data acquisition
> systems, a multiprocessor version of UNIX, plus several compilers,
> mail systems and window managers. He has also built a WYSIWYG text
> editor, a constraint-based drawing editor and a text editor called
> "Emacs" for UNIX systems.
> 
> In the article's feedback form, I sent them a polite comment about
> Richard Stallman.


Indeed.  http://www.fact-index.com/g/go/gosling_emacs.html

Would Richard have had the idea to write an emacs for unix (GNU) if
James had not opened the path?  Perhaps we would still have a GNU
emacs, but running on VMS only?

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein
From: Joe Marshall
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <eknxdh7c.fsf@comcast.net>
Pascal Bourguignon <····@thalassa.informatimago.com> writes:

> Indeed.  http://www.fact-index.com/g/go/gosling_emacs.html
>
> Would Richard have had the idea to write an emacs for unix (GNU) if
> James had not opened the path?  

Yes.  I'm no fan of RMS, but his vision was that a Unix Emacs that was
as powerful as Multics or Teco Emacs, was a fundamental step in the
tool chain for building GNU.  Gosling's emacs was nowhere near enough.

> Perhaps we would still have a GNU emacs, but running on VMS only?

I don't think so.  One `advantage' of unix at the time was that it was
orders of magnitude simpler than VMS.

-- 
~jrm
From: David Steuber
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <4ddd570c.0406301233.53928b1a@posting.google.com>
Joe Marshall <·············@comcast.net> wrote in message news:<············@comcast.net>...
> Pascal Bourguignon <····@thalassa.informatimago.com> writes:
> 
> > Indeed.  http://www.fact-index.com/g/go/gosling_emacs.html
> >
> > Would Richard have had the idea to write an emacs for unix (GNU) if
> > James had not opened the path?  
> 
> Yes.  I'm no fan of RMS, but his vision was that a Unix Emacs that was
> as powerful as Multics or Teco Emacs, was a fundamental step in the
> tool chain for building GNU.  Gosling's emacs was nowhere near enough.

When I was reading up on the history of Emacs, I seem to recall
reading that there was a huge frakas over Gosling Emacs.  Now I'm
aware of two editors that still call themselves Emacs: GNU Emacs and
XEmacs (Lucid).  Those are also the only two I've ever used.  I
haven't even touched VILE.
From: David Golden
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <JhGEc.3570$Z14.4480@news.indigo.ie>
David Steuber wrote:

> When I was reading up on the history of Emacs, I seem to recall
> reading that there was a huge frakas over Gosling Emacs.  Now I'm
> aware of two editors that still call themselves Emacs: GNU Emacs and
> XEmacs (Lucid).  Those are also the only two I've ever used.  I
> haven't even touched VILE.

An editor I haven't used since AmigaOS 1.x, MicroEMACS a.k.a muemacs a.k.a
uemacs still apparently exists.  Though it's not emacs-as-in-lisp.  Also
now has a spinoff "nanoemacs" since microemacs started accumulating
kitchen-sink macro packages - so it's an emacs in spirit, anyway :-)

http://www.jasspa.com/ - friendly (according to them) GPL fork
http://uemacs.tripod.com/ - original (I think...)
From: Kevin Layer
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <mk7jtn2189.fsf@*n*o*s*p*a*m*franz.com>
·····@david-steuber.com (David Steuber) writes:

> When I was reading up on the history of Emacs, I seem to recall
> reading that there was a huge frakas over Gosling Emacs.  

There was.  Some of the display code (and perhaps other stuff) from
Gosling's Emacs was used by RMS in early versions of GNU Emacs.  When
Gosling sold (gave? invested?) his Emacs to Unipress, and GNU Emacs
started to take away customers from Unipress' Emacs, they asked that
RMS remove the code he got from Gosling's Emacs.  This precipitated a
rewrite of the display code and became free of any legal problems.

My memory is a little foggy on all this, so I might have gotten some
of the details wrong.

Kevin
From: Barry Margolin
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <barmar-3C7C8A.15350701072004@comcast.dca.giganews.com>
In article <··············@*n*o*s*p*a*m*franz.com>,
 Kevin Layer <·····@*n*o*s*p*a*m*franz.com> wrote:

> ·····@david-steuber.com (David Steuber) writes:
> 
> > When I was reading up on the history of Emacs, I seem to recall
> > reading that there was a huge frakas over Gosling Emacs.  
> 
> There was.  Some of the display code (and perhaps other stuff) from
> Gosling's Emacs was used by RMS in early versions of GNU Emacs.  When
> Gosling sold (gave? invested?) his Emacs to Unipress, and GNU Emacs
> started to take away customers from Unipress' Emacs, they asked that
> RMS remove the code he got from Gosling's Emacs.  This precipitated a
> rewrite of the display code and became free of any legal problems.
> 
> My memory is a little foggy on all this, so I might have gotten some
> of the details wrong.

That's the gist as I remember it as well.  RMS never actually admitted 
that he used Gosling code, but rather than get into a legal battle he 
just did the rewrite of that module.  It probably could have used a good 
cleaning anyway, so this just pushed it to the top of the priority list.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
From: Paolo Amoroso
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <874qorrb4j.fsf@plato.moon.paoloamoroso.it>
·····@david-steuber.com (David Steuber) writes:

> reading that there was a huge frakas over Gosling Emacs.  Now I'm
> aware of two editors that still call themselves Emacs: GNU Emacs and
> XEmacs (Lucid).  Those are also the only two I've ever used.  I

In case you are interested, JWZ's site includes an interesting account
on the early history of Lucid Emacs/XEmacs and the fork from GNU
Emacs:

  http://www.jwz.org


Paolo
-- 
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
Recommended Common Lisp libraries/tools (Google for info on each):
- ASDF/ASDF-INSTALL: system building/installation
- CL-PPCRE: regular expressions
- UFFI: Foreign Function Interface
From: Luke Gorrie
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <lhvfh78z6d.fsf@dodo.bluetail.com>
Paolo Amoroso <·······@mclink.it> writes:

> ·····@david-steuber.com (David Steuber) writes:
>
>> reading that there was a huge frakas over Gosling Emacs.  Now I'm
>> aware of two editors that still call themselves Emacs: GNU Emacs and
>> XEmacs (Lucid).  Those are also the only two I've ever used.  I
>
> In case you are interested, JWZ's site includes an interesting account
> on the early history of Lucid Emacs/XEmacs and the fork from GNU
> Emacs:
>
>   http://www.jwz.org

And if the Emacs/XEmacs schism isn't sufficiently gut-wrenching for
you, the GNU/Gosling frakas is described in detail (from RMS's point
of view) here:

  http://www.gnu.org/philosophy/stallman-kth.html

-Luke
From: Mark McConnell
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <d3aed052.0406300703.7ef0fd01@posting.google.com>
Pascal Bourguignon <····@thalassa.informatimago.com> wrote in message news:<··············@thalassa.informatimago.com>...
> ···············@yahoo.com (Mark McConnell) writes:
> 
> > It says it in print.
> > 
> > http://java.sun.com/developer/technicalArticles/Interviews/gosling0604_qa.html
> > 
> > ...In his storied career, Gosling has built satellite data acquisition
> > systems, a multiprocessor version of UNIX, plus several compilers,
> > mail systems and window managers. He has also built a WYSIWYG text
> > editor, a constraint-based drawing editor and a text editor called
> > "Emacs" for UNIX systems.
> > 
> > In the article's feedback form, I sent them a polite comment about
> > Richard Stallman.
> 
> 
> Indeed.  http://www.fact-index.com/g/go/gosling_emacs.html
> 
> Would Richard have had the idea to write an emacs for unix (GNU) if
> James had not opened the path?  Perhaps we would still have a GNU
> emacs, but running on VMS only?

My original post was wrong--I apologize.  I had thought Stallman wrote
Emacs.  The true story is explained in Pascal's post.  I also received
this e-mail from someone else:

> He did indeed.  AFAIK it was the second implementation of emacs (first
> one was built on top of TECO) and was the second emacs to use lisp  as
> a macro language (first was multics emacs), before the lispm emacs
> editors even, although there's some chance that he wrote the multics
> emacs also and then ported it to unix later -- my memory is fuzzy on
> this particular point.
 
> Stallman's GNU Emacs came much later (post-lispm, and way post-gosling
> emacs).  Gosling's Emacs became a commercial product, and Stallman's
> emacs, partly because of it's open-source, wound up becoming more
> popular.
From: Barry Margolin
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <barmar-A156B5.12113830062004@comcast.dca.giganews.com>
In article <····························@posting.google.com>,
 ···············@yahoo.com (Mark McConnell) wrote:

> Pascal Bourguignon <····@thalassa.informatimago.com> wrote in message 
> news:<··············@thalassa.informatimago.com>...
> > ···············@yahoo.com (Mark McConnell) writes:
> > 
> > > It says it in print.
> > > 
> > > http://java.sun.com/developer/technicalArticles/Interviews/gosling0604_qa.
> > > html
> > > 
> > > ...In his storied career, Gosling has built satellite data acquisition
> > > systems, a multiprocessor version of UNIX, plus several compilers,
> > > mail systems and window managers. He has also built a WYSIWYG text
> > > editor, a constraint-based drawing editor and a text editor called
> > > "Emacs" for UNIX systems.
> > > 
> > > In the article's feedback form, I sent them a polite comment about
> > > Richard Stallman.
> > 
> > 
> > Indeed.  http://www.fact-index.com/g/go/gosling_emacs.html
> > 
> > Would Richard have had the idea to write an emacs for unix (GNU) if
> > James had not opened the path?  Perhaps we would still have a GNU
> > emacs, but running on VMS only?
> 
> My original post was wrong--I apologize.  I had thought Stallman wrote
> Emacs.  The true story is explained in Pascal's post.  I also received
> this e-mail from someone else:
> 
> > He did indeed.  AFAIK it was the second implementation of emacs (first
> > one was built on top of TECO) and was the second emacs to use lisp  as
> > a macro language (first was multics emacs), before the lispm emacs
> > editors even, although there's some chance that he wrote the multics
> > emacs also and then ported it to unix later -- my memory is fuzzy on
> > this particular point.

Multics Emacs was written by Bernie Greenberg at Honeywell, around 1978.  
There was no porting relationship between Multics Emacs and Gosling 
Emacs, although I think he adopted a few ideas (e.g. save-excursion, 
which was also adopted into GNU Emacs).

>  
> > Stallman's GNU Emacs came much later (post-lispm, and way post-gosling
> > emacs).  Gosling's Emacs became a commercial product, and Stallman's
> > emacs, partly because of it's open-source, wound up becoming more
> > popular.

In fact, GNU Emacs was at least the *third* Emacs for Unix.  Gosling's 
was first, then came Zimmerman's (its look and feel was a bit more like 
the original ITS Emacs -- e.g. M-x command names were mixed case with 
spaces separating words, rather than lowercase with hyphens).

There's a document that's posted periodically to comp.editors that 
contains a catalogue and history of text editors, and should clarify the 
lineage of all these.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
From: JP Massar
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <koq5e0124am3r0kr33oj2jfilq0tsgmela@4ax.com>
On Wed, 30 Jun 2004 12:11:38 -0400, Barry Margolin
<······@alum.mit.edu> wrote:
 
>
>In fact, GNU Emacs was at least the *third* Emacs for Unix.  Gosling's 
>was first, then came Zimmerman's (its look and feel was a bit more like 
>the original ITS Emacs -- e.g. M-x command names were mixed case with 
>spaces separating words, rather than lowercase with hyphens).
>
 
BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
was the first Emacs AFAIK to implement its extension language in
Common Lisp (or a subset thereof).
From: Christopher C. Stacy
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <uhdstc6xy.fsf@news.dtpq.com>
>>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:

 JP> On Wed, 30 Jun 2004 12:11:38 -0400, Barry Margolin
 JP> <······@alum.mit.edu> wrote:
 
 >> 
 >> In fact, GNU Emacs was at least the *third* Emacs for Unix.  Gosling's 
 >> was first, then came Zimmerman's (its look and feel was a bit more like 
 >> the original ITS Emacs -- e.g. M-x command names were mixed case with 
 >> spaces separating words, rather than lowercase with hyphens).
 >> 
 
 JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
 JP> was the first Emacs AFAIK to implement its extension language in
 JP> Common Lisp (or a subset thereof).

What about the Emacs implementation that was part of NIL?
I only used it a little bit and can't remember it's name.
From: Christopher C. Stacy
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <ud63hc6qv.fsf@news.dtpq.com>
>>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
 JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
 JP> was the first Emacs AFAIK to implement its extension language in
 JP> Common Lisp (or a subset thereof).

What about the Lisp Machine implementation of Emacs, mid 1970s?
From: Luke Gorrie
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <lhr7rxarpk.fsf@dodo.bluetail.com>
······@news.dtpq.com (Christopher C. Stacy) writes:

>>>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
>  JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
>  JP> was the first Emacs AFAIK to implement its extension language in
>  JP> Common Lisp (or a subset thereof).
>
> What about the Lisp Machine implementation of Emacs, mid 1970s?

Remember the Emacs Timeline:

  http://www.jwz.org/doc/emacs-timeline.html

I see no mention of any "CCA Emacs" there. Perhaps someone should send
in a correction?

-Luke
From: JP Massar
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <f4l6e0d400a0mg07jpj1q015v07ujd2ef0@4ax.com>
On Wed, 30 Jun 2004 19:19:51 +0200, Luke Gorrie <····@bluetail.com>
wrote:

>······@news.dtpq.com (Christopher C. Stacy) writes:
>
>>>>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
>>  JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
>>  JP> was the first Emacs AFAIK to implement its extension language in
>>  JP> Common Lisp (or a subset thereof).
>>
>> What about the Lisp Machine implementation of Emacs, mid 1970s?
>
>Remember the Emacs Timeline:
>
>  http://www.jwz.org/doc/emacs-timeline.html
>
>I see no mention of any "CCA Emacs" there. Perhaps someone should send
>in a correction?
>
 
1981               Gosling Emacs                       :
                   by James Gosling                    :
                   written in C; with "Mocklisp"
                   as its extension language.
                       /      |
1983                  /       |
                     /   Unipress Emacs (6-may-83)
                    /    $395 commercial product.

---------------------------------------------------------------

Addition:

1980-1982   CCA Emacs by Steve Zimmerman.  Written in C, with
no extension language.  Given away.
1983-1984  CCA Emacs turned into commercial product, with an extension
language, a subset of Common Lisp, written by JP Massar.
Cost unknown.
1985 With the release of Gnu Emacs as open source, the
commericialization of CCA Emacs fails and the product is abandoned.
From: Barry Margolin
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <barmar-2481AE.20395130062004@comcast.dca.giganews.com>
In article <··································@4ax.com>,
 JP Massar <······@alum.mit.edu> wrote:

> Addition:
> 
> 1980-1982   CCA Emacs by Steve Zimmerman.  Written in C, with
> no extension language.  Given away.

Wasn't it called something like ZEmacs in the pre-commercial days?

> 1983-1984  CCA Emacs turned into commercial product, with an extension
> language, a subset of Common Lisp, written by JP Massar.
> Cost unknown.
> 1985 With the release of Gnu Emacs as open source, the
> commericialization of CCA Emacs fails and the product is abandoned.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
From: JP Massar
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <p169e0pe3r2nuvdm8uebfq4qbc825d5dtt@4ax.com>
On Wed, 30 Jun 2004 20:39:51 -0400, Barry Margolin
<······@alum.mit.edu> wrote:

>In article <··································@4ax.com>,
> JP Massar <······@alum.mit.edu> wrote:
>
>> Addition:
>> 
>> 1980-1982   CCA Emacs by Steve Zimmerman.  Written in C, with
>> no extension language.  Given away.
>
>Wasn't it called something like ZEmacs in the pre-commercial days?

Unfortunately, I don't remember.

 
From: Barry Margolin
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <barmar-FC1179.20124130062004@comcast.dca.giganews.com>
In article <·············@news.dtpq.com>,
 ······@news.dtpq.com (Christopher C. Stacy) wrote:

> >>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
>  JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
>  JP> was the first Emacs AFAIK to implement its extension language in
>  JP> Common Lisp (or a subset thereof).
> 
> What about the Lisp Machine implementation of Emacs, mid 1970s?

It was written in Lisp Machine Lisp, not Common Lisp.  Common Lisp 
wasn't created until the early 80's.

And it wasn't Emacs, it was EINE, which stood for EINE Is Not Emacs.  
BTW, the next version was ZWEI, for ZWEI Was EINE Initially; had there 
been another rewrite, I suppose it would have been something like DREI 
Resembles EINE Inconsiderably.

Also, was it really the mid-70's?  I showed up at MIT in 1979, and I 
don't think the Lisp Machines were really finished yet.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
From: Christopher C. Stacy
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <ur7rwjlh2.fsf@news.dtpq.com>
Before I respond to this, let me suggest an excellent paper,
"Theory And Practice Of Text Editors, OR, A Cookbook For An Emacs".
Craig Finseth's  1980 B.S. thesis, MIT/LCS/TM-165.
He explains design and implementation techniques for writing an
Emacs editor, defines what "Emacs" is, and includes a survey
of all the Emacs and Emacs-like editors of the day.

A bunch more Emacs editors were implemented after that time.  
One that I think is notable in this discussion, and missing, 
was STEVE.  This was a full-up Emacs implementation that was part
of the NIL development environment (like the editor in Lispworks).
Most user extension code would have been Common Lisp.  
The user manual was published in 1984.  Having only used NIL for
about 20 hours in my whole life, I don't remember anything more
about STEVE (except that I liked it better than whatever the
alternative Emacs editor was on the VAX at the time).

>>>>> On Wed, 30 Jun 2004 20:12:41 -0400, Barry Margolin ("Barry") writes:

 Barry> In article <·············@news.dtpq.com>,
 Barry>  ······@news.dtpq.com (Christopher C. Stacy) wrote:

 >> >>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
 JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
 JP> was the first Emacs AFAIK to implement its extension language in
 JP> Common Lisp (or a subset thereof).
 >> 
 >> What about the Lisp Machine implementation of Emacs, mid 1970s?

 Barry> It was written in Lisp Machine Lisp, not Common Lisp.
 Barry> Common Lisp wasn't created until the early 80's.

Common Lisp did not pop into existance out of thin air.
There was lots of code around, and Common Lisp (as well 
you know) was designed to accomodate that existing code base.

EINE and ZWEI were written in Lisp Machine Lisp (aka ZetaLisp),
from which Common Lisp is mainly descended.  There are definitely
some parts of the implementation that relied on features that did
not make it into Common Lisp.  For example, array leaders; never
mind that a lot of ZWEI is written in Flavors, predating CLOS.
(By the way, ZWEI was ported to ANSI Common Lisp by someone later
on, but that code was never released.)

But the discussion here is about the editor extension language.

The extension language for this editor was Common Lisp.
(You could also write extensions in the older dialect.)

Once "Common Lisp" existed, whenever you want to say that happened,
this existing Common Lisp code was by tautology in Common Lisp.
One of the primary considerations in the design of Common Lisp
was to make that fact be a true as possible, so that users in exactly
this case would be impacted in exactly this way: Not at all, or minimally.

ZMACS extensions might often be calling ZWEI internals or APIs that
were implemented in ZetaLisp, but that's as irrelevent as the fact
that the underlying language of most Emacs implementations,
such as GNU Emacs, is C.

Here's some typical extension code, out of my init file from the early 80s.
The stuff in my login init file looks like:

(zwei:set-comtab
    zwei:*standard-comtab*
    '(#\super-C		     zwei:com-list-callers
      #\super-M		     zwei:com-list-methods
      #\super-T              zwei:com-exchange-lines
      #\control-\\           zwei:com-just-one-space
      #\super-J              zwei:com-change-style-region
      #\super-L              zwei:com-lowercase-code-in-region
      #\super-U              zwei:com-uppercase-code-in-region
      #\super-D              zwei:com-quick-disassemble))

Here's what's obviously a little later addition to that init file:

(setq zwei:*aliases-for-relevant-function-name*
      (acons 'clos:method 1 zwei:*aliases-for-relevant-function-name*))

That login init file also loaded another file that contained 
my ZMACS extensions.  I haven't looked at these files in over a
decade, but apparently in this incarnation of my init file, 
I defined a package "CLZ" which was Common Lisp, importing a whole
bunch of symbols that were the extension API from the ZWEI package.  
"SCL" is Symbolics Common Lisp, a superset of (ANSI) Common Lisp.  
The CLZ package definition was:

(unless (find-package "CL-ZWEI")
  (defpackage CL-ZWEI
    (:use SCL)
    (:nicknames "CLZ")
    (:import [a bunch of symbols from ZWEI...])))

My subsequently loaded ZWEI init file also claimed at the time 
that it was "Common Lisp" code:

;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10; Package: CLZ  -*-

(defun straight-down-real-line (n-lines)
  (let* ((*current-command-type* 'real-move)
	 (point (point))
	 (dest (forward-line point n-lines))
	 (dis-return dis-bps))
    (set-centering-fraction n-lines)
    (cond (dest
	   (move-bp point (bp-line dest) (bp-index dest)))
	  (t
	   (cond ((minusp n-lines)
		  (move-bp point (interval-first-bp *interval*)))
		 ((not *numeric-arg-p*)
		  (setq dis-return dis-text)
		  (move-bp point (insert (interval-last-bp *interval*)
					 #\cr)))
		 (t
		  (move-bp point (interval-last-bp *interval*))))))
    dis-return))

(defcom com-down-real-straight-line
	"Move to beginning of next line."
	(km r)
  (straight-down-real-line *numeric-arg*))


What's not Common Lisp about that?

Here's another snip, showing some slightly older, not-quite--CL, code.
Notice the use of Flavors (SEND PATHNAME ...).  This could have been
trivially rewritten into Common Lisp at the time, but I didn't bother.

(unless (fdefinedp 'load-word-abbrevs)
  (defun load-word-abbrevs (pathname &optional (remember-module t) no-msg-p)
    (setq pathname (fs:parse-pathname pathname))
    (labels ((generic-pathname (pathname)
	       (send pathname :new-pathname :type nil :version nil))
	     (pathname-equal (pn1 pn2)
	       (and (pathnamep pn1) (pathnamep pn2)
		    (equal (generic-pathname pn1) (generic-pathname pn2)))))
      (unless (and remember-module
		   (find pathname *modules* :test #'pathname-equal))
	(with-open-file (qwabl pathname :direction :input)
	  (unless no-msg-p
	    (format t "~&Loading word abbrevs ~A" pathname))
	  (zwei:load-qwabl qwabl))
	(when remember-module
	  (pushnew (generic-pathname pathname) *modules*))))))


 Barry> And it wasn't Emacs

What could "it wasn't Emacs" possibly mean?

The Lisp Machine editor ("ZMACS", whose implementation language was in 
the Lisp package "ZWEI"), was a customizable extensible self-documenting
real-time display text editor, implementing the essential look and feel 
of the original TECO program (more so than, say, today's "XEmacs") on a
modern display system, implementing the Emacs command set and key bindings, 
extended in Lisp, written at MIT AI Lab by users and developers of Emacs,
and considered by them to be the latest and greatest version of "Emacs".
I don't see how a program could be more "Emacs" than that.

But maybe you were just noting the joke about the funny names.

>>>>> On Wed, 30 Jun 2004 20:12:41 -0400, Barry Margolin ("Barry") writes:
 Barry> Also, was it really the mid-70's?  I showed up at MIT in 1979,
 Barry> and I don't think the Lisp Machines were really finished yet.

I don't know what "finished" means, but the Lisp Machine was the complete
system that you're familiar with, including Emacs (EINE), on the CONS machine
before late 1977.  That's when work started on the CADR, soon followed 
by manufacturing a bunch of the machines for actual users.
The first version of the Lisp Ma"CHINE" Man"NUAL" that I have 
was dated 1978.  ZWEI was implemented in 1979 by Dan Weinreb.

The editor was actually called ZMACS, the name of the Lisp
package that implemented it was "ZWEI".

When "Common Lisp" came along, all conforming code was now "legal" 
Common Lisp code.  That would include just about all ZMACS customization
and extension code that had been written by users.  There was probably
more extension code written after Common Lisp, anyway, because that's
(of course) around the time there were lots of commercial LispM users.

The body of pre-existing Common Lisp code would not necessarily 
include the implementation of the editor's APIs, or the internals.
The main structures were Flavors objects, arrays with leaders, and
DEFSTRUCTs, not CLOS objects.  there are also some ZetaLisp differences 
(like MEMBER vs. MEMQ, APPLY, etc) which could be fixed mechanically 
(without having to shadow any symbols).  Without taking an inventory, 
I could not say whether most of the code was already Common Lisp.  
It would be fair to say that it was not a Common Lisp program, since
someone had to port it to ANSI CL to fix up those various things.  
But lots of the implementation of ZWEI was perfectly legal Common Lisp.

For example, here are the first Lisp forms from the beginning of some
of the files comprising ZWEI's internal implementation.  This is old
code from way back, before any porting.  Tell me this is not Common Lisp.

------------------------------------------------------------------------
;;;;* ZWEI:COMA.LISP

(DEFCOM COM-SELF-INSERT "Inserts the last character typed.
With a numeric argument (n), it inserts the character n times." (NM)
  (LET* ((CHAR (IN-CURRENT-STYLE *LAST-COMMAND-CHAR*))
	 (POINT (POINT)))
    (WITH-NODE-WRITE-LOCKED ((BP-NODE-TO-LOCK POINT))
      (DOTIMES (IGNORE *NUMERIC-ARG*)
	(INSERT-MOVING POINT CHAR))
      (MOVE-POINT POINT)
      (SETQ *CURRENT-COMMAND-TYPE* 'SELF-INSERT)
      (IF (CHAR= CHAR #\CR) DIS-TEXT
	;;--- Changed to not copy (BP-LINE POINT) before munging the line, for copy-on-write
	(VALUES DIS-LINE (BP-LINE POINT) (- (BP-INDEX POINT) *NUMERIC-ARG*))))))


;;;;* ZWEI:COMB.LISP

(DEFCOM COM-MARK-PAGE
	"Marks a page as the region, with point at top of page, mark at end.
A page is defined by the editor variable Page Delimiter List.
A numeric arg specifies which page to mark:
  0  current page
  1  next page
 -1  previous page
  n  nth page from the current one" (SM)
  (MULTIPLE-VALUE-BIND (BP1 BP2)
      (MARK-PAGE-INTERNAL (POINT) (IF *NUMERIC-ARG-P* *NUMERIC-ARG* 0))
    (MOVE-POINT BP1)
    (MOVE-MARK BP2))
  DIS-BPS)


;;;;* ZWEI:COMC.LISP
;;;   The first form was a boring one-liner, so here's the second thing.
;;;;  - You can tell this is not Common Lisp because it calls CL:MEMBER.
;;;;    In ZetaLisp, MEMBER was today's MEMQ.   CL gave the good name
;;;;    to the more frequently used semantics.
;;;;  - DW is the direct predecessor of CLIM.
;;;   - SCL is "Symbolics Common Lisp".  Don't know why that isn't DW:ACCEPT.
;;;;  - (SEND STREAM :READ-LOCATION) is legal CL, but I would call what's
;;;;    going on here "Flavors" because it does not reflect what we wouldnot what we 
;;;;    would do today in CLOS: just (READ-LOCATION STREAM) generic function call.

(DEFUN PARSE-SEQUENCE-UNTIL-END (STREAM TYPE)
  (ZCOLLECTING-INTO (VALUES TYPES)
    (LOOP NAMED TOP
	  FOR PROVIDE-DEFAULT = T THEN NIL
	  DOING
      (MULTIPLE-VALUE-BIND (VAL TYP)
	  (SCL:ACCEPT TYPE :STREAM STREAM :PROMPT NIL
			   :PROVIDE-DEFAULT PROVIDE-DEFAULT :DISPLAY-DEFAULT NIL)
	(ZCOLLECT VALUES VAL)
	(ZCOLLECT TYPES TYP))
      (LOOP DO
	(DW:WITH-PRESENTATION-INPUT-CONTEXT (TYPE :STREAM STREAM) (BLIP)
	     (LET ((CH (DW:PEEK-CHAR-FOR-ACCEPT STREAM)))
	       (IF (NOT (CL:MEMBER CH SI:*WHITESPACE* :TEST #'DW:COMPARE-CHAR-FOR-ACCEPT))
		   (DW::PRESENTATION-REPLACE-INPUT STREAM
						   (SEND STREAM :READ-LOCATION)
						   "
" :DONT-QUOTE T)
		   (DW:READ-CHAR-FOR-ACCEPT STREAM)
		   (SETQ CH NIL))
	       (WHEN (NULL CH)
		 (SETQ CH (DW:PEEK-CHAR-FOR-ACCEPT STREAM T)))
	       (IF (DW:COMPARE-CHAR-FOR-ACCEPT CH #\End)
		   (RETURN-FROM TOP)
		   (RETURN)))
	   (T
	    (DW:ECHO-PRESENTATION-BLIP STREAM BLIP)
	    (DW::PRESENTATION-REPLACE-INPUT STREAM
					    (SEND STREAM :READ-LOCATION)
					    "
" :DONT-QUOTE T)
	    (ZCOLLECT VALUES (DW:PRESENTATION-BLIP-OBJECT BLIP))
	    (ZCOLLECT TYPES (DW:PRESENTATION-BLIP-PRESENTATION-TYPE BLIP))))))
    (VALUES VALUES TYPES)))



;;;;* ZWEI:COMTAB.LISP

(DEFSTRUCT (COMTAB :NAMED :CONC-NAME)
  NAME					;The name of this comtab
  KEYBOARD-ARRAY			;Commands gotten by typing on the keyboard.
  MOUSE-ARRAY				;Commands gotten by pushing mouse buttons.
  EXTENDED-COMMANDS			;Alist of long-named commands.
  INDIRECT-TO				;A COMTAB to try when you find NIL in this COMTAB.
  MOUSE-DOCUMENTATION-CACHE		;A string
  OTHER-CHARACTER-SET-KEYBOARD-ARRAYS	;Commands gotten by typing in another charset somehow
  )


;;;;* ZWEI;DISPLA

(DEFUN MUST-REDISPLAY (WINDOW DEGREE &OPTIONAL LINE INDEX (DONT-RECURSE NIL))
  (LET ((W-DEGREE (WINDOW-REDISPLAY-DEGREE WINDOW)))
    (COND ((= DEGREE DIS-LINE)
	   (COND ((AND (WINDOW-BACKSPACE-OVERPRINTING-FLAG WINDOW)
		       (STRING-SEARCH-CHAR #\BS LINE))
		  (SETF (WINDOW-REDISPLAY-DEGREE WINDOW) (MAX W-DEGREE DIS-TEXT)))
		 ((= W-DEGREE DIS-LINE)
		  (COND ((EQ (WINDOW-REDISPLAY-LINE WINDOW) LINE)
			 (SETF (WINDOW-REDISPLAY-INDEX WINDOW)
			       (MIN INDEX (WINDOW-REDISPLAY-INDEX WINDOW))))
			(T 
			  (SETF (WINDOW-REDISPLAY-DEGREE WINDOW) DIS-TEXT))))
		 ((< W-DEGREE DIS-LINE)
		  (SETF (WINDOW-REDISPLAY-DEGREE WINDOW) DIS-LINE)
		  (SETF (WINDOW-REDISPLAY-LINE WINDOW) LINE)
		  (SETF (WINDOW-REDISPLAY-INDEX WINDOW) INDEX))))
	  (T (SETF (WINDOW-REDISPLAY-DEGREE WINDOW) (MAX W-DEGREE DEGREE)))))
  (WHEN (NOT DONT-RECURSE)
    (MUST-REDISPLAY-OTHER-WINDOWS (WINDOW-INTERVAL WINDOW) WINDOW DEGREE LINE INDEX)))


;;;;* ZWEI;PRIMIT.LISP

(DEFUN ASSURE-SINGLE-SECTION-INTERVAL-1
       (START-BP END-BP 
	&OPTIONAL
	(MESSAGE "This operation is not allowed across multiple sections.")
	RETURN-THIS-INSTEAD-OF-BARFING)	
  (DECLARE (VALUES START-BP END-BP))
  (LET ((NODE (BP-TOP-LEVEL-LINE-LINKED-NODE START-BP)))
    (COND ((OR (EQ NODE (BP-TOP-LEVEL-LINE-LINKED-NODE END-BP))
	       ;; END-BP is not in same node, but if it's just past the end, allow anyway
	       (AND (ZEROP (BP-INDEX END-BP))
		    (EQ (BP-LINE END-BP)
			(LINE-NEXT-IN-BUFFER (BP-LINE (NODE-LAST-BP NODE))
					     :BUFFER (OR (BP-BUFFER START-BP) *INTERVAL*)))))
	   (VALUES START-BP END-BP))
	  (RETURN-THIS-INSTEAD-OF-BARFING)
	  (T (BARF MESSAGE)))))

------------------------------------------------------------------------

Chris
From: Christopher C. Stacy
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <ueknvk5ua.fsf@news.dtpq.com>
 cstacy> In ZetaLisp, MEMBER was today's MEMQ.

I said that wrong, of course:  MEMBER was EQUAL, MEMQ was EQ.
ZetaList also had MEM, whose first argument was the predicate.
Common Lisp combined MEMBER and MEM and of course uses EQL,
and flushed MEMQ.
From: JP Massar
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <drk6e05a0tpa0164h0mofijeuodpu1q963@4ax.com>
On Wed, 30 Jun 2004 17:09:44 GMT, ······@news.dtpq.com (Christopher C.
Stacy) wrote:

>>>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
> JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
> JP> was the first Emacs AFAIK to implement its extension language in
> JP> Common Lisp (or a subset thereof).
>
>What about the Lisp Machine implementation of Emacs, mid 1970s?
>

Common Lisp didn't exist until circa 1983.
From: Christopher C. Stacy
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <uvfh8jrra.fsf@news.dtpq.com>
>>>>> On Wed, 30 Jun 2004 23:58:45 GMT, JP Massar ("JP") writes:

 JP> On Wed, 30 Jun 2004 17:09:44 GMT, ······@news.dtpq.com (Christopher C.
 JP> Stacy) wrote:

 >>>>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
 JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
 JP> was the first Emacs AFAIK to implement its extension language in
 JP> Common Lisp (or a subset thereof).
 >> 
 >> What about the Lisp Machine implementation of Emacs, mid 1970s?
 >> 

 JP> Common Lisp didn't exist until circa 1983.

But the moment that it did exist, whenever you want to say that 
event occurred, the Emacs implementation on the Lisp Machine
(which would have been the second one, ZWEI) was written
in a subset of it.
From: Barry Margolin
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <barmar-02044C.01115301072004@comcast.dca.giganews.com>
In article <·············@news.dtpq.com>,
 ······@news.dtpq.com (Christopher C. Stacy) wrote:

> >>>>> On Wed, 30 Jun 2004 23:58:45 GMT, JP Massar ("JP") writes:
> 
>  JP> On Wed, 30 Jun 2004 17:09:44 GMT, ······@news.dtpq.com (Christopher C.
>  JP> Stacy) wrote:
> 
>  >>>>>>> On Wed, 30 Jun 2004 16:33:55 GMT, JP Massar ("JP") writes:
>  JP> BTW, Zimmerman's Emacs (aka CCA Emacs, for the company he worked for)
>  JP> was the first Emacs AFAIK to implement its extension language in
>  JP> Common Lisp (or a subset thereof).
>  >> 
>  >> What about the Lisp Machine implementation of Emacs, mid 1970s?
>  >> 
> 
>  JP> Common Lisp didn't exist until circa 1983.
> 
> But the moment that it did exist, whenever you want to say that 
> event occurred, the Emacs implementation on the Lisp Machine
> (which would have been the second one, ZWEI) was written
> in a subset of it.

Not really.  Lisp Machine Lisp and Common Lisp are two different 
dialects of Lisp.  They have alot in common, so they were able to exist 
together in one Lisp image, but that doesn't make either one a subset of 
the other.

For instance, ZWEI made extensive use of Flavors, but not CLOS, for its 
object orientation.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
From: Luke Gorrie
Subject: Re: James Gosling built Emacs
Date: 
Message-ID: <lh7jtpc9mb.fsf@dodo.bluetail.com>
···············@yahoo.com (Mark McConnell) writes:

>> He did indeed.  AFAIK it was the second implementation of emacs (first
>> one was built on top of TECO) and was the second emacs to use lisp  as
>> a macro language (first was multics emacs)

This is really great reading:

  Multics Emacs: The History, Design and Implementation
  http://www.multicians.org/mepap.html