emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117244: Stop cc-mode loading cl at runtime


From: Glenn Morris
Subject: [Emacs-diffs] emacs-24 r117244: Stop cc-mode loading cl at runtime
Date: Sat, 14 Jun 2014 23:54:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117244
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17463
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-06-14 16:54:39 -0700
message:
  Stop cc-mode loading cl at runtime
  
  * lisp/progmodes/cc-langs.el: Require cl-lib. 
  Replace delete-duplicates and mapcan by cl- versions throughout.
  And cl-macroexpand-all by macroexpand-all.
  (delete-duplicates, mapcan, cl-macroexpand-all): No need to declare.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/cc-langs.el     cclangs.el-20091113204419-o5vbwnq5f7feedwu-1228
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-06-14 16:37:15 +0000
+++ b/lisp/ChangeLog    2014-06-14 23:54:39 +0000
@@ -1,3 +1,10 @@
+2014-06-14  Glenn Morris  <address@hidden>
+
+       * progmodes/cc-langs.el: Require cl-lib.  (Bug#17463)
+       Replace delete-duplicates and mapcan by cl- versions throughout.
+       And cl-macroexpand-all by macroexpand-all.
+       (delete-duplicates, mapcan, cl-macroexpand-all): No need to declare.
+
 2014-06-14  Eli Zaretskii  <address@hidden>
 
        * subr.el (posn-col-row): Doc fix.  (Bug#17768)

=== modified file 'lisp/progmodes/cc-langs.el'
--- a/lisp/progmodes/cc-langs.el        2014-01-01 07:43:34 +0000
+++ b/lisp/progmodes/cc-langs.el        2014-06-14 23:54:39 +0000
@@ -130,7 +130,9 @@
 
 
 ;; This file is not always loaded.  See note above.
-(cc-external-require 'cl)
+;; Except it is always loaded - see bug#17463.
+;;;(cc-external-require 'cl)
+(require 'cl-lib)
 
 
 ;;; Setup for the `c-lang-defvar' system.
@@ -209,9 +211,9 @@
 ;; Suppress "might not be defined at runtime" warning.
 ;; This file is only used when compiling other cc files.
 ;; These are defined in cl as aliases to the cl- versions.
-(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t)
-(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t)
-(declare-function cl-macroexpand-all "cl" (form &optional env))
+;(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t)
+;(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t)
+;(declare-function cl-macroexpand-all "cl" (form &optional env))
 
 (eval-and-compile
   ;; Some helper functions used when building the language constants.
@@ -252,14 +254,14 @@
     (unless xlate
       (setq xlate 'identity))
     (c-with-syntax-table (c-lang-const c-mode-syntax-table)
-      (delete-duplicates
-       (mapcan (lambda (opgroup)
+      (cl-delete-duplicates
+       (cl-mapcan (lambda (opgroup)
                 (when (if (symbolp (car opgroup))
                           (when (funcall opgroup-filter (car opgroup))
                             (setq opgroup (cdr opgroup))
                             t)
                         t)
-                  (mapcan (lambda (op)
+                  (cl-mapcan (lambda (op)
                             (when (funcall op-filter op)
                               (let ((res (funcall xlate op)))
                                 (if (listp res) res (list res)))))
@@ -1147,7 +1149,7 @@
 (c-lang-defconst c-all-op-syntax-tokens
   ;; List of all tokens in the punctuation and parenthesis syntax
   ;; classes.
-  t (delete-duplicates (append (c-lang-const c-other-op-syntax-tokens)
+  t (cl-delete-duplicates (append (c-lang-const c-other-op-syntax-tokens)
                               (c-lang-const c-operator-list))
                       :test 'string-equal))
 
@@ -1700,7 +1702,7 @@
 (c-lang-defconst c-type-start-kwds
   ;; All keywords that can start a type (i.e. are either a type prefix
   ;; or a complete type).
-  t (delete-duplicates (append (c-lang-const c-primitive-type-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-primitive-type-kwds)
                               (c-lang-const c-type-prefix-kwds)
                               (c-lang-const c-type-modifier-kwds))
                       :test 'string-equal))
@@ -1943,7 +1945,7 @@
   ;; something is a type or just some sort of macro in front of the
   ;; declaration.  They might be ambiguous with types or type
   ;; prefixes.
-  t (delete-duplicates (append (c-lang-const c-class-decl-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-class-decl-kwds)
                               (c-lang-const c-brace-list-decl-kwds)
                               (c-lang-const c-other-block-decl-kwds)
                               (c-lang-const c-typedef-decl-kwds)
@@ -2136,7 +2138,7 @@
   pike '("array" "function" "int" "mapping" "multiset" "object" "program"))
 
 (c-lang-defconst c-paren-any-kwds
-  t (delete-duplicates (append (c-lang-const c-paren-nontype-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-paren-nontype-kwds)
                               (c-lang-const c-paren-type-kwds))
                       :test 'string-equal))
 
@@ -2162,7 +2164,7 @@
 
 (c-lang-defconst c-<>-sexp-kwds
   ;; All keywords that can be followed by an angle bracket sexp.
-  t (delete-duplicates (append (c-lang-const c-<>-type-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-<>-type-kwds)
                               (c-lang-const c-<>-arglist-kwds))
                       :test 'string-equal))
 
@@ -2222,7 +2224,7 @@
 
 (c-lang-defconst c-block-stmt-kwds
   ;; Union of `c-block-stmt-1-kwds' and `c-block-stmt-2-kwds'.
-  t (delete-duplicates (append (c-lang-const c-block-stmt-1-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-block-stmt-1-kwds)
                               (c-lang-const c-block-stmt-2-kwds))
                       :test 'string-equal))
 
@@ -2326,7 +2328,7 @@
 (c-lang-defconst c-expr-kwds
   ;; Keywords that can occur anywhere in expressions.  Built from
   ;; `c-primary-expr-kwds' and all keyword operators in `c-operators'.
-  t (delete-duplicates
+  t (cl-delete-duplicates
      (append (c-lang-const c-primary-expr-kwds)
             (c-filter-ops (c-lang-const c-operator-list)
                           t
@@ -2430,7 +2432,7 @@
 
 (c-lang-defconst c-keywords
   ;; All keywords as a list.
-  t (delete-duplicates
+  t (cl-delete-duplicates
      (c-lang-defconst-eval-immediately
       `(append ,@(mapcar (lambda (kwds-lang-const)
                           `(c-lang-const ,kwds-lang-const))
@@ -3193,10 +3195,10 @@
                             ;; `c-lang-const' will expand to the evaluated
                             ;; constant immediately in `cl-macroexpand-all'
                             ;; below.
-                             (mapcan
+                             (cl-mapcan
                               (lambda (init)
                                 `(current-var ',(car init)
-                                  ,(car init) ,(cl-macroexpand-all
+                                  ,(car init) ,(macroexpand-all
                                                 (elt init 1))))
                               ;; Note: The following `append' copies the
                               ;; first argument.  That list is small, so


reply via email to

[Prev in Thread] Current Thread [Next in Thread]