montnaro@sprite.crd.ge.com (Skip Montanaro) (04/28/89)
In article <BOB.89Apr24150043@allosaur.cis.ohio-state.edu> bob@allosaur.cis.ohio-state.edu (Bob Sutterfield) writes:
OK, I think we're up to date again now... I just put the new Emacs
Lisp manual in place on osu-cis and updated GNU.how-to-get.
In what I think is the latest INFO-ized version of the ELisp manual, the
comment/corretion address is incorrect. Maybe we're "not quite up-to-date".
:-)
I quote from file elisp-1:
Mail comments and corrections to: gnu.emacs.lisp.manual@prep.ai.mit.edu
-Bil Lewis 31-Oct-87
-Dan LaLiberte 01-Apr-89
According to the aliases file on rice-chex, it should be
gnu-manual@prep.ai.mit.edu
Perhaps the address was correct in the texinfo source, but got mangled
somehow in the texinfo->info process?
Changing the subject entirely, here are sample union/intersect functions.
They were solicited in the Lisp manual section on using lists as sets. The
functions below are not too robust, since they don't check their args for
list-hood or nil-ness. They're just part of a throwaway prototype, but
demonstrate the idea.
(defun union (a b)
"merge lists A and B together, eliminating duplicates (boolean set or)."
(let ((l nil)
(both (append a b)))
(while both
(setq l (append l (list (car both))))
(setq both (delete (car both) both)))
l))
(defun intersect (a b)
"merge lists A and B together, retaining only elements they have in common
(boolean set and)."
(let ((l nil))
(while a
(if (contains (car a) b)
(progn
(setq b (delete (car a) b))
(setq l (append l (list (car a))))))
(setq a (cdr a)))
l))
They both use delete (could use delq if eql comparison is good enough for you):
(defun delete (e l)
"Delete E from list L. Uses 'equal for comparison."
(let ((n nil))
(while l
(if (not (equal e (car l)))
(setq n (append n (list (car l)))))
(setq l (cdr l)))
n))
--
Skip Montanaro (montanaro@sprite.crd.ge.com)
liberte@M.CS.UIUC.EDU (Daniel LaLiberte) (05/01/89)
Either gnu-manual@a.cs.uiuc.edu or gnu.emacs.lisp.manual@prep.ai.mit.edu go to the same set of people, albeit in a slightly different order. Since I am not working on the elisp manual anymore, this list is pretty much obsolete, unless people at FSF want to maintain it for their own use. I would continue to make contributions, as others would, and as Skip has just done. Dan LaLiberte uiucdcs!liberte liberte@cs.uiuc.edu liberte%a.cs.uiuc.edu@uiucvmd.bitnet
tower@AI.MIT.EDU (05/03/89)
Date: 28 Apr 89 16:51:02 GMT From: rpi!crdgw1!vdsvax!montnaro@cis.ohio-state.edu (Skip Montanaro) Organization: GE Corporate Research & Development, Schenectady, NY Sender: gnu-manual-request@a.cs.uiuc.edu In what I think is the latest INFO-ized version of the ELisp manual, the comment/corretion address is incorrect. Maybe we're "not quite up-to-date". :-) I quote from file elisp-1: Mail comments and corrections to: gnu.emacs.lisp.manual@prep.ai.mit.edu -Bil Lewis 31-Oct-87 -Dan LaLiberte 01-Apr-89 According to the aliases file on rice-chex, it should be gnu-manual@prep.ai.mit.edu Correct. The prep.ai.mit.edu address forwards to: gnu-manual@a.cs.uiuc.edu which is where the gnu-manual mailing list is kept. Both addresses end up trading messages (a.k.a. articles) with the USENET newsgroup: gnu.emacs.lisp.manual which is where I expect the confusion came from. We do not plan to add the address: gnu.emacs.lisp.manual@prep.ai.mit.edu as an alias for gnu-manual@a.cs.uiuc.edu, but will get the lisp manual text corrected to mention both the mailing list and the USENET newsgroup. thanx -len