# HG changeset patch # User Richard M. Stallman # Date 1058055596 0 # Node ID a39d64d1eb5044b01b6000efb8859ca71170189c # Parent 8065f7ca332966f6ff042ec8bd5ffa12944f3e37 (c-make-keywords-re): Don't use delete-duplicates. (c-lang-const): Don't use mapcan. diff -r 8065f7ca3329 -r a39d64d1eb50 lisp/progmodes/cc-defs.el --- a/lisp/progmodes/cc-defs.el Sat Jul 12 22:00:20 2003 +0000 +++ b/lisp/progmodes/cc-defs.el Sun Jul 13 00:19:56 2003 +0000 @@ -972,7 +972,11 @@ variable `c-nonsymbol-key' is used to make the adornment. The optional MODE specifies the language to get it in. The default is the current language (taken from `c-buffer-is-cc-mode')." - (setq list (delete-duplicates list :test 'string-equal)) + (let (unique) + (dolist (elt list) + (unless (member elt unique) + (push elt unique))) + (setq list unique)) (if list (let ((re (c-regexp-opt list))) ;; Add our own grouping parenthesis around re instead of @@ -1326,11 +1330,12 @@ ;; are no file dependencies needed. (setq source-files (nreverse ;; Reverse to get the right load order. - (mapcan (lambda (elem) - (if (eq file (car elem)) - nil ; Exclude our own file. - (list (car elem)))) - (get sym 'source))))) + (apply 'nconc + (mapcar (lambda (elem) + (if (eq file (car elem)) + nil ; Exclude our own file. + (list (car elem)))) + (get sym 'source)))))) ;; Spend some effort to make a compact call to ;; `c-get-lang-constant' since it will be compiled in.