[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug fix for 'insert' in opus 38.50
- To: franz-friends@Berkeley
- Subject: bug fix for 'insert' in opus 38.50
- From: Dorab Patel <patel@UCLA-LOCUS>
- Date: Wed, 31 Aug 83 04:44:13 GMT
- Original-date: Tue, 30 Aug 83 21:44:13 PDT
The function 'insert' in Opus 38.50 does not perform as advertised in
the manual if the last argument is non-nil (i.e. if no duplicates are allowed.
It still insists on putting the duplicate element into the list. The
fix is in /usr/lib/lisp/common2.l. Just change the default setting
of the 'comparefn' to that given below instead of
(function alphalessp). Here is an excerpt from the modified file.
[.....]
(def insert
(lambda (x l comparefn nodups)
(cond ((null l) (list x))
((atom l)
(error "an atom, can't be inserted into" l))
(t (cond
((null comparefn) (setq comparefn
(function
(lambda (x y)
(or (alphalessp x y)
(equal x y)))))))
(prog (l1 n n1 y)
(setq l1 l)
(setq n (length l))
a (setq n1 (/ (add1 n) 2))
(setq y (Cnth l1 n1))
[..........]