changeset 51887:a39d64d1eb50

(c-make-keywords-re): Don't use delete-duplicates. (c-lang-const): Don't use mapcan.
author Richard M. Stallman <rms@gnu.org>
date Sun, 13 Jul 2003 00:19:56 +0000
parents 8065f7ca3329
children b5a29d6f2851
files lisp/progmodes/cc-defs.el
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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.