diff options
author | Stefan Monnier <[email protected]> | 2012-06-07 15:48:22 -0400 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2012-06-07 15:48:22 -0400 |
commit | 6fa6c4aedbc9f33cf8ed67fdb7794c3b4ff6660a (patch) | |
tree | 8d2ba96cad998ec1eb5dbf4c001d464aed2b990a /lisp/emacs-lisp/cl.el | |
parent | 4dd1c416d1c17aee0558dc3c1a37549462e75526 (diff) |
Move old compatiblity to cl.el. Remove cl-macroexpand-all.
* emacs-lisp/cl-extra.el (cl-map-keymap, cl-copy-tree)
(cl-not-hash-table, cl-builtin-gethash, cl-builtin-remhash)
(cl-builtin-clrhash, cl-builtin-maphash, cl-gethash, cl-puthash)
(cl-remhash, cl-clrhash, cl-maphash, cl-make-hash-table)
(cl-hash-table-p, cl-hash-table-count): Move to cl.el.
(cl-macroexpand-cmacs): Remove var.
(cl-macroexpand-all, cl-macroexpand-body): Remove funs.
Use macroexpand-all instead.
* emacs-lisp/cl-lib.el (cl-macro-environment): Remove decl.
(cl-macroexpand): Move to cl-macs.el and rename to cl--sm-macroexpand.
(cl-member): Remove old alias.
* emacs-lisp/cl-macs.el (cl-macro-environment): Remove var.
Use macroexpand-all-environment instead.
(cl--old-macroexpand): New var.
(cl--sm-macroexpand): New function.
(cl-symbol-macrolet): Use it during macro expansion.
(cl--function-convert-cache): New var.
(cl--function-convert): New function, extracted from
cl-macroexpand-all.
(cl-lexical-let): Use it.
* emacs-lisp/cl.el (cl-macroexpand, cl-macro-environment)
(cl-macroexpand-all, cl-not-hash-table, cl-builtin-gethash)
(cl-builtin-remhash, cl-builtin-clrhash, cl-builtin-maphash)
(cl-map-keymap, cl-copy-tree, cl-gethash, cl-puthash, cl-remhash)
(cl-clrhash, cl-maphash, cl-make-hash-table, cl-hash-table-p)
(cl-hash-table-count): Add old compatibility aliases.
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r-- | lisp/emacs-lisp/cl.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index ad15d038a8..b4be63f2bb 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -330,5 +330,37 @@ (if (get new prop) (put fun prop (get new prop)))))) +;;; Additional compatibility code +;; For names that were clean but really aren't needed any more. + +(defalias 'cl-macroexpand 'macroexpand) +(defvaralias 'cl-macro-environment 'macroexpand-all-environment) +(defalias 'cl-macroexpand-all 'macroexpand-all) + +;;; Hash tables. +;; This is just kept for compatibility with code byte-compiled by Emacs-20. + +;; No idea if this might still be needed. +(defun cl-not-hash-table (x &optional y &rest z) + (signal 'wrong-type-argument (list 'cl-hash-table-p (or y x)))) + +(defvar cl-builtin-gethash (symbol-function 'gethash)) +(defvar cl-builtin-remhash (symbol-function 'remhash)) +(defvar cl-builtin-clrhash (symbol-function 'clrhash)) +(defvar cl-builtin-maphash (symbol-function 'maphash)) + +(defalias 'cl-map-keymap 'map-keymap) +(defalias 'cl-copy-tree 'copy-tree) +(defalias 'cl-gethash 'gethash) +(defalias 'cl-puthash 'puthash) +(defalias 'cl-remhash 'remhash) +(defalias 'cl-clrhash 'clrhash) +(defalias 'cl-maphash 'maphash) +(defalias 'cl-make-hash-table 'make-hash-table) +(defalias 'cl-hash-table-p 'hash-table-p) +(defalias 'cl-hash-table-count 'hash-table-count) + +;; FIXME: More candidates: define-modify-macro, define-setf-expander, lexical-let. + (provide 'cl) ;;; cl.el ends here |