aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/cl.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2012-06-11 11:52:50 -0400
committerStefan Monnier <[email protected]>2012-06-11 11:52:50 -0400
commitbb3faf5b98f59f4fed117f3d0e6e27a7b180d04c (patch)
treea7e8a7c9fcae6484bcbee42e81d8587ba23fbbb5 /lisp/emacs-lisp/cl.el
parent3017f87fbd0461b9460e7261a095fc86e166b30e (diff)
Use lexical-binding for all of CL, and clean up its namespace.
* lisp/emacs-lisp/cl-lib.el: Use lexical-binding. (cl-map-extents, cl-maclisp-member): Remove. (cl--set-elt, cl--set-nthcdr, cl--set-buffer-substring) (cl--set-substring, cl--block-wrapper, cl--block-throw) (cl--compiling-file, cl--mapcar-many, cl--do-subst): Use "cl--" prefix. * lisp/emacs-lisp/cl-extra.el: Use lexical-binding. (cl--mapcar-many, cl--map-keymap-recursively, cl--map-intervals) (cl--map-overlays, cl--set-frame-visible-p, cl--progv-save) (cl--progv-before, cl--progv-after, cl--finite-do, cl--set-getf) (cl--do-remf, cl--do-prettyprint): Use "cl--" prefix. * lisp/emacs-lisp/cl-seq.el: Use lexical-binding. (cl--parsing-keywords, cl--check-key, cl--check-test-nokey) (cl--check-test, cl--check-match): Use "cl--" prefix and backquotes. (cl--alist, cl--sublis-rec, cl--nsublis-rec, cl--tree-equal-rec): * lisp/emacs-lisp/cl-macs.el (cl--lambda-list-keywords): Use "cl--" prefix. * lisp/edmacro.el (edmacro-mismatch): Simplify to remove dependence on CL's internals.
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r--lisp/emacs-lisp/cl.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index d162a377f9..d41b72f20d 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -337,6 +337,7 @@ The two cases that are handled are:
- closure-conversion of lambda expressions for `lexical-let'.
- renaming of F when it's a function defined via `cl-labels' or `labels'."
(require 'cl-macs)
+ (declare-function cl--expr-contains-any "cl-macs" (x y))
(cond
;; ¡¡Big Ugly Hack!! We can't use a compiler-macro because those are checked
;; *after* handling `function', but we want to stop macroexpansion from
@@ -460,7 +461,7 @@ go back to their previous definitions, or lack thereof).
(let ((func `(cl-function
(lambda ,(cadr x)
(cl-block ,(car x) ,@(cddr x))))))
- (when (cl-compiling-file)
+ (when (cl--compiling-file)
;; Bug#411. It would be nice to fix this.
(and (get (car x) 'byte-compile)
(error "Byte-compiling a redefinition of `%s' \
@@ -532,6 +533,11 @@ Unlike `flet', this macro is fully compliant with the Common Lisp standard.
(define-obsolete-function-alias 'cl-hash-table-p 'hash-table-p "24.2")
(define-obsolete-function-alias 'cl-hash-table-count 'hash-table-count "24.2")
+(defun cl-maclisp-member (item list)
+ (declare (obsolete member "24.2"))
+ (while (and list (not (equal item (car list)))) (setq list (cdr list)))
+ list)
+
;; FIXME: More candidates: define-modify-macro, define-setf-expander.
(provide 'cl)