diff options
| author | Gerd Moellmann | 2000-08-05 20:09:44 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-08-05 20:09:44 +0000 |
| commit | ed590ca87cbbc46d3f474249108050ce8a74945c (patch) | |
| tree | 54ac7d7a7bdeb8b8cdb1d81c8353c329b1c0feb3 | |
| parent | 3db3a13fe3364f99ca5a001ac7ecbb6b68879528 (diff) | |
| download | emacs-ed590ca87cbbc46d3f474249108050ce8a74945c.tar.gz emacs-ed590ca87cbbc46d3f474249108050ce8a74945c.zip | |
(first, ..., tenth): Make them macros.
(toplevel): Remove `remq' and `remove' from autoloads.
(cl-fake-autoloads): New variable. If set, arrange for an error
when CL functions etc. are autoloaded.
| -rw-r--r-- | lisp/emacs-lisp/cl.el | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 790e4c9b6e3..2d91043077e 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el | |||
| @@ -332,41 +332,41 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp | |||
| 332 | (defalias 'rest 'cdr) | 332 | (defalias 'rest 'cdr) |
| 333 | (defalias 'endp 'null) | 333 | (defalias 'endp 'null) |
| 334 | 334 | ||
| 335 | (defun second (x) | 335 | (defmacro second (x) |
| 336 | "Return the second element of the list LIST." | 336 | "Return the second element of the list LIST." |
| 337 | (car (cdr x))) | 337 | `(car (cdr ,x))) |
| 338 | 338 | ||
| 339 | (defun third (x) | 339 | (defmacro third (x) |
| 340 | "Return the third element of the list LIST." | 340 | "Return the third element of the list LIST." |
| 341 | (car (cdr (cdr x)))) | 341 | `(car (cdr (cdr ,x)))) |
| 342 | 342 | ||
| 343 | (defun fourth (x) | 343 | (defmacro fourth (x) |
| 344 | "Return the fourth element of the list LIST." | 344 | "Return the fourth element of the list LIST." |
| 345 | (nth 3 x)) | 345 | `(nth 3 ,x)) |
| 346 | 346 | ||
| 347 | (defun fifth (x) | 347 | (defmacro fifth (x) |
| 348 | "Return the fifth element of the list LIST." | 348 | "Return the fifth element of the list LIST." |
| 349 | (nth 4 x)) | 349 | `(nth 4 ,x)) |
| 350 | 350 | ||
| 351 | (defun sixth (x) | 351 | (defmacro sixth (x) |
| 352 | "Return the sixth element of the list LIST." | 352 | "Return the sixth element of the list LIST." |
| 353 | (nth 5 x)) | 353 | `(nth 5 ,x)) |
| 354 | 354 | ||
| 355 | (defun seventh (x) | 355 | (defmacro seventh (x) |
| 356 | "Return the seventh element of the list LIST." | 356 | "Return the seventh element of the list LIST." |
| 357 | (nth 6 x)) | 357 | `(nth 6 ,x)) |
| 358 | 358 | ||
| 359 | (defun eighth (x) | 359 | (defmacro eighth (x) |
| 360 | "Return the eighth element of the list LIST." | 360 | "Return the eighth element of the list LIST." |
| 361 | (nth 7 x)) | 361 | `(nth 7 ,x)) |
| 362 | 362 | ||
| 363 | (defun ninth (x) | 363 | (defmacro ninth (x) |
| 364 | "Return the ninth element of the list LIST." | 364 | "Return the ninth element of the list LIST." |
| 365 | (nth 8 x)) | 365 | `(nth 8 ,x)) |
| 366 | 366 | ||
| 367 | (defun tenth (x) | 367 | (defmacro tenth (x) |
| 368 | "Return the tenth element of the list LIST." | 368 | "Return the tenth element of the list LIST." |
| 369 | (nth 9 x)) | 369 | `(nth 9 ,x)) |
| 370 | 370 | ||
| 371 | (defun caaar (x) | 371 | (defun caaar (x) |
| 372 | "Return the `car' of the `car' of the `car' of X." | 372 | "Return the `car' of the `car' of the `car' of X." |
| @@ -565,13 +565,17 @@ Keywords supported: :test :test-not :key" | |||
| 565 | (put 'cl-assertion-failed 'error-conditions '(error)) | 565 | (put 'cl-assertion-failed 'error-conditions '(error)) |
| 566 | (put 'cl-assertion-failed 'error-message "Assertion failed") | 566 | (put 'cl-assertion-failed 'error-message "Assertion failed") |
| 567 | 567 | ||
| 568 | (defvar cl-fake-autoloads nil | ||
| 569 | "Non-nil means don't make CL functions autoload.") | ||
| 570 | |||
| 568 | ;;; Autoload the other portions of the package. | 571 | ;;; Autoload the other portions of the package. |
| 569 | (mapcar (function | 572 | (mapcar (function |
| 570 | (lambda (set) | 573 | (lambda (set) |
| 571 | (mapcar (function | 574 | (let ((file (if cl-fake-autoloads "<none>" (car set)))) |
| 572 | (lambda (func) | 575 | (mapcar (function |
| 573 | (autoload func (car set) nil nil (nth 1 set)))) | 576 | (lambda (func) |
| 574 | (cddr set)))) | 577 | (autoload func (car set) nil nil (nth 1 set)))) |
| 578 | (cddr set))))) | ||
| 575 | '(("cl-extra" nil | 579 | '(("cl-extra" nil |
| 576 | coerce equalp cl-map-keymap maplist mapc mapl mapcan mapcon | 580 | coerce equalp cl-map-keymap maplist mapc mapl mapcan mapcon |
| 577 | cl-map-keymap cl-map-keymap-recursively cl-map-intervals | 581 | cl-map-keymap cl-map-keymap-recursively cl-map-intervals |
| @@ -585,7 +589,7 @@ Keywords supported: :test :test-not :key" | |||
| 585 | cl-hash-table-count cl-progv-before cl-prettyexpand | 589 | cl-hash-table-count cl-progv-before cl-prettyexpand |
| 586 | cl-macroexpand-all) | 590 | cl-macroexpand-all) |
| 587 | ("cl-seq" nil | 591 | ("cl-seq" nil |
| 588 | reduce fill replace remq remove remove* remove-if remove-if-not | 592 | reduce fill replace remove* remove-if remove-if-not |
| 589 | delete* delete-if delete-if-not remove-duplicates | 593 | delete* delete-if delete-if-not remove-duplicates |
| 590 | delete-duplicates substitute substitute-if substitute-if-not | 594 | delete-duplicates substitute substitute-if substitute-if-not |
| 591 | nsubstitute nsubstitute-if nsubstitute-if-not find find-if | 595 | nsubstitute nsubstitute-if nsubstitute-if-not find find-if |