aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/cc-defs.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2003-07-13 00:19:56 +0000
committerRichard M. Stallman <[email protected]>2003-07-13 00:19:56 +0000
commit19c5fddbc3f8a8da51fbf2fb78fae04adebdae86 (patch)
treea097ca9fe0624923227a1625dec72794ce981370 /lisp/progmodes/cc-defs.el
parent800bebe3b77eff03e00293ae94c3086fea5cccfc (diff)
(c-make-keywords-re): Don't use delete-duplicates.
(c-lang-const): Don't use mapcan.
Diffstat (limited to 'lisp/progmodes/cc-defs.el')
-rw-r--r--lisp/progmodes/cc-defs.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 9ea9635861..132019618c 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -972,7 +972,11 @@ of any identifier. Adorned regexps cannot be appended. The language
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 @@ This macro does not do any hidden buffer changes."
;; 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.