comparison lisp/format.el @ 4607:517f6887fbc0

Remove duplicate functions, chiefly #'delete-duplicates reimplementations. lisp/ChangeLog addition: 2009-02-08 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (delete-duplicates): Add a new compiler macro, inlining this function if it's called with a literal #'eq or #'equal test arguments and no other keywords. * font-lock.el (font-lock-unique): Remove this function. * font-lock.el (font-lock-prepend-text-property): (font-lock-append-text-property): Use #'delete-duplicates instead of #'font-lock-unique. * font.el (font-unique): Remove this function. * font.el (font-combine-fonts-internal): (x-font-families-for-device): (xft-font-families-for-device): (ns-font-families-for-device): Use #'delete-duplicates instead of #'font-unique. * fontconfig.el (fc-delete-duplicates): * fontconfig.el (fc-filter): Remove these functions. * fontconfig.el (fc-find-available-font-families): Replace #'fc-delete-duplicates with #'delete-duplicates, #'fc-filter with #'delete-if-not. * format.el (format-make-relatively-unique): Document that this is equivalent to #'nset-exclusive-or with a test of #'equal.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 08 Feb 2009 18:45:22 +0000
parents 576fb035e263
children 3acaa0fc09be
comparison
equal deleted inserted replaced
4606:88ba7d18dc23 4607:517f6887fbc0
452 (setq p (cdr p))) 452 (setq p (cdr p)))
453 ;; Now (cdr p) is the cons to delete 453 ;; Now (cdr p) is the cons to delete
454 (setcdr p (cdr cons)) 454 (setcdr p (cdr cons))
455 list))) 455 list)))
456 456
457 ;; XEmacs: this is #'nset-exclusive-or with a :test of #'equal, though we
458 ;; probably don't want to replace it right now.
457 (defun format-make-relatively-unique (a b) 459 (defun format-make-relatively-unique (a b)
458 "Delete common elements of lists A and B, return as pair. 460 "Delete common elements of lists A and B, return as pair.
459 Compares using `equal'." 461 Compares using `equal'."
460 (let* ((acopy (copy-sequence a)) 462 (let* ((acopy (copy-sequence a))
461 (bcopy (copy-sequence b)) 463 (bcopy (copy-sequence b))