Thread View: gnu.emacs.lisp.manual
2 messages
2 total messages
Started by Skip Montanaro
Fri, 28 Apr 1989 16:51
Correction to ELisp address, union/intersect examples
Author: Skip Montanaro
Date: Fri, 28 Apr 1989 16:51
Date: Fri, 28 Apr 1989 16:51
65 lines
2577 bytes
2577 bytes
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)
Correction to ELisp address, union/intersect examples
Author: tower
Date: Tue, 02 May 1989 21:15
Date: Tue, 02 May 1989 21:15
37 lines
1641 bytes
1641 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads