• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/emacs-lisp/

Lines Matching +defs:cl +defs:map

0 ;;; cl.el --- Common Lisp extensions for Emacs -*-byte-compile-dynamic: t;-*-
34 ;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
52 ;; * Added "cl-compat.el" file, extra compatibility with old package.
68 ;; * Added `map', `concatenate', `reduce', `merge'.
81 ;; * Moved most sequence functions to a new file, cl-seq.el.
82 ;; * Moved `eval-when' into cl-macs.el.
83 ;; * Moved `pushnew' and `adjoin' to cl.el for most common cases.
97 (defvar cl-optimize-speed 1)
98 (defvar cl-optimize-safety 1)
112 (add-hook 'cl-unload-hook 'cl-cannot-unload)
113 (defun cl-cannot-unload ()
114 (error "Cannot unload the feature `cl'"))
142 (cl-do-pop place)))
165 (defun cl-set-elt (seq n val)
168 (defun cl-set-nthcdr (n list x)
171 (defun cl-set-buffer-substring (start end val)
177 (defun cl-set-substring (str start end val)
189 ;;; them all the time than to load them from cl-macs.el.
191 (defun cl-map-extents (&rest cl-args)
192 (apply 'cl-map-overlays cl-args))
197 (defalias 'cl-block-wrapper 'identity)
198 (defalias 'cl-block-throw 'throw)
244 (defvar cl-macro-environment nil)
245 (defvar cl-old-macroexpand (prog1 (symbol-function 'macroexpand)
246 (defalias 'macroexpand 'cl-macroexpand)))
248 (defun cl-macroexpand (cl-macro &optional cl-env)
257 (let ((cl-macro-environment cl-env))
258 (while (progn (setq cl-macro (funcall cl-old-macroexpand cl-macro cl-env))
259 (and (symbolp cl-macro)
260 (cdr (assq (symbol-name cl-macro) cl-env))))
261 (setq cl-macro (cadr (assq (symbol-name cl-macro) cl-env))))
262 cl-macro))
267 (defvar cl-compiling-file nil)
268 (defun cl-compiling-file ()
269 (or cl-compiling-file
274 (defvar cl-proclaims-deferred nil)
277 (if (fboundp 'cl-do-proclaim) (cl-do-proclaim spec t)
278 (push spec cl-proclaims-deferred))
284 (if (cl-compiling-file) (list* 'eval-when '(compile load eval) body)
285 (cons 'progn body)))) ; avoid loading cl-macs.el for eval-when
290 (defun cl-random-time ()
295 (defvar *gensym-counter* (* (logand (cl-random-time) 1023) 100))
322 (defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
324 ;;; The following are actually set by cl-float-limits.
339 (defun mapcar* (cl-func cl-x &rest cl-rest)
346 (if cl-rest
347 (if (or (cdr cl-rest) (nlistp cl-x) (nlistp (car cl-rest)))
348 (cl-mapcar-many cl-func (cons cl-x cl-rest))
349 (let ((cl-res nil) (cl-y (car cl-rest)))
350 (while (and cl-x cl-y)
351 (push (funcall cl-func (pop cl-x) (pop cl-y)) cl-res))
352 (nreverse cl-res)))
353 (mapcar cl-func cl-x)))
503 (defun list* (arg &rest rest) ; See compiler macro in cl-macs.el
532 (defun cl-maclisp-member (item list)
536 (defalias 'cl-member 'memq) ; for compatibility with old CL package
537 (defalias 'cl-floor 'floor*)
538 (defalias 'cl-ceiling 'ceiling*)
539 (defalias 'cl-truncate 'truncate*)
540 (defalias 'cl-round 'round*)
541 (defalias 'cl-mod 'mod*)
543 (defun adjoin (cl-item cl-list &rest cl-keys) ; See compiler macro in cl-macs
548 (cond ((or (equal cl-keys '(:test eq))
549 (and (null cl-keys) (not (numberp cl-item))))
550 (if (memq cl-item cl-list) cl-list (cons cl-item cl-list)))
551 ((or (equal cl-keys '(:test equal)) (null cl-keys))
552 (if (member cl-item cl-list) cl-list (cons cl-item cl-list)))
553 (t (apply 'cl-adjoin cl-item cl-list cl-keys))))
555 (defun subst (cl-new cl-old cl-tree &rest cl-keys)
560 (if (or cl-keys (and (numberp cl-old) (not (integerp cl-old))))
561 (apply 'sublis (list (cons cl-old cl-new)) cl-tree cl-keys)
562 (cl-do-subst cl-new cl-old cl-tree)))
564 (defun cl-do-subst (cl-new cl-old cl-tree)
565 (cond ((eq cl-tree cl-old) cl-new)
566 ((consp cl-tree)
567 (let ((a (cl-do-subst cl-new cl-old (car cl-tree)))
568 (d (cl-do-subst cl-new cl-old (cdr cl-tree))))
569 (if (and (eq a (car cl-tree)) (eq d (cdr cl-tree)))
570 cl-tree (cons a d))))
571 (t cl-tree)))
588 (defvar cl-fake-autoloads nil
598 (let ((file (if cl-fake-autoloads "<none>" (car set))))
603 '(("cl-extra" nil
604 coerce equalp cl-map-keymap maplist mapc mapl mapcan mapcon
605 cl-map-keymap cl-map-keymap-recursively cl-map-intervals
606 cl-map-overlays cl-set-frame-visible-p cl-float-limits
609 subseq concatenate cl-mapcar-many map some every notany
611 cl-set-getf cl-do-remf remprop cl-make-hash-table cl-hash-lookup
612 cl-gethash cl-puthash cl-remhash cl-clrhash cl-maphash cl-hash-table-p
613 cl-hash-table-count cl-progv-before cl-prettyexpand
614 cl-macroexpand-all)
615 ("cl-seq" nil
622 member-if member-if-not cl-adjoin assoc* assoc-if assoc-if-not
627 ("cl-macs" nil
628 gensym gentemp typep cl-do-pop get-setf-method
629 cl-struct-setf-expander compiler-macroexpand cl-compile-time-init)
630 ("cl-macs" t
680 ;;; This goes here so that cl-macs can find it if it loads right now.
681 (provide 'cl-19) ; usage: (require 'cl-19 "cl")
685 ;;; As a side effect, we cause cl-macs to be loaded when compiling, so
688 (defvar cl-hacked-flag nil)
689 (defun cl-hack-byte-compiler ()
690 (if (and (not cl-hacked-flag) (fboundp 'byte-compile-file-form))
692 (setq cl-hacked-flag t) ; Do it first, to prevent recursion.
693 (cl-compile-time-init)))) ; In cl-macs.el.
696 (cl-hack-byte-compiler)
699 (add-hook 'bytecomp-load-hook 'cl-hack-byte-compiler)
702 ;;; The following ensures that packages which expect the old-style cl.el
705 (provide 'cl)
707 (run-hooks 'cl-load-hook)
710 ;;; cl.el ends here