aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 9ea96358619..132019618c6 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
972variable `c-nonsymbol-key' is used to make the adornment. The 972variable `c-nonsymbol-key' is used to make the adornment. The
973optional MODE specifies the language to get it in. The default is the 973optional MODE specifies the language to get it in. The default is the
974current language (taken from `c-buffer-is-cc-mode')." 974current language (taken from `c-buffer-is-cc-mode')."
975 (setq list (delete-duplicates list :test 'string-equal)) 975 (let (unique)
976 (dolist (elt list)
977 (unless (member elt unique)
978 (push elt unique)))
979 (setq list unique))
976 (if list 980 (if list
977 (let ((re (c-regexp-opt list))) 981 (let ((re (c-regexp-opt list)))
978 ;; Add our own grouping parenthesis around re instead of 982 ;; Add our own grouping parenthesis around re instead of
@@ -1326,11 +1330,12 @@ This macro does not do any hidden buffer changes."
1326 ;; are no file dependencies needed. 1330 ;; are no file dependencies needed.
1327 (setq source-files (nreverse 1331 (setq source-files (nreverse
1328 ;; Reverse to get the right load order. 1332 ;; Reverse to get the right load order.
1329 (mapcan (lambda (elem) 1333 (apply 'nconc
1330 (if (eq file (car elem)) 1334 (mapcar (lambda (elem)
1331 nil ; Exclude our own file. 1335 (if (eq file (car elem))
1332 (list (car elem)))) 1336 nil ; Exclude our own file.
1333 (get sym 'source))))) 1337 (list (car elem))))
1338 (get sym 'source))))))
1334 1339
1335 ;; Spend some effort to make a compact call to 1340 ;; Spend some effort to make a compact call to
1336 ;; `c-get-lang-constant' since it will be compiled in. 1341 ;; `c-get-lang-constant' since it will be compiled in.