diff options
| author | Alan Mackenzie | 2015-04-05 12:41:45 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2015-04-05 12:49:14 +0000 |
| commit | 2056db3fada56038664c4fa079ef1e034f64e3a5 (patch) | |
| tree | 5a3d864152cb9793353fa4be3578907af1cf1989 /lisp | |
| parent | 5842e489eef061766a747e26ca81e1ef6e2ece5a (diff) | |
| download | emacs-2056db3fada56038664c4fa079ef1e034f64e3a5.tar.gz emacs-2056db3fada56038664c4fa079ef1e034f64e3a5.zip | |
Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r.
Also expunge eudc-c[ad]+r.
* subr.el (internal--compiler-macro-cXXr): "New" function, copied
from cl--compiler-macro-cXXr.
(caar, cadr, cdar, cddr): Change from defsubsts to defuns with
the above compiler-macro.
* net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove.
* emacs-lisp/cl.el (Top level dolist doing defaliases): Remove
caaar, etc., from list of new alias functions.
* emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc.
(gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro
which generate obsolete cl- aliases for caaar, etc. Invoke them.
* desktop.el:
* edmacro.el:
* emacs-lisp/cl-macs.el:
* frameset.el:
* ibuffer.el:
* mail/footnote.el:
* net/dbus.el:
* net/eudc-export.el:
* net/eudc.el:
* net/eudcb-ph.el:
* net/rcirc.el:
* net/secrets.el:
* play/5x5.el:
* play/decipher.el:
* play/hanoi.el:
* progmodes/hideif.el:
* ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, etc.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 38 | ||||
| -rw-r--r-- | lisp/desktop.el | 2 | ||||
| -rw-r--r-- | lisp/edmacro.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 85 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 53 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl.el | 38 | ||||
| -rw-r--r-- | lisp/frameset.el | 2 | ||||
| -rw-r--r-- | lisp/ibuffer.el | 4 | ||||
| -rw-r--r-- | lisp/mail/footnote.el | 2 | ||||
| -rw-r--r-- | lisp/net/dbus.el | 6 | ||||
| -rw-r--r-- | lisp/net/eudc-export.el | 2 | ||||
| -rw-r--r-- | lisp/net/eudc.el | 32 | ||||
| -rw-r--r-- | lisp/net/eudcb-ph.el | 8 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 18 | ||||
| -rw-r--r-- | lisp/net/secrets.el | 2 | ||||
| -rw-r--r-- | lisp/play/5x5.el | 8 | ||||
| -rw-r--r-- | lisp/play/decipher.el | 4 | ||||
| -rw-r--r-- | lisp/play/hanoi.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/hideif.el | 6 | ||||
| -rw-r--r-- | lisp/ses.el | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 29 |
21 files changed, 202 insertions, 143 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33e14568376..643ea78de71 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,41 @@ | |||
| 1 | 2015-04-05 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r. | ||
| 4 | Also expunge eudc-c[ad]+r. | ||
| 5 | |||
| 6 | * subr.el (internal--compiler-macro-cXXr): "New" function, copied | ||
| 7 | from cl--compiler-macro-cXXr. | ||
| 8 | (caar, cadr, cdar, cddr): Changed from defsubsts to defuns with | ||
| 9 | the above compiler-macro. | ||
| 10 | |||
| 11 | * net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove. | ||
| 12 | |||
| 13 | * emacs-lisp/cl.el (Top level dolist doing defaliases): Remove | ||
| 14 | caaar, etc., from list of new alias functions. | ||
| 15 | |||
| 16 | * emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc. | ||
| 17 | (gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro | ||
| 18 | which generate obsolete cl- aliases for caaar, etc. Invoke them. | ||
| 19 | |||
| 20 | * desktop.el: | ||
| 21 | * edmacro.el: | ||
| 22 | * emacs-lisp/cl-macs.el: | ||
| 23 | * frameset.el: | ||
| 24 | * ibuffer.el: | ||
| 25 | * mail/footnote.el: | ||
| 26 | * net/dbus.el: | ||
| 27 | * net/eudc-export.el: | ||
| 28 | * net/eudc.el: | ||
| 29 | * net/eudcb-ph.el: | ||
| 30 | * net/rcirc.el: | ||
| 31 | * net/secrets.el: | ||
| 32 | * play/5x5.el: | ||
| 33 | * play/decipher.el: | ||
| 34 | * play/hanoi.el: | ||
| 35 | * progmodes/hideif.el: | ||
| 36 | * ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, | ||
| 37 | etc. | ||
| 38 | |||
| 1 | 2015-04-05 Richard Stallman <rms@gnu.org> | 39 | 2015-04-05 Richard Stallman <rms@gnu.org> |
| 2 | 40 | ||
| 3 | * mail/rmail.el (rmail-show-message-1): When displaying a mime message, | 41 | * mail/rmail.el (rmail-show-message-1): When displaying a mime message, |
diff --git a/lisp/desktop.el b/lisp/desktop.el index 3eca5a6a774..4b76052ca21 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -1468,7 +1468,7 @@ after that many seconds of idle time." | |||
| 1468 | (dolist (record compacted-vars) | 1468 | (dolist (record compacted-vars) |
| 1469 | (let* | 1469 | (let* |
| 1470 | ((var (car record)) | 1470 | ((var (car record)) |
| 1471 | (deser-fun (cl-caddr (assq var desktop-var-serdes-funs)))) | 1471 | (deser-fun (caddr (assq var desktop-var-serdes-funs)))) |
| 1472 | (if deser-fun (set var (funcall deser-fun (cadr record)))))))) | 1472 | (if deser-fun (set var (funcall deser-fun (cadr record)))))))) |
| 1473 | result)))) | 1473 | result)))) |
| 1474 | 1474 | ||
diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 84dfd4f1ebf..d759160d10d 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el | |||
| @@ -612,7 +612,7 @@ This function assumes that the events can be stored in a string." | |||
| 612 | ((eq (car ev) 'switch-frame)) | 612 | ((eq (car ev) 'switch-frame)) |
| 613 | ((equal ev '(menu-bar)) | 613 | ((equal ev '(menu-bar)) |
| 614 | (push 'menu-bar result)) | 614 | (push 'menu-bar result)) |
| 615 | ((equal (cl-cadadr ev) '(menu-bar)) | 615 | ((equal (cadadr ev) '(menu-bar)) |
| 616 | (push (vector 'menu-bar (car ev)) result)) | 616 | (push (vector 'menu-bar (car ev)) result)) |
| 617 | ;; It would be nice to do pop-up menus, too, but not enough | 617 | ;; It would be nice to do pop-up menus, too, but not enough |
| 618 | ;; info is recorded in macros to make this possible. | 618 | ;; info is recorded in macros to make this possible. |
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 10651cc29bd..3ee5e0416c0 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el | |||
| @@ -385,8 +385,8 @@ Signal an error if X is not a list." | |||
| 385 | (null x) | 385 | (null x) |
| 386 | (signal 'wrong-type-argument (list 'listp x 'x)))) | 386 | (signal 'wrong-type-argument (list 'listp x 'x)))) |
| 387 | 387 | ||
| 388 | (cl--defalias 'cl-third 'cl-caddr "Return the third element of the list X.") | 388 | (cl--defalias 'cl-third 'caddr "Return the third element of the list X.") |
| 389 | (cl--defalias 'cl-fourth 'cl-cadddr "Return the fourth element of the list X.") | 389 | (cl--defalias 'cl-fourth 'cadddr "Return the fourth element of the list X.") |
| 390 | 390 | ||
| 391 | (defsubst cl-fifth (x) | 391 | (defsubst cl-fifth (x) |
| 392 | "Return the fifth element of the list X." | 392 | "Return the fifth element of the list X." |
| @@ -418,126 +418,159 @@ Signal an error if X is not a list." | |||
| 418 | (declare (gv-setter (lambda (store) `(setcar (nthcdr 9 ,x) ,store)))) | 418 | (declare (gv-setter (lambda (store) `(setcar (nthcdr 9 ,x) ,store)))) |
| 419 | (nth 9 x)) | 419 | (nth 9 x)) |
| 420 | 420 | ||
| 421 | (defun cl-caaar (x) | 421 | (defun caaar (x) |
| 422 | "Return the `car' of the `car' of the `car' of X." | 422 | "Return the `car' of the `car' of the `car' of X." |
| 423 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 423 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 424 | (car (car (car x)))) | 424 | (car (car (car x)))) |
| 425 | 425 | ||
| 426 | (defun cl-caadr (x) | 426 | (defun caadr (x) |
| 427 | "Return the `car' of the `car' of the `cdr' of X." | 427 | "Return the `car' of the `car' of the `cdr' of X." |
| 428 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 428 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 429 | (car (car (cdr x)))) | 429 | (car (car (cdr x)))) |
| 430 | 430 | ||
| 431 | (defun cl-cadar (x) | 431 | (defun cadar (x) |
| 432 | "Return the `car' of the `cdr' of the `car' of X." | 432 | "Return the `car' of the `cdr' of the `car' of X." |
| 433 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 433 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 434 | (car (cdr (car x)))) | 434 | (car (cdr (car x)))) |
| 435 | 435 | ||
| 436 | (defun cl-caddr (x) | 436 | (defun caddr (x) |
| 437 | "Return the `car' of the `cdr' of the `cdr' of X." | 437 | "Return the `car' of the `cdr' of the `cdr' of X." |
| 438 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 438 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 439 | (car (cdr (cdr x)))) | 439 | (car (cdr (cdr x)))) |
| 440 | 440 | ||
| 441 | (defun cl-cdaar (x) | 441 | (defun cdaar (x) |
| 442 | "Return the `cdr' of the `car' of the `car' of X." | 442 | "Return the `cdr' of the `car' of the `car' of X." |
| 443 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 443 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 444 | (cdr (car (car x)))) | 444 | (cdr (car (car x)))) |
| 445 | 445 | ||
| 446 | (defun cl-cdadr (x) | 446 | (defun cdadr (x) |
| 447 | "Return the `cdr' of the `car' of the `cdr' of X." | 447 | "Return the `cdr' of the `car' of the `cdr' of X." |
| 448 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 448 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 449 | (cdr (car (cdr x)))) | 449 | (cdr (car (cdr x)))) |
| 450 | 450 | ||
| 451 | (defun cl-cddar (x) | 451 | (defun cddar (x) |
| 452 | "Return the `cdr' of the `cdr' of the `car' of X." | 452 | "Return the `cdr' of the `cdr' of the `car' of X." |
| 453 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 453 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 454 | (cdr (cdr (car x)))) | 454 | (cdr (cdr (car x)))) |
| 455 | 455 | ||
| 456 | (defun cl-cdddr (x) | 456 | (defun cdddr (x) |
| 457 | "Return the `cdr' of the `cdr' of the `cdr' of X." | 457 | "Return the `cdr' of the `cdr' of the `cdr' of X." |
| 458 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 458 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 459 | (cdr (cdr (cdr x)))) | 459 | (cdr (cdr (cdr x)))) |
| 460 | 460 | ||
| 461 | (defun cl-caaaar (x) | 461 | (defun caaaar (x) |
| 462 | "Return the `car' of the `car' of the `car' of the `car' of X." | 462 | "Return the `car' of the `car' of the `car' of the `car' of X." |
| 463 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 463 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 464 | (car (car (car (car x))))) | 464 | (car (car (car (car x))))) |
| 465 | 465 | ||
| 466 | (defun cl-caaadr (x) | 466 | (defun caaadr (x) |
| 467 | "Return the `car' of the `car' of the `car' of the `cdr' of X." | 467 | "Return the `car' of the `car' of the `car' of the `cdr' of X." |
| 468 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 468 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 469 | (car (car (car (cdr x))))) | 469 | (car (car (car (cdr x))))) |
| 470 | 470 | ||
| 471 | (defun cl-caadar (x) | 471 | (defun caadar (x) |
| 472 | "Return the `car' of the `car' of the `cdr' of the `car' of X." | 472 | "Return the `car' of the `car' of the `cdr' of the `car' of X." |
| 473 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 473 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 474 | (car (car (cdr (car x))))) | 474 | (car (car (cdr (car x))))) |
| 475 | 475 | ||
| 476 | (defun cl-caaddr (x) | 476 | (defun caaddr (x) |
| 477 | "Return the `car' of the `car' of the `cdr' of the `cdr' of X." | 477 | "Return the `car' of the `car' of the `cdr' of the `cdr' of X." |
| 478 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 478 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 479 | (car (car (cdr (cdr x))))) | 479 | (car (car (cdr (cdr x))))) |
| 480 | 480 | ||
| 481 | (defun cl-cadaar (x) | 481 | (defun cadaar (x) |
| 482 | "Return the `car' of the `cdr' of the `car' of the `car' of X." | 482 | "Return the `car' of the `cdr' of the `car' of the `car' of X." |
| 483 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 483 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 484 | (car (cdr (car (car x))))) | 484 | (car (cdr (car (car x))))) |
| 485 | 485 | ||
| 486 | (defun cl-cadadr (x) | 486 | (defun cadadr (x) |
| 487 | "Return the `car' of the `cdr' of the `car' of the `cdr' of X." | 487 | "Return the `car' of the `cdr' of the `car' of the `cdr' of X." |
| 488 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 488 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 489 | (car (cdr (car (cdr x))))) | 489 | (car (cdr (car (cdr x))))) |
| 490 | 490 | ||
| 491 | (defun cl-caddar (x) | 491 | (defun caddar (x) |
| 492 | "Return the `car' of the `cdr' of the `cdr' of the `car' of X." | 492 | "Return the `car' of the `cdr' of the `cdr' of the `car' of X." |
| 493 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 493 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 494 | (car (cdr (cdr (car x))))) | 494 | (car (cdr (cdr (car x))))) |
| 495 | 495 | ||
| 496 | (defun cl-cadddr (x) | 496 | (defun cadddr (x) |
| 497 | "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X." | 497 | "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X." |
| 498 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 498 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 499 | (car (cdr (cdr (cdr x))))) | 499 | (car (cdr (cdr (cdr x))))) |
| 500 | 500 | ||
| 501 | (defun cl-cdaaar (x) | 501 | (defun cdaaar (x) |
| 502 | "Return the `cdr' of the `car' of the `car' of the `car' of X." | 502 | "Return the `cdr' of the `car' of the `car' of the `car' of X." |
| 503 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 503 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 504 | (cdr (car (car (car x))))) | 504 | (cdr (car (car (car x))))) |
| 505 | 505 | ||
| 506 | (defun cl-cdaadr (x) | 506 | (defun cdaadr (x) |
| 507 | "Return the `cdr' of the `car' of the `car' of the `cdr' of X." | 507 | "Return the `cdr' of the `car' of the `car' of the `cdr' of X." |
| 508 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 508 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 509 | (cdr (car (car (cdr x))))) | 509 | (cdr (car (car (cdr x))))) |
| 510 | 510 | ||
| 511 | (defun cl-cdadar (x) | 511 | (defun cdadar (x) |
| 512 | "Return the `cdr' of the `car' of the `cdr' of the `car' of X." | 512 | "Return the `cdr' of the `car' of the `cdr' of the `car' of X." |
| 513 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 513 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 514 | (cdr (car (cdr (car x))))) | 514 | (cdr (car (cdr (car x))))) |
| 515 | 515 | ||
| 516 | (defun cl-cdaddr (x) | 516 | (defun cdaddr (x) |
| 517 | "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X." | 517 | "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X." |
| 518 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 518 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 519 | (cdr (car (cdr (cdr x))))) | 519 | (cdr (car (cdr (cdr x))))) |
| 520 | 520 | ||
| 521 | (defun cl-cddaar (x) | 521 | (defun cddaar (x) |
| 522 | "Return the `cdr' of the `cdr' of the `car' of the `car' of X." | 522 | "Return the `cdr' of the `cdr' of the `car' of the `car' of X." |
| 523 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 523 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 524 | (cdr (cdr (car (car x))))) | 524 | (cdr (cdr (car (car x))))) |
| 525 | 525 | ||
| 526 | (defun cl-cddadr (x) | 526 | (defun cddadr (x) |
| 527 | "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X." | 527 | "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X." |
| 528 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 528 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 529 | (cdr (cdr (car (cdr x))))) | 529 | (cdr (cdr (car (cdr x))))) |
| 530 | 530 | ||
| 531 | (defun cl-cdddar (x) | 531 | (defun cdddar (x) |
| 532 | "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X." | 532 | "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X." |
| 533 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 533 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 534 | (cdr (cdr (cdr (car x))))) | 534 | (cdr (cdr (cdr (car x))))) |
| 535 | 535 | ||
| 536 | (defun cl-cddddr (x) | 536 | (defun cddddr (x) |
| 537 | "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X." | 537 | "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X." |
| 538 | (declare (compiler-macro cl--compiler-macro-cXXr)) | 538 | (declare (compiler-macro cl--compiler-macro-cXXr)) |
| 539 | (cdr (cdr (cdr (cdr x))))) | 539 | (cdr (cdr (cdr (cdr x))))) |
| 540 | 540 | ||
| 541 | ;; Generate aliases cl-cXXr for all the above defuns, and mark them obsolete. | ||
| 542 | (eval-when-compile | ||
| 543 | (defun gen-cXXr--rawname (n bits) | ||
| 544 | "Generate and return a string like \"adad\" corresponding to N. | ||
| 545 | BITS is the number of a's and d's. | ||
| 546 | The \"corresponding\" means each bit of N is converted to an \"a\" (for zero) | ||
| 547 | or a \"d\" (for one)." | ||
| 548 | (let ((name (make-string bits ?a)) | ||
| 549 | (mask (lsh 1 (1- bits))) | ||
| 550 | (elt 0)) | ||
| 551 | (while (< elt bits) | ||
| 552 | (if (/= (logand n mask) 0) | ||
| 553 | (aset name elt ?d)) | ||
| 554 | (setq elt (1+ elt) | ||
| 555 | mask (lsh mask -1))) | ||
| 556 | name)) | ||
| 557 | |||
| 558 | (defmacro gen-cXXr-all-cl-aliases (bits) | ||
| 559 | "Generate cl- aliases for all defuns `c[ad]+r' with BITS a's and d's. | ||
| 560 | Also mark the aliases as obsolete." | ||
| 561 | `(progn | ||
| 562 | ,@(mapcar | ||
| 563 | (lambda (n) | ||
| 564 | (let* ((raw (gen-cXXr--rawname n bits)) | ||
| 565 | (old (intern (concat "cl-c" raw "r"))) | ||
| 566 | (new (intern (concat "c" raw "r")))) | ||
| 567 | `(progn (defalias ',old ',new) | ||
| 568 | (make-obsolete ',old ',new "25.1")))) | ||
| 569 | (number-sequence 0 (1- (lsh 1 bits))))))) | ||
| 570 | |||
| 571 | (gen-cXXr-all-cl-aliases 3) | ||
| 572 | (gen-cXXr-all-cl-aliases 4) | ||
| 573 | |||
| 541 | ;;(defun last* (x &optional n) | 574 | ;;(defun last* (x &optional n) |
| 542 | ;; "Returns the last link in the list LIST. | 575 | ;; "Returns the last link in the list LIST. |
| 543 | ;;With optional argument N, returns Nth-to-last link (default 1)." | 576 | ;;With optional argument N, returns Nth-to-last link (default 1)." |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index f8ddc00c3bf..fa6a4bc3a72 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -70,6 +70,9 @@ | |||
| 70 | (setq form `(cons ,(car args) ,form))) | 70 | (setq form `(cons ,(car args) ,form))) |
| 71 | form)) | 71 | form)) |
| 72 | 72 | ||
| 73 | ;; Note: `cl--compiler-macro-cXXr' has been copied to | ||
| 74 | ;; `internal--compiler-macro-cXXr' in subr.el. If you amend either | ||
| 75 | ;; one, you may want to amend the other, too. | ||
| 73 | ;;;###autoload | 76 | ;;;###autoload |
| 74 | (defun cl--compiler-macro-cXXr (form x) | 77 | (defun cl--compiler-macro-cXXr (form x) |
| 75 | (let* ((head (car form)) | 78 | (let* ((head (car form)) |
| @@ -500,7 +503,7 @@ its argument list allows full Common Lisp conventions." | |||
| 500 | (while (and (eq (car args) '&aux) (pop args)) | 503 | (while (and (eq (car args) '&aux) (pop args)) |
| 501 | (while (and args (not (memq (car args) cl--lambda-list-keywords))) | 504 | (while (and args (not (memq (car args) cl--lambda-list-keywords))) |
| 502 | (if (consp (car args)) | 505 | (if (consp (car args)) |
| 503 | (if (and cl--bind-enquote (cl-cadar args)) | 506 | (if (and cl--bind-enquote (cadar args)) |
| 504 | (cl--do-arglist (caar args) | 507 | (cl--do-arglist (caar args) |
| 505 | `',(cadr (pop args))) | 508 | `',(cadr (pop args))) |
| 506 | (cl--do-arglist (caar args) (cadr (pop args)))) | 509 | (cl--do-arglist (caar args) (cadr (pop args)))) |
| @@ -584,7 +587,7 @@ its argument list allows full Common Lisp conventions." | |||
| 584 | (if (eq ?_ (aref name 0)) | 587 | (if (eq ?_ (aref name 0)) |
| 585 | (setq name (substring name 1))) | 588 | (setq name (substring name 1))) |
| 586 | (intern (format ":%s" name))))) | 589 | (intern (format ":%s" name))))) |
| 587 | (varg (if (consp (car arg)) (cl-cadar arg) (car arg))) | 590 | (varg (if (consp (car arg)) (cadar arg) (car arg))) |
| 588 | (def (if (cdr arg) (cadr arg) | 591 | (def (if (cdr arg) (cadr arg) |
| 589 | ;; The ordering between those two or clauses is | 592 | ;; The ordering between those two or clauses is |
| 590 | ;; irrelevant, since in practice only one of the two | 593 | ;; irrelevant, since in practice only one of the two |
| @@ -1188,10 +1191,10 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1188 | (if (memq (car cl--loop-args) '(downto above)) | 1191 | (if (memq (car cl--loop-args) '(downto above)) |
| 1189 | (error "Must specify `from' value for downward cl-loop")) | 1192 | (error "Must specify `from' value for downward cl-loop")) |
| 1190 | (let* ((down (or (eq (car cl--loop-args) 'downfrom) | 1193 | (let* ((down (or (eq (car cl--loop-args) 'downfrom) |
| 1191 | (memq (cl-caddr cl--loop-args) | 1194 | (memq (caddr cl--loop-args) |
| 1192 | '(downto above)))) | 1195 | '(downto above)))) |
| 1193 | (excl (or (memq (car cl--loop-args) '(above below)) | 1196 | (excl (or (memq (car cl--loop-args) '(above below)) |
| 1194 | (memq (cl-caddr cl--loop-args) | 1197 | (memq (caddr cl--loop-args) |
| 1195 | '(above below)))) | 1198 | '(above below)))) |
| 1196 | (start (and (memq (car cl--loop-args) | 1199 | (start (and (memq (car cl--loop-args) |
| 1197 | '(from upfrom downfrom)) | 1200 | '(from upfrom downfrom)) |
| @@ -1291,7 +1294,7 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1291 | (temp-idx | 1294 | (temp-idx |
| 1292 | (if (eq (car cl--loop-args) 'using) | 1295 | (if (eq (car cl--loop-args) 'using) |
| 1293 | (if (and (= (length (cadr cl--loop-args)) 2) | 1296 | (if (and (= (length (cadr cl--loop-args)) 2) |
| 1294 | (eq (cl-caadr cl--loop-args) 'index)) | 1297 | (eq (caadr cl--loop-args) 'index)) |
| 1295 | (cadr (cl--pop2 cl--loop-args)) | 1298 | (cadr (cl--pop2 cl--loop-args)) |
| 1296 | (error "Bad `using' clause")) | 1299 | (error "Bad `using' clause")) |
| 1297 | (make-symbol "--cl-idx--")))) | 1300 | (make-symbol "--cl-idx--")))) |
| @@ -1323,8 +1326,8 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1323 | (other | 1326 | (other |
| 1324 | (if (eq (car cl--loop-args) 'using) | 1327 | (if (eq (car cl--loop-args) 'using) |
| 1325 | (if (and (= (length (cadr cl--loop-args)) 2) | 1328 | (if (and (= (length (cadr cl--loop-args)) 2) |
| 1326 | (memq (cl-caadr cl--loop-args) hash-types) | 1329 | (memq (caadr cl--loop-args) hash-types) |
| 1327 | (not (eq (cl-caadr cl--loop-args) word))) | 1330 | (not (eq (caadr cl--loop-args) word))) |
| 1328 | (cadr (cl--pop2 cl--loop-args)) | 1331 | (cadr (cl--pop2 cl--loop-args)) |
| 1329 | (error "Bad `using' clause")) | 1332 | (error "Bad `using' clause")) |
| 1330 | (make-symbol "--cl-var--")))) | 1333 | (make-symbol "--cl-var--")))) |
| @@ -1386,8 +1389,8 @@ For more details, see Info node `(cl)Loop Facility'. | |||
| 1386 | (other | 1389 | (other |
| 1387 | (if (eq (car cl--loop-args) 'using) | 1390 | (if (eq (car cl--loop-args) 'using) |
| 1388 | (if (and (= (length (cadr cl--loop-args)) 2) | 1391 | (if (and (= (length (cadr cl--loop-args)) 2) |
| 1389 | (memq (cl-caadr cl--loop-args) key-types) | 1392 | (memq (caadr cl--loop-args) key-types) |
| 1390 | (not (eq (cl-caadr cl--loop-args) word))) | 1393 | (not (eq (caadr cl--loop-args) word))) |
| 1391 | (cadr (cl--pop2 cl--loop-args)) | 1394 | (cadr (cl--pop2 cl--loop-args)) |
| 1392 | (error "Bad `using' clause")) | 1395 | (error "Bad `using' clause")) |
| 1393 | (make-symbol "--cl-var--")))) | 1396 | (make-symbol "--cl-var--")))) |
| @@ -1611,7 +1614,7 @@ If BODY is `setq', then use SPECS for assignments rather than for bindings." | |||
| 1611 | (let ((temps nil) (new nil)) | 1614 | (let ((temps nil) (new nil)) |
| 1612 | (when par | 1615 | (when par |
| 1613 | (let ((p specs)) | 1616 | (let ((p specs)) |
| 1614 | (while (and p (or (symbolp (car-safe (car p))) (null (cl-cadar p)))) | 1617 | (while (and p (or (symbolp (car-safe (car p))) (null (cadar p)))) |
| 1615 | (setq p (cdr p))) | 1618 | (setq p (cdr p))) |
| 1616 | (when p | 1619 | (when p |
| 1617 | (setq par nil) | 1620 | (setq par nil) |
| @@ -1686,7 +1689,7 @@ such that COMBO is equivalent to (and . CLAUSES)." | |||
| 1686 | (setq clauses (cons (nconc (butlast (car clauses)) | 1689 | (setq clauses (cons (nconc (butlast (car clauses)) |
| 1687 | (if (eq (car-safe (cadr clauses)) | 1690 | (if (eq (car-safe (cadr clauses)) |
| 1688 | 'progn) | 1691 | 'progn) |
| 1689 | (cl-cdadr clauses) | 1692 | (cdadr clauses) |
| 1690 | (list (cadr clauses)))) | 1693 | (list (cadr clauses)))) |
| 1691 | (cddr clauses))) | 1694 | (cddr clauses))) |
| 1692 | ;; A final (progn ,@A t) is moved outside of the `and'. | 1695 | ;; A final (progn ,@A t) is moved outside of the `and'. |
| @@ -1828,7 +1831,7 @@ from OBARRAY. | |||
| 1828 | (let (,(car spec)) | 1831 | (let (,(car spec)) |
| 1829 | (mapatoms #'(lambda (,(car spec)) ,@body) | 1832 | (mapatoms #'(lambda (,(car spec)) ,@body) |
| 1830 | ,@(and (cadr spec) (list (cadr spec)))) | 1833 | ,@(and (cadr spec) (list (cadr spec)))) |
| 1831 | ,(cl-caddr spec)))) | 1834 | ,(caddr spec)))) |
| 1832 | 1835 | ||
| 1833 | ;;;###autoload | 1836 | ;;;###autoload |
| 1834 | (defmacro cl-do-all-symbols (spec &rest body) | 1837 | (defmacro cl-do-all-symbols (spec &rest body) |
| @@ -2105,9 +2108,9 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...). | |||
| 2105 | ;; FIXME: For N bindings, this will traverse `body' N times! | 2108 | ;; FIXME: For N bindings, this will traverse `body' N times! |
| 2106 | (macroexpand-all (macroexp-progn body) | 2109 | (macroexpand-all (macroexp-progn body) |
| 2107 | (cons (list (symbol-name (caar bindings)) | 2110 | (cons (list (symbol-name (caar bindings)) |
| 2108 | (cl-cadar bindings)) | 2111 | (cadar bindings)) |
| 2109 | macroexpand-all-environment)))) | 2112 | macroexpand-all-environment)))) |
| 2110 | (if (or (null (cdar bindings)) (cl-cddar bindings)) | 2113 | (if (or (null (cdar bindings)) (cddar bindings)) |
| 2111 | (macroexp--warn-and-return | 2114 | (macroexp--warn-and-return |
| 2112 | (format "Malformed `cl-symbol-macrolet' binding: %S" | 2115 | (format "Malformed `cl-symbol-macrolet' binding: %S" |
| 2113 | (car bindings)) | 2116 | (car bindings)) |
| @@ -2216,7 +2219,7 @@ values. For compatibility, (cl-values A B C) is a synonym for (list A B C). | |||
| 2216 | ((and (eq (car-safe spec) 'warn) (boundp 'byte-compile-warnings)) | 2219 | ((and (eq (car-safe spec) 'warn) (boundp 'byte-compile-warnings)) |
| 2217 | (while (setq spec (cdr spec)) | 2220 | (while (setq spec (cdr spec)) |
| 2218 | (if (consp (car spec)) | 2221 | (if (consp (car spec)) |
| 2219 | (if (eq (cl-cadar spec) 0) | 2222 | (if (eq (cadar spec) 0) |
| 2220 | (byte-compile-disable-warning (caar spec)) | 2223 | (byte-compile-disable-warning (caar spec)) |
| 2221 | (byte-compile-enable-warning (caar spec))))))) | 2224 | (byte-compile-enable-warning (caar spec))))))) |
| 2222 | nil) | 2225 | nil) |
| @@ -2660,9 +2663,9 @@ non-nil value, that slot cannot be set via `setf'. | |||
| 2660 | (t `(and (consp cl-x) | 2663 | (t `(and (consp cl-x) |
| 2661 | (memq (nth ,pos cl-x) ,tag-symbol)))))) | 2664 | (memq (nth ,pos cl-x) ,tag-symbol)))))) |
| 2662 | pred-check (and pred-form (> safety 0) | 2665 | pred-check (and pred-form (> safety 0) |
| 2663 | (if (and (eq (cl-caadr pred-form) 'vectorp) | 2666 | (if (and (eq (caadr pred-form) 'vectorp) |
| 2664 | (= safety 1)) | 2667 | (= safety 1)) |
| 2665 | (cons 'and (cl-cdddr pred-form)) | 2668 | (cons 'and (cdddr pred-form)) |
| 2666 | `(,predicate cl-x)))) | 2669 | `(,predicate cl-x)))) |
| 2667 | (let ((pos 0) (descp descs)) | 2670 | (let ((pos 0) (descp descs)) |
| 2668 | (while descp | 2671 | (while descp |
| @@ -3090,14 +3093,14 @@ macro that returns its `&whole' argument." | |||
| 3090 | cl-fifth cl-sixth cl-seventh | 3093 | cl-fifth cl-sixth cl-seventh |
| 3091 | cl-eighth cl-ninth cl-tenth | 3094 | cl-eighth cl-ninth cl-tenth |
| 3092 | cl-rest cl-endp cl-plusp cl-minusp | 3095 | cl-rest cl-endp cl-plusp cl-minusp |
| 3093 | cl-caaar cl-caadr cl-cadar | 3096 | caaar caadr cadar |
| 3094 | cl-caddr cl-cdaar cl-cdadr | 3097 | caddr cdaar cdadr |
| 3095 | cl-cddar cl-cdddr cl-caaaar | 3098 | cddar cdddr caaaar |
| 3096 | cl-caaadr cl-caadar cl-caaddr | 3099 | caaadr caadar caaddr |
| 3097 | cl-cadaar cl-cadadr cl-caddar | 3100 | cadaar cadadr caddar |
| 3098 | cl-cadddr cl-cdaaar cl-cdaadr | 3101 | cadddr cdaaar cdaadr |
| 3099 | cl-cdadar cl-cdaddr cl-cddaar | 3102 | cdadar cdaddr cddaar |
| 3100 | cl-cddadr cl-cdddar cl-cddddr)) | 3103 | cddadr cdddar cddddr)) |
| 3101 | (put y 'side-effect-free t)) | 3104 | (put y 'side-effect-free t)) |
| 3102 | 3105 | ||
| 3103 | ;;; Things that are inline. | 3106 | ;;; Things that are inline. |
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 5da1cea6bb3..be7b6f4022a 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el | |||
| @@ -259,30 +259,6 @@ | |||
| 259 | copy-list | 259 | copy-list |
| 260 | ldiff | 260 | ldiff |
| 261 | list* | 261 | list* |
| 262 | cddddr | ||
| 263 | cdddar | ||
| 264 | cddadr | ||
| 265 | cddaar | ||
| 266 | cdaddr | ||
| 267 | cdadar | ||
| 268 | cdaadr | ||
| 269 | cdaaar | ||
| 270 | cadddr | ||
| 271 | caddar | ||
| 272 | cadadr | ||
| 273 | cadaar | ||
| 274 | caaddr | ||
| 275 | caadar | ||
| 276 | caaadr | ||
| 277 | caaaar | ||
| 278 | cdddr | ||
| 279 | cddar | ||
| 280 | cdadr | ||
| 281 | cdaar | ||
| 282 | caddr | ||
| 283 | cadar | ||
| 284 | caadr | ||
| 285 | caaar | ||
| 286 | tenth | 262 | tenth |
| 287 | ninth | 263 | ninth |
| 288 | eighth | 264 | eighth |
| @@ -397,7 +373,7 @@ lexical closures as in Common Lisp. | |||
| 397 | (macroexpand-all | 373 | (macroexpand-all |
| 398 | `(cl-symbol-macrolet | 374 | `(cl-symbol-macrolet |
| 399 | ,(mapcar (lambda (x) | 375 | ,(mapcar (lambda (x) |
| 400 | `(,(car x) (symbol-value ,(cl-caddr x)))) | 376 | `(,(car x) (symbol-value ,(caddr x)))) |
| 401 | vars) | 377 | vars) |
| 402 | ,@body) | 378 | ,@body) |
| 403 | (cons (cons 'function #'cl--function-convert) | 379 | (cons (cons 'function #'cl--function-convert) |
| @@ -410,20 +386,20 @@ lexical closures as in Common Lisp. | |||
| 410 | ;; dynamic scoping, since with lexical scoping we'd need | 386 | ;; dynamic scoping, since with lexical scoping we'd need |
| 411 | ;; (let ((foo <val>)) ...foo...). | 387 | ;; (let ((foo <val>)) ...foo...). |
| 412 | `(progn | 388 | `(progn |
| 413 | ,@(mapcar (lambda (x) `(defvar ,(cl-caddr x))) vars) | 389 | ,@(mapcar (lambda (x) `(defvar ,(caddr x))) vars) |
| 414 | (let ,(mapcar (lambda (x) (list (cl-caddr x) (cadr x))) vars) | 390 | (let ,(mapcar (lambda (x) (list (caddr x) (cadr x))) vars) |
| 415 | ,(cl-sublis (mapcar (lambda (x) | 391 | ,(cl-sublis (mapcar (lambda (x) |
| 416 | (cons (cl-caddr x) | 392 | (cons (caddr x) |
| 417 | `',(cl-caddr x))) | 393 | `',(caddr x))) |
| 418 | vars) | 394 | vars) |
| 419 | ebody))) | 395 | ebody))) |
| 420 | `(let ,(mapcar (lambda (x) | 396 | `(let ,(mapcar (lambda (x) |
| 421 | (list (cl-caddr x) | 397 | (list (caddr x) |
| 422 | `(make-symbol ,(format "--%s--" (car x))))) | 398 | `(make-symbol ,(format "--%s--" (car x))))) |
| 423 | vars) | 399 | vars) |
| 424 | (setf ,@(apply #'append | 400 | (setf ,@(apply #'append |
| 425 | (mapcar (lambda (x) | 401 | (mapcar (lambda (x) |
| 426 | (list `(symbol-value ,(cl-caddr x)) (cadr x))) | 402 | (list `(symbol-value ,(caddr x)) (cadr x))) |
| 427 | vars))) | 403 | vars))) |
| 428 | ,ebody)))) | 404 | ,ebody)))) |
| 429 | 405 | ||
diff --git a/lisp/frameset.el b/lisp/frameset.el index 17fe39be844..adff85332a8 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el | |||
| @@ -809,7 +809,7 @@ For the description of FORCE-ONSCREEN, see `frameset-restore'. | |||
| 809 | When forced onscreen, frames wider than the monitor's workarea are converted | 809 | When forced onscreen, frames wider than the monitor's workarea are converted |
| 810 | to fullwidth, and frames taller than the workarea are converted to fullheight. | 810 | to fullwidth, and frames taller than the workarea are converted to fullheight. |
| 811 | NOTE: This only works for non-iconified frames." | 811 | NOTE: This only works for non-iconified frames." |
| 812 | (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) | 812 | (pcase-let* ((`(,left ,top ,width ,height) (cdadr (frame-monitor-attributes frame))) |
| 813 | (right (+ left width -1)) | 813 | (right (+ left width -1)) |
| 814 | (bottom (+ top height -1)) | 814 | (bottom (+ top height -1)) |
| 815 | (fr-left (frameset-compute-pos (frame-parameter frame 'left) left right)) | 815 | (fr-left (frameset-compute-pos (frame-parameter frame 'left) left right)) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 8bd1e469650..837fbaeea2c 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -2162,7 +2162,7 @@ If optional arg SILENT is non-nil, do not display progress messages." | |||
| 2162 | (eq ibuffer-always-show-last-buffer | 2162 | (eq ibuffer-always-show-last-buffer |
| 2163 | :nomini) | 2163 | :nomini) |
| 2164 | (minibufferp (cadr bufs))) | 2164 | (minibufferp (cadr bufs))) |
| 2165 | (cl-caddr bufs) | 2165 | (caddr bufs) |
| 2166 | (cadr bufs)) | 2166 | (cadr bufs)) |
| 2167 | (ibuffer-current-buffers-with-marks bufs) | 2167 | (ibuffer-current-buffers-with-marks bufs) |
| 2168 | ibuffer-display-maybe-show-predicates))) | 2168 | ibuffer-display-maybe-show-predicates))) |
| @@ -2194,7 +2194,7 @@ If optional arg SILENT is non-nil, do not display progress messages." | |||
| 2194 | (require 'ibuf-ext)) | 2194 | (require 'ibuf-ext)) |
| 2195 | (let* ((sortdat (assq ibuffer-sorting-mode | 2195 | (let* ((sortdat (assq ibuffer-sorting-mode |
| 2196 | ibuffer-sorting-functions-alist)) | 2196 | ibuffer-sorting-functions-alist)) |
| 2197 | (func (cl-caddr sortdat))) | 2197 | (func (caddr sortdat))) |
| 2198 | (let ((result | 2198 | (let ((result |
| 2199 | ;; actually sort the buffers | 2199 | ;; actually sort the buffers |
| 2200 | (if (and sortdat func) | 2200 | (if (and sortdat func) |
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index ea674434a2f..d841187df0f 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el | |||
| @@ -644,7 +644,7 @@ by using `Footnote-back-to-message'." | |||
| 644 | (interactive "*P") | 644 | (interactive "*P") |
| 645 | (let ((num | 645 | (let ((num |
| 646 | (if footnote-text-marker-alist | 646 | (if footnote-text-marker-alist |
| 647 | (if (< (point) (cl-cadar (last footnote-pointer-marker-alist))) | 647 | (if (< (point) (cadar (last footnote-pointer-marker-alist))) |
| 648 | (Footnote-make-hole) | 648 | (Footnote-make-hole) |
| 649 | (1+ (caar (last footnote-text-marker-alist)))) | 649 | (1+ (caar (last footnote-text-marker-alist)))) |
| 650 | 1))) | 650 | 1))) |
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index b2c1ba883a4..4f63374a9b6 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -869,7 +869,7 @@ association to the service from D-Bus." | |||
| 869 | ;; Service. | 869 | ;; Service. |
| 870 | (string-equal service (cadr e)) | 870 | (string-equal service (cadr e)) |
| 871 | ;; Non-empty object path. | 871 | ;; Non-empty object path. |
| 872 | (cl-caddr e) | 872 | (caddr e) |
| 873 | (throw :found t))))) | 873 | (throw :found t))))) |
| 874 | dbus-registered-objects-table) | 874 | dbus-registered-objects-table) |
| 875 | nil)))) | 875 | nil)))) |
| @@ -1474,7 +1474,7 @@ name of the property, and its value. If there are no properties, | |||
| 1474 | bus service path dbus-interface-properties | 1474 | bus service path dbus-interface-properties |
| 1475 | "GetAll" :timeout 500 interface) | 1475 | "GetAll" :timeout 500 interface) |
| 1476 | result) | 1476 | result) |
| 1477 | (add-to-list 'result (cons (car dict) (cl-caadr dict)) 'append))))) | 1477 | (add-to-list 'result (cons (car dict) (caadr dict)) 'append))))) |
| 1478 | 1478 | ||
| 1479 | (defun dbus-register-property | 1479 | (defun dbus-register-property |
| 1480 | (bus service path interface property access value | 1480 | (bus service path interface property access value |
| @@ -1672,7 +1672,7 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow." | |||
| 1672 | (if (cadr entry2) | 1672 | (if (cadr entry2) |
| 1673 | ;; "sv". | 1673 | ;; "sv". |
| 1674 | (dolist (entry3 (cadr entry2)) | 1674 | (dolist (entry3 (cadr entry2)) |
| 1675 | (setcdr entry3 (cl-caadr entry3))) | 1675 | (setcdr entry3 (caadr entry3))) |
| 1676 | (setcdr entry2 nil))))) | 1676 | (setcdr entry2 nil))))) |
| 1677 | 1677 | ||
| 1678 | ;; Fallback: collect the information. Slooow! | 1678 | ;; Fallback: collect the information. Slooow! |
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index 0e54d841d57..ec0914d636b 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el | |||
| @@ -174,7 +174,7 @@ LOCATION is used as the phone location for BBDB." | |||
| 174 | (condition-case err | 174 | (condition-case err |
| 175 | (setq phone-list (bbdb-parse-phone-number phone)) | 175 | (setq phone-list (bbdb-parse-phone-number phone)) |
| 176 | (error | 176 | (error |
| 177 | (if (string= "phone number unparsable." (eudc-cadr err)) | 177 | (if (string= "phone number unparsable." (cadr err)) |
| 178 | (if (not (y-or-n-p (format "BBDB claims %S to be unparsable--insert anyway? " phone))) | 178 | (if (not (y-or-n-p (format "BBDB claims %S to be unparsable--insert anyway? " phone))) |
| 179 | (error "Phone number unparsable") | 179 | (error "Phone number unparsable") |
| 180 | (setq phone-list (list (bbdb-string-trim phone)))) | 180 | (setq phone-list (list (bbdb-string-trim phone)))) |
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index cf5d13fce88..ada9eae813e 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el | |||
| @@ -105,18 +105,6 @@ | |||
| 105 | ;; attribute name | 105 | ;; attribute name |
| 106 | (defvar eudc-protocol-has-default-query-attributes nil) | 106 | (defvar eudc-protocol-has-default-query-attributes nil) |
| 107 | 107 | ||
| 108 | (defun eudc-cadr (obj) | ||
| 109 | (car (cdr obj))) | ||
| 110 | |||
| 111 | (defun eudc-cdar (obj) | ||
| 112 | (cdr (car obj))) | ||
| 113 | |||
| 114 | (defun eudc-caar (obj) | ||
| 115 | (car (car obj))) | ||
| 116 | |||
| 117 | (defun eudc-cdaar (obj) | ||
| 118 | (cdr (car (car obj)))) | ||
| 119 | |||
| 120 | (defun eudc-plist-member (plist prop) | 108 | (defun eudc-plist-member (plist prop) |
| 121 | "Return t if PROP has a value specified in PLIST." | 109 | "Return t if PROP has a value specified in PLIST." |
| 122 | (if (not (= 0 (% (length plist) 2))) | 110 | (if (not (= 0 (% (length plist) 2))) |
| @@ -555,10 +543,10 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'." | |||
| 555 | 543 | ||
| 556 | ;; Search for multiple records | 544 | ;; Search for multiple records |
| 557 | (while (and rec | 545 | (while (and rec |
| 558 | (not (listp (eudc-cdar rec)))) | 546 | (not (listp (cdar rec)))) |
| 559 | (setq rec (cdr rec))) | 547 | (setq rec (cdr rec))) |
| 560 | 548 | ||
| 561 | (if (null (eudc-cdar rec)) | 549 | (if (null (cdar rec)) |
| 562 | (list record) ; No duplicate attrs in this record | 550 | (list record) ; No duplicate attrs in this record |
| 563 | (mapc (function | 551 | (mapc (function |
| 564 | (lambda (field) | 552 | (lambda (field) |
| @@ -590,7 +578,7 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'." | |||
| 590 | ((eq 'first method) | 578 | ((eq 'first method) |
| 591 | (setq result | 579 | (setq result |
| 592 | (eudc-add-field-to-records (cons (car field) | 580 | (eudc-add-field-to-records (cons (car field) |
| 593 | (eudc-cadr field)) | 581 | (cadr field)) |
| 594 | result))) | 582 | result))) |
| 595 | ((eq 'concat method) | 583 | ((eq 'concat method) |
| 596 | (setq result | 584 | (setq result |
| @@ -710,7 +698,7 @@ If ERROR is non-nil, report an error if there is none." | |||
| 710 | (let ((result (eudc-query (list (cons 'name name)) '(email))) | 698 | (let ((result (eudc-query (list (cons 'name name)) '(email))) |
| 711 | email) | 699 | email) |
| 712 | (if (null (cdr result)) | 700 | (if (null (cdr result)) |
| 713 | (setq email (eudc-cdaar result)) | 701 | (setq email (cdaar result)) |
| 714 | (error "Multiple match--use the query form")) | 702 | (error "Multiple match--use the query form")) |
| 715 | (if error | 703 | (if error |
| 716 | (if email | 704 | (if email |
| @@ -728,7 +716,7 @@ If ERROR is non-nil, report an error if there is none." | |||
| 728 | (let ((result (eudc-query (list (cons 'name name)) '(phone))) | 716 | (let ((result (eudc-query (list (cons 'name name)) '(phone))) |
| 729 | phone) | 717 | phone) |
| 730 | (if (null (cdr result)) | 718 | (if (null (cdr result)) |
| 731 | (setq phone (eudc-cdaar result)) | 719 | (setq phone (cdaar result)) |
| 732 | (error "Multiple match--use the query form")) | 720 | (error "Multiple match--use the query form")) |
| 733 | (if error | 721 | (if error |
| 734 | (if phone | 722 | (if phone |
| @@ -765,8 +753,8 @@ otherwise a list of symbols is returned." | |||
| 765 | ;; If the same attribute appears more than once, merge | 753 | ;; If the same attribute appears more than once, merge |
| 766 | ;; the corresponding values | 754 | ;; the corresponding values |
| 767 | (while query-alist | 755 | (while query-alist |
| 768 | (setq key (eudc-caar query-alist) | 756 | (setq key (caar query-alist) |
| 769 | val (eudc-cdar query-alist) | 757 | val (cdar query-alist) |
| 770 | cell (assq key query)) | 758 | cell (assq key query)) |
| 771 | (if cell | 759 | (if cell |
| 772 | (setcdr cell (concat (cdr cell) " " val)) | 760 | (setcdr cell (concat (cdr cell) " " val)) |
| @@ -863,7 +851,7 @@ see `eudc-inline-expansion-servers'" | |||
| 863 | (catch 'found | 851 | (catch 'found |
| 864 | ;; Loop on the servers | 852 | ;; Loop on the servers |
| 865 | (while servers | 853 | (while servers |
| 866 | (eudc-set-server (eudc-caar servers) (eudc-cdar servers) t) | 854 | (eudc-set-server (caar servers) (cdar servers) t) |
| 867 | 855 | ||
| 868 | ;; Determine which formats apply in the query-format list | 856 | ;; Determine which formats apply in the query-format list |
| 869 | (setq query-formats | 857 | (setq query-formats |
| @@ -1047,14 +1035,14 @@ queries the server for the existing fields and displays a corresponding form." | |||
| 1047 | (point)) | 1035 | (point)) |
| 1048 | (setq set-server-p t)) | 1036 | (setq set-server-p t)) |
| 1049 | ((and (eq (car sexp) 'setq) | 1037 | ((and (eq (car sexp) 'setq) |
| 1050 | (eq (eudc-cadr sexp) 'eudc-server-hotlist)) | 1038 | (eq (cadr sexp) 'eudc-server-hotlist)) |
| 1051 | (delete-region (save-excursion | 1039 | (delete-region (save-excursion |
| 1052 | (backward-sexp) | 1040 | (backward-sexp) |
| 1053 | (point)) | 1041 | (point)) |
| 1054 | (point)) | 1042 | (point)) |
| 1055 | (setq set-hotlist-p t)) | 1043 | (setq set-hotlist-p t)) |
| 1056 | ((and (eq (car sexp) 'provide) | 1044 | ((and (eq (car sexp) 'provide) |
| 1057 | (equal (eudc-cadr sexp) '(quote eudc-options-file))) | 1045 | (equal (cadr sexp) '(quote eudc-options-file))) |
| 1058 | (setq provide-p t))) | 1046 | (setq provide-p t))) |
| 1059 | (if (and provide-p | 1047 | (if (and provide-p |
| 1060 | set-hotlist-p | 1048 | set-hotlist-p |
diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 1897e0b08bc..15e15e2144d 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el | |||
| @@ -81,7 +81,7 @@ are returned" | |||
| 81 | (eudc-ph-do-request "fields") | 81 | (eudc-ph-do-request "fields") |
| 82 | (if full-records | 82 | (if full-records |
| 83 | (eudc-ph-parse-query-result) | 83 | (eudc-ph-parse-query-result) |
| 84 | (mapcar 'eudc-caar (eudc-ph-parse-query-result)))) | 84 | (mapcar 'caar (eudc-ph-parse-query-result)))) |
| 85 | 85 | ||
| 86 | (defun eudc-ph-parse-query-result (&optional fields) | 86 | (defun eudc-ph-parse-query-result (&optional fields) |
| 87 | "Return a list of alists of key/values from in `eudc-ph-process-buffer'. | 87 | "Return a list of alists of key/values from in `eudc-ph-process-buffer'. |
| @@ -126,9 +126,9 @@ Fields not in FIELDS are discarded." | |||
| 126 | (memq current-key fields)) | 126 | (memq current-key fields)) |
| 127 | (if key | 127 | (if key |
| 128 | (setq record (cons (cons key value) record)) ; New key | 128 | (setq record (cons (cons key value) record)) ; New key |
| 129 | (setcdr (car record) (if (listp (eudc-cdar record)) | 129 | (setcdr (car record) (if (listp (cdar record)) |
| 130 | (append (eudc-cdar record) (list value)) | 130 | (append (cdar record) (list value)) |
| 131 | (list (eudc-cdar record) value)))))))) | 131 | (list (cdar record) value)))))))) |
| 132 | (and (not ignore) | 132 | (and (not ignore) |
| 133 | (or (null fields) | 133 | (or (null fields) |
| 134 | (eq 'all fields) | 134 | (eq 'all fields) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 74d03f59f3d..b418c5192be 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -2148,7 +2148,7 @@ activity. Only run if the buffer is not visible and | |||
| 2148 | (when (and (listp x) (listp (cadr x))) | 2148 | (when (and (listp x) (listp (cadr x))) |
| 2149 | (setcdr x (if (> (length (cdr x)) 1) | 2149 | (setcdr x (if (> (length (cdr x)) 1) |
| 2150 | (rcirc-make-trees (cdr x)) | 2150 | (rcirc-make-trees (cdr x)) |
| 2151 | (setcdr x (list (cl-cdadr x))))))) | 2151 | (setcdr x (list (cdadr x))))))) |
| 2152 | alist))) | 2152 | alist))) |
| 2153 | 2153 | ||
| 2154 | ;;; /commands these are called with 3 args: PROCESS, TARGET, which is | 2154 | ;;; /commands these are called with 3 args: PROCESS, TARGET, which is |
| @@ -2693,7 +2693,7 @@ the only argument." | |||
| 2693 | (defun rcirc-handler-KICK (process sender args _text) | 2693 | (defun rcirc-handler-KICK (process sender args _text) |
| 2694 | (let* ((channel (car args)) | 2694 | (let* ((channel (car args)) |
| 2695 | (nick (cadr args)) | 2695 | (nick (cadr args)) |
| 2696 | (reason (cl-caddr args)) | 2696 | (reason (caddr args)) |
| 2697 | (message (concat nick " " channel " " reason))) | 2697 | (message (concat nick " " channel " " reason))) |
| 2698 | (rcirc-print process sender "KICK" channel message t) | 2698 | (rcirc-print process sender "KICK" channel message t) |
| 2699 | ;; print in private chat buffer if it exists | 2699 | ;; print in private chat buffer if it exists |
| @@ -2777,7 +2777,7 @@ the only argument." | |||
| 2777 | "RPL_AWAY" | 2777 | "RPL_AWAY" |
| 2778 | (let* ((nick (cadr args)) | 2778 | (let* ((nick (cadr args)) |
| 2779 | (rec (assoc-string nick rcirc-nick-away-alist)) | 2779 | (rec (assoc-string nick rcirc-nick-away-alist)) |
| 2780 | (away-message (cl-caddr args))) | 2780 | (away-message (caddr args))) |
| 2781 | (when (or (not rec) | 2781 | (when (or (not rec) |
| 2782 | (not (string= (cdr rec) away-message))) | 2782 | (not (string= (cdr rec) away-message))) |
| 2783 | ;; away message has changed | 2783 | ;; away message has changed |
| @@ -2806,7 +2806,7 @@ the only argument." | |||
| 2806 | (let ((buffer (or (rcirc-get-buffer process (cadr args)) | 2806 | (let ((buffer (or (rcirc-get-buffer process (cadr args)) |
| 2807 | (rcirc-get-temp-buffer-create process (cadr args))))) | 2807 | (rcirc-get-temp-buffer-create process (cadr args))))) |
| 2808 | (with-current-buffer buffer | 2808 | (with-current-buffer buffer |
| 2809 | (setq rcirc-topic (cl-caddr args))))) | 2809 | (setq rcirc-topic (caddr args))))) |
| 2810 | 2810 | ||
| 2811 | (defun rcirc-handler-333 (process sender args _text) | 2811 | (defun rcirc-handler-333 (process sender args _text) |
| 2812 | "333 says who set the topic and when. | 2812 | "333 says who set the topic and when. |
| @@ -2814,16 +2814,16 @@ Not in rfc1459.txt" | |||
| 2814 | (let ((buffer (or (rcirc-get-buffer process (cadr args)) | 2814 | (let ((buffer (or (rcirc-get-buffer process (cadr args)) |
| 2815 | (rcirc-get-temp-buffer-create process (cadr args))))) | 2815 | (rcirc-get-temp-buffer-create process (cadr args))))) |
| 2816 | (with-current-buffer buffer | 2816 | (with-current-buffer buffer |
| 2817 | (let ((setter (cl-caddr args)) | 2817 | (let ((setter (caddr args)) |
| 2818 | (time (current-time-string | 2818 | (time (current-time-string |
| 2819 | (seconds-to-time | 2819 | (seconds-to-time |
| 2820 | (string-to-number (cl-cadddr args)))))) | 2820 | (string-to-number (cadddr args)))))) |
| 2821 | (rcirc-print process sender "TOPIC" (cadr args) | 2821 | (rcirc-print process sender "TOPIC" (cadr args) |
| 2822 | (format "%s (%s on %s)" rcirc-topic setter time)))))) | 2822 | (format "%s (%s on %s)" rcirc-topic setter time)))))) |
| 2823 | 2823 | ||
| 2824 | (defun rcirc-handler-477 (process sender args _text) | 2824 | (defun rcirc-handler-477 (process sender args _text) |
| 2825 | "ERR_NOCHANMODES" | 2825 | "ERR_NOCHANMODES" |
| 2826 | (rcirc-print process sender "477" (cadr args) (cl-caddr args))) | 2826 | (rcirc-print process sender "477" (cadr args) (caddr args))) |
| 2827 | 2827 | ||
| 2828 | (defun rcirc-handler-MODE (process sender args _text) | 2828 | (defun rcirc-handler-MODE (process sender args _text) |
| 2829 | (let ((target (car args)) | 2829 | (let ((target (car args)) |
| @@ -2883,9 +2883,9 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2883 | (dolist (i rcirc-authinfo) | 2883 | (dolist (i rcirc-authinfo) |
| 2884 | (let ((process (rcirc-buffer-process)) | 2884 | (let ((process (rcirc-buffer-process)) |
| 2885 | (server (car i)) | 2885 | (server (car i)) |
| 2886 | (nick (cl-caddr i)) | 2886 | (nick (caddr i)) |
| 2887 | (method (cadr i)) | 2887 | (method (cadr i)) |
| 2888 | (args (cl-cdddr i))) | 2888 | (args (cdddr i))) |
| 2889 | (when (and (string-match server rcirc-server)) | 2889 | (when (and (string-match server rcirc-server)) |
| 2890 | (if (and (memq method '(nickserv chanserv bitlbee)) | 2890 | (if (and (memq method '(nickserv chanserv bitlbee)) |
| 2891 | (string-match nick rcirc-nick)) | 2891 | (string-match nick rcirc-nick)) |
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 45caf7c2339..f7bb91b14f6 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el | |||
| @@ -702,7 +702,7 @@ If there is no such item, return nil." | |||
| 702 | (let ((item-path (secrets-item-path collection item))) | 702 | (let ((item-path (secrets-item-path collection item))) |
| 703 | (unless (secrets-empty-path item-path) | 703 | (unless (secrets-empty-path item-path) |
| 704 | (dbus-byte-array-to-string | 704 | (dbus-byte-array-to-string |
| 705 | (cl-caddr | 705 | (caddr |
| 706 | (dbus-call-method | 706 | (dbus-call-method |
| 707 | :session secrets-service item-path secrets-interface-item | 707 | :session secrets-service item-path secrets-interface-item |
| 708 | "GetSecret" :object-path secrets-session-path)))))) | 708 | "GetSecret" :object-path secrets-session-path)))))) |
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 0258f1e4e4a..8b1b2171d5c 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el | |||
| @@ -322,7 +322,7 @@ Quit current game \\[5x5-quit-game]" | |||
| 322 | (save-excursion | 322 | (save-excursion |
| 323 | (goto-char grid-org) | 323 | (goto-char grid-org) |
| 324 | (beginning-of-line (+ 1 (/ 5x5-y-scale 2))) | 324 | (beginning-of-line (+ 1 (/ 5x5-y-scale 2))) |
| 325 | (let ((solution-grid (cl-cdadr 5x5-solver-output))) | 325 | (let ((solution-grid (cdadr 5x5-solver-output))) |
| 326 | (dotimes (y 5x5-grid-size) | 326 | (dotimes (y 5x5-grid-size) |
| 327 | (save-excursion | 327 | (save-excursion |
| 328 | (forward-char (+ 1 (/ (1+ 5x5-x-scale) 2))) | 328 | (forward-char (+ 1 (/ (1+ 5x5-x-scale) 2))) |
| @@ -747,9 +747,9 @@ Solutions are sorted from least to greatest Hamming weight." | |||
| 747 | ;; The Hamming Weight is computed by matrix reduction | 747 | ;; The Hamming Weight is computed by matrix reduction |
| 748 | ;; with an ad-hoc operator. | 748 | ;; with an ad-hoc operator. |
| 749 | (math-reduce-vec | 749 | (math-reduce-vec |
| 750 | ;; (cl-cadadr '(vec (mod x 2))) => x | 750 | ;; (cadadr '(vec (mod x 2))) => x |
| 751 | (lambda (r x) (+ (if (integerp r) r (cl-cadadr r)) | 751 | (lambda (r x) (+ (if (integerp r) r (cadadr r)) |
| 752 | (cl-cadadr x))) | 752 | (cadadr x))) |
| 753 | solution); car | 753 | solution); car |
| 754 | (5x5-vec-to-grid | 754 | (5x5-vec-to-grid |
| 755 | (calcFunc-arrange solution 5x5-grid-size));cdr | 755 | (calcFunc-arrange solution 5x5-grid-size));cdr |
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index f42ae90f3c8..98a3ae247fe 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el | |||
| @@ -792,8 +792,8 @@ TOTAL is the total number of letters in the ciphertext." | |||
| 792 | (while temp-list | 792 | (while temp-list |
| 793 | (insert (caar temp-list) | 793 | (insert (caar temp-list) |
| 794 | (format "%4d%3d%% " | 794 | (format "%4d%3d%% " |
| 795 | (cl-cadar temp-list) | 795 | (cadar temp-list) |
| 796 | (/ (* 100 (cl-cadar temp-list)) total))) | 796 | (/ (* 100 (cadar temp-list)) total))) |
| 797 | (setq temp-list (nthcdr 4 temp-list))) | 797 | (setq temp-list (nthcdr 4 temp-list))) |
| 798 | (insert ?\n) | 798 | (insert ?\n) |
| 799 | (setq freq-list (cdr freq-list) | 799 | (setq freq-list (cdr freq-list) |
diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index b868db68f30..d2734450593 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el | |||
| @@ -277,7 +277,7 @@ BITS must be of length nrings. Start at START-TIME." | |||
| 277 | ;; Disable display of line and column numbers, for speed. | 277 | ;; Disable display of line and column numbers, for speed. |
| 278 | (line-number-mode nil) (column-number-mode nil)) | 278 | (line-number-mode nil) (column-number-mode nil)) |
| 279 | ;; do it! | 279 | ;; do it! |
| 280 | (hanoi-n bits rings (car poles) (cadr poles) (cl-caddr poles) | 280 | (hanoi-n bits rings (car poles) (cadr poles) (caddr poles) |
| 281 | start-time)) | 281 | start-time)) |
| 282 | (message "Done")) | 282 | (message "Done")) |
| 283 | (setq buffer-read-only t) | 283 | (setq buffer-read-only t) |
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 7f2fd9274f7..64913c2e014 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el | |||
| @@ -663,8 +663,8 @@ that form should be displayed.") | |||
| 663 | (setq tok (cadr tokens)) | 663 | (setq tok (cadr tokens)) |
| 664 | (if (eq (car tokens) 'hif-lparen) | 664 | (if (eq (car tokens) 'hif-lparen) |
| 665 | (if (and (hif-if-valid-identifier-p tok) | 665 | (if (and (hif-if-valid-identifier-p tok) |
| 666 | (eq (cl-caddr tokens) 'hif-rparen)) | 666 | (eq (caddr tokens) 'hif-rparen)) |
| 667 | (setq tokens (cl-cdddr tokens)) | 667 | (setq tokens (cdddr tokens)) |
| 668 | (error "#define followed by non-identifier: %S" tok)) | 668 | (error "#define followed by non-identifier: %S" tok)) |
| 669 | (setq tok (car tokens) | 669 | (setq tok (car tokens) |
| 670 | tokens (cdr tokens)) | 670 | tokens (cdr tokens)) |
| @@ -730,7 +730,7 @@ detecting self-reference." | |||
| 730 | result)) | 730 | result)) |
| 731 | ;; Argument list is nil, direct expansion | 731 | ;; Argument list is nil, direct expansion |
| 732 | (setq rep (hif-expand-token-list | 732 | (setq rep (hif-expand-token-list |
| 733 | (cl-caddr rep) ; Macro's token list | 733 | (caddr rep) ; Macro's token list |
| 734 | tok expand_list)) | 734 | tok expand_list)) |
| 735 | ;; Replace all remaining references immediately | 735 | ;; Replace all remaining references immediately |
| 736 | (setq remains (cl-substitute tok rep remains)) | 736 | (setq remains (cl-substitute tok rep remains)) |
diff --git a/lisp/ses.el b/lisp/ses.el index b0a09fff057..f42b61c20e7 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -1577,7 +1577,7 @@ if the range was altered." | |||
| 1577 | (funcall field (ses-sym-rowcol min)))) | 1577 | (funcall field (ses-sym-rowcol min)))) |
| 1578 | ;; This range has changed size. | 1578 | ;; This range has changed size. |
| 1579 | (setq ses-relocate-return 'range)) | 1579 | (setq ses-relocate-return 'range)) |
| 1580 | `(ses-range ,min ,max ,@(cl-cdddr range))))) | 1580 | `(ses-range ,min ,max ,@(cdddr range))))) |
| 1581 | 1581 | ||
| 1582 | (defun ses-relocate-all (minrow mincol rowincr colincr) | 1582 | (defun ses-relocate-all (minrow mincol rowincr colincr) |
| 1583 | "Alter all cell values, symbols, formulas, and reference-lists to relocate | 1583 | "Alter all cell values, symbols, formulas, and reference-lists to relocate |
diff --git a/lisp/subr.el b/lisp/subr.el index 163a1c419d4..00acdb6541f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -339,20 +339,41 @@ configuration." | |||
| 339 | 339 | ||
| 340 | ;;;; List functions. | 340 | ;;;; List functions. |
| 341 | 341 | ||
| 342 | (defsubst caar (x) | 342 | ;; Note: `internal--compiler-macro-cXXr' was copied from |
| 343 | ;; `cl--compiler-macro-cXXr' in cl-macs.el. If you amend either one, | ||
| 344 | ;; you may want to amend the other, too. | ||
| 345 | (defun internal--compiler-macro-cXXr (form x) | ||
| 346 | (let* ((head (car form)) | ||
| 347 | (n (symbol-name (car form))) | ||
| 348 | (i (- (length n) 2))) | ||
| 349 | (if (not (string-match "c[ad]+r\\'" n)) | ||
| 350 | (if (and (fboundp head) (symbolp (symbol-function head))) | ||
| 351 | (internal--compiler-macro-cXXr (cons (symbol-function head) (cdr form)) | ||
| 352 | x) | ||
| 353 | (error "Compiler macro for cXXr applied to non-cXXr form")) | ||
| 354 | (while (> i (match-beginning 0)) | ||
| 355 | (setq x (list (if (eq (aref n i) ?a) 'car 'cdr) x)) | ||
| 356 | (setq i (1- i))) | ||
| 357 | x))) | ||
| 358 | |||
| 359 | (defun caar (x) | ||
| 343 | "Return the car of the car of X." | 360 | "Return the car of the car of X." |
| 361 | (declare (compiler-macro internal--compiler-macro-cXXr)) | ||
| 344 | (car (car x))) | 362 | (car (car x))) |
| 345 | 363 | ||
| 346 | (defsubst cadr (x) | 364 | (defun cadr (x) |
| 347 | "Return the car of the cdr of X." | 365 | "Return the car of the cdr of X." |
| 366 | (declare (compiler-macro internal--compiler-macro-cXXr)) | ||
| 348 | (car (cdr x))) | 367 | (car (cdr x))) |
| 349 | 368 | ||
| 350 | (defsubst cdar (x) | 369 | (defun cdar (x) |
| 351 | "Return the cdr of the car of X." | 370 | "Return the cdr of the car of X." |
| 371 | (declare (compiler-macro internal--compiler-macro-cXXr)) | ||
| 352 | (cdr (car x))) | 372 | (cdr (car x))) |
| 353 | 373 | ||
| 354 | (defsubst cddr (x) | 374 | (defun cddr (x) |
| 355 | "Return the cdr of the cdr of X." | 375 | "Return the cdr of the cdr of X." |
| 376 | (declare (compiler-macro internal--compiler-macro-cXXr)) | ||
| 356 | (cdr (cdr x))) | 377 | (cdr (cdr x))) |
| 357 | 378 | ||
| 358 | (defun last (list &optional n) | 379 | (defun last (list &optional n) |