comparison lisp/cl-macs.el @ 4714:84f870bbd17b

Fix another bug in the delete-duplicates compiler macro. 2009-10-12 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (delete-duplicates): Fix another bug in the delete-duplicates compiler macro, thank you the byte compiler.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 12 Oct 2009 16:42:38 +0100
parents 5bb0735f56e0
children dca5bb2adff1
comparison
equal deleted inserted replaced
4713:312503644bc3 4714:84f870bbd17b
3238 (setq cl-seq (setcdr cl-seq (delq (car cl-seq) 3238 (setq cl-seq (setcdr cl-seq (delq (car cl-seq)
3239 (cdr cl-seq))))) 3239 (cdr cl-seq)))))
3240 begin) 3240 begin)
3241 ;; Call cl-delete-duplicates explicitly, to avoid the form 3241 ;; Call cl-delete-duplicates explicitly, to avoid the form
3242 ;; getting compiler-macroexpanded again: 3242 ;; getting compiler-macroexpanded again:
3243 (cl-delete-duplicates begin ,(third form) ,(fourth form) nil)))) 3243 (cl-delete-duplicates begin ',cl-keys nil))))
3244 ((and (= 4 (length form)) 3244 ((and (= 4 (length form))
3245 (eq :test (third form)) 3245 (eq :test (third form))
3246 (or (equal '(quote equal) (fourth form)) 3246 (or (equal '(quote equal) (fourth form))
3247 (equal '(function equal) (fourth form)))) 3247 (equal '(function equal) (fourth form))))
3248 `(let* ((begin ,cl-seq) 3248 `(let* ((begin ,cl-seq)
3253 (setq cl-seq (setcdr cl-seq (delete (car cl-seq) 3253 (setq cl-seq (setcdr cl-seq (delete (car cl-seq)
3254 (cdr cl-seq))))) 3254 (cdr cl-seq)))))
3255 begin) 3255 begin)
3256 ;; Call cl-delete-duplicates explicitly, to avoid the form 3256 ;; Call cl-delete-duplicates explicitly, to avoid the form
3257 ;; getting compiler-macroexpanded again: 3257 ;; getting compiler-macroexpanded again:
3258 (cl-delete-duplicates begin ,(third form) ,(fourth form) nil)))) 3258 (cl-delete-duplicates begin ',cl-keys nil))))
3259 (t 3259 (t
3260 form)))) 3260 form))))
3261 3261
3262 (mapc 3262 (mapc
3263 #'(lambda (y) 3263 #'(lambda (y)